/* ==========================================================================
   Trafford Pells - portfolio
   Brand: charcoal + white, scanlines, RGB-split glitch, Futura-style type.
   Mood: late-90s / early-00s console title screens & menus (minus the horror).
   ========================================================================== */

:root {
  --bg: #121212;
  --bg-2: #1a1a1a;
  --panel: #222222;          /* brand charcoal */
  --panel-2: #2a2a2a;
  --line: #3a3a3a;
  --ink: #f3f3f0;
  --dim: #9b9b96;
  --faint: #5d5d5a;
  --red: #ff2d55;
  --cyan: #00e0ff;
  --green: #36ff9a;

  --f-display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --f-body: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --f-mono: "Share Tech Mono", ui-monospace, "Consolas", monospace;

  --pad: clamp(18px, 4vw, 56px);
  --max: 1400px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--bg); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- CRT layer: scanlines, noise, vignette (on every page) ---------- */
.crt { position: fixed; inset: 0; pointer-events: none; z-index: 90; }
.crt::before {                                  /* scanlines */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.28) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.crt::after {                                   /* vignette + film grain */
  content: ""; position: absolute; inset: -50%;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
  opacity: .07;
  animation: grain .6s steps(4) infinite;
}
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 89;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%); }
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-6%, 4%); }
  50% { transform: translate(5%, -3%); } 75% { transform: translate(-3%, -6%); } 100% { transform: translate(0, 0); }
}

