/* Jared Porter: Archive
   Shares the portfolio's type (Cal Sans + Manrope) and colour family,
   in a darker "catalogue" setting. Era colours tag every piece. */

:root {
  --page: #0c0e11;
  --surface: #14171b;
  --surface-2: #1c2025;
  --ink: #eef1f5;
  --ink-2: #aab2bd;
  --ink-3: #7f8996;
  --line: rgba(238, 241, 245, 0.12);
  --line-2: rgba(238, 241, 245, 0.22);
  --accent: #d8ff3e;

  --era-early: #ffb547;
  --era-dynix: #4fb3ff;
  --era-cell: #ff5fd2;
  --era-hsc: #3ee07a;
  --era-wilson: #9a8cff;
  --era-ux: #d8ff3e;

  --font-display: "Cal Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4.5vw, 72px);
  --max: 1440px;
  --radius: 14px;
  --text-display: clamp(52px, 10.5vw, 168px);
  --text-h2: clamp(34px, 5vw, 72px);
  --text-lede: clamp(19px, 1.7vw, 24px);
  --text-body: clamp(16px, 1.15vw, 18px);
  color-scheme: dark;
}

/* The archive is always dark (cool grays); the portfolio's case studies are the white pages. */


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 var(--text-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.02em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--page); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Draft copy written by Claude, highlighted with ?review (same as the portfolio) */
/* Notes on where content came from: for Jared's review only, hidden from visitors */
body:not(.review) .src { display: none; }
.review .src { background: color-mix(in srgb, var(--era-dynix) 26%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--era-dynix) 26%, transparent); }
.review .draft { background: color-mix(in srgb, var(--era-early) 28%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--era-early) 28%, transparent); }

/* ---------- bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--page) 72%, transparent);
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-display); font-size: 20px; text-decoration: none; letter-spacing: -0.01em; }
.brand-sub { color: var(--ink-3); }
.brand-sep { color: var(--ink-3); }
.bar-nav { margin-left: auto; display: flex; gap: clamp(14px, 2.4vw, 32px); font-size: 15px; }
.bar-nav a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.bar-nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .bar-nav a:not(:first-child) { display: none; } }
@media (max-width: 420px) { .bar-nav { display: none; } }

/* ---------- shared */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { color: var(--ink-3); margin: 0 0 18px; text-transform: uppercase; letter-spacing: .08em; }
.eyebrow a { color: var(--ink-2); text-decoration: none; }
.eyebrow a:hover { color: var(--ink); }
.display {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-display); line-height: .88; letter-spacing: -0.035em; margin: 0;
}
.lede { font-size: var(--text-lede); line-height: 1.45; color: var(--ink-2); max-width: 36ch; margin: 28px 0 0; }
.h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-h2); line-height: .95; letter-spacing: -0.03em; margin: 0; }
.h2-years { font-size: 0.24em; color: var(--ink-3); letter-spacing: .04em; vertical-align: super; margin-left: 6px; }
.section { padding: clamp(64px, 10vw, 150px) 0 0; }
.section-head { display: grid; grid-template-columns: 1fr minmax(0, 420px); gap: 24px 48px; align-items: end; margin-bottom: 32px; }
.section-note { margin: 0; color: var(--ink-3); font-size: 15px; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } }
.badge {
  position: absolute; left: 12px; top: 12px; padding: 5px 9px; border-radius: 99px;
  background: rgba(10, 9, 8, .72); color: #fff; backdrop-filter: blur(8px); font-size: 11px;
}

