/* Emily Blackwell — portfolio */
@font-face { font-family: "Fraunces"; src: url(../fonts/Fraunces_72pt-Light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(../fonts/Fraunces_72pt-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Urbanist"; src: url(../fonts/Urbanist-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Urbanist"; src: url(../fonts/Urbanist-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #ffffff;
  --ink: #1d1d1d;
  --muted: #8a8a8a;
  --rule: #e7e7e7;
  --tint: #f3efe9;
  --accent: #d6453d;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Urbanist", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 60; }
.skip:focus { left: 1rem; top: 1rem; }

.label { font: 400 .75rem/1.5 var(--sans); color: var(--muted); letter-spacing: .02em; }
.more {
  display: inline-block; color: var(--accent); font: 500 .8125rem/1 var(--sans);
  padding-bottom: 4px; border-bottom: 1px solid currentColor; transition: opacity .2s;
}
.more:hover { opacity: .65; }

/* Header: side / centered name / menu */
.site-head {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1.1rem var(--gutter); border-bottom: 1px solid var(--rule);
}
.head-side { font: 300 1.0625rem/1 var(--serif); justify-self: start; }
.brand { font: 400 1.375rem/1 var(--serif); letter-spacing: -.005em; }
.menu-btn {
  justify-self: end; display: flex; align-items: center; gap: .8rem;
  background: none; border: 0; cursor: pointer; font: 300 1.0625rem/1 var(--serif); padding: .25rem 0;
}
.burger, .burger::before { display: block; width: 22px; height: 1px; background: currentColor; position: relative; transition: transform .3s; }
.burger { margin-top: -5px; }
.burger::before { content: ""; position: absolute; top: 6px; }
.menu-btn[aria-expanded="true"] .burger { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger::before { transform: translateY(-6px) rotate(-90deg); }

.menu {
  position: fixed; inset: 0; z-index: 35; background: #fff; padding: 7rem var(--gutter) 3rem;
  display: flex; align-items: center; justify-content: center;
}
.menu[hidden] { display: none; }
.menu ul { text-align: center; }
.menu li + li { margin-top: .35em; }
.menu a { font: 300 clamp(2rem, 5vw, 3.4rem)/1.2 var(--serif); transition: color .2s; }
.menu a:hover { color: var(--accent); }
body.menu-open { overflow: hidden; }

main { max-width: var(--max); margin: 0 auto; }

/* Hero */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem; padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(3rem, 6vw, 5rem);
}
.hero h1 { font: 300 clamp(2.2rem, 4.6vw, 4.1rem)/1.32 var(--serif); letter-spacing: -.01em; max-width: 14ch; }
.q { color: var(--accent); }
.hero .meta { margin-top: 2.25rem; font-size: .8125rem; color: var(--muted); line-height: 1.8; }
.down { display: inline-block; margin-top: 3rem; transition: transform .3s; }
.down:hover { transform: translateY(4px); }
.hero-art { grid-column: 2; grid-row: 1; align-self: start; margin-top: clamp(4rem, 10vw, 9rem); max-width: 360px; justify-self: center; width: 100%; }

/* Feature: art bleeds to the left edge, text to the right */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-bottom: clamp(4rem, 9vw, 8rem); }
.feature-art { background: var(--tint); padding: clamp(1.5rem, 4vw, 3.5rem); }
.feature-art img { max-height: 78vh; width: auto; margin: 0 auto; }
.feature-text { padding-right: var(--gutter); max-width: 40rem; }
.feature-text h2 { font: 300 clamp(1.8rem, 3vw, 2.5rem)/1.15 var(--serif); margin-bottom: 2rem; }
.split { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.5rem; }
.split p:not(.label) { color: #555; font-size: .9375rem; line-height: 1.75; margin-bottom: 1.5rem; }

/* Series rails */
.series { border-top: 1px solid var(--rule); padding-top: clamp(3rem, 6vw, 5rem); }
.series-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; grid-template-rows: auto auto;
  gap: .75rem 3rem; align-items: end; padding: 0 var(--gutter) clamp(2rem, 4vw, 3rem);
}
.series-head .label { grid-column: 1; }
.series-head h2 { grid-column: 1; grid-row: 2; font: 300 clamp(1.8rem, 3.2vw, 2.7rem)/1.1 var(--serif); }
.series-desc { grid-column: 2; grid-row: 2; font-size: .9375rem; color: #555; max-width: 44ch; }
.rail-ctrl { grid-column: 3; grid-row: 2; display: flex; gap: .5rem; }
.rail-ctrl button {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--rule); background: #fff;
  cursor: pointer; font-size: 1rem; transition: border-color .2s, color .2s;
}
.rail-ctrl button:hover:not(:disabled) { border-color: var(--ink); }
.rail-ctrl button:disabled { opacity: .3; cursor: default; }

.rail {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding-left: var(--gutter); scroll-padding-left: var(--gutter);
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline-offset: -2px; }
.card {
  flex: 0 0 clamp(240px, 24vw, 320px); scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1.75rem 1.5rem 2rem; border-right: 1px solid var(--rule);
}
.card:first-child { border-left: 1px solid var(--rule); }
.card:last-child { margin-right: var(--gutter); }
.card h3 { font: 300 1.2rem/1.25 var(--serif); min-height: 2.5em; display: flex; align-items: center; }
.card-art { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5; background: var(--tint); padding: 1.1rem; margin: .75rem 0 1.1rem; cursor: zoom-in; overflow: hidden; }
.card-art img { max-height: 100%; width: auto; object-fit: contain; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card-art:hover img { transform: scale(1.04); }
.card-meta { font-size: .8125rem; }
.card-meta span { display: block; color: var(--muted); font-size: .75rem; margin-top: .15rem; }
.card .more { margin-top: 1rem; }
#embassies .card-art, #political .card-art, #drawing-board .card-art { aspect-ratio: 1; background: #f6f6f4; }

/* Marquee */
.marquee { display: block; overflow: hidden; border-bottom: 1px solid var(--rule); padding: 1rem 0; margin-top: -1px; }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { font: 300 clamp(1.3rem, 2.2vw, 1.75rem)/1 var(--serif); white-space: nowrap; padding: 0 1.4rem; transition: color .2s; }
.marquee i { color: var(--accent); font-style: normal; font-size: .9rem; align-self: center; }
.marquee:hover span { color: var(--accent); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Commissions */
.artist {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 6vw, 6rem); align-items: center;
  padding: clamp(4rem, 9vw, 8rem) var(--gutter); border-top: 1px solid var(--rule); margin-top: clamp(3rem, 6vw, 5rem);
}
.artist h2 { font: 300 clamp(1.8rem, 3vw, 2.5rem)/1.15 var(--serif); margin: .75rem 0 1.25rem; }
.artist-text p:not(.label) { color: #555; font-size: .9375rem; max-width: 36ch; margin-bottom: 1.75rem; }
.artist-art { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.artist-art a:nth-child(2) { margin-top: 4rem; }
.artist-art a { cursor: zoom-in; background: var(--tint); padding: 1rem; }

/* Contact */
.contact { text-align: center; padding: clamp(4rem, 9vw, 7rem) var(--gutter); border-top: 1px solid var(--rule); }
.contact h2 { font: 300 clamp(2rem, 4vw, 3.2rem)/1.1 var(--serif); text-transform: uppercase; letter-spacing: .02em; }
.contact .sub { margin-top: .75rem; color: var(--muted); font-size: .875rem; }
.contact-card {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; margin: 2.75rem auto 0;
  border: 1px solid var(--rule); text-align: left;
}
.contact-card > div { padding: 1.4rem 1.6rem; }
.contact-card > div + div { border-left: 1px solid var(--rule); }
.contact-card a, .contact-card p:not(.label) { font-size: .875rem; margin-top: .3rem; display: block; overflow-wrap: anywhere; }
.contact-card a:hover { color: var(--accent); }

/* Footer */
.site-foot {
  max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem;
  padding: 1.75rem var(--gutter) 2.25rem; border-top: 1px solid var(--rule); font-size: .75rem; color: var(--muted);
}
.site-foot a:hover { color: var(--accent); }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #fff; color: var(--ink); display: none; grid-template-columns: 4.5rem 1fr 4.5rem; align-items: center;
}
.lightbox[open] { display: grid; animation: fade .3s ease; }
.lightbox::backdrop { background: #fff; }
@keyframes fade { from { opacity: 0; } }
.lb-figure { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4.5rem 0 1.5rem; min-width: 0; }
.lb-img { max-width: 100%; max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; transition: opacity .25s; }
.lb-img.loading { opacity: 0; }
.lb-figure figcaption { margin-top: 1.25rem; display: flex; gap: 1.5rem; align-items: baseline; }
.lb-title { font: 300 1.25rem/1.3 var(--serif); }
.lb-pos { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lightbox button { appearance: none; background: none; border: 0; cursor: pointer; font: 300 1.6rem/1 var(--sans); width: 3rem; height: 3rem; justify-self: center; opacity: .55; transition: opacity .2s, color .2s; }
.lightbox button:hover { opacity: 1; color: var(--accent); }
.lb-close { position: absolute; top: 1rem; right: calc(var(--gutter) - .75rem); font-size: 2rem !important; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { grid-column: 1; grid-row: auto; margin-top: 0; justify-self: end; max-width: 72%; }
  .feature, .artist { grid-template-columns: 1fr; }
  .feature-text { padding: 0 var(--gutter); }
  .series-head { grid-template-columns: 1fr auto; }
  .series-desc { grid-column: 1 / -1; grid-row: 3; }
  .rail-ctrl { grid-column: 2; }
  .contact-card { grid-template-columns: 1fr; }
  .contact-card > div + div { border-left: 0; border-top: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  .site-head { grid-template-columns: auto 1fr; }
  .head-side { display: none; }
  .brand { font-size: 1.2rem; }
  .split { grid-template-columns: 1fr; gap: .5rem; }
  .card { flex-basis: 72vw; }
  .rail-ctrl { display: none; }
  .lightbox { grid-template-columns: 0 1fr 0; }
  .lb-prev, .lb-next { position: absolute; bottom: .75rem; }
  .lb-prev { left: 1rem; } .lb-next { right: 1rem; }
  .lb-figure { padding: 4rem 1rem 4.5rem; }
  .lb-img { max-height: calc(100dvh - 11rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .card-art img, .burger, .burger::before { transition: none; }
}
