/* Tielor McBride — shared styles
   Layout: white editorial pages, oversized grotesk headlines, mono metadata, one teal accent.
   The Archive page flips the same system to black via <html class="dark">. */
:root {
  --paper: #ffffff;
  --paper-rgb: 255, 255, 255;
  --ink: #0b0b0c;
  --mute: #8b8b90;
  --line: #e7e7e9;
  --soft: #f3f3f4;
  --accent: #e0113a;
  --gutter: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
html.dark {
  --paper: #060607;
  --paper-rgb: 6, 6, 7;
  --ink: #f4f4f2;
  --mute: #77777c;
  --line: #232326;
  --soft: #121214;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }
.mute { color: var(--mute); }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- progress + nav ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  background: rgba(var(--paper-rgb), .82);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .4s;
}
.nav.scrolled { border-color: var(--line); }
.brand { font-weight: 600; letter-spacing: -.01em; font-size: 15px; white-space: nowrap; }
.nav ul { display: flex; gap: clamp(14px, 2.4vw, 34px); list-style: none; }
.nav li a { position: relative; padding: 4px 0; color: var(--mute); transition: color .3s; white-space: nowrap; }
.nav li a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform .5s var(--ease);
}
.nav li a:hover, .nav li a.on { color: var(--ink); }
.nav li a:hover::after, .nav li a.on::after { transform: scaleX(1); transform-origin: 0 50%; }