/* ---------- hero */
.hero { padding: clamp(56px, 12vw, 180px) 0 0; }
.hero .display { background: linear-gradient(100deg, var(--ink) 30%, var(--era-cell) 62%, var(--era-wilson) 78%, var(--era-ux) 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.stats { display: flex; flex-wrap: wrap; gap: 0; margin: clamp(40px, 6vw, 80px) 0 0; border-top: 1px solid var(--line); }
.stats div { flex: 1 1 140px; padding: 18px 20px 0 0; }
.stats dt { color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.stats dd { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(36px, 4.4vw, 64px); letter-spacing: -0.02em; line-height: 1; }

/* ---------- timeline */
.tl { position: relative; }
.tl-axis { position: relative; height: 22px; margin-left: calc(220px + 24px); color: var(--ink-3); font-size: 11px; }
.tl-axis span { position: absolute; transform: translateX(-50%); }
.tl-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tl-row { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto auto; column-gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.tl-label { display: flex; flex-direction: column; }
.tl-name { font-weight: 600; }
.tl-years { color: var(--ink-3); }
.tl-track { position: relative; height: 10px; align-self: center; background: var(--surface); border-radius: 99px; }
.tl-bar { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--era); box-shadow: 0 0 24px color-mix(in srgb, var(--era) 50%, transparent); }
.tl-note { grid-column: 2; margin: 10px 0 0; color: var(--ink-2); font-size: 15px; max-width: 70ch; }
.tl-count { color: var(--era); margin-left: 6px; white-space: nowrap; }
@media (max-width: 720px) {
  .tl-axis { display: none; }
  .tl-row { grid-template-columns: 1fr; }
  .tl-track { margin-top: 10px; }
  .tl-note { grid-column: 1; }
}

/* ---------- words */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); border-top: 1px solid var(--line); padding-top: 28px; }
.principles h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 2.2vw, 34px); line-height: 1; margin: 0 0 14px; letter-spacing: -0.015em; }
.principles p { margin: 0; color: var(--ink-2); }
@media (max-width: 900px) { .principles { grid-template-columns: 1fr; } }
.pull { margin: 0 0 40px; padding-left: clamp(16px, 2vw, 28px); border-left: 3px solid var(--era-cell); }
.pull p { max-width: none; font-family: var(--font-display); font-size: clamp(22px, 3vw, 44px); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 12px; text-wrap: balance; }
.pull p::before { content: "\201C"; color: var(--era-cell); }
.pull p::after { content: "\201D"; color: var(--era-cell); }
.pull cite { font-style: normal; color: var(--ink-3); }

/* ---------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.chip {
  border: 1px solid var(--line-2); background: transparent; border-radius: 99px;
  padding: 7px 14px; font-size: 14px; cursor: pointer; color: var(--ink-2); transition: all .2s;
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }

/* ---------- project cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 28px); }
.card { grid-column: span 4; }
.card-feature { grid-column: span 6; }
@media (max-width: 1000px) { .card, .card-feature { grid-column: span 6; } }
@media (max-width: 600px) { .card, .card-feature { grid-column: span 12; } }
.card a { display: block; text-decoration: none; }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.card-feature .card-media { aspect-ratio: 16 / 9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .4s; }
.card a:hover .card-media img { transform: scale(1.035); }
.card-text { padding: 14px 2px 0; }
.card h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.05; letter-spacing: -0.015em; }
.card-feature h3 { font-size: clamp(26px, 2.6vw, 40px); }
.card-meta { display: flex; gap: 12px; align-items: baseline; margin: 6px 0 0; color: var(--ink-3); font-size: 14px; }
.card-meta span:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--era); margin-right: 8px; }
.is-hidden { display: none !important; }

/* ---------- flash wall */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.tile-btn {
  position: relative; display: flex; flex-direction: column; width: 100%; padding: 0; border: 1px solid var(--line);
  background: var(--surface); border-radius: 10px; cursor: pointer; overflow: hidden; text-align: left;
  transition: border-color .2s, transform .3s cubic-bezier(.2, .7, .2, 1);
}
.tile-btn:hover { border-color: var(--era); transform: translateY(-2px); }
.tile-media { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 14px;
  background: repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--ink) 3%, transparent) 6px 7px), var(--surface-2); }