/* ---------- Brand stripe: the charcoal scanline band from the letterhead ---------- */
.stripe {
  position: relative;
  background:
    repeating-linear-gradient(to bottom, #2c2c2c 0 2px, #1f1f1f 2px 4px);
}
.stripe::before, .stripe::after {               /* stepped grey line clusters above + below */
  content: ""; position: absolute; left: 0; right: 0; height: 14px;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.16) 0 1px, transparent 1px 3px);
  -webkit-mask: linear-gradient(90deg, #000 0 7%, transparent 7% 24%, #000 24% 41%, transparent 41% 58%, #000 58% 75%, transparent 75% 92%, #000 92%);
          mask: linear-gradient(90deg, #000 0 7%, transparent 7% 24%, #000 24% 41%, transparent 41% 58%, #000 58% 75%, transparent 75% 92%, #000 92%);
}
.stripe::before { top: -16px; transform: skewY(-.6deg); }
.stripe::after  { bottom: -16px; transform: skewY(-.6deg);
  -webkit-mask: linear-gradient(90deg, transparent 0 8%, #000 8% 25%, transparent 25% 42%, #000 42% 59%, transparent 59% 76%, #000 76% 93%, transparent 93%);
          mask: linear-gradient(90deg, transparent 0 8%, #000 8% 25%, transparent 25% 42%, #000 42% 59%, transparent 59% 76%, #000 76% 93%, transparent 93%); }

/* ---------- Glitch text (RGB split like the brand banner) ---------- */
.rgb { text-shadow: -2px 0 var(--red), 2px 0 var(--cyan); }
.rgb-soft { text-shadow: -1px 0 rgba(255,45,85,.8), 1px 0 rgba(0,224,255,.8); }

.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.glitch::before { color: var(--red);  mix-blend-mode: screen; transform: translateX(-3px); clip-path: inset(0 0 100% 0); animation: slice-a 4.5s infinite steps(1); }
.glitch::after  { color: var(--cyan); mix-blend-mode: screen; transform: translateX(3px);  clip-path: inset(100% 0 0 0); animation: slice-b 4.5s infinite steps(1); }
@keyframes slice-a {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); transform: translateX(0); }
  87% { clip-path: inset(10% 0 62% 0); transform: translateX(-7px); }
  89% { clip-path: inset(55% 0 20% 0); transform: translateX(5px); }
  91% { clip-path: inset(30% 0 48% 0); transform: translateX(-4px); }
  93% { clip-path: inset(0 0 100% 0); }
}
@keyframes slice-b {
  0%, 86%, 100% { clip-path: inset(100% 0 0 0); transform: translateX(0); }
  88% { clip-path: inset(70% 0 8% 0); transform: translateX(6px); }
  90% { clip-path: inset(22% 0 60% 0); transform: translateX(-6px); }
  92% { clip-path: inset(45% 0 35% 0); transform: translateX(3px); }
  94% { clip-path: inset(100% 0 0 0); }
}
.jitter { animation: jitter 4.5s infinite steps(1); }
@keyframes jitter {
  0%, 86%, 100% { transform: none; }
  87% { transform: translate(-3px, 1px) skewX(-4deg); }
  89% { transform: translate(4px, -1px); }
  91% { transform: translate(-1px, 0) skewX(3deg); }
  93% { transform: none; }
}

/* ---------- Screen wipe between pages (brand stripe sweeps the screen) ---------- */
.wipe {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  display: grid; place-items: center;
  background: repeating-linear-gradient(to bottom, #262626 0 2px, #161616 2px 4px);
  animation: wipe-out .55s var(--ease) .05s both;
}
.wipe span { font-family: var(--f-mono); font-size: 13px; letter-spacing: .3em; color: var(--dim); opacity: 0; }
.is-leaving .wipe { animation: wipe-in .38s var(--ease) both; pointer-events: all; }
.is-leaving .wipe span { opacity: 1; animation: blink .5s steps(1) infinite; }
@keyframes wipe-out { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(50% 0 50% 0); } }
@keyframes wipe-in  { from { clip-path: inset(50% 0 50% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   HOME - title screen
   ========================================================================== */
.home { height: 100vh; height: 100svh; overflow: hidden; }
.title-screen {
  position: relative; height: 100%;
  display: grid; grid-template-rows: 1fr auto;
}

.ts-band {
  position: absolute; left: -4vw; right: -4vw; top: 50%;
  height: clamp(200px, 38vh, 420px);
  transform: translateY(-58%) rotate(-1.4deg);
  transition: height 1s var(--ease), transform 1s var(--ease), left 1s var(--ease), right 1s var(--ease);
}
.ts-band .slides { position: absolute; inset: 0; overflow: hidden; }
.ts-band .slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.85) contrast(1.1) brightness(.6);
  opacity: 0;
  transition: opacity 1.2s ease, filter 1.2s ease;
}
.ts-band .slides img.on { opacity: .62; animation: drift 9s linear both; }
.ts-band .slides img.glitching { animation: img-glitch .35s steps(2) both; opacity: .8; }
.ts-band .slides::before {          /* soft shade so the type stays readable */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(14,14,14,.55), rgba(14,14,14,.1) 75%);
  opacity: 0; transition: opacity 1s ease;
}
.ts-band .slides::after {           /* re-apply band scanlines over the images */
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.45) 0 2px, transparent 2px 4px);
}
/* after PRESS START: the stripe opens out to fill the screen and the colour comes up */
.started .ts-band { left: 0; right: 0; height: 100vh; height: 100svh; transform: translateY(-50%) rotate(0deg); }
.started .ts-band::before, .started .ts-band::after { opacity: 0; }
.ts-band::before, .ts-band::after { transition: opacity .5s ease; }
.started .ts-band .slides img { filter: saturate(1.05) contrast(1.05) brightness(.55); }
.started .ts-band .slides img.on { opacity: .9; }
.started .ts-band .slides::before { opacity: 1; }
.started .menu a:not(.active) { color: rgba(243,243,240,.6); text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.started .menu a .num, .started .menu-help, .started .hud { color: rgba(243,243,240,.75); text-shadow: 0 1px 8px rgba(0,0,0,.8); }
@keyframes drift { from { transform: scale(1.08) translateX(-1.5%); } to { transform: scale(1.08) translateX(1.5%); } }
@keyframes img-glitch {
  0% { transform: translateX(-12px); filter: grayscale(1) contrast(2) brightness(1); clip-path: inset(10% 0 40% 0); }
  50% { transform: translateX(10px); clip-path: inset(50% 0 10% 0); }
  100% { transform: none; clip-path: inset(0); }
}

.ts-center {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--pad); padding-bottom: 0;
}
.ts-logo { width: clamp(80px, 11vh, 140px); height: auto; margin-bottom: clamp(26px, 5.5vh, 60px);
  filter: drop-shadow(0 0 18px rgba(255,255,255,.12)); }
