/* =====================================================================
   Colin Joy Lobo — Portfolio (minimal / editorial, wide layout)
   ===================================================================== */

:root {
  --paper:  #faf9f6;
  --ink:    #1a1a1e;   /* headings */
  --body:   #3a3a42;   /* body copy */
  --muted:  #6b6b74;   /* meta, captions */
  --faint:  #9a9aa2;   /* labels at rest */
  --accent: #b5552f;   /* terracotta */
  --rule:   rgba(26,26,30,.12);
  --rule-2: rgba(26,26,30,.22);
  --card:   #fffefb;
  --wrap:   1200px;
  --ease: cubic-bezier(.16,1,.3,1);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; transition: background-color .45s var(--ease); }
body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}
/* faint paper grain */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
::selection { background: rgba(181,85,47,.20); }
em { font-style: italic; }
strong { font-weight: 600; color: var(--ink); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 60; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 4px; }

/* tabular numerals where numbers carry meaning */
.metrics dt, .metrics-sm dt, .ticker-row, .proj-tags, .proj-no, .note-no,
.sec-label, .top-name, .exp-list dt, kbd { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "kern" 1; }

/* =====================================================================
   LAYOUT — block + inner container
   ===================================================================== */
.block { padding: clamp(56px, 9vw, 120px) 0; }
.inner { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

/* =====================================================================
   TOP BAR
   ===================================================================== */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px clamp(20px, 5vw, 48px);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top-name { font-family: var(--mono); font-size: 13px; color: var(--ink); letter-spacing: .2px; }
.top-name:hover { text-decoration: none; color: var(--accent); }
.top-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 24px); }
.top-nav a { font-family: var(--mono); font-size: 13px; color: var(--muted); position: relative; }
.top-nav a:hover { color: var(--ink); text-decoration: none; }
.top-nav a.active { color: var(--ink); }
.top-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px; background: var(--accent); }
.nav-cta { border: 1px solid var(--rule-2); border-radius: 999px; padding: 7px 15px !important; color: var(--ink) !important; transition: all .2s; }
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; border-color: var(--ink); }
.nav-cta.active::after { display: none; }
.cmdk-hint { display: inline-flex; gap: 3px; background: none; border: none; cursor: pointer; padding: 4px; }
.cmdk-hint kbd, kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; background: rgba(0,0,0,.02); }
.cmdk-hint:hover kbd { color: var(--accent); border-color: var(--accent); }
.theme-toggle { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; display: inline-flex; line-height: 0; transition: color .25s; }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle svg { transition: transform .5s var(--ease); }
[data-theme="dark"] .theme-toggle svg { transform: rotate(180deg); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn { display: inline-flex; align-items: center; gap: 9px; font-family: var(--sans); font-weight: 500; font-size: 15px; padding: 13px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); }
.btn-ghost { border-color: var(--rule-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero { padding-top: clamp(48px, 8vw, 92px); padding-bottom: clamp(30px, 5vw, 60px); }
.avail { font-family: var(--mono); font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 9px; margin-bottom: clamp(40px, 8vw, 90px); }
.dotpulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(181,85,47,.5); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(181,85,47,.5)} 70%{box-shadow:0 0 0 8px rgba(181,85,47,0)} 100%{box-shadow:0 0 0 0 rgba(181,85,47,0)} }

.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 72px); align-items: end; }
.hero-name {
  font-family: var(--serif); font-weight: 350; font-optical-sizing: auto;
  font-variation-settings: 'opsz' 144, 'wght' 360;
  font-size: clamp(58px, 11vw, 150px); line-height: .9; letter-spacing: -.035em; color: var(--ink);
  text-wrap: balance;
}
.hero-name em { font-style: italic; color: var(--accent); font-variation-settings: 'opsz' 144, 'wght' 340; }
.hero-name .dot { color: var(--accent); }
.hero-side { padding-bottom: clamp(6px, 1.5vw, 20px); }
.hero-role { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.4vw, 27px); color: var(--accent); margin-bottom: 18px; }
.hero-lede { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.62; color: var(--body); max-width: 46ch; margin-bottom: 28px; }
.hero-lede .ul { color: var(--ink); border-bottom: 1.5px solid var(--accent); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* =====================================================================
   METRICS STRIP
   ===================================================================== */
.metrics-block { padding-top: clamp(20px,4vw,44px); padding-bottom: clamp(40px,6vw,72px); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 4vw, 50px); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: clamp(28px,4vw,42px) 0; }
.metrics dt { font-family: var(--serif); font-weight: 380; font-size: clamp(38px, 5.5vw, 68px); color: var(--ink); line-height: 1; letter-spacing: -.03em; }
.metrics div:first-child dt { color: var(--accent); }
.metrics dd { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 12px; letter-spacing: .2px; }

