/* General Sans (Fontshare, ITF Free Font License), self-hosted */
@font-face { font-family: 'General Sans'; src: url('../fonts/general-sans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('../fonts/general-sans-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('../fonts/general-sans-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ivory: #F3EFE7;
  --ink: #15131A;
  --red: #B42318;
  --red-on-dark: #E0483A;
  --stone: #6F685D;
  --stone-on-band: #645D53; /* #6F685D is 4.4:1 on the band; this keeps 4.5:1+ */
  --band: #EAE4D8;
  --body-soft: #4A453E;
  --step-off: #DCD5C8;

  --display: 'Bodoni Moda', serif;
  --body: 'General Sans', system-ui, sans-serif;
  /* Stand-ins: swap for the licensed Porca / Pixeletta files later. */
  --pixel-display: 'Pixelify Sans', sans-serif;
  --pixel-label: 'Silkscreen', monospace;

  --ease: cubic-bezier(.16, .84, .24, 1);
  --gutter: 40px;
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: var(--ink); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, p, ol, ul { margin: 0; }
em { font-style: italic; }

.wrap { max-width: 1400px; margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.red { color: var(--red); }
.on-dark-red { color: var(--red-on-dark); }
.pixel { font-family: var(--pixel-display); letter-spacing: 0; }
.label { font-family: var(--pixel-label); font-size: 12px; font-weight: 400; letter-spacing: .06em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 60;
  background: var(--ink); color: var(--ivory); padding: 0 16px;
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--pixel-label); font-size: 12px;
}
.skip:focus { top: 16px; color: var(--ivory); }

/* Tap targets: every text link in nav/labels gets a 44px hit area */
.main-nav a, .contact-links a, .scroll-cue, .strip-head a, .mark {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration: none;
}

/* ---------- Loading screen ---------- */
.loader {
  display: none;
  position: fixed; inset: 0; z-index: 50;
  background: var(--ink); color: var(--ivory);
  transition: opacity .5s ease;
}
.is-loading .loader, .loader.is-leaving { display: block; }
.loader.is-leaving { opacity: 0; pointer-events: none; }
/* Both pinned in place so the growing counter never nudges anything (no layout shift). */
.loader-name {
  position: absolute; left: var(--gutter); bottom: var(--gutter);
  font-family: var(--display); font-style: italic; font-size: clamp(28px, 6vw, 40px);
}
.loader-pct {
  position: absolute; right: var(--gutter); bottom: var(--gutter);
  width: 2.6em; text-align: left; white-space: nowrap;
  font-family: var(--pixel-display); font-size: clamp(88px, 24vw, 160px); line-height: .8;
}
@media (max-width: 600px) {
  .loader-name { bottom: auto; top: var(--gutter); }
}

/* ---------- Header ---------- */
.site-header {
  padding-top: 20px; padding-bottom: 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--pixel-label); font-size: 12px; letter-spacing: .06em;
}
.mark-svg { display: block; width: 50px; height: 22px; }
.main-nav { display: flex; flex-wrap: wrap; column-gap: 28px; }
@media (max-width: 600px) { .main-nav { column-gap: 18px; } }

.chip {
  font-family: var(--pixel-label); font-size: 12px; letter-spacing: .06em;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background .25s, color .25s;
}
.chip:hover, .chip[aria-pressed="true"] { background: var(--ink); color: var(--ivory); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-top: 72px; padding-bottom: 56px;
  display: flex; flex-direction: column; gap: 20px;
}
.clocks {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-family: var(--pixel-label); font-size: 12px; letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.hero-name { margin-top: 24px; display: flex; flex-direction: column; line-height: .86; font-weight: 400; }
.hero-name .first {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(88px, 14vw, 220px); letter-spacing: -.04em; animation-delay: 150ms;
}
.hero-name .last {
  font-family: var(--pixel-display); font-weight: 500;
  font-size: clamp(56px, 10.4vw, 168px); letter-spacing: -.01em; animation-delay: 350ms;
}
@media (max-width: 480px) {
  .hero-name .last { font-size: 15.4vw; }
}
.thread-line { width: 100%; height: 40px; display: block; }
.hero-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 32px; align-items: end;
}
.hero-build { font-family: var(--display); font-size: clamp(30px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -.01em; }
.build-word { font-family: var(--pixel-display); color: var(--red); }
/* Narrow screens: the longest word wraps to a second line, so reserve it (no layout jump). */
@media (max-width: 700px) { .hero-build { min-height: 2.2em; } }
.hero-intro { max-width: 460px; justify-self: end; font-size: 18px; line-height: 1.55; }
.scroll-cue { align-self: flex-start; gap: 1ch; font-family: var(--pixel-label); font-size: 12px; }

.trail-dot {
  position: absolute; left: 0; top: 0; width: 10px; height: 10px;
  background: var(--red); opacity: 0; pointer-events: none;
}

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: rise 1100ms var(--ease) forwards; }
@keyframes draw { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
.thread { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.8s 800ms ease-in-out forwards; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { display: flex; width: max-content; animation: slide 32s linear infinite; }
@keyframes blink { 50% { opacity: 0; } }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes pop { from { opacity: 0; transform: translateY(.4em); } to { opacity: 1; transform: none; } }
.word { display: inline-block; animation: pop 420ms var(--ease); }
@keyframes bob { 50% { transform: translateY(6px); } }
.bob { display: inline-block; animation: bob 1.6s ease-in-out infinite; }

/* ---------- Ticker ---------- */
.ticker-clip { overflow: hidden; padding: 24px 0; }
.ticker {
  background: var(--ink); color: var(--ivory);
  overflow: hidden; padding: 18px 0;
  transform: rotate(-1.2deg); margin: 0 -20px;
}
.marquee { font-family: var(--pixel-label); font-size: 22px; white-space: nowrap; }
.marquee > span { margin-right: 36px; }
.t-star { color: var(--red-on-dark); }

/* ---------- Project strip ---------- */
.strip-section { padding-top: 88px; display: flex; flex-direction: column; gap: 20px; }
.strip-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.strip {
  list-style: none; margin: 0;
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px var(--gutter) 24px; scroll-padding-left: var(--gutter); scrollbar-width: thin;
}
.strip > li { flex: 0 0 min(360px, 80vw); scroll-snap-align: start; }
.cover {
  aspect-ratio: 4 / 5; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px; text-decoration: none;
  background: var(--ground); color: var(--v-ink);
  border: 1px solid #E2DBCD;
  transition: transform .5s var(--ease);
}
a.cover:hover { color: var(--v-ink); }
.cover:hover { transform: translateY(-8px) rotate(-1deg); }
.cover::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(rgba(21, 19, 26, .22) 1px, transparent 1.4px);
  background-size: 6px 6px; opacity: 0; transition: opacity .4s;
}
.cover:hover::after { opacity: 1; }
.cover-media { position: absolute; inset: 0; z-index: 0; }
.cover-media > img, .cover-media > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover > :not(.cover-media) { position: relative; z-index: 2; }
.cover-meta { font-family: var(--pixel-label); font-size: 11px; color: var(--muted); }
.wordmark { font-family: var(--v-font); font-weight: var(--v-weight, 400); font-size: 48px; line-height: 1; color: var(--v-ink); }
.wordmark svg { vertical-align: middle; }
.logo-clar { margin-right: 6px; }
.logo-tick { margin-right: 8px; }

/* Venture palettes */
.v-forecraft { --ground: #F2EFE8; --v-ink: #2B2925; --muted: #6B665C; --v-font: 'Newsreader', serif; --v-weight: 500; }
.v-clar      { --ground: #F6F5F2; --v-ink: #4F3437; --muted: #6B6A66; --v-font: 'Spectral', serif; --v-weight: 300; }
.v-octavia   { --ground: #F5F2EC; --v-ink: #2C2C2A; --muted: #6B665C; --v-font: 'Cormorant Garamond', serif; --v-weight: 500; }
.v-maison    { --ground: #0A112D; --v-ink: #FFFFFF; --muted: #D4C492; --v-font: 'Playfair Display', serif; --v-weight: 400; }
.v-regula    { --ground: #E9E6DF; --v-ink: #15131A; --muted: #6B665C; --v-font: 'Archivo', sans-serif; --v-weight: 400; }

/* ---------- About ---------- */
.about { padding-top: 96px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 88px; }
.about-intro {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start;
}
@media (max-width: 860px) { .about-intro { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
.about-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 40px; }

/* Portrait: tilted print with a red-thread caption; straightens on hover */
.portrait { margin: 0; max-width: 460px; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.portrait-frame {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  background: var(--band); border: 1px solid #E2DBCD;
  box-shadow: 0 24px 60px rgba(21, 19, 26, .12);
  transform: rotate(-2deg); transition: transform .5s var(--ease);
  display: flex; align-items: center; justify-content: center;
}
.portrait:hover .portrait-frame { transform: rotate(0deg); }
.portrait-frame picture, .portrait-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait figcaption { border-top: 1px solid var(--red); padding-top: 10px; color: var(--stone); }
.stitch { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.bio { display: flex; flex-direction: column; gap: 20px; max-width: 640px; }
.bio p { font-size: 18px; line-height: 1.6; }
.bio .bio-lead { font-family: var(--display); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -.01em; }
.facts { margin: 8px 0 0; border-top: 1px solid var(--ink); }
.facts > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid #CFC7B8; }
.facts dt { font-family: var(--pixel-label); font-size: 12px; letter-spacing: .06em; color: var(--red); padding-top: 3px; }
.facts dd { margin: 0; font-size: 16px; }
.bio-link {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--pixel-label); font-size: 12px; letter-spacing: .06em;
}

/* Scroll-in: bio lines rise one after another once About is in view (JS adds .is-in) */
.js .reveal { opacity: 0; }
.js .is-in .reveal { animation: rise 900ms var(--ease) forwards; }
.js .is-in .reveal:nth-child(2) { animation-delay: 80ms; }
.js .is-in .reveal:nth-child(3) { animation-delay: 160ms; }
.js .is-in .reveal:nth-child(4) { animation-delay: 240ms; }
.js .is-in .reveal:nth-child(5) { animation-delay: 320ms; }
.js .is-in .reveal:nth-child(6) { animation-delay: 400ms; }
.js .is-in .reveal:nth-child(7) { animation-delay: 480ms; }
.about-col { display: flex; flex-direction: column; gap: 12px; }
.about-col p { font-family: var(--display); font-size: 30px; line-height: 1.15; }

/* ---------- How I work ---------- */
.process { padding-top: 40px; }
.process-grid {
  list-style: none; padding: 0; border-top: 1px solid var(--ink);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.process-grid li { display: flex; flex-direction: column; gap: 10px; padding: 28px 24px 28px 0; }
.p-n { font-family: var(--pixel-display); font-size: 44px; color: var(--red); line-height: 1; }
.p-t { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.p-d { font-size: 15px; line-height: 1.5; color: var(--body-soft); }

/* ---------- Work index ---------- */
.work { padding-top: 80px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 32px; }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.work-title { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 8vw, 120px); line-height: .9; letter-spacing: -.03em; }
.work-count { font-family: var(--pixel-display); font-size: .4em; color: var(--red); vertical-align: top; margin-left: 8px; letter-spacing: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.rows { border-bottom: 1px solid var(--ink); }

.row {
  position: relative;
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 180px 200px; gap: 24px; align-items: center;
  padding: 28px 0; border-top: 1px solid var(--ink);
  color: var(--ink); text-decoration: none;
}
.row[hidden] { display: none; }
.row:hover { color: var(--ink); }
.row-no, .row-tags { font-family: var(--pixel-label); font-size: 12px; }
.row-tags { line-height: 1.6; }
.row-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nm {
  font-family: var(--display); font-size: clamp(36px, 4.4vw, 64px); line-height: 1; letter-spacing: -.02em;
  transition: transform .5s var(--ease);
}
.row:hover .nm, .row:focus-visible .nm { transform: translateX(18px); font-style: italic; }
.row-line { font-size: 15px; line-height: 1.5; max-width: 560px; }
.row-stage { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; text-align: right; }
.stage-name { font-family: var(--pixel-display); font-size: 18px; color: var(--red); }
.stage-bar { display: grid; grid-template-columns: repeat(5, 18px); gap: 3px; }
.stage-bar i { height: 8px; background: var(--step-off); }
.stage-bar i.on { background: var(--ink); }
.row-link { font-size: 13px; color: var(--stone); }

.pv {
  position: absolute; right: 220px; top: 50%; z-index: 2;
  width: 300px; height: 220px; padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--ground);
  box-shadow: 0 24px 60px rgba(21, 19, 26, .18);
  transform: translateY(-50%) rotate(-3deg) scale(.92);
  opacity: 0; pointer-events: none;
  transition: opacity .35s, transform .5s var(--ease);
}
.pv .wordmark { font-size: 40px; }
.row:hover .pv, .row:focus-visible .pv { opacity: 1; transform: translateY(-50%) rotate(-3deg) scale(1); }
.swatches { display: flex; gap: 6px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(21, 19, 26, .12); }

@media (max-width: 860px) {
  .row { grid-template-columns: 48px minmax(0, 1fr); }
  .row .hide-s, .row .pv { display: none; }
}

/* ---------- Journal ---------- */
.journal { padding-bottom: 96px; display: flex; flex-direction: column; gap: 12px; }
.journal p { font-family: var(--display); font-size: 30px; line-height: 1.15; }

/* ---------- Contact ---------- */
.contact { background: var(--band); }
.contact-inner { padding-top: 112px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 36px; }
.hello { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 9vw, 140px); line-height: .9; letter-spacing: -.03em; }
.contact-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.ghost {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; max-width: 100%;
  border: 1px solid var(--ink); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; overflow-wrap: anywhere;
  transition: background .3s, color .3s;
}
.ghost:hover { background: var(--ink); color: var(--ivory); }
.contact-links { display: flex; flex-wrap: wrap; column-gap: 24px; font-family: var(--pixel-label); font-size: 12px; }
.contact-links a { text-decoration: underline; }
.footer-line {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  border-top: 1px solid #CFC7B8; padding-top: 20px;
  font-family: var(--pixel-label); font-size: 11px; color: var(--stone-on-band);
}

/* ---------- Pause toggle + reduced motion: stop everything ---------- */
.is-paused .marquee, .is-paused .bob { animation-play-state: paused; }
.is-paused .caret, .is-paused .word { animation: none; }
.is-paused .rise { animation: none; opacity: 1; }
.is-paused .thread { animation: none; stroke-dashoffset: 0; }
.is-paused .trail-dot { display: none; }
.is-paused .nm, .is-paused .pv, .is-paused .cover { transition: none; }
.is-paused .row:hover .nm, .is-paused .row:focus-visible .nm,
.is-paused .cover:hover { transform: none; }
.is-paused .row:hover .pv, .is-paused .row:focus-visible .pv { transform: translateY(-50%) rotate(-3deg); }
html.is-paused { scroll-behavior: auto; }
.is-paused .reveal { animation: none; opacity: 1; }
.is-paused .stitch { display: none; }
.is-paused .portrait-frame { transition: none; }
.is-paused .portrait:hover .portrait-frame { transform: rotate(-2deg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; opacity: 1; }
  .word, .marquee, .caret, .bob { animation: none; }
  .thread { animation: none; stroke-dashoffset: 0; }
  .trail-dot, .loader { display: none !important; }
  .nm, .pv, .cover, .cover::after, .chip, .ghost { transition: none; }
  .row:hover .nm, .row:focus-visible .nm, .cover:hover { transform: none; }
  .row:hover .pv, .row:focus-visible .pv { transform: translateY(-50%) rotate(-3deg); }
  .js .reveal { animation: none; opacity: 1; }
  .stitch { display: none; }
  .portrait-frame { transition: none; }
  .portrait:hover .portrait-frame { transform: rotate(-2deg); }
}