.ts-name {
  margin: 0; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(54px, 9.5vw, 136px); line-height: .82; letter-spacing: .03em;
}
.ts-tag {
  margin: clamp(2px, .6vh, 8px) 0 0; font-style: italic; font-weight: 400;
  font-size: clamp(16px, 2.1vw, 28px); letter-spacing: .04em;
}

.ts-action { position: relative; min-height: clamp(190px, 27vh, 250px); width: 100%; margin-top: clamp(24px, 5vh, 56px); display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2vh, 20px); }
.press-start {
  appearance: none; background: none; border: 0; cursor: pointer;
  font-family: var(--f-mono); font-size: clamp(15px, 1.6vw, 20px); letter-spacing: .4em;
  color: var(--ink); padding: 14px 20px; height: fit-content; text-transform: uppercase;
  animation: blink 1.1s steps(1) infinite;
}
.press-start.pressed { animation: blink .09s steps(1) infinite; }

.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; justify-items: start; }
.menu[hidden] { display: none; }
.menu li { opacity: 0; transform: translateY(6px); animation: menu-in .35s var(--ease) forwards; }
.menu li:nth-child(2) { animation-delay: .07s; } .menu li:nth-child(3) { animation-delay: .14s; }
@keyframes menu-in { to { opacity: 1; transform: none; } }
.menu a {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 4px 18px 4px 40px; text-decoration: none;
  font-family: var(--f-display); font-size: clamp(34px, 4.2vw, 54px); line-height: 1.05; letter-spacing: .05em;
  color: var(--faint); transition: color .15s;
}
.menu a::before {               /* the selection cursor */
  content: ""; position: absolute; left: 8px; top: 50%; width: 0; height: 0;
  border-left: 14px solid var(--ink); border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  transform: translateY(-50%); opacity: 0;
}
.menu a.active { color: var(--ink); text-shadow: -2px 0 var(--red), 2px 0 var(--cyan); }
.menu a.active::before { opacity: 1; animation: nudge .7s ease-in-out infinite; }
.menu a .num { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; color: var(--faint); }
.menu a.active .num { color: var(--dim); text-shadow: none; }
@keyframes nudge { 50% { transform: translate(5px, -50%); } }

.menu-help { margin: 0; text-align: center;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); min-height: 1.6em; }

.hud {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--pad); font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.hud button { appearance: none; background: none; border: 1px solid var(--line); padding: 6px 10px; cursor: pointer; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; font-family: var(--f-mono); font-size: 12px; }
.hud button:hover { color: var(--ink); border-color: var(--dim); }
.hud .keys kbd { font-family: inherit; border: 1px solid var(--line); padding: 1px 6px; margin: 0 2px; color: var(--dim); }

/* Intro "content warning" screen */
.intro {
  position: fixed; inset: 0; z-index: 80; background: #050505;
  display: grid; place-items: center; text-align: center; padding: var(--pad); cursor: pointer;
  transition: opacity .7s ease;
}
.intro.gone { opacity: 0; pointer-events: none; }
.intro .warn-head { font-family: var(--f-mono); letter-spacing: .5em; font-size: 13px; color: var(--dim); margin: 0 0 24px; }
.intro .warn-body { font-family: var(--f-display); font-size: clamp(30px, 5vw, 64px); letter-spacing: .04em; line-height: 1; margin: 0 auto; max-width: 16ch; }
.intro .warn-foot { margin-top: 24px; font-style: italic; color: var(--dim); }
.intro .skip { position: absolute; right: var(--pad); bottom: 22px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .2em; color: var(--faint); background: none; border: 0; cursor: pointer; }
.intro .line { opacity: 0; animation: fade-in .9s ease forwards; }
.intro .line:nth-child(2) { animation-delay: .5s; } .intro .line:nth-child(3) { animation-delay: 1.1s; }
@keyframes fade-in { to { opacity: 1; } }