/* =====================================================================
   COVER BAND
   ===================================================================== */
.cover-block { padding-top: 0; padding-bottom: clamp(20px,4vw,40px); }
.cover { margin: 0; }
/* living cover — two labelled production clusters side by side, each a flip-wall
   that cycles within its own project's frames */
.cover-stack { position: relative; aspect-ratio: 21 / 9; display: flex; gap: 5px; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #0e0e12; }
.cprod { position: relative; flex: 1; overflow: hidden; }
.cgrid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 5px; perspective: 1400px; }
.cprod-scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(8,8,12,.22) 0%, rgba(8,8,12,0) 24%, rgba(8,8,12,0) 46%, rgba(8,8,12,.82) 100%); }
.cprod-tag { position: absolute; left: clamp(12px,1.6vw,20px); bottom: clamp(12px,1.6vw,20px); z-index: 3; display: flex; align-items: baseline; gap: 9px; font-family: var(--serif); font-weight: 460; font-size: clamp(16px,1.9vw,24px); letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 22px rgba(0,0,0,.6); }
.cprod-tag em { font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: 1px; color: var(--accent); }
.cprod-tag i { font-family: var(--mono); font-style: normal; font-size: 10.5px; letter-spacing: .4px; color: #d9d7cf; opacity: .8; text-transform: uppercase; }
.ctile { position: relative; overflow: hidden; background: #0e0e12; transform-style: preserve-3d; transform: rotateX(0deg); transition: transform .62s cubic-bezier(.7, 0, .25, 1); will-change: transform; }
.ctile.flip { transform: rotateX(-90deg); }
.ctile img { width: 100%; height: 100%; object-fit: cover; display: block; filter: contrast(1.04) saturate(1.03); animation: cdrift 30s ease-in-out infinite alternate; will-change: transform; backface-visibility: hidden; }
.ctile:nth-child(2n) img { animation-duration: 36s; animation-direction: alternate-reverse; }
.ctile:nth-child(3n) img { animation-duration: 42s; }
/* a thin glow line as a tile flips — the "shot wall" feel */
.ctile::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 0 var(--accent); opacity: 0; transition: opacity .4s; }
.ctile.flip::after { opacity: .5; box-shadow: inset 0 0 40px -6px var(--accent); }
@keyframes cdrift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.12) translate(-1.4%, -1.2%); } }
/* cinematic scrim so the label reads */
.cover-grain { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8,8,12,.28) 0%, rgba(8,8,12,0) 26%, rgba(8,8,12,0) 50%, rgba(8,8,12,.74) 100%); }
.cover-data { position: absolute; left: clamp(16px,3vw,30px); bottom: clamp(16px,3vw,28px); z-index: 2; display: flex; flex-direction: column; gap: 7px; max-width: 88%; }
.cd-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: #f4f3ed; opacity: .85; display: inline-flex; align-items: center; gap: 8px; }
.cd-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(181,85,47,.6); animation: pulse 2.4s var(--ease) infinite; }
.cd-stat { font-family: var(--serif); font-weight: 420; font-size: clamp(17px, 2.2vw, 27px); line-height: 1.1; letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.55); }
.cover figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 13px; }
.cover figcaption span { color: var(--accent); margin-right: 8px; }
@media (max-width: 620px) { .cover-stack { aspect-ratio: 16 / 11; flex-direction: column; } .cprod-tag i { display: none; } }
@media (prefers-reduced-motion: reduce) { .ctile, .ctile img { transition: none; animation: none; } }

/* =====================================================================
   TICKER
   ===================================================================== */
.ticker { overflow: hidden; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 14px 0; }
.ticker-row { display: flex; gap: 0; white-space: nowrap; width: max-content; animation: ticker 60s linear infinite; }
.ticker-row span { font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 0 16px; }
.ticker-row i { color: var(--accent); font-style: normal; opacity: .6; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-row { animation: none; } }

/* =====================================================================
   SECTION HEADS
   ===================================================================== */