.tile-media img { max-height: 100%; width: auto; object-fit: contain; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.tile-cap { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; font-size: 14px; }
.tile-cap .mono { color: var(--era); }
.tile-client { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .badge { left: auto; right: 10px; top: 10px; }
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile-media { padding: 8px; }
  .tile-cap { padding: 7px 9px 9px; font-size: 12px; line-height: 1.35; }
  .tile .badge { right: 6px; top: 6px; transform: scale(.85); transform-origin: top right; }
}

/* ---------- viewer */
.viewer { width: min(1180px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--page); color: var(--ink); }
.viewer::backdrop { background: rgba(5, 5, 5, .72); backdrop-filter: blur(6px); }
.viewer-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); }
.viewer-stage { display: grid; place-items: center; min-height: 360px; padding: clamp(16px, 3vw, 40px); background: #050505; }
.viewer-stage img { image-rendering: auto; max-height: 70dvh; width: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.viewer-stage .flash-box { width: 100%; max-height: 72dvh; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.viewer-stage ruffle-player { display: block; width: 100%; height: 100%; }
.tiles > li { display: flex; }
.tile-btn { height: 100%; }
.viewer-info { padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 12px; }
.viewer-id { color: var(--era, var(--accent)); margin: 0; }
.viewer-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 3vw, 40px); line-height: 1; margin: 0; letter-spacing: -0.02em; }
.viewer-meta { color: var(--ink-3); margin: 0; }
.viewer-desc { margin: 4px 0 0; color: var(--ink-2); }
.viewer-note { color: var(--ink-3); font-size: 13px; margin: 0; }
.viewer-nav { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; }
.viewer-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--page); font-size: 22px; cursor: pointer; }
@media (max-width: 760px) {
  .viewer-in { grid-template-columns: 1fr; }
  .viewer-stage { min-height: 220px; }
}
.btn, .btn-ghost { border-radius: 99px; padding: 10px 18px; cursor: pointer; font-weight: 600; font-size: 15px; }
.btn { background: var(--ink); color: var(--page); border: 0; }
.btn:hover { background: var(--accent); color: var(--page); }
.btn-ghost { background: transparent; border: 1px solid var(--line-2); min-width: 48px; }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- project page */
.inner .project { padding-top: clamp(40px, 8vw, 120px); }
.display-project { font-size: clamp(48px, 8.5vw, 136px); }
.spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: clamp(32px, 5vw, 64px) 0 0; border-top: 1px solid var(--line); }
.spec div { padding: 16px 20px 0 0; }
.spec dt { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.spec dd { margin: 6px 0 0; }
.spec ul { list-style: none; margin: 0; padding: 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--era); margin-right: 8px; vertical-align: 1px; }
@media (max-width: 760px) { .spec { grid-template-columns: 1fr 1fr; } }
.films { display: grid; gap: clamp(16px, 2vw, 28px); margin: clamp(40px, 6vw, 80px) 0 0; }
.film { margin: 0; }
.film video, .yt { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #000; object-fit: contain; }
.film figcaption { display: flex; gap: 14px; align-items: baseline; padding: 10px 2px 0; color: var(--ink-3); font-size: 14px; }
.yt { position: relative; display: block; padding: 0; border: 0; cursor: pointer; overflow: hidden; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .3s, transform .6s; }
.yt:hover img { opacity: 1; transform: scale(1.02); }
.yt-play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .16); backdrop-filter: blur(12px); color: #fff; font-size: 28px; border: 1px solid rgba(255, 255, 255, .35); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.project-cover { margin: clamp(40px, 6vw, 80px) 0 0; }
.project-cover img { width: 100%; border-radius: var(--radius); }
.project-body { max-width: 64ch; margin: clamp(40px, 6vw, 80px) 0 0 auto; margin-right: clamp(0px, 8vw, 140px); font-size: clamp(17px, 1.3vw, 20px); color: var(--ink-2); }
.project-body p { margin: 0 0 1.1em; }
.project-body p:first-child { color: var(--ink); font-size: 1.12em; line-height: 1.5; }
.swatches { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.swatches li { display: flex; flex-direction: column; gap: 4px; color: var(--ink); font-size: 15px; }
.swatches span { height: 64px; border-radius: 10px; }
.swatches code { color: var(--ink-3); }
.body-h { font-family: var(--font-display); font-weight: 400; font-size: 1.5em; line-height: 1.1; color: var(--ink); margin: 1.8em 0 .5em; letter-spacing: -0.01em; }
@media (max-width: 820px) { .project-body { margin-right: 0; } }
.gallery { columns: 2; column-gap: clamp(16px, 2vw, 28px); margin: clamp(48px, 7vw, 96px) 0 0; }
.shot { break-inside: avoid; margin: 0 0 clamp(16px, 2vw, 28px); }
.shot img { width: 100%; border-radius: 10px; background: var(--surface); }
@media (max-width: 640px) { .gallery { columns: 1; } }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: clamp(64px, 9vw, 140px) 0 0; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 6px; padding: 24px 0; text-decoration: none; font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 40px); line-height: 1.05; }
.pager a .mono { font-family: var(--font-mono); color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.pager-next { text-align: right; align-items: flex-end; }
.pager a:hover span:last-child { color: var(--era); }

/* ---------- footer */
.foot { margin-top: clamp(80px, 12vw, 180px); border-top: 1px solid var(--line); }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--ink-3); font-size: 14px; }
.foot p { margin: 0; }
.foot a { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- gallery: grouped looks and cropped animations */
.look { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(20px, 4vw, 64px); align-items: start; margin: clamp(56px, 8vw, 110px) 0 0; padding-top: clamp(24px, 3vw, 40px); border-top: 1px solid var(--line); }
.look-text { position: sticky; top: 88px; }
.look-h { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 3vw, 44px); line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 .5em; color: var(--ink); }
.look-n { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--era, var(--ink-3)); margin-bottom: 10px; }
.look-text p { color: var(--ink-2); margin: 0; }
.gallery-look { margin: 0; columns: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: start; }
.gallery-look .shot { margin: 0; }
@media (max-width: 760px) { .look { grid-template-columns: 1fr; } .look-text { position: static; } }
.shot-crop a { display: block; aspect-ratio: var(--crop); overflow: hidden; border-radius: 10px; background: var(--surface); }
.shot-crop img { height: 100%; object-fit: cover; object-position: top; border-radius: 0; }
.shot a.zoom { display: block; cursor: zoom-in; }
.shot a.zoom:focus-visible { outline: 2px solid var(--era, var(--ink)); outline-offset: 4px; border-radius: 12px; }