/* ==========================================================================
   INNER PAGES - shared header / footer
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px var(--pad);
  background: rgba(18,18,18,.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #262626;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: auto; }
.brand span { font-family: var(--f-display); font-size: 24px; letter-spacing: .06em; line-height: 1; }
.nav { display: flex; gap: clamp(4px, 2vw, 28px); }
.nav a {
  position: relative; text-decoration: none; padding: 6px 4px 6px 20px;
  font-family: var(--f-display); font-size: 22px; letter-spacing: .08em; color: var(--dim);
}
.nav a::before { content: ""; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; opacity: 0; transition: opacity .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::before, .nav a[aria-current="page"]::before { opacity: 1; }
.nav a[aria-current="page"] { text-shadow: -1px 0 var(--red), 1px 0 var(--cyan); }

.page { max-width: var(--max); margin: 0 auto; padding: clamp(32px, 6vw, 80px) var(--pad) 80px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(28px, 5vw, 56px); }
.eyebrow { font-family: var(--f-mono); font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); margin: 0 0 10px; }
.page-title { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(64px, 11vw, 150px); line-height: .85; letter-spacing: .02em; }
.page-head .meta { font-family: var(--f-mono); font-size: 13px; letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }

.footer { border-top: 1px solid #262626; }
.footer .stripe { height: 10px; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 28px var(--pad) 40px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.footer a { color: var(--dim); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer .links { display: flex; gap: 20px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 14px 22px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn::before { content: ""; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.btn.ghost { border-color: var(--line); color: var(--dim); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

/* ==========================================================================
   WORK - inventory screen
   ========================================================================== */
.inventory { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.slot {
  position: relative; aspect-ratio: 4 / 5; display: block; overflow: hidden; text-decoration: none;
  background: var(--panel); border: 1px solid #2e2e2e;
  transition: border-color .15s, transform .25s var(--ease);
}
.slot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.85) brightness(.7); transition: filter .35s, transform .6s var(--ease); }
.slot::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.25) 0 1px, transparent 1px 3px); pointer-events: none; }
.slot .slot-num { position: absolute; top: 10px; left: 12px; z-index: 2; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--dim); }
.slot .slot-label { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.slot .slot-label b { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 2.4vw, 32px); line-height: 1; letter-spacing: .04em; }
.slot .slot-label small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.slot:hover, .slot.active, .slot:focus-visible { border-color: var(--ink); outline: none; }
.slot:hover img, .slot.active img, .slot:focus-visible img { filter: none; transform: scale(1.04); }
.slot.active .slot-num::before { content: "\25B6  "; color: var(--ink); }
/* tile motion: staggered arrival, slow drift, image cuts, a scan line passing over */
.slot { animation: slot-in .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes slot-in { from { opacity: 0; transform: translateY(14px); } }
.slot .slot-img { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease, filter .35s; }
.slot .slot-img.on { opacity: 1; animation: kb 8s ease-in-out infinite alternate; animation-delay: calc(var(--d, 0s) * -1); }
.slot .slot-img.cut { animation: img-glitch .3s steps(2), kb 8s ease-in-out infinite alternate; }
@keyframes kb { from { transform: scale(1.04) translate(-1.5%, 1%); } to { transform: scale(1.13) translate(1.5%, -1.5%); } }
.slot::before { content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 26%; z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, rgba(255,255,255,.09) 60%, rgba(255,255,255,.16) 62%, transparent 64%);
  animation: sweep 6s linear infinite; animation-delay: var(--d, 0s); }
@keyframes sweep { 0% { top: -30%; } 45%, 100% { top: 110%; } }
.slot.empty::before { display: none; }
.slot.empty span { animation: flick 5s steps(1) infinite; animation-delay: var(--d, 0s); }
@keyframes flick { 0%, 90%, 100% { opacity: 1; } 92% { opacity: .15; } 94% { opacity: 1; } 96% { opacity: .35; } }
.examine .ex-img img { animation: kb 10s ease-in-out infinite alternate; }
.examine .ex-img img.swap { animation: img-glitch .3s steps(2), kb 10s ease-in-out .3s infinite alternate; }