/* ---------- reveal primitives ---------- */
.line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.line > span { display: block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.in .line > span, .line.in > span { transform: none; }
.fade { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.in .fade, .fade.in { opacity: 1; transform: none; }
.rule { height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.3s var(--ease); }
.in .rule, .rule.in { transform: none; }
.d1 { transition-delay: .08s !important; } .d2 { transition-delay: .16s !important; }
.d3 { transition-delay: .24s !important; } .d4 { transition-delay: .32s !important; }
.shot { overflow: hidden; }
.shot > .clip { overflow: hidden; background: var(--soft); clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease); transition-delay: inherit; }
.shot.in > .clip { clip-path: inset(0); }
.shot img, .shot video { width: 100%; transform: scale(1.12); transition: transform 1.6s var(--ease), filter .6s; }
.shot.in img, .shot.in video { transform: none; }

/* ---------- page head ---------- */
.head { padding: clamp(120px, 16vw, 200px) var(--gutter) clamp(30px, 4vw, 56px); }
.head h1 {
  font-weight: 500; font-size: clamp(60px, 13vw, 230px); line-height: .86; letter-spacing: -.055em;
  margin: 18px 0 0 -.04em; text-wrap: balance;
}
.head-meta { display: flex; justify-content: space-between; gap: 20px; padding-top: 14px; margin-top: clamp(28px, 4vw, 52px); }

/* ---------- buttons / links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 99px;
  border: 1px solid var(--ink); transition: background .35s, color .35s;
}
.btn:hover, .btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: transparent; color: var(--ink); }
.btn svg { width: 14px; height: 14px; transition: transform .5s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

/* ---------- HOME ---------- */
.home-hero { padding: clamp(110px, 13vw, 170px) var(--gutter) 0; }
.home-hero h1 {
  font-weight: 500; font-size: clamp(54px, 15.6vw, 300px); line-height: .82; letter-spacing: -.065em;
  margin: 14px 0 0 -.05em;
}
.home-hero h1 .line:nth-child(2) { text-align: right; }
.home-sub { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: clamp(22px, 3vw, 40px) 0; }
.home-sub p { max-width: 34ch; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.35; letter-spacing: -.01em; }
.reel { position: relative; margin-top: 8px; }
.reel .frame { overflow: hidden; clip-path: inset(0 var(--inset, 4vw) 0 var(--inset, 4vw)); will-change: clip-path; background: var(--soft); }
.reel video { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.reel .tag { position: absolute; left: calc(var(--gutter) + 6px); bottom: 18px; color: #fff; mix-blend-mode: difference; }

.statement { padding: clamp(90px, 13vw, 200px) var(--gutter); }
.statement .big { font-size: clamp(28px, 4.6vw, 76px); line-height: 1.04; letter-spacing: -.04em; font-weight: 500; max-width: 20ch; text-wrap: balance; }
.statement .big span { opacity: .14; transition: opacity .35s linear; }
.statement .big span.lit { opacity: 1; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); margin-top: clamp(50px, 7vw, 110px); }
.pillars > div { border-top: 1px solid var(--ink); padding-top: 14px; }
.pillars p { margin-top: 18px; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.45; max-width: 36ch; color: var(--ink); }

.work { padding: 0 var(--gutter) clamp(80px, 10vw, 150px); }
.work-head { display: flex; justify-content: space-between; padding-bottom: 14px; }
.work ol { list-style: none; border-top: 1px solid var(--ink); }
.work li a {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: baseline; gap: 16px;
  padding: clamp(14px, 1.8vw, 26px) 0; border-bottom: 1px solid var(--line);
  transition: padding .6s var(--ease), color .35s;
}
.work li a .t { font-size: clamp(30px, 6.4vw, 112px); font-weight: 500; letter-spacing: -.05em; line-height: .95; }
.work li a .thumb { display: none; }
@media (hover: hover) {
  .work ol:hover li a { color: color-mix(in srgb, var(--ink) 22%, var(--paper)); }
  .work ol li a:hover { color: var(--ink); padding-left: clamp(10px, 2vw, 34px); }
}
.peek {
  position: fixed; left: 0; top: 0; z-index: 30; width: clamp(240px, 30vw, 520px); aspect-ratio: 16 / 10;
  pointer-events: none; overflow: hidden; opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.86);
  transition: opacity .35s, clip-path .6s var(--ease); clip-path: inset(12% 12% 12% 12%); background: var(--soft);
}
.peek.on { opacity: 1; clip-path: inset(0); }
.peek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.peek img.on { opacity: 1; }

.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(16px, 2vw, 28px) 0; }
.marquee .run { display: flex; width: max-content; animation: run 38s linear infinite; }
.marquee span { font-size: clamp(26px, 4vw, 62px); font-weight: 500; letter-spacing: -.04em; white-space: nowrap; padding-right: .5em; }
.marquee span::after { content: "✳"; color: var(--accent); margin-left: .5em; font-size: .55em; vertical-align: .22em; font-weight: 400; }
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- INFO ---------- */
.info { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 110px); padding: 0 var(--gutter) clamp(80px, 10vw, 150px); align-items: start; }
.info .portrait { position: sticky; top: 96px; }
.info .portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.info .portrait:hover img { filter: none; }
.info .lede { font-size: clamp(24px, 3vw, 46px); line-height: 1.08; letter-spacing: -.035em; font-weight: 500; text-wrap: balance; }
.info .body { margin-top: clamp(26px, 3vw, 44px); display: grid; gap: 18px; max-width: 60ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; }
.info .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 3vw, 44px); }
.facts { margin-top: clamp(50px, 6vw, 90px); border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.facts p { font-size: clamp(16px, 1.3vw, 19px); }
.copy { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------- PROJECTS ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 5vw, 84px) clamp(14px, 2vw, 28px); padding: 0 var(--gutter) clamp(80px, 10vw, 150px); }
.grid a:nth-child(even) { margin-top: clamp(40px, 9vw, 150px); }
.card .clip { aspect-ratio: 4 / 3; }
.card img { height: 100%; object-fit: cover; filter: grayscale(1); }
.card:hover img { filter: none; transform: scale(1.04) !important; }
.card-meta { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding-top: 14px; }
.card h2 { font-size: clamp(22px, 2.6vw, 40px); font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.card h2 i { font-style: normal; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease); }
.card:hover h2 i { background-size: 100% 1px; }
@media (hover: none) { .card img, .info .portrait img { filter: none; } }

