/* Layout measurements match the previous site at each breakpoint: 576, 768, 992 and 1200 px. */
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/source-sans-pro-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-pro-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/source-sans-pro-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: italic; font-weight: 700; font-display: swap; src: url("../fonts/source-sans-pro-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: "Dancing Script"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dancing-script-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Mrs Saint Delafield"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/mrs-saint-delafield-latin-400-normal.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: #212529;
  font: 400 16px/1.5 "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: #1d809f; text-decoration: none; }
a:hover { color: #155d74; text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid #1d809f; outline-offset: 2px; }
section:focus { outline: none; }
svg { display: block; }

.container { width: 100%; margin: 0 auto; padding: 0 15px; }

/* Menu */
.menu-toggle, .scroll-to-top {
  position: fixed;
  right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(52, 58, 64, .5);
  color: #fff;
  cursor: pointer;
}
.menu-toggle:hover, .scroll-to-top:hover { background: #343a40; color: #fff; }
.menu-toggle { top: 15px; z-index: 999; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2;
  width: 250px;
  height: 100%;
  border-left: 1px solid rgba(255, 255, 255, .1);
  background: #1d809f;
  transform: translateX(250px);
  visibility: hidden;
  transition: transform .4s ease, visibility .4s;
}
.sidebar.active { transform: none; visibility: visible; }
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar a { display: block; padding: 15px 8px; color: #fff; text-decoration: none; }
.sidebar a:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.sidebar a:focus-visible { outline-color: #fff; outline-offset: -2px; }
.sidebar .sidebar-brand { height: 80px; background: rgba(52, 58, 64, .1); font-size: 19.2px; line-height: 50px; }
.sidebar .sidebar-brand a { padding: 8px; }
.sidebar .sidebar-brand a:hover { background: none; }

/* Hero */
.masthead {
  display: flex;
  position: relative;
  min-height: 480px;
  padding: 128px 0;
  background: url("../img/Maddison%20Tierney_107.jpg") 50% / cover no-repeat;
  background-image: image-set(url("../img/photos/maddison-tierney-107.webp") type("image/webp"), url("../img/Maddison%20Tierney_107.jpg") type("image/jpeg"));
  color: #fff;
  text-align: center;
}
.masthead .container { margin-top: auto; margin-bottom: auto; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
/* The name is 125 px, scaled down only where its longest word wouldn't fit the screen. */
.masthead h1 { margin: 0 0 4px; font: 700 min(125px, calc(28vw - 9px))/1.2 "Dancing Script", cursive; }
.tagline { margin: 0 0 48px; font-size: 28px; font-weight: 700; line-height: 1.2; }
.tagline em { font-size: 23px; }

/* Bio */
.about { padding: 60px 0; background: #f8f9fa; text-align: center; }
.about h2, .portfolio h2 { font-family: "Mrs Saint Delafield", cursive; font-size: 89px; font-weight: 700; }
.about h2 { margin: 0 0 8px; line-height: 1.2; }
.about p { margin: 0 0 78px; font-size: 20px; font-weight: 300; }
.about a { color: #155d74; text-decoration: underline; }

.not-found { margin: 0 0 8px; font-family: "Dancing Script", cursive; font-size: 60px; line-height: 1.2; }

/* Photos */
.portfolio { height: 147px; margin-bottom: 40px; padding: 60px 0; text-align: center; }
.portfolio h2 { margin: 0 0 48px; line-height: 64px; }
.photos { display: grid; grid-template-columns: 1fr; margin: 0 -15px; padding-bottom: 20px; color: #313437; }
.photos a { display: block; min-width: 0; padding: 0 15px 30px; }
.photos img { display: block; width: 100%; height: auto; }

/* Footer */
.footer { padding: 104px 0 80px; text-align: center; }
.social { display: flex; justify-content: center; gap: 11.2px; margin: 0 0 48px; padding: 0; list-style: none; }
.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #1d809f;
  box-shadow: 0 3px 3px 0 rgba(0, 0, 0, .1);
  color: #fff;
  transition: background-color .15s ease-in-out;
}
.social a:hover { background: #155d74; color: #fff; }
.copyright { margin: 0; color: #6c757d; font-size: 12.8px; line-height: 1.5; }

.scroll-to-top {
  bottom: 15px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s, background-color .15s;
}
.scroll-to-top.show { opacity: 1; visibility: visible; }

/* Photo viewer */
.viewer {
  width: fit-content;
  max-width: none;
  max-height: none;
  margin: 50px auto 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: none;
}
.viewer::backdrop { background: rgba(0, 0, 0, .8); }
.viewer-box { position: relative; padding: 4px; border-radius: 4px; background: #fff; }
.viewer-box img {
  display: block;
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 128px);
  border-radius: 3px;
  transition: opacity .3s;
}
.viewer-box img.loading { opacity: 0; }
.viewer-prev, .viewer-next {
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, .8));
}
.viewer-prev { left: 0; width: 34%; }
.viewer-next { right: 0; width: 64%; justify-content: flex-end; }
.viewer-prev:hover, .viewer-next:hover, .viewer-prev:focus-visible, .viewer-next:focus-visible { opacity: 1; }
.viewer-prev[hidden], .viewer-next[hidden] { display: none; }
.viewer-bar { display: flex; justify-content: space-between; width: 0; min-width: 100%; padding: 5px 3px 0; color: #ccc; font-size: 12px; line-height: 1.5; }
#viewer-number { padding-top: 3px; }
.viewer-close { padding: 0; border: 0; background: none; color: #fff; cursor: pointer; opacity: .7; transition: opacity .2s; }
.viewer-close:hover { opacity: 1; }

@media (min-width: 576px) {
  .container { width: 540px; }
  .photos { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .container { width: 720px; }
  .photos { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .container { width: 960px; }
  .masthead { height: 100vh; }
  .about-text { width: calc((100% + 30px) * .83333 - 30px); margin: 0 auto; }
  .photos { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .container { width: 1140px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