.sec-head { margin-bottom: clamp(36px, 5vw, 60px); }
.sec-label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); display: block; margin-bottom: 16px; }
.sec-label.centre { text-align: center; }
.sec-head h2 { font-family: var(--serif); font-weight: 380; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.0; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }

/* =====================================================================
   SERVICES
   ===================================================================== */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.svc { position: relative; border: 1px solid var(--rule); border-radius: 10px; padding: clamp(22px,2.4vw,30px); background: var(--card); overflow: hidden; transition: border-color .25s, transform .25s var(--ease); }
.svc:hover { border-color: var(--rule-2); transform: translateY(-3px); }
.svc h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(19px,2vw,23px); color: var(--ink); margin-bottom: 12px; letter-spacing: -.01em; }
.svc p { font-size: 14.5px; line-height: 1.55; color: var(--body); position: relative; z-index: 1; }
.svc-no { position: absolute; right: 14px; bottom: 2px; font-family: var(--serif); font-weight: 400; font-size: 84px; line-height: 1; color: var(--ink); opacity: .06; pointer-events: none; }

/* =====================================================================
   WORK — project cards
   ===================================================================== */
.bento { display: flex; flex-direction: column; gap: 16px; }
.proj { display: grid; grid-template-columns: minmax(0,0.92fr) minmax(0,1.08fr); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--card); transition: border-color .25s; }
.proj:hover { border-color: var(--rule-2); }
.proj.wide { grid-template-columns: 1fr; }
.proj-info { padding: clamp(24px,2.6vw,40px); border-right: 1px solid var(--rule); }
.proj.rev .proj-info { order: 2; border-right: none; border-left: 1px solid var(--rule); }
.proj.wide .proj-info { border-right: none; border-bottom: 1px solid var(--rule); }
.proj-media { padding: clamp(20px,2.2vw,32px); display: flex; flex-direction: column; justify-content: center; gap: 18px; background: color-mix(in srgb, var(--ink) 1.6%, transparent); position: relative; }
.proj.rev .proj-media { order: 1; }
.proj-media > .fig, .proj-media > div, .proj-media > .fig-cap { margin: 0; }
.proj-media.as-link { text-decoration: none; }
.proj-media.as-link img { transition: filter .3s var(--ease); }
.proj-media.as-link:hover img { filter: brightness(.92); }
.media-open { position: absolute; right: 16px; bottom: 16px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--paper); background: color-mix(in srgb, var(--ink) 78%, transparent); backdrop-filter: blur(4px); padding: 6px 12px; border-radius: 999px; opacity: .9; transition: opacity .25s var(--ease), background .25s; pointer-events: none; z-index: 2; }
.proj-media.as-link:hover .media-open,
.proj-media:hover .media-open { opacity: 1; background: var(--accent); }