/* ---------- PROJECT ---------- */
.p-hero { padding: 0 var(--gutter); position: relative; }
.p-hero video, .p-hero img { width: 100%; }
.p-hero video { aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.sound { position: absolute; right: calc(var(--gutter) + 14px); bottom: 14px; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 99px; }
.stack { display: grid; gap: clamp(14px, 2vw, 28px); padding: clamp(14px, 2vw, 28px) var(--gutter) 0; }
.stack figure { cursor: zoom-in; }
.stack figure.l { width: 70%; }
.stack figure.r { width: 70%; justify-self: end; }
.stack figure .clip { min-height: 120px; }
.stack figure.vid { cursor: default; }
.portraits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); padding: clamp(14px, 2vw, 28px) var(--gutter) 0; }
.portraits figure { cursor: zoom-in; }
.jrows { display: grid; gap: clamp(8px, 1.2vw, 16px); padding: clamp(14px, 2vw, 28px) var(--gutter) 0; }
.jrow { display: flex; gap: clamp(8px, 1.2vw, 16px); }
.jrow figure { min-width: 0; cursor: zoom-in; }
.jrow .clip { height: 100%; }
.jrow img { width: 100%; height: 100%; object-fit: cover; }
.portraits .clip { aspect-ratio: 4 / 5; }
.portraits img { height: 100%; object-fit: cover; }
.next { display: block; padding: clamp(80px, 11vw, 170px) var(--gutter) clamp(50px, 6vw, 90px); }
.next .t { display: block; font-size: clamp(44px, 10vw, 170px); font-weight: 500; letter-spacing: -.055em; line-height: .9; margin: 16px 0 0 -.04em; }
.next .t i { font-style: normal; display: inline-block; transition: transform .7s var(--ease); }
.next:hover .t i { transform: translateX(.18em); }

