/* ------------------------------------------------------------ tokens */
:root {
  --bg: #f4f2ed;
  --surface: #fbfaf7;
  --ink: #151515;
  --muted: #67645e;
  --line: #d9d5cc;
  --accent: #d9381e;
  --accent-ink: #ffffff;
  --shade: rgba(14, 13, 12, .94);

  --display: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --text: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --gap: clamp(6px, .9vw, 12px);
  --row: 300px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11110f; --surface: #1a1917; --ink: #eceae4; --muted: #9a968d;
    --line: #2d2b27; --accent: #ff6247; --accent-ink: #120a08; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11110f; --surface: #1a1917; --ink: #eceae4; --muted: #9a968d;
  --line: #2d2b27; --accent: #ff6247; --accent-ink: #120a08; color-scheme: dark;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1; margin: 0; letter-spacing: -.035em; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow {
  font: 600 .75rem/1 var(--text); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1rem;
}

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.wordmark {
  font: 700 1.2rem/1 var(--display);
  letter-spacing: -.03em; text-decoration: none; white-space: nowrap;
}
.site-nav { display: flex; gap: clamp(14px, 2.2vw, 32px); }
.site-nav a {
  text-decoration: none; font-size: .95rem; font-weight: 500; position: relative; padding-block: 6px;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }
.site-nav a:hover { color: inherit; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; min-height: 46px; padding: 0 1.3em;
  border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--bg);
  font: 600 .95rem/1 var(--text); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.arrow-link { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.arrow-link::after { content: " →"; }

/* ------------------------------------------------------------ home */
.hero {
  display: grid; grid-template-columns: 1fr; gap: clamp(20px, 3vw, 40px);
  padding-top: clamp(40px, 8vw, 112px); padding-bottom: clamp(32px, 5vw, 64px);
}
.hero-name {
  font-size: clamp(3.5rem, 11vw, 10rem); line-height: .88; font-weight: 700; letter-spacing: -.055em;
}
.hero-side { display: grid; gap: 24px; align-content: end; }
.hero-lede { font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.45; max-width: 30ch; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
@media (min-width: 900px) {
  .hero { grid-template-columns: auto minmax(260px, 380px); align-items: end; justify-content: space-between; }
}

.details { display: grid; gap: var(--gap); padding-block: 8px clamp(48px, 7vw, 96px); overflow: hidden; }
.marquee {
  --tile: clamp(120px, 14vw, 190px);
  display: flex; gap: var(--gap); list-style: none; margin: 0; padding: 0; width: max-content;
  animation: slide var(--dur, 70s) linear infinite;
}
.marquee.reverse { animation-direction: reverse; }
.details:hover .marquee { animation-play-state: paused; }
.marquee li { flex: none; width: var(--tile); aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--line); }
.marquee img { width: 100%; height: 100%; object-fit: cover; }
@keyframes slide { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
  .details { overflow-x: auto; }
}

.cards { display: grid; gap: clamp(16px, 2vw, 28px); grid-template-columns: 1fr; padding-bottom: clamp(64px, 9vw, 128px); }
@media (min-width: 800px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { text-decoration: none; display: grid; gap: 14px; }
.card:hover { color: inherit; }
.card-media { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.04); }
.card-text { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-text h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.card-text span { color: var(--muted); font-size: .9rem; }
.card:hover h2 { color: var(--accent); }

.intro { padding-bottom: clamp(72px, 10vw, 140px); }
.intro-text {
  font: 500 clamp(1.5rem, 3.2vw, 2.6rem)/1.2 var(--display); letter-spacing: -.015em;
  max-width: 26ch; margin: 0 0 1.5rem; text-wrap: balance;
}

/* ------------------------------------------------------------ page heads */
.page-head { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(24px, 4vw, 48px); }
.page-title { font-size: clamp(2.75rem, 8vw, 6.5rem); font-weight: 700; letter-spacing: -.05em; line-height: .92; }
.page-intro { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 46ch; margin: 1.25rem 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chips a {
  text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  font-size: .9rem; font-weight: 500; background: var(--surface);
}
.chips a span { color: var(--muted); margin-left: 4px; }
.chips a:hover { border-color: var(--accent); color: var(--ink); }

.group { padding-bottom: clamp(48px, 6vw, 88px); }
.group-title { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 20px; }

/* ------------------------------------------------------------ justified grid */
.j-grid { display: flex; flex-wrap: wrap; gap: var(--gap); }
.j-grid::after { content: ""; flex-grow: 1000000; }
.j-item {
  margin: 0; flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--row));
  min-width: 0;
}
.j-item a { display: block; overflow: hidden; border-radius: 3px; background: var(--line); cursor: zoom-in; }
.j-item img { width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .3s; }
.j-item a:hover img { transform: scale(1.025); }
.j-item figcaption {
  font-size: .875rem; line-height: 1.3; padding-top: 8px; min-height: 2.6em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.j-item figcaption span { color: var(--muted); margin-left: .5em; }
@media (max-width: 1100px) { :root { --row: 240px; } }
@media (max-width: 700px)  { :root { --row: 150px; } }

/* ------------------------------------------------------------ about */
.about { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(64px, 9vw, 128px); }
.about-head { display: flex; align-items: flex-end; gap: clamp(20px, 3vw, 36px); margin-bottom: clamp(32px, 5vw, 56px); }
.headshot { width: clamp(96px, 12vw, 160px); height: auto; border-radius: 6px; filter: grayscale(.15); }
.roles { margin: 14px 0 0; color: var(--muted); font-weight: 500; }
.prose { max-width: 64ch; font-size: clamp(1.05rem, 1.25vw, 1.15rem); }
.prose p { margin: 0 0 1.25em; }
.prose p:first-child { font: 500 clamp(1.15rem, 2vw, 1.55rem)/1.45 var(--display); letter-spacing: -.01em; }
.prose .aside { color: var(--muted); font-size: .95rem; border-top: 1px solid var(--line); padding-top: 1.25em; margin-top: 2em; }

/* ------------------------------------------------------------ contact */
.contact { padding-top: clamp(56px, 10vw, 140px); padding-bottom: clamp(80px, 12vw, 180px); }
.contact .page-title { max-width: 14ch; font-size: clamp(2.6rem, 7vw, 6rem); }
.contact-email { margin: clamp(28px, 4vw, 48px) 0 20px; font: 600 clamp(1.4rem, 4vw, 3rem)/1.1 var(--display); overflow-wrap: anywhere; }
.contact-email a { text-decoration-thickness: 2px; text-underline-offset: .15em; }

/* ------------------------------------------------------------ archive */
.a-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px var(--gap); padding-bottom: 56px; }
.a-item { margin: 0; }
.a-item a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 3px; background: var(--surface); border: 1px solid var(--line); cursor: zoom-in; }
.a-item img { width: 100%; height: 100%; object-fit: cover; }
.a-item figcaption { font-size: .82rem; line-height: 1.35; padding-top: 8px; color: var(--muted); }
.a-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px; padding-bottom: clamp(64px, 9vw, 128px); }
.a-lists h3 { font-size: 1.1rem; margin-bottom: 10px; letter-spacing: -.01em; }
.a-lists ul { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: .95rem; }
.a-lists li { padding: 6px 0; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px; font-size: .9rem; }
.footer-inner { display: grid; gap: 8px 32px; grid-template-columns: 1fr; }
.footer-inner p { margin: 0; }
.footer-name { font: 700 1.1rem/1.2 var(--display); }
.footer-copy, .footer-links a { color: var(--muted); }
@media (min-width: 800px) {
  .footer-inner { grid-template-columns: 1fr auto auto auto; align-items: baseline; }
}