/* project group labels (segregated) */
.group-label { display: flex; align-items: baseline; gap: 12px; font-family: var(--serif); font-weight: 420; font-size: clamp(20px, 2.4vw, 27px); color: var(--ink); letter-spacing: -.01em; margin: clamp(14px,3vw,30px) 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.group-label:not(:first-of-type) { margin-top: clamp(40px,6vw,72px); }
.group-label span { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 50%; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; }
.bento + .group-label { margin-top: clamp(40px,6vw,72px); }

/* uniform production hero panel (fixed aspect, cover) */
.prod-shot { aspect-ratio: 3 / 2; width: 100%; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.prod-shot img, .prod-shot video { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; border: none; border-radius: 0; cursor: zoom-in; }
.prod-shot video { cursor: pointer; }
.prod-shot.top img { object-position: center top; }
.prod-shot.portrait { aspect-ratio: 4 / 5; max-width: 360px; margin: 0 auto; }
.prod-shot.portrait img { object-position: center top; }
.proj-media.as-link .prod-shot img { cursor: pointer; }

/* production tiles — media-top vertical cards */
.prod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.prod-card { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; transition: border-color .25s, transform .25s var(--ease); }
.prod-card:hover { border-color: var(--rule-2); transform: translateY(-3px); }
.prod-media { position: relative; display: block; }
.prod-frame { aspect-ratio: 16 / 9; overflow: hidden; background: #0e0e12; }
.prod-frame img, .prod-frame video { width: 100%; height: 100%; object-fit: cover; display: block; border: none; border-radius: 0; }
.prod-frame.face img, .prod-frame.face video { object-position: center 22%; }
.prod-open { position: absolute; right: 14px; bottom: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--paper); background: color-mix(in srgb, var(--ink) 80%, transparent); backdrop-filter: blur(4px); padding: 6px 12px; border-radius: 999px; opacity: .92; transition: opacity .25s, background .25s; }
.prod-media:hover .prod-open { opacity: 1; background: var(--accent); }
.prod-body { padding: clamp(20px,2.4vw,30px); }
.prod-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.prod-no { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.prod-cat { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); }
.prod-title { font-family: var(--serif); font-weight: 500; font-size: clamp(21px,2.4vw,28px); line-height: 1.12; letter-spacing: -.01em; color: var(--ink); margin-bottom: 12px; text-wrap: balance; }
.prod-desc { font-size: 15px; line-height: 1.55; color: var(--body); margin-bottom: 18px; text-wrap: pretty; }
.prod-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.prod-tags span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 12px; }
@media (max-width: 720px) { .prod-grid { grid-template-columns: 1fr; } }
.proj-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.proj-no { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.proj-cat { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); }
.proj-title { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.08; color: var(--ink); letter-spacing: -.02em; margin-bottom: 16px; text-wrap: balance; }
.proj-desc { font-size: 16px; line-height: 1.62; color: var(--body); max-width: 68ch; margin-bottom: 20px; text-wrap: pretty; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.proj-tags span, .proj-tags a { font-family: var(--mono); font-size: 11.5px; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 12px; }
.proj-tags a { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.proj-tags a:hover { background: var(--accent); color: var(--paper); text-decoration: none; }

.metrics-sm { display: flex; flex-wrap: wrap; gap: clamp(22px, 4vw, 48px); margin-bottom: 26px; }
.metrics-sm dt { font-family: var(--serif); font-weight: 420; font-size: clamp(22px, 2.6vw, 30px); color: var(--accent); line-height: 1; letter-spacing: -.01em; }
.metrics-sm dd { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 8px; }

/* media inside cards */
.fig { margin-top: 6px; }
.fig img { width: 100%; display: block; border: 1px solid var(--rule); border-radius: 6px; cursor: zoom-in; }
.fig figcaption, .fig-cap { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.demo-vid { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border: 1px solid var(--rule); border-radius: 6px; background: #000; }
/* video inside a production frame fills it (no double border / aspect handled by frame) */
.prod-frame .demo-vid { aspect-ratio: auto; border: none; border-radius: 0; }

/* six-agent horizontal flow */
.fig-diagram .agent-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; border: 1px solid var(--rule); border-radius: 6px; padding: 22px clamp(16px,2.4vw,26px); background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.agent-flow span { font-family: var(--mono); font-size: 12px; color: var(--ink); padding: 9px 13px; border: 1px solid var(--rule-2); border-radius: 6px; background: var(--paper); position: relative; }
.agent-flow span + span { margin-left: 30px; }
.agent-flow span + span::before { content: '→'; position: absolute; left: -24px; top: 50%; transform: translateY(-50%); color: var(--accent); font-family: var(--mono); font-size: 14px; }
.agent-flow-judge { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 14px; padding-left: 4px; }

/* UI feature reel — cycles through a tool's features (Carve, MultiCam) */
.ui-reel { position: relative; width: 100%; }
.ui-reel img { width: 100%; display: block; border: 1px solid var(--rule); border-radius: 6px; opacity: 1; transition: opacity .5s var(--ease); }
.ui-reel img.swapping { opacity: 0; }
.ui-feat { position: absolute; top: 12px; left: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .5px; color: var(--paper); background: color-mix(in srgb, var(--ink) 82%, transparent); backdrop-filter: blur(4px); padding: 5px 11px; border-radius: 999px; }

/* MultiCam contact sheet */
.contact-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.contact-sheet figure { margin: 0; }
.contact-sheet img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border: 1px solid var(--rule); border-radius: 6px; cursor: zoom-in; }
.contact-sheet figcaption { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 6px; }

/* cue — screenplay + refs → shot-broken storyboard */
.cue-flow2 { display: flex; align-items: stretch; flex-wrap: wrap; gap: 18px; margin-top: 6px; }
.cue-script { flex: 1 1 460px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 6px; padding: 16px 18px; background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.cue-slug { font-family: var(--mono); font-size: 11px; letter-spacing: .5px; color: var(--accent); text-transform: uppercase; display: block; margin-bottom: 10px; }
.cue-script p { font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.5; color: var(--body); margin-bottom: 14px; }
.cue-refs { display: flex; gap: 12px; }
.cue-refs figure { margin: 0; width: 86px; }
.cue-refs img { width: 86px; height: 86px; object-fit: cover; object-position: center top; border: 1px solid var(--rule); border-radius: 6px; display: block; cursor: zoom-in; background: #fff; }
.cue-refs figcaption { font-family: var(--mono); font-size: 10.5px; color: var(--accent); margin-top: 5px; text-align: center; }
.cue-arrow { align-self: center; font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--accent); max-width: 190px; }
/* real storyboard grid — the way the app lays out a scene's shots */
.sb-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-bottom: 9px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 11px; letter-spacing: .4px; color: var(--muted); }
.sb-head span:last-child { color: var(--accent); }
.sb-sheet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.sb-card { margin: 0; display: flex; flex-direction: column; }
.sb-frame { position: relative; aspect-ratio: 16/9; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #0e0e12; cursor: zoom-in; }
.sb-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-frame::after { content: ''; position: absolute; inset: auto 0 0 0; height: 44%; background: linear-gradient(180deg, transparent, rgba(8,8,12,.85)); pointer-events: none; }
.sb-num { position: absolute; left: 8px; bottom: 7px; z-index: 2; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .5px; color: #fff; }
.sb-cam { position: absolute; right: 8px; bottom: 7px; z-index: 2; font-family: var(--mono); font-size: 9px; letter-spacing: .4px; color: #eceae3; opacity: .88; }
.sb-card figcaption { font-family: var(--mono); font-size: 10px; line-height: 1.55; color: var(--muted); margin-top: 8px; }
.sb-cast { display: block; color: var(--accent); margin-bottom: 3px; letter-spacing: .3px; }
@media (max-width: 900px) { .sb-sheet { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .sb-sheet { grid-template-columns: repeat(2, 1fr); } }

/* =====================================================================
   SKILLS — icon grid
   ===================================================================== */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px) clamp(28px,5vw,64px); }
.skcol h4 { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.skcol ul { list-style: none; }
.skcol li { display: flex; align-items: center; gap: 11px; padding: 7px 0; font-size: 15.5px; color: var(--body); }
.skcol li::before { content: ''; width: 6px; height: 6px; flex: none; border: 1px solid var(--accent); transform: rotate(45deg); opacity: .8; }

/* =====================================================================
   FIELD NOTES
   ===================================================================== */
.note-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(32px,5vw,64px); }
.note-list li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--rule); align-items: start; }
.note-no { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 2px; }
.note-list p { color: var(--body); font-size: 15.5px; line-height: 1.6; text-wrap: pretty; }
.note-list strong { color: var(--ink); }

/* =====================================================================
   OPEN SOURCE — cards
   ===================================================================== */
.oss-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.oss-card { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 10px; padding: 22px; background: var(--card); transition: border-color .2s, transform .2s var(--ease); }
.oss-card:hover { border-color: var(--rule-2); transform: translateY(-3px); text-decoration: none; }
.oss-card h4 { font-family: var(--mono); font-size: 14px; color: var(--ink); margin-bottom: 9px; }
.oss-card p { font-size: 14px; line-height: 1.5; color: var(--muted); flex: 1; margin-bottom: 16px; }
.oss-card .oss-go { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); }
.also { margin-top: 26px; font-size: 15px; }
.also a { color: var(--accent); }

/* =====================================================================
   EXPERIENCE
   ===================================================================== */
.exp-list { display: grid; gap: 0; }
.exp-list > div { display: grid; grid-template-columns: 160px 1fr; gap: clamp(20px,4vw,48px); padding: 22px 0; border-top: 1px solid var(--rule); }
.exp-list dt { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.exp-list dd { color: var(--body); font-size: 16px; line-height: 1.6; }

/* =====================================================================
   CONTACT — dark block (always dark)
   ===================================================================== */
.contact { background: #14141a; border-radius: 0; text-align: center; }
.contact .sec-label { color: #d98a5f; }
.contact-title { font-family: var(--serif); font-weight: 360; font-size: clamp(38px, 7vw, 88px); line-height: .98; letter-spacing: -.03em; color: #f4f3ed; text-wrap: balance; margin-bottom: 22px; }
.contact-lede { max-width: 52ch; margin: 0 auto 36px; font-size: 17px; line-height: 1.6; color: #b6b5af; }
.contact-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact .btn-solid { background: #f4f3ed; color: #14141a; }
.contact .btn-solid:hover { background: #d98a5f; color: #14141a; }
.contact .btn-ghost { border-color: rgba(255,255,255,.25); color: #f4f3ed; }
.contact .btn-ghost:hover { border-color: #f4f3ed; }
.contact-alt { margin-top: 26px; font-family: var(--mono); font-size: 13px; color: #8a8a93; display: flex; gap: 12px; justify-content: center; }
.contact-alt a { color: #b6b5af; }
.contact-alt a:hover { color: #f4f3ed; }

/* =====================================================================
   FOOTER — dark
   ===================================================================== */
.foot { background: #0f0f13; padding: 26px 0; }
.foot-row { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; color: #8a8a93; }
.foot-dot { display: inline-flex; align-items: center; gap: 9px; }
.foot-top { color: #b6b5af; }
.foot-top:hover { color: #f4f3ed; text-decoration: none; }

/* =====================================================================
   COMMAND PALETTE
   ===================================================================== */
.cmdk { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 14vh 20px 20px; background: rgba(20,20,26,.34); backdrop-filter: blur(4px); }
.cmdk.open { display: flex; }
.cmdk-box { width: 100%; max-width: 540px; background: var(--paper); border: 1px solid var(--rule-2); border-radius: 12px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.45); overflow: hidden; transform: translateY(-10px) scale(.985); opacity: 0; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.cmdk.open .cmdk-box { transform: none; opacity: 1; }
#cmdkInput { width: 100%; border: none; border-bottom: 1px solid var(--rule); background: none; padding: 18px 20px; font-family: var(--sans); font-size: 16px; color: var(--ink); outline: none; }
#cmdkInput::placeholder { color: var(--faint); }
#cmdkList { list-style: none; max-height: 320px; overflow-y: auto; padding: 6px; }
#cmdkList li { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--body); }
#cmdkList li .ck-kind { font-family: var(--mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .5px; }
#cmdkList li.sel, #cmdkList li:hover { background: #efece4; color: var(--ink); }
#cmdkList li.sel .ck-kind { color: var(--accent); }

/* =====================================================================
   LIGHTBOX
   ===================================================================== */
.lightbox { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 5vh 5vw; background: color-mix(in srgb, var(--paper) 70%, transparent); backdrop-filter: blur(10px); cursor: zoom-out; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 40px 120px -40px rgba(0,0,0,.5); }
[data-theme="dark"] .lightbox { background: rgba(0,0,0,.8); }

/* =====================================================================
   REVEAL
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dotpulse { animation: none; }
}

/* scroll offset under sticky nav */
#top, #work, #skills, #services, #notes, #oss, #experience, #contact { scroll-margin-top: 80px; }

/* keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* view-transition theme reveal */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }

/* =====================================================================
   DARK THEME
   ===================================================================== */
[data-theme="dark"] {
  --paper:  #15151a;
  --ink:    #f3f2ec;
  --body:   #c6c5bf;
  --muted:  #8c8b95;
  --faint:  #61616b;
  --accent: #d98a5f;
  --rule:   rgba(255,255,255,.11);
  --rule-2: rgba(255,255,255,.2);
  --card:   #1b1b21;
}
[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .03; }
[data-theme="dark"] ::selection { background: rgba(217,138,95,.28); }
[data-theme="dark"] .agent-flow span { background: var(--card); }
[data-theme="dark"] .cmdk-box { background: var(--card); }
[data-theme="dark"] #cmdkList li.sel, [data-theme="dark"] #cmdkList li:hover { background: rgba(255,255,255,.07); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; gap: 28px; }
  .hero-side { padding-bottom: 0; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .oss-grid { grid-template-columns: repeat(2, 1fr); }
  .note-list { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .proj, .proj.rev { grid-template-columns: 1fr; }
  .proj-info, .proj.rev .proj-info { order: 0; border-right: none; border-left: none; border-bottom: 1px solid var(--rule); }
  .proj-media, .proj.rev .proj-media { order: 0; }
}
@media (max-width: 600px) {
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 24px 20px; }
  .svc-grid, .skills-grid, .oss-grid { grid-template-columns: 1fr; }
  .sb-sheet { grid-template-columns: repeat(2, 1fr); }
  .cue-op.cue-gen { margin-left: 0; }
  .exp-list > div { grid-template-columns: 1fr; gap: 6px; }
  .agent-flow span + span { margin-left: 24px; }
  .top-nav { gap: 12px; }
  .top-nav a:not(.nav-cta):not(.active) { display: none; }
}