.slot.empty { display: grid; place-items: center; cursor: default; background: repeating-linear-gradient(135deg, #1b1b1b 0 10px, #1e1e1e 10px 20px); border-style: dashed; border-color: #2c2c2c; }
.slot.empty span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .24em; color: #444; }

.examine { position: sticky; top: 92px; background: var(--bg-2); border: 1px solid #2a2a2a; }
.examine .ex-head { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #2a2a2a;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; color: var(--dim); text-transform: uppercase; }
.examine .ex-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #111; }
.examine .ex-img img { width: 100%; height: 100%; object-fit: cover; }
.examine .ex-img img.swap { animation: img-glitch .3s steps(2); }
.examine .ex-body { padding: 20px; }
.examine h2 { margin: 0 0 6px; font-family: var(--f-display); font-weight: 400; font-size: 46px; line-height: .95; letter-spacing: .03em; }
.examine dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 14px 0 16px; font-size: 14px; }
.examine dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; padding-top: 2px; }
.examine dd { margin: 0; color: var(--ink); }
.examine p { margin: 0 0 20px; color: var(--dim); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.tags li { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--line); color: var(--dim); }

/* ==========================================================================
   PROJECT page
   ========================================================================== */
.p-hero { position: relative; height: min(78vh, 760px); min-height: 380px; overflow: hidden; background: #0c0c0c; }
.p-hero img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.p-hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,18,18,.1) 30%, rgba(18,18,18,.95) 100%), repeating-linear-gradient(to bottom, rgba(0,0,0,.2) 0 1px, transparent 1px 3px); }
.p-hero .p-title { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(24px, 4vw, 48px); }
.p-hero h1 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(72px, 14vw, 200px); line-height: .82; letter-spacing: .02em; }

.p-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid #2a2a2a; border-bottom: 1px solid #2a2a2a; margin-bottom: clamp(32px, 5vw, 64px); }
.p-meta div { padding: 16px 18px; border-right: 1px solid #2a2a2a; }
.p-meta div:last-child { border-right: 0; }
.p-meta span { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; color: var(--faint); text-transform: uppercase; margin-bottom: 4px; }
.p-meta b { font-weight: 400; }

.p-summary { font-size: clamp(19px, 2vw, 26px); line-height: 1.5; max-width: 46ch; margin: 0 0 clamp(48px, 7vw, 96px); font-weight: 300; }

.p-section { margin-bottom: clamp(56px, 8vw, 110px); }
.p-section-head { display: flex; align-items: baseline; gap: 18px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid #2a2a2a; }
.p-section-head .idx { font-family: var(--f-mono); font-size: 13px; letter-spacing: .16em; color: var(--faint); }
.p-section-head h2 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: .04em; }
.p-section-text { color: var(--dim); max-width: 62ch; margin: -4px 0 20px; }

.group { margin-bottom: 18px; }
.group-label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.group-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 10px; align-items: start; }
.media { position: relative; margin: 0; background: var(--panel); cursor: zoom-in; overflow: hidden; }
.media img, .media video { width: 100%; height: auto; transition: transform .5s var(--ease), opacity .4s; }
.media img { opacity: 0; } .media img.loaded { opacity: 1; }
.media:hover img { transform: scale(1.02); }
.group-grid.single:not(.wide) .media { max-width: 440px; }
.media.video::after { content: "VIDEO"; position: absolute; top: 8px; left: 8px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em; padding: 2px 6px; background: rgba(0,0,0,.6); }

.p-section-sub { margin-left: auto; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); text-align: right; }

/* Carousels: one per campaign, swipe / arrows / pills */
.car-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(14px, 2vw, 26px); }
.car-frame { position: relative; overflow: hidden; background: var(--panel); border: 1px solid #2a2a2a; }
.car-track { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; outline: none; }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; border: 0; padding: 0; margin: 0; background: none; cursor: zoom-in; }
.car-slide img { width: 100%; height: 100%; object-fit: contain; }   /* whole image always visible, even in mixed-size sets */
.car-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); }
.car:hover .car-frame { border-color: var(--dim); }
.car:hover .car-frame::after { opacity: 1; }