/* ------------------------------------------------------------ lightbox */
.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: var(--shade); color: #f1efe9;
}
.lightbox::backdrop { background: var(--shade); }
.lightbox[open] { display: grid; place-items: center; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.lb-figure { margin: 0; display: grid; justify-items: center; gap: 14px; padding: 64px 72px 56px; max-width: 100%; max-height: 100%; }
.lb-img { max-width: min(100%, 1800px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 2px; }
.lb-caption { font-size: .95rem; text-align: center; min-height: 1.4em; }
.lb-count { position: fixed; top: 18px; left: 22px; margin: 0; font-size: .85rem; color: #a9a59c; font-variant-numeric: tabular-nums; }
.lb-btn {
  position: fixed; width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06); color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: background .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.16); }
.lb-close { top: 10px; right: 12px; font-size: 1.8rem; }
.lb-prev { left: 12px; top: 50%; translate: 0 -50%; }
.lb-next { right: 12px; top: 50%; translate: 0 -50%; }
@media (max-width: 700px) {
  .lb-figure { padding: 60px 8px 96px; }
  .lb-img { max-height: calc(100dvh - 180px); }
  .lb-prev, .lb-next { top: auto; bottom: 18px; translate: none; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
}

/* ------------------------------------------------------------ small screens */
@media (max-width: 700px) {
  .header-inner { flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding-top: 12px; }
  .site-nav { overflow-x: auto; scrollbar-width: none; gap: 14px; justify-content: space-between; padding-bottom: 4px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding-block: 10px; white-space: nowrap; font-size: .875rem; }
  html { scroll-padding-top: 110px; }
  .hero-name { font-size: 19.5vw; }
}