/* ---------- lightbox */
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.lightbox::backdrop { background: rgba(8, 8, 10, .62); backdrop-filter: blur(18px) saturate(.9); -webkit-backdrop-filter: blur(18px) saturate(.9); }
.lb-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; place-items: center; padding: 72px clamp(16px, 7vw, 96px) 56px; }
.lb-fig { margin: 0; max-width: min(1400px, 100%); }
.lb-fig img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - 128px); border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, .55); background: #111; }
.lb-fig.is-tall img { max-height: none; width: min(100%, 900px); }
.lb-fig.is-crop { width: min(100%, 720px); }
.lb-fig.is-crop .lb-crop { aspect-ratio: var(--crop); overflow: hidden; border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, .55); max-height: calc(100dvh - 128px); }
.lb-fig.is-crop img { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: top; border-radius: 0; box-shadow: none; }
.lb-btn { position: fixed; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(20, 20, 22, .6); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .15s ease, transform .15s ease; }
.lb-btn:hover { background: rgba(255, 255, 255, .18); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lb-close { top: 16px; right: 16px; font-size: 26px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: fixed; top: 28px; left: 20px; z-index: 2; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: rgba(255, 255, 255, .75); }
@media (max-width: 640px) {
  .lb-scroll { padding: 72px 12px 88px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-prev { left: calc(50% - 56px); } .lb-next { right: calc(50% - 56px); }
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] .lb-fig { animation: lb-in .22s ease-out; }
  @keyframes lb-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
}