.car-pills { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px;
  background: rgba(12,12,12,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.car-pills button { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.4); transition: width .3s var(--ease), background .3s; }
.car-pills button::before { content: ""; position: absolute; inset: -8px -4px; }   /* bigger tap target */
.car-pills button:hover { background: rgba(255,255,255,.75); }
.car-pills button.on { width: 26px; background: var(--ink); }

.car-count, .car-badge { position: absolute; top: 10px; z-index: 2; pointer-events: none;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  padding: 3px 8px; background: rgba(12,12,12,.6); color: var(--ink); }
.car-count { right: 10px; }
.car-badge { left: 10px; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; }
.car:hover .car-badge, .reel:hover .car-badge { opacity: 1; transform: none; }

.car-arrow { position: absolute; top: 50%; z-index: 2; width: 38px; height: 54px; margin-top: -27px; border: 0; cursor: pointer;
  background: rgba(12,12,12,.6); color: var(--ink); font-size: 13px; opacity: 0; transition: opacity .2s, background .2s; }
.car-arrow.prev { left: 0; } .car-arrow.next { right: 0; }
.car:hover .car-arrow, .car-arrow:focus-visible { opacity: 1; }
.car-arrow:hover { background: rgba(12,12,12,.9); }

.car-meta { margin-top: 12px; }
.car-brand { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.car-meta h3 { margin: 2px 0 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); line-height: 1; letter-spacing: .04em; }
.car-info { display: block; margin-top: 4px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* The big one (landscape sets like Packaging & POS) */
.car--wide .car-frame { max-height: 82vh; width: 100%; }
.car--wide .car-arrow { width: 52px; height: 72px; margin-top: -36px; font-size: 16px; opacity: .75; }

/* Motion reels */
.reel-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); align-items: start; }
.reel { margin: 0; cursor: pointer; }
.reel-frame { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: var(--panel); border: 1px solid #2a2a2a; max-height: 78vh; }
.reel-frame video { width: 100%; height: 100%; object-fit: cover; }
.reel:hover .reel-frame { border-color: var(--dim); }

/* Story / Post switch in the full-screen viewer */
.lb-views { display: inline-flex; margin-left: 14px; border: 1px solid var(--line); vertical-align: middle; }
.lb-view { appearance: none; background: none; border: 0; padding: 4px 10px; cursor: pointer; color: var(--dim);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.lb-view.on { background: var(--ink); color: var(--bg); }

.p-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 32px; border-top: 1px solid #2a2a2a; }

/* Lightbox ("examine item") */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(8,8,8,.96); display: none; grid-template-rows: auto 1fr auto; }
.lightbox.open { display: grid; }
.lb-top, .lb-bottom { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--pad); font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; color: var(--dim); text-transform: uppercase; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100vh - 130px); max-height: calc(100svh - 130px); width: auto; height: auto; object-fit: contain; }
.lb-btn { appearance: none; background: none; border: 1px solid var(--line); color: var(--ink); cursor: pointer; font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; padding: 8px 12px; }
.lb-btn:hover { border-color: var(--ink); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 60px; padding: 0; font-size: 18px; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.status-card { position: sticky; top: 92px; background: var(--bg-2); border: 1px solid #2a2a2a; }
.status-card .portrait { aspect-ratio: 1; display: grid; place-items: center; background: var(--panel); position: relative; overflow: hidden; }
.status-card .portrait img { width: 46%; }
.status-card .portrait::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.3) 0 1px, transparent 1px 3px); }
.status-card .rows { padding: 6px 18px 18px; }
.status-card .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #2a2a2a; font-size: 15px; }
.status-card .row span:first-child { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; color: var(--faint); text-transform: uppercase; padding-top: 2px; }
.status-card .row span:last-child { text-align: right; }
.status-card .live { color: var(--green); }
.status-card .live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 8px; box-shadow: 0 0 10px var(--green); animation: blink 1.6s steps(1) infinite; }
.status-card .actions { padding: 0 18px 18px; display: grid; gap: 10px; }
.status-card .actions .btn { justify-content: center; }

.lead { font-size: clamp(20px, 2.2vw, 28px); font-weight: 300; line-height: 1.45; margin: 0 0 18px; }
.about-body p { max-width: 62ch; }
.block { margin-top: clamp(44px, 6vw, 80px); }
.block-title { display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid #2a2a2a;
  font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: .05em; line-height: 1; }
.block-title small { font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; color: var(--faint); }