.facts-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 40px); padding: clamp(28px, 4vw, 56px) var(--gutter) 0; }
.facts-row > div { border-top: 1px solid var(--ink); padding-top: 12px; }
.facts-row p { margin-top: 12px; font-size: clamp(16px, 1.5vw, 22px); line-height: 1.25; letter-spacing: -.015em; }
.stats { padding: clamp(60px, 8vw, 120px) var(--gutter) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 40px); padding-top: clamp(22px, 3vw, 40px); }
.stats-grid > div { display: grid; gap: 12px; align-content: start; }
.stats .num { font-size: clamp(34px, 4.7vw, 92px); font-weight: 500; letter-spacing: -.055em; line-height: .9; white-space: nowrap; }
.stats-grid > div:first-child .num { color: var(--accent); }
.stats-note { margin-top: clamp(22px, 3vw, 36px); text-transform: none; letter-spacing: .02em; }
.story { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 90px); padding: clamp(60px, 8vw, 130px) var(--gutter); }
.story > div { border-top: 1px solid var(--ink); padding-top: 12px; }
.story p { margin-top: 18px; font-size: clamp(16px, 1.35vw, 20px); line-height: 1.5; max-width: 58ch; }
.story p + p { margin-top: 12px; }
.services { display: grid; grid-template-columns: minmax(0, .35fr) minmax(0, 1fr); gap: 16px clamp(24px, 5vw, 90px); padding: 0 var(--gutter) clamp(60px, 8vw, 130px); align-items: start; }
.services ul { list-style: none; border-top: 1px solid var(--ink); }
.services li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: clamp(20px, 2.4vw, 36px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.services > span:last-child { grid-column: 2; }

/* ---------- ARCHIVE (black) ---------- */
.a-intro { padding: 0 var(--gutter) clamp(40px, 6vw, 90px); display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.a-intro p { max-width: 38ch; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.35; }
.hscroll { position: relative; }
.hs-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hs-head { position: absolute; left: var(--gutter); right: var(--gutter); top: 84px; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; z-index: 2; pointer-events: none; }
.hs-head h2 { font-size: clamp(34px, 6vw, 104px); font-weight: 500; letter-spacing: -.05em; line-height: .9; }
.hs-track { display: flex; align-items: center; gap: clamp(18px, 3vw, 54px); padding: 0 var(--gutter); width: max-content; will-change: transform; margin-top: 60px; }
.hs-track figure { flex: 0 0 auto; cursor: zoom-in; }
.hs-track figure img { height: 56vh; width: auto; max-width: none; min-width: 26vh; background: var(--soft); filter: grayscale(1) brightness(.82); transition: filter .5s, transform .8s var(--ease); }
.hs-track figure:nth-child(3n+2) img { height: 40vh; }
.hs-track figure:nth-child(3n) img { height: 48vh; }
.hs-track figure:nth-child(odd) { transform: translateY(-3vh); }
.hs-track figure:nth-child(even) { transform: translateY(5vh); }
.hs-track figure:hover img { filter: none; transform: scale(1.02); }
.hs-track figcaption { padding-top: 10px; display: flex; justify-content: space-between; }
.hs-end { flex: 0 0 auto; width: 30vw; display: grid; place-items: center; }
.hs-bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 34px; height: 1px; background: var(--line); }
.hs-bar i { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.hs-hint { position: absolute; right: var(--gutter); bottom: 46px; }

/* ---------- footer ---------- */
footer { padding: 0 var(--gutter) 60px; }
footer .big { display: block; font-weight: 500; font-size: clamp(28px, 6.2vw, 108px); letter-spacing: -.05em; line-height: 1; margin: clamp(30px, 5vw, 70px) 0; overflow-wrap: anywhere; }
footer .big .u { background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 2px no-repeat; transition: background-size .7s var(--ease); }
footer .big:hover .u { background-size: 100% 2px; }
footer .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer .row nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer .row a:hover { color: var(--ink); }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: var(--paper); display: grid; grid-template-rows: auto 1fr auto; padding: 18px var(--gutter); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.lb.open { opacity: 1; visibility: visible; }
.lb .bar { display: flex; justify-content: space-between; align-items: center; }
.lb .stage { display: grid; place-items: center; min-height: 0; padding: 18px 0; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; }

@media (max-width: 860px) {
  .nav ul { gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .nav ul::-webkit-scrollbar { display: none; }
  .nav li a { font-size: 13px; }
  .home-hero h1 .line:nth-child(2) { text-align: left; }
  .home-sub { flex-direction: column; align-items: start; }
  .reel video { aspect-ratio: 4 / 3; }
  .pillars { grid-template-columns: 1fr; }
  .work li a { grid-template-columns: 30px minmax(0, 1fr); }
  .work li a .d { display: none; }
  .info { grid-template-columns: 1fr; }
  .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .story, .services { grid-template-columns: 1fr; }
  .services > span:last-child { grid-column: 1; }
  .info .portrait { position: static; max-width: 420px; }
  .grid { grid-template-columns: 1fr; }
  .grid a:nth-child(even) { margin-top: 0; }
  .stack figure.l, .stack figure.r { width: 100%; }
  .portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jrow { flex-wrap: wrap; }
  .jrow figure { flex-basis: 40% !important; }
  .hs-sticky { position: static; height: auto; display: block; padding: 40px 0 60px; }
  .hs-head { position: static; padding: 0 var(--gutter) 22px; flex-direction: column; gap: 8px; }
  .hs-track { width: auto; overflow-x: auto; margin-top: 0; scrollbar-width: none; transform: none !important; }
  .hs-track::-webkit-scrollbar { display: none; }
  .hs-track figure { transform: none !important; }
  .hs-track figure img { height: 46vh !important; filter: none; }
  .hs-bar, .hs-hint, .hs-end { display: none; }
  .head-meta { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .line > span, .fade, .rule, .shot > .clip, .shot img, .shot video { transition: none !important; transform: none !important; opacity: 1 !important; clip-path: none !important; }
  .marquee .run { animation: none; }
  .statement .big span { opacity: 1; }
  .reel .frame { clip-path: none; }
}

/* archive role write-ups */
.hs-intro { flex: 0 0 auto; width: clamp(260px, 28vw, 440px); align-self: center; padding-right: clamp(10px, 2vw, 30px); }
.hs-intro .mono { display: block; margin-bottom: 16px; }
.hs-intro p { font-size: clamp(15px, 1.15vw, 19px); line-height: 1.5; letter-spacing: -.01em; }