.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px dashed #2a2a2a; }
.log .when { font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; color: var(--dim); padding-top: 4px; }
.log h3 { margin: 0; font-family: var(--f-body); font-weight: 500; font-size: 20px; }
.log h3 span { color: var(--dim); font-weight: 400; }
.log p { margin: 6px 0 0; color: var(--dim); font-size: 15px; }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.skill { aspect-ratio: 1; background: var(--panel); border: 1px solid #2e2e2e; display: grid; place-content: center; text-align: center; gap: 4px; transition: border-color .15s; }
.skill:hover { border-color: var(--ink); }
.skill b { font-family: var(--f-display); font-weight: 400; font-size: 40px; line-height: 1; }
.skill:hover b { text-shadow: -2px 0 var(--red), 2px 0 var(--cyan); }
.skill span { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

.brand-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.brand-list li { padding: 8px 14px; border: 1px solid var(--line); font-size: 15px; color: var(--dim); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 90px); align-items: start; }
.typed { font-family: var(--f-display); font-weight: 400; font-size: clamp(60px, 10vw, 140px); line-height: .86; letter-spacing: .02em; margin: 0 0 28px; min-height: 1.72em; }
.typed .caret { display: inline-block; width: .45em; height: .08em; background: var(--ink); margin-left: .05em; vertical-align: baseline; animation: blink .8s steps(1) infinite; }
.email-big { display: inline-block; font-size: clamp(20px, 2.6vw, 34px); text-decoration: none; border-bottom: 2px solid var(--line); padding-bottom: 4px; word-break: break-all; transition: border-color .15s; }
.email-big:hover { border-color: var(--ink); }
.copy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 18px 0 36px; }
.socials { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid #2a2a2a; }
.socials a { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #2a2a2a; text-decoration: none; font-family: var(--f-display); font-size: 28px; letter-spacing: .06em; }
.socials a::after { content: "\2197"; font-family: var(--f-body); color: var(--dim); }
.socials a:hover { text-shadow: -2px 0 var(--red), 2px 0 var(--cyan); }

.form { background: var(--bg-2); border: 1px solid #2a2a2a; padding: clamp(18px, 3vw, 32px); }
.form .ex-head { margin: calc(-1 * clamp(18px, 3vw, 32px)) calc(-1 * clamp(18px, 3vw, 32px)) 24px; padding: 10px 14px; border-bottom: 1px solid #2a2a2a; font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; color: var(--dim); text-transform: uppercase; display: flex; justify-content: space-between; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.field input, .field textarea, .field select {
  width: 100%; background: #141414; border: 1px solid var(--line); color: var(--ink); padding: 12px 14px; font: inherit; font-size: 16px; border-radius: 0;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); }
.form-note { font-size: 13px; color: var(--faint); margin: 12px 0 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
  .inventory { grid-template-columns: 1fr; }
  .car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .examine { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .status-card { position: static; display: grid; grid-template-columns: 160px 1fr; }
  .status-card .actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .hud .keys { display: none; }
  .ts-band { height: 30vh; }
  .menu a { padding-left: 34px; }
  .topbar { padding: 10px var(--pad); }
  .brand span { display: none; }
  .nav a { font-size: 20px; padding-left: 16px; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .slot.desk-only { display: none; }
  .car-grid { grid-template-columns: 1fr; }
  .car-badge { opacity: 1; transform: none; }
  .p-section-head { flex-wrap: wrap; }
  .p-section-sub { margin-left: 0; width: 100%; text-align: left; }
  .car--wide .car-arrow { display: none; }
  .reel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot .slot-label small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .p-meta { grid-template-columns: 1fr 1fr; }
  .p-meta div:nth-child(2) { border-right: 0; }
  .p-meta div:nth-child(-n+2) { border-bottom: 1px solid #2a2a2a; }
  /* sets of images become swipeable strips, like the carousels they are */
  .group-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 6px; scrollbar-width: none; }
  .group-grid::-webkit-scrollbar { display: none; }
  .group-grid .media { flex: 0 0 78%; scroll-snap-align: center; }
  .group-grid.single .media, .group-grid.wide .media { flex-basis: 100%; }
  .log li { grid-template-columns: 1fr; gap: 4px; }
  .status-card { grid-template-columns: 1fr; }
  .status-card .portrait { aspect-ratio: 16 / 9; }
  .status-card .portrait img { width: 22%; }
  .lb-stage { padding: 0 8px; }
  .lb-prev, .lb-next { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .crt::after { display: none; }
  .press-start { animation: none; }
}
