/* ==========================================================================
   BMW-TFT INSPIRED PORTFOLIO — core stylesheet
   Theme: ice-cyan / white instrument cluster on deep black
   ========================================================================== */

:root {
  /* --- palette ------------------------------------------------------- */
  --bg:            #04070a;
  --bg-2:          #080d13;
  --panel:         rgba(10, 18, 26, 0.72);
  --panel-solid:   #0a121a;
  --line:          rgba(120, 200, 230, 0.16);
  --line-strong:   rgba(120, 210, 240, 0.34);

  --cyan:          #5fe6ff;
  --cyan-dim:      #2b98b5;
  --cyan-deep:     #0d3d4d;
  --ice:           #eaf9ff;
  --white:         #ffffff;
  --red:           #ff3b30;
  --amber:         #ffb020;

  --text:          #cfe6f0;
  --text-dim:      #7f9aa8;
  --text-faint:    #4a6472;

  /* --- type ---------------------------------------------------------- */
  --f-display: 'Orbitron', 'Rajdhani', ui-sans-serif, system-ui, sans-serif;
  --f-mono:    ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  --f-body:    'Rajdhani', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* --- metrics ------------------------------------------------------- */
  --maxw: 1180px;
  --gut:  clamp(20px, 5vw, 64px);
  --glow: 0 0 18px rgba(95, 230, 255, 0.35);
}

/* ---------- reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- ambient background layers -------------------------------- */
.bg-grid,
.bg-vignette,
.bg-scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(95, 230, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 230, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 20%, transparent 80%);
}

.bg-vignette {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%,  rgba(20, 90, 120, 0.28), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(10, 50, 70, 0.22), transparent 70%);
}

.bg-scan {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.016) 0px,
    rgba(255, 255, 255, 0.016) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.5;
  mix-blend-mode: overlay;
}

/* ==========================================================================
   SKIP LINK — first tab stop, so keyboard users bypass the HUD and nav
   ========================================================================== */
.skip-link {
  position: fixed;
  top: 0; left: 50%;
  transform: translate(-50%, -140%);
  z-index: 9999;
  padding: 12px 24px;
  background: var(--cyan);
  color: var(--bg);
  font-family: var(--f-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ==========================================================================
   IGNITION LOADER — the bike ride to 100%
   --------------------------------------------------------------------------
   Full-screen, but deliberately short-lived. It tracks real signals (CSS,
   fonts, DOM, deferred 3D bundle) and is capped at 2.5s by ui.js, so it can
   never become the thing standing between a recruiter and the content.

   The bike travels left-to-right along a track while the rev bar fills, so
   "progress" is legible three different ways at a glance.
   ========================================================================== */
/* Never shown without JavaScript: there is nothing to load in that case (the
   content is prerendered), and a curtain that only JS can lift would hide the
   page forever if the module failed. */
#ignition { display: none; }

.js #ignition {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 46%, rgba(20, 90, 120, 0.20), transparent 72%),
    var(--bg);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
  /* CSS-only failsafe. ui.js normally dismisses this in well under a second,
     but if the module throws, 404s, or is blocked, this still clears the
     screen. A loader that can only be removed by the script it is waiting on
     is a single point of failure for the whole page. */
  animation: ig-failsafe 0.6s 3.2s forwards;
}
@keyframes ig-failsafe {
  to { opacity: 0; visibility: hidden; }
}
/* Scan-line texture so it belongs to the same world as the HUD. */
#ignition::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px,
    transparent 1px, transparent 3px);
}
#ignition.done { opacity: 0; visibility: hidden; }

.ig-inner {
  position: relative;
  z-index: 2;
  width: min(560px, 84vw);
  text-align: center;
}

/* ---- wordmark ---- */
.ig-mark { margin-bottom: 42px; }
.ig-mark-name {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 900;
  letter-spacing: clamp(4px, 1.6vw, 10px);
  text-transform: uppercase;
  color: var(--ice);
  text-shadow: 0 0 28px rgba(95, 230, 255, 0.28);
}
.ig-mark-sub {
  display: block;
  margin-top: 9px;
  font-family: var(--f-display);
  font-size: 9px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--cyan-dim);
}

/* ---- the road ---- */
.ig-road { position: relative; height: 78px; }

.ig-track {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  height: 2px;
  background: rgba(95, 230, 255, 0.14);
  overflow: hidden;
}
.ig-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: 0 0 14px var(--cyan);
  /* No CSS transition: ui.js eases this every frame in rAF. Having both would
     double-smooth it and make the bike lag behind the number. */
}

/* road markings that scroll past, to imply movement */
.ig-ticks {
  position: absolute;
  left: 0; right: 0; bottom: 7px;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--cyan-deep) 0 14px, transparent 14px 34px);
  opacity: 0.55;
  animation: ig-road 0.5s linear infinite;
}
@keyframes ig-road { to { background-position-x: -34px; } }

/* ---- the bike ---- */
.ig-bike {
  position: absolute;
  bottom: 12px;
  /* Travels 0 -> 100% of the track. --p is eased from JS each frame, so no
     CSS transition here either. */
  left: var(--p, 0%);
  width: 74px;
  margin-left: -37px;
}
.ig-bike svg {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 10px rgba(95, 230, 255, 0.5));
  /* a touch of lean, like it is driving */
  transform: rotate(-2deg);
}
.ig-bike svg circle,
.ig-bike svg path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.ig-bike .ig-body   { stroke: var(--ice); stroke-width: 2.8; }
.ig-bike .ig-rider  { stroke: var(--cyan); stroke-width: 2.6; opacity: 0.9; }
.ig-bike .ig-wheel  { transform-origin: center; }
.ig-wheel-f { animation: ig-spin 0.42s linear infinite; transform-box: fill-box; }
.ig-wheel-r { animation: ig-spin 0.42s linear infinite; transform-box: fill-box; }
@keyframes ig-spin { to { transform: rotate(360deg); } }

/* exhaust / speed trail behind the bike */
.ig-trail {
  position: absolute;
  right: 100%;
  bottom: 13px;
  width: 54px;
  height: 2px;
  background: linear-gradient(to left, var(--cyan), transparent);
  opacity: 0.75;
  filter: blur(0.5px);
}

/* ---- readout ---- */
.ig-readout {
  margin-top: 26px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  font-family: var(--f-display);
  font-variant-numeric: tabular-nums;
}
.ig-pct {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  color: var(--ice);
  text-shadow: 0 0 26px rgba(95, 230, 255, 0.4);
}
.ig-pct-unit { font-size: 15px; color: var(--cyan); margin-right: 14px; }
.ig-stage {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-faint);
  align-self: center;
}

/* ---- segmented rev bar, echoing the real cluster ---- */
.ig-revbar {
  margin: 26px auto 0;
  display: flex;
  gap: 3px;
  height: 12px;
  justify-content: center;
}
.ig-revbar i {
  flex: 1 1 auto;
  max-width: 11px;
  background: rgba(95, 230, 255, 0.1);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.ig-revbar i.on { background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.ig-revbar i.on.red { background: var(--red); box-shadow: 0 0 9px var(--red); }

/* ---- skip ---- */
.ig-skip {
  margin-top: 30px;
  background: none;
  border: 1px solid var(--line);
  color: var(--text-faint);
  font-family: var(--f-display);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.ig-skip:hover { color: var(--cyan); border-color: var(--line-strong); }

@media (max-width: 560px) {
  .ig-road { height: 64px; }
  .ig-bike { width: 58px; margin-left: -29px; }
  .ig-pct { font-size: 32px; }
  .ig-mark { margin-bottom: 30px; }
}

/* Reduced motion: no ride, no spin. ui.js skips the loader entirely in this
   case, but if it is ever shown, it must not animate. */
@media (prefers-reduced-motion: reduce) {
  #ignition { display: none; }
}

/* ==========================================================================
   BOOT BAR — real module-load progress
   --------------------------------------------------------------------------
   Replaces the old full-screen preloader. That one covered content behind a
   fabricated percentage (Math.random) with a 4s timeout; now that the page is
   prerendered, the content is already painted and hiding it would be a
   regression. This is a 2px line that reports actual load stage.
   ========================================================================== */
#boot-bar {
  position: fixed;
  top: 0; left: 0;
  z-index: 9998;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: 0 0 12px var(--cyan);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
  pointer-events: none;
}
#boot-bar.done { opacity: 0; }

/* ==========================================================================
   HUD CHROME — fixed corner instrumentation
   ========================================================================== */
.hud {
  position: fixed;
  z-index: 60;
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  pointer-events: none;
  user-select: none;
}
.hud-tl { top: 22px; left: var(--gut); }
.hud-tr { top: 22px; right: var(--gut); text-align: right; }
.hud-bl { bottom: 22px; left: var(--gut); }

.hud-tl .mark {
  color: var(--ice);
  font-size: 13px;
  letter-spacing: 5px;
  display: block;
}
.hud-tl .sub { color: var(--cyan-dim); }

.hud-status { display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* scroll hint */
.hud-bl .scroll-hint { display: flex; align-items: center; gap: 10px; }
.scroll-track {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-track::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 12px;
  background: var(--ice);
  animation: scroll-run 1.9s ease-in-out infinite;
}
@keyframes scroll-run {
  0%   { transform: translateY(-14px); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translateY(34px); opacity: 0; }
}

/* ==========================================================================
   GEAR NAVIGATION — right rail
   ========================================================================== */
#gear-nav {
  position: fixed;
  right: calc(var(--gut) - 6px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gear-btn {
  --sz: 40px;
  width: var(--sz); height: var(--sz);
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-faint);
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.gear-btn:hover {
  color: var(--ice);
  border-color: var(--line-strong);
  background: rgba(95, 230, 255, 0.07);
}
.gear-btn.active {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(95, 230, 255, 0.55);
}
/* label flyout */
.gear-btn .flag {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--f-display);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}
.gear-btn:hover .flag { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
main { position: relative; z-index: 10; }

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(90px, 13vh, 150px) var(--gut);
  position: relative;
}

/* section heading with instrument tick */
.sec-head { margin-bottom: 52px; }

.sec-idx {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--cyan-dim);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.sec-idx::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line-strong), transparent);
}

.sec-title {
  font-family: var(--f-display);
  font-size: clamp(30px, 5.2vw, 54px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.05;
  color: var(--ice);
  margin: 0;
  text-transform: uppercase;
}
.sec-title em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: var(--glow);
}

/* ==========================================================================
   HERO
   ========================================================================== */
#hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0 var(--gut);
  max-width: none;
  position: relative;
}

/* three.js canvas sits behind hero copy */
#gauge-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* scrim: darkens the middle of the dial so the name stays legible
   over the glowing instrument behind it */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse 34% 33% at 50% 50%,
    rgba(4, 7, 10, 0.94) 0%,
    rgba(4, 7, 10, 0.86) 40%,
    rgba(4, 7, 10, 0.45) 66%,
    transparent 86%
  );
}

.hero-copy {
  position: relative;
  z-index: 3;
  pointer-events: none;
  text-shadow: 0 2px 30px rgba(4, 7, 10, 0.95);
}
.hero-copy a, .hero-copy button { pointer-events: auto; }

.hero-eyebrow {
  font-family: var(--f-display);
  font-size: clamp(9px, 1.4vw, 11px);
  letter-spacing: clamp(4px, 1.2vw, 8px);
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: 0;
  animation: fade-up 0.9s 0.2s forwards;
}

.hero-name {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(38px, 9vw, 104px);
  line-height: 0.92;
  letter-spacing: -1px;
  margin: 0;
  color: var(--white);
  text-transform: uppercase;
}
.hero-name .ln1 {
  display: block;
  opacity: 0;
  animation: fade-up 0.9s 0.35s forwards;
}
.hero-name .ln2 {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cyan);
  text-shadow: 0 0 26px rgba(95, 230, 255, 0.4);
  opacity: 0;
  animation: fade-up 0.9s 0.5s forwards;
}

.hero-role {
  font-family: var(--f-display);
  font-size: clamp(12px, 2.1vw, 17px);
  letter-spacing: clamp(2px, 0.8vw, 5px);
  color: var(--text);
  text-transform: uppercase;
  margin: 22px 0 0;
  opacity: 0;
  animation: fade-up 0.9s 0.65s forwards;
}
.hero-tagline {
  color: var(--text-dim);
  max-width: 480px;
  margin: 14px auto 0;
  font-size: 16px;
  opacity: 0;
  animation: fade-up 0.9s 0.78s forwards;
}

.hero-cta {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.9s 0.9s forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- buttons --------------------------------------------------- */
.btn {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 13px 26px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 20, 28, 0.6);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
  display: inline-block;
  backdrop-filter: blur(6px);
}
.btn:hover {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 26px rgba(95, 230, 255, 0.4);
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
  font-weight: 700;
}
.btn-primary:hover { background: var(--ice); border-color: var(--ice); }

/* ==========================================================================
   PANELS — the shared instrument-card look
   ========================================================================== */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 28px;
  position: relative;
  backdrop-filter: blur(10px);
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.panel:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(95, 230, 255, 0.09);
}
/* corner tick */
.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 22px; height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-wrap {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 46px;
  align-items: start;
}
.about-body p { margin: 0 0 18px; font-size: 17.5px; color: var(--text); }
.about-body p:first-child::first-letter {
  font-family: var(--f-display);
  font-size: 3em;
  float: left;
  line-height: 0.82;
  padding: 6px 14px 0 0;
  color: var(--cyan);
  text-shadow: var(--glow);
}

.stat-stack { display: flex; flex-direction: column; gap: 14px; }
.stat {
  border: 1px solid var(--line);
  background: rgba(8, 16, 24, 0.6);
  padding: 18px 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: border-color .3s, background .3s;
}
.stat:hover { border-color: var(--line-strong); background: rgba(95,230,255,0.05); }
.stat-val {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
  text-shadow: var(--glow);
}
.stat-lbl {
  font-family: var(--f-display);
  font-size: 9.5px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: right;
}

/* mini info row */
.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.info-item { font-family: var(--f-mono); font-size: 12.5px; color: var(--text-dim); }
.info-item b {
  color: var(--cyan-dim);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 10px;
  display: block;
  margin-bottom: 2px;
}

/* ==========================================================================
   EXPERIENCE — timeline
   ========================================================================== */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), var(--cyan-deep) 60%, transparent);
}

.tl-item { position: relative; margin-bottom: 30px; }
.tl-item:last-child { margin-bottom: 0; }

.tl-item::before {
  content: '';
  position: absolute;
  left: -34px; top: 26px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan-dim);
  transition: all 0.35s ease;
}
.tl-item:hover::before {
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
  transform: scale(1.18);
}

.tl-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.tl-role {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ice);
  margin: 0;
  letter-spacing: 0.4px;
}
.tl-company { color: var(--cyan); font-size: 15.5px; letter-spacing: 0.6px; }
.tl-period {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 4px 11px;
  white-space: nowrap;
  text-transform: uppercase;
}
.tl-loc { font-family: var(--f-mono); font-size: 11.5px; color: var(--text-faint); margin-bottom: 14px; }

.tl-points li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--text);
}
.tl-points li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 8px; height: 1px;
  background: var(--cyan-dim);
}

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.chip {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: var(--cyan-dim);
  border: 1px solid rgba(95, 230, 255, 0.22);
  background: rgba(95, 230, 255, 0.05);
  padding: 4px 10px;
  text-transform: uppercase;
}

/* ==========================================================================
   SKILLS — radial gauges
   ========================================================================== */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.skill-group-title {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: 3.4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 22px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.skill { margin-bottom: 19px; }
.skill:last-child { margin-bottom: 0; }
.skill-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}
.skill-name { font-size: 15.5px; color: var(--text); letter-spacing: 0.3px; }
.skill-pct { font-family: var(--f-mono); font-size: 11.5px; color: var(--cyan-dim); }

.skill-track {
  height: 5px;
  background: rgba(95, 230, 255, 0.09);
  position: relative;
  overflow: hidden;
}
/* tick marks over the bar, like a dial */
.skill-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    transparent 0, transparent 9px,
    rgba(4, 7, 10, 0.85) 9px, rgba(4, 7, 10, 0.85) 11px
  );
  pointer-events: none;
}
.skill-fill {
  height: 100%;
  /* Prerendered HTML carries the real value as --lvl, so the bar is correct
     with no JavaScript. With JS, it starts at 0 and animates up. */
  width: var(--lvl, 100%);
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: 0 0 12px rgba(95, 230, 255, 0.65);
  transition: width 1.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .skill-fill { width: 0; }
/* redline zone */
.skill-fill.redline {
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan) 74%, var(--red));
}

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.proj { display: flex; flex-direction: column; }
.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.proj-name {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ice);
  margin: 0;
  letter-spacing: 0.4px;
}
.proj-metric { text-align: right; flex-shrink: 0; }
.proj-metric .m-val {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
  text-shadow: var(--glow);
}
.proj-metric .m-lbl {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 1.6px;
  color: var(--text-faint);
  text-transform: uppercase;
}
.proj-blurb { color: var(--text-dim); font-size: 15.5px; margin: 0 0 auto; }
.proj .chips { margin-top: 18px; }

.proj-link {
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.25s ease;
}
.proj-link:hover { gap: 14px; }

/* ==========================================================================
   EDUCATION + CERTS
   ========================================================================== */
.edu-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.edu-degree {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ice);
  margin: 0 0 4px;
}
.edu-school { color: var(--cyan); font-size: 15.5px; }
.edu-meta {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 9px;
  letter-spacing: 1.2px;
}

.cert-list { margin-top: 22px; }
.cert {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.cert:last-child { border-bottom: 0; }
.cert-name { color: var(--text); font-size: 15.5px; flex: 1; }
.cert-issuer { color: var(--text-dim); font-size: 13.5px; }
.cert-year { font-family: var(--f-mono); font-size: 11.5px; color: var(--cyan-dim); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
#contact { text-align: center; }
.contact-body {
  max-width: 560px;
  margin: 0 auto 34px;
  color: var(--text-dim);
  font-size: 17.5px;
}
.contact-mail {
  font-family: var(--f-display);
  font-size: clamp(19px, 4.4vw, 40px);
  font-weight: 700;
  color: var(--ice);
  letter-spacing: 0.5px;
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cyan-deep);
  transition: all 0.3s ease;
  word-break: break-word;
}
.contact-mail:hover { color: var(--cyan); border-bottom-color: var(--cyan); text-shadow: var(--glow); }

.social {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}
.social a {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}
.social a:hover {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(95, 230, 255, 0.45);
}
.social svg { width: 19px; height: 19px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  border-top: 1px solid var(--line);
  padding: 26px var(--gut);
  text-align: center;
  position: relative;
  z-index: 10;
}
footer p {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--text-faint);
  margin: 0;
  text-transform: uppercase;
}

/* ==========================================================================
   SCROLL REVEAL
   --------------------------------------------------------------------------
   Scoped to html.js — a class set by a one-line inline script in <head>.

   This matters now that content is prerendered rather than built by JS. If
   these rules applied unconditionally, a visitor whose JavaScript is disabled
   or simply failed to load would get a fully-populated page rendered at
   opacity 0 — a blank screen — which would defeat the entire point of
   prerendering. No JS means no hiding: everything is visible immediately.
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .reveal.in { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .about-wrap { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  #gear-nav {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 14px;
    transform: translateX(-50%);
    flex-direction: row;
    background: rgba(6, 12, 18, 0.9);
    border: 1px solid var(--line);
    padding: 5px;
    backdrop-filter: blur(12px);
  }
  .gear-btn { --sz: 36px; font-size: 12px; }
  .gear-btn .flag { display: none; }
  .hud-bl { display: none; }
  .hud-tl, .hud-tr { font-size: 9px; }
  .timeline { padding-left: 24px; }
  .tl-item::before { left: -24px; width: 11px; height: 11px; }
  .panel { padding: 22px; }
  footer { padding-bottom: 74px; }
}

@media (max-width: 400px) {
  .gear-btn { --sz: 32px; }
}

/* ---------- accessibility -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Must match the .js-scoped specificity above, or this override loses. */
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; }
  .js .skill-fill { width: var(--lvl, 100%); }
}

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

/* ---------- print ------------------------------------------------------
   The full site prints as a readable fallback, but resume.html is the page
   built for it — see the RESUME / PRINT block near the end of this file.  */
@media print {
  .bg-grid, .bg-vignette, .bg-scan, #gear-nav, .hud,
  #gauge-canvas, #boot-bar, .cmdk, .skip-link,
  .hero-scrim, .vehicle-stage, .game-stage { display: none !important; }
  body { background: #fff; color: #000; }
  .sec-title, .tl-role, .proj-name, .hero-name { color: #000; }
  .panel { border: 1px solid #ccc; background: none; backdrop-filter: none; }
}

/* ==========================================================================
   ADDITIONS: competencies, shipped titles, project subtitle, garage
   ========================================================================== */

/* ---- mini section heads inside panels -------------------------------- */
.comp-block { margin-top: 26px; }
.mini-head {
  font-family: var(--f-display);
  font-size: 9.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan-dim);
  margin-bottom: 11px;
}
/* highlight chips for shipped game titles */
.chip-hot {
  color: var(--ice);
  border-color: rgba(95, 230, 255, 0.4);
  background: rgba(95, 230, 255, 0.1);
}

/* ---- project subtitle -------------------------------------------------- */
.proj-sub {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.6px;
  margin-top: 3px;
}

/* ---- education note ---------------------------------------------------- */
.edu-note {
  margin: 12px 0 0;
  font-size: 14.5px;
  color: var(--text-dim);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   GARAGE
   ========================================================================== */
.garage-intro {
  max-width: 680px;
  color: var(--text-dim);
  font-size: 17px;
  margin: -18px 0 38px;
}

.garage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 22px;
}

.garage-card { display: flex; flex-direction: column; }

.garage-label {
  font-family: var(--f-display);
  font-size: 9.5px;
  letter-spacing: 3.4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}
.garage-name {
  font-family: var(--f-display);
  font-size: 23px;
  font-weight: 800;
  color: var(--ice);
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}

/* the WebGL stage */
.vehicle-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 60% at 50% 60%, rgba(20, 90, 120, 0.16), transparent 72%),
    rgba(4, 8, 12, 0.55);
  overflow: hidden;
}
/* blueprint corner ticks */
.vehicle-stage::before,
.vehicle-stage::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid var(--cyan);
  opacity: 0.55;
  pointer-events: none;
  z-index: 2;
}
.vehicle-stage::before { top: 8px;    left: 8px;  border-right: 0; border-bottom: 0; }
.vehicle-stage::after  { bottom: 8px; right: 8px; border-left: 0;  border-top: 0; }

.vehicle-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.drag-hint {
  position: absolute;
  bottom: 9px; left: 12px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-faint);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.4s ease;
}
.vehicle-stage:hover .drag-hint { opacity: 0.35; }

/* fallback when WebGL is unavailable */
.vehicle-stage.no-webgl::after { content: none; }
.vehicle-stage.no-webgl .drag-hint { display: none; }
.vehicle-stage.no-webgl {
  display: grid;
  place-items: center;
}
.vehicle-stage.no-webgl .vehicle-canvas { display: none; }

.garage-blurb {
  color: var(--text-dim);
  font-size: 15.5px;
  margin: 0 0 auto;
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.spec { flex: 1 1 auto; min-width: 92px; }
.spec b {
  display: block;
  font-family: var(--f-display);
  font-size: 8.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 3px;
}
.spec span {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--cyan);
}

@media (max-width: 720px) {
  .garage-grid { grid-template-columns: 1fr; }
  .vehicle-stage { aspect-ratio: 4 / 3; }
}


/* ==========================================================================
   GAMES
   ========================================================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
}
.game-card { display: flex; flex-direction: column; }

.game-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.game-engine {
  font-family: var(--f-display);
  font-size: 9.5px;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 5px;
}
.game-badge {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--line);
  white-space: nowrap;
  flex-shrink: 0;
}
.game-badge.live { color: var(--bg); background: var(--cyan); border-color: var(--cyan); }
.game-badge.soon { color: var(--text-faint); }

.game-stage {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(4, 8, 12, 0.6);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}
.game-stage iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
}
.game-empty {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center;
  gap: 8px; text-align: center; padding: 20px;
}
.game-empty-icon { width: 34px; height: 34px; color: var(--cyan-dim); opacity: 0.6; }
.game-empty-icon svg { width: 100%; height: 100%; }
.game-empty p { margin: 0; color: var(--text-dim); font-size: 14.5px; }
.game-empty code,
.gallery-empty code {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--cyan-dim);
  background: rgba(95, 230, 255, 0.07);
  border: 1px solid var(--line);
  padding: 3px 8px;
}
.game-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.game-foot .chips { margin: 0; }
.game-controls {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ==========================================================================
   INTERESTING BITS
   ========================================================================== */
.bits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 18px;
  margin-bottom: 56px;
}
.bit-card { text-align: left; }
.bit-icon {
  width: 30px; height: 30px;
  color: var(--cyan);
  margin-bottom: 14px;
}
.bit-icon svg { width: 100%; height: 100%; }
.bit-title {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ice);
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}
.bit-text { margin: 0; color: var(--text-dim); font-size: 15px; line-height: 1.6; }

.sub-head {
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 26px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* ==========================================================================
   SUBPAGE (project detail)
   ========================================================================== */
.subpage main { position: relative; z-index: 10; }

.subnav {
  position: relative;
  z-index: 40;
  padding: 74px var(--gut) 0;
  max-width: var(--maxw);
  margin: 0 auto;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-display);
  font-size: 10.5px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.25s ease, gap 0.25s ease;
}
.back-link:hover { color: var(--cyan); gap: 14px; }
.back-link svg { width: 15px; height: 15px; }

.loading-state {
  padding: 120px var(--gut);
  text-align: center;
  color: var(--text-faint);
  font-family: var(--f-mono);
  letter-spacing: 2px;
}

.detail-wrap { padding-top: 34px; }
.detail-sub {
  font-family: var(--f-mono);
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 14px 0 0;
  letter-spacing: 0.4px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}
.meta-item b {
  display: block;
  font-family: var(--f-display);
  font-size: 8.5px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 5px;
}
.meta-item span { color: var(--cyan); font-family: var(--f-mono); font-size: 13.5px; }

.detail-chips { margin-bottom: 34px; }

.detail-body { max-width: 760px; }
.detail-body p {
  font-size: 17.5px;
  color: var(--text);
  margin: 0 0 18px;
  line-height: 1.72;
}

.detail-block { margin-top: 52px; }
.block-head {
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.hl-list { max-width: 760px; }
.hl-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  font-size: 16.5px;
  color: var(--text);
}
.hl-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 13px; height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* ---- gallery ---------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.tile {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(6, 12, 18, 0.6);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.tile:hover { border-color: var(--cyan); transform: translateY(-3px); }
.tile img, .tile video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tile-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--bg);
  background: var(--cyan);
  padding: 3px 8px;
}
.tile-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 12px 9px;
  font-size: 12.5px;
  color: var(--ice);
  text-align: left;
  background: linear-gradient(to top, rgba(4,7,10,0.94), transparent);
}
.gallery-empty { text-align: center; }
.gallery-empty p { margin: 0 0 10px; color: var(--text-dim); }
.gallery-empty .hint { font-size: 14px; color: var(--text-faint); margin: 0; }

.detail-foot {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 58px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

/* ---- lightbox ---------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 5, 8, 0.94);
  display: grid;
  place-items: center;
  padding: 60px 20px;
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lb-body {
  max-width: min(1100px, 92vw);
  max-height: 78vh;
  display: grid;
  place-items: center;
}
.lb-body img, .lb-body video {
  max-width: 100%;
  max-height: 78vh;
  display: block;
  border: 1px solid var(--line-strong);
}
.lb-body iframe {
  width: min(1000px, 90vw);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong);
}
.lb-caption {
  margin-top: 16px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.25s ease;
  font-family: var(--f-display);
  line-height: 1;
}
.lb-close { top: 22px; right: 22px; width: 42px; height: 42px; font-size: 24px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 46px; height: 62px; font-size: 30px; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: var(--cyan); color: var(--bg); border-color: var(--cyan);
}

@media (max-width: 720px) {
  .games-grid { grid-template-columns: 1fr; }
  .bits-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .subnav { padding-top: 62px; }
  .lb-prev, .lb-next { width: 38px; height: 52px; font-size: 24px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

/* ==========================================================================
   HUD TELEMETRY — real render stats, not a fabricated RPM number
   ========================================================================== */
#hud-telemetry {
  display: flex;
  align-items: baseline;
  gap: 5px;
  justify-content: flex-end;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1px;
  margin-top: 4px;
  color: var(--cyan-dim);
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
#hud-telemetry .t-v {
  color: var(--cyan);
  font-weight: 600;
  min-width: 1.6em;
  text-align: right;
}
#hud-telemetry .t-k   { color: var(--text-faint); font-size: 9px; }
#hud-telemetry .t-sep { color: var(--text-faint); opacity: 0.5; margin: 0 2px; }
#hud-telemetry.warn .t-v { color: var(--amber); }
#hud-telemetry.offline   { color: var(--text-faint); letter-spacing: 2px; }

/* command palette hint, bottom-left */
.cmdk-hint {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 20, 28, 0.7);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--f-display);
  font-size: 9.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.cmdk-hint:hover { color: var(--ice); border-color: var(--line-strong); }
.cmdk-hint kbd {
  font-family: var(--f-mono);
  font-size: 10px;
  background: rgba(95, 230, 255, 0.1);
  border: 1px solid var(--line);
  color: var(--cyan);
  padding: 1px 5px;
  letter-spacing: 0;
}

/* ==========================================================================
   HERO — availability pill + ghost button
   ========================================================================== */
.hero-avail {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 20px auto 0;
  padding: 6px 15px 6px 12px;
  border: 1px solid rgba(95, 230, 255, 0.3);
  background: rgba(95, 230, 255, 0.06);
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0;
  animation: fade-up 0.9s 0.84s forwards;
}
.avail-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 9px #3ddc84;
  animation: pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
.hero-tagline { max-width: 560px; }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-dim);
}

/* Hero "Play a Game" — only rendered when something is actually playable. */
.btn-play { display: inline-flex; align-items: center; gap: 9px; }
.bp-icon { width: 13px; height: 13px; display: inline-flex; }
.bp-icon svg { width: 100%; height: 100%; }

/* ==========================================================================
   SKILLS — evidence tiers instead of invented percentages
   ========================================================================== */
.skill-pct {
  font-family: var(--f-display);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-faint);
}
.skill[data-tier="current"]  .skill-pct { color: var(--cyan); }
.skill[data-tier="shipped"]  .skill-pct { color: var(--cyan-dim); }
.skill[data-tier="assisted"] .skill-pct { color: var(--text-faint); }

.skill-note {
  font-family: var(--f-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-faint);
  margin-top: 6px;
}
.skill { margin-bottom: 22px; }

.garage-intro b { color: var(--cyan); font-weight: 600; }

/* ==========================================================================
   PROJECTS / GAMES — small refinements
   ========================================================================== */
.proj-featured::before { width: 46px; }
.proj-metric .m-lbl { max-width: 110px; margin-left: auto; line-height: 1.35; }

.game-building .game-stage {
  background:
    repeating-linear-gradient(45deg,
      rgba(95, 230, 255, 0.03) 0 10px,
      transparent 10px 20px),
    rgba(4, 8, 12, 0.6);
}
.game-empty p { max-width: 26ch; }

/* ---- stage poster -----------------------------------------------------
   Default layout is `logo-fill`: the logo is full-bleed key art and the action
   block (Play, or the in-development label) floats over its lower third,
   centred. Flex column with justify-content:flex-end puts the action at the
   bottom; the logo itself is taken out of flow so it does not affect it.
   --------------------------------------------------------------------- */
.game-poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 0 16px 20px;
  background-size: cover;
  background-position: center;
  background-color: #060c12;
  z-index: 2;
  text-align: center;
}
/* No artwork at all: centre the action block instead of bottom-anchoring it. */
.game-poster.is-bare { justify-content: center; padding: 6% 20px; }
/* Scrim so the play button stays legible over a bright screenshot. */
.game-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%,
    rgba(4, 7, 10, 0.55), rgba(4, 7, 10, 0.86));
}

/* An <a>, not a <button> — see the note in render.js gameStage(). */
.game-play {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 22px 34px;
  background: rgba(6, 14, 20, 0.72);
  border: 1px solid var(--line-strong);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.game-play:hover {
  border-color: var(--cyan);
  background: rgba(95, 230, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(95, 230, 255, 0.28);
}

.gp-icon { width: 26px; height: 26px; color: var(--cyan); }
.gp-icon svg { width: 100%; height: 100%; }
.game-play:hover .gp-icon { filter: drop-shadow(0 0 8px var(--cyan)); }

.gp-main {
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ice);
}
.gp-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ---- game logo --------------------------------------------------------
   Auto-detected from assets/games/<id>/logo.* by tools/prerender.mjs.
   Sized in CSS only, since the build step does not read image headers — the
   logo lives in an absolutely-positioned overlay, so there is no layout to
   shift and no need for width/height attributes.
   --------------------------------------------------------------------- */
.game-logo {
  position: relative;          /* above the poster scrim (::before) */
  display: block;
  /* Bound on BOTH axes so neither a wide banner nor a tall square logo can
     push the Play button out of a 16:9 stage. min-height:0 is what actually
     permits the flex item to shrink below its intrinsic height. */
  max-width: min(70%, 320px);
  max-height: 46%;
  min-height: 0;
  width: auto;
  height: auto;
  flex: 0 1 auto;
  object-fit: contain;
  /* Lift it off a dark background without washing out a light logo. */
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.75));
  animation: gl-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes gl-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* With a logo present the Play control steps back — the logo is the identity,
   the button is just the action. */
.game-poster.has-logo .game-play { padding: 15px 26px; }
.game-poster.has-logo .gp-icon { width: 20px; height: 20px; }
.game-poster.has-logo .gp-main { font-size: 11px; }

/* ==========================================================================
   LOGO LAYOUT — set by render.js logoLayout()
   ========================================================================== */

/* ---- logo-fill (default): the logo IS the artwork --------------------- */
.game-poster.logo-fill .game-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-position: center;
  filter: none;                 /* full-bleed art needs no drop shadow */
  z-index: 0;
}
.logo-cover   .game-logo { object-fit: cover; }
.logo-contain .game-logo { object-fit: contain; }

/* The centre-radial scrim is for a floating mark on a dark panel — over
   full-bleed art it just dims the artwork, so drop it and use a bottom
   gradient instead. That keeps the action block legible over anything while
   leaving the top two-thirds of the logo untouched. */
.game-poster.logo-fill::before { display: none; }
.game-poster.logo-fill::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 62%;
  background: linear-gradient(to top,
    rgba(4, 7, 10, 0.94) 0%,
    rgba(4, 7, 10, 0.62) 34%,
    rgba(4, 7, 10, 0.18) 66%,
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}
/* Action block sits above both the art and the scrim, and goes HORIZONTAL.
   Stacked (icon / Play / meta) it stands about 85px tall, which is 40% of a
   258px stage — it would dominate the artwork it is supposed to sit under.
   As a single row it is roughly 42px, so with the bottom padding it occupies
   the lower ~25%. That figure is the logo safe area quoted in the README. */
.game-poster.logo-fill .game-play,
.game-poster.logo-fill .game-pending {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
}
.game-poster.logo-fill .gp-icon { width: 16px; height: 16px; flex-shrink: 0; }
.game-poster.logo-fill .gp-main { font-size: 10.5px; letter-spacing: 3px; }
.game-poster.logo-fill .gp-sub { font-size: 9.5px; }
/* Separator so the meta reads as part of one line, not a second label. */
.game-poster.logo-fill .gp-sub::before {
  content: '·';
  margin-right: 9px;
  opacity: 0.45;
}

/* ---- logo-inset: the logo is a mark, not key art --------------------- */
.game-poster.logo-inset { justify-content: center; padding: 6% 20px; }

.game-poster.logo-inset.logo-wide { flex-direction: column; gap: 20px; }
.game-poster.logo-inset.logo-wide .game-logo {
  max-width: min(70%, 320px);
  max-height: 46%;
}

/* A portrait mark goes BESIDE the button — a 16:9 stage is short and wide, so
   height is the scarce axis. */
.game-poster.logo-inset.logo-tall {
  flex-direction: row;
  gap: clamp(16px, 4%, 34px);
  padding: 7% 6%;
}
.game-poster.logo-inset.logo-tall .game-logo {
  max-width: 42%;
  max-height: 86%;
}
.game-poster.logo-inset.logo-tall .game-play { flex: 0 0 auto; }

@media (max-width: 560px) {
  .game-poster.logo-inset.logo-tall {
    flex-direction: column;
    gap: 16px;
    padding: 6% 16px;
  }
  .game-poster.logo-inset.logo-tall .game-logo { max-width: 46%; max-height: 58%; }
}

/* ---- in-development action block ------------------------------------- */
.game-pending {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 13px 24px;
  border: 1px solid var(--line);
  background: rgba(6, 14, 20, 0.72);
  backdrop-filter: blur(8px);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.game-pending .gp-icon { width: 19px; height: 19px; color: var(--cyan-dim); }
.game-pending .gp-main {
  font-family: var(--f-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
}
.game-pending .gp-sub {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* An in-development card with a logo now uses the same .game-poster treatment
   as a live one, so key art reads as key art either way. This is the fallback
   for a game with no logo and no screenshot at all. */
.game-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 720px) {
  .game-poster.logo-inset.logo-wide .game-logo { max-width: 76%; max-height: 42%; }
}

/* An animated GIF cannot be paused from CSS, so honour reduced-motion by at
   least not adding our own movement on top of it. */
@media (prefers-reduced-motion: reduce) {
  .game-logo { animation: none; }
}

/* Loading feedback now lives inside the theater overlay (.gt-boot), not on the
   card — the card is never modified when a game launches, which is what makes
   replaying work without rebuilding it. */

/* ==========================================================================
   THEATER MODE — the game filling the viewport
   --------------------------------------------------------------------------
   The animated element is .gt-frame, and it is transformed, never resized.
   It sits at its final full-viewport size for the whole animation so the
   iframe inside it has a single stable layout — meaning Unity sizes its
   drawing buffer exactly once. Animating width/height instead would force a
   WebGL buffer resize every frame, which is both janky and expensive.
   ========================================================================== */
body.theater-open { overflow: hidden; }

.game-theater {
  position: fixed;
  inset: 0;
  z-index: 900;
}

.gt-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 7, 0.92);
  backdrop-filter: blur(3px);
}

.gt-frame {
  position: absolute;
  inset: 0;
  /* Transform origin at the top-left corner is what makes the FLIP maths in
     ui.js work: translate() then scale() maps the viewport rect onto the
     card's rect exactly. */
  transform-origin: 0 0;
  background: #04070a;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
  will-change: transform;
}

.gt-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #04070a;
}

/* ---- top bar ---- */
.gt-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(4, 7, 10, 0.88), transparent);
  pointer-events: none;
  /* Out of the way while playing, back on hover or keyboard focus. */
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gt-frame:hover .gt-bar,
.gt-bar:focus-within { opacity: 1; }

.gt-title {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ice);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.gt-hint {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-left: auto;
}
.gt-hint kbd {
  border: 1px solid var(--line);
  background: rgba(10, 20, 28, 0.7);
  padding: 2px 6px;
  color: var(--cyan-dim);
}

.gt-close {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 20, 28, 0.8);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: var(--f-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  padding: 9px 15px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.22s ease;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.gt-close:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.gt-close svg { width: 14px; height: 14px; }

/* ---- boot overlay inside the theater ---- */
.gt-boot {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: #04070a;
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.gt-boot.gone { opacity: 0; visibility: hidden; }
.gt-spin {
  width: 30px; height: 30px;
  border: 2px solid rgba(95, 230, 255, 0.16);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: gt-spin 0.9s linear infinite;
}
@keyframes gt-spin { to { transform: rotate(360deg); } }
.gt-err { color: var(--red); letter-spacing: 2px; }

@media (max-width: 720px) {
  .gt-bar { opacity: 1; }              /* no hover on touch — always show Exit */
  .gt-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gt-spin { animation-duration: 2.4s; }
  .gt-bar { opacity: 1; }
}

/* ==========================================================================
   COMMAND PALETTE (⌘K)
   ========================================================================== */
body.cmdk-open { overflow: hidden; }

.cmdk { position: fixed; inset: 0; z-index: 500; }
.cmdk[hidden] { display: none; }

.cmdk-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 8, 0.72);
  backdrop-filter: blur(4px);
  animation: cmdk-fade 0.18s ease;
}
@keyframes cmdk-fade { from { opacity: 0; } to { opacity: 1; } }

.cmdk-box {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  margin: min(14vh, 110px) auto 0;
  background: rgba(8, 15, 22, 0.97);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(95, 230, 255, 0.08);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  animation: cmdk-rise 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
@keyframes cmdk-rise {
  from { opacity: 0; transform: translateY(-14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.cmdk-inputrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
.cmdk-icon { width: 17px; height: 17px; color: var(--cyan-dim); flex-shrink: 0; }
.cmdk-inputrow input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: var(--ice);
  font-family: var(--f-body);
  font-size: 17px;
  min-width: 0;
}
.cmdk-inputrow input::placeholder { color: var(--text-faint); }
.cmdk-inputrow kbd {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-faint);
  border: 1px solid var(--line);
  padding: 3px 7px;
  cursor: pointer;
  text-transform: uppercase;
}

.cmdk-list {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
}
.cmdk-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 13px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.cmdk-item.on {
  background: rgba(95, 230, 255, 0.09);
  border-left-color: var(--cyan);
}
.cmdk-kind {
  font-family: var(--f-display);
  font-size: 8px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-faint);
  min-width: 82px;
  flex-shrink: 0;
}
.cmdk-item.on .cmdk-kind { color: var(--cyan-dim); }
.cmdk-label { color: var(--text); font-size: 15.5px; flex-shrink: 0; }
.cmdk-item.on .cmdk-label { color: var(--ice); }

/* the palette result hint is plain text, unlike the HUD button of the
   same class name — reset the chrome it inherits */
.cmdk-list .cmdk-hint {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
  letter-spacing: 0;
  text-transform: none;
  backdrop-filter: none;
  clip-path: none;
  cursor: inherit;
  display: inline;
}
.cmdk-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14.5px;
}
.cmdk-foot {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.6px;
}
.cmdk-foot span { display: inline-flex; align-items: center; gap: 5px; }
.cmdk-foot span:last-child { margin-left: auto; }
.cmdk-foot kbd {
  border: 1px solid var(--line);
  padding: 1px 5px;
  color: var(--cyan-dim);
}

@media (max-width: 560px) {
  .cmdk-box { margin-top: 8vh; }
  .cmdk-kind { display: none; }
  .cmdk-foot span:not(:last-child) { display: none; }
}

/* ==========================================================================
   RESUME / RECRUITER VIEW  (resume.html)
   --------------------------------------------------------------------------
   Deliberately plain. Recruiters who want facts rather than a rendering demo
   land here, and Ctrl+P turns it into a correctly paginated PDF.
   ========================================================================== */
body.resume-mode { background: var(--bg-2); }
body.resume-mode .bg-scan { display: none; }

.resume-shell { position: relative; z-index: 10; }

.resume-page {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 84px) var(--gut) 90px;
}

.r-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--cyan);
}
.r-head h1 {
  font-family: var(--f-display);
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ice);
  margin: 0;
  line-height: 1.02;
}
.r-title {
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 9px 0 0;
}
.r-contact {
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.85;
}
.r-contact a { color: var(--text-dim); }
.r-contact a:hover { color: var(--cyan); }

.r-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 8px;
}
.r-actions .btn { display: inline-flex; align-items: center; gap: 9px; }
.r-actions .btn svg { width: 15px; height: 15px; }

.r-block { margin-top: 40px; }
.r-block > h2 {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.r-block p { margin: 0 0 12px; font-size: 15.5px; color: var(--text); }

.r-job, .r-proj { margin-bottom: 26px; }
.r-job:last-child, .r-proj:last-child { margin-bottom: 0; }

.r-jobtop {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.r-jobtop h3, .r-proj h3 {
  font-family: var(--f-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ice);
  margin: 0;
  letter-spacing: 0.3px;
}
.r-at { color: var(--cyan-dim); }
.r-when {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 1.4px;
  color: var(--text-dim);
  white-space: nowrap;
  text-transform: uppercase;
}
.r-loc {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 3px 0 9px !important;
}
.r-job ul { margin: 0 0 10px; }
.r-job li {
  position: relative;
  padding-left: 17px;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}
.r-job li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 7px; height: 1px;
  background: var(--cyan-dim);
}
.r-stack {
  font-family: var(--f-mono);
  font-size: 12px !important;
  color: var(--text-dim) !important;
  margin: 8px 0 0 !important;
}
.r-stack b {
  color: var(--cyan-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 10px;
  margin-right: 7px;
}
.r-metric {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--cyan);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.r-skillrow {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.r-skillrow:last-child { border-bottom: 0; }
.r-skillrow h3 {
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 3px 0 0;
  font-weight: 500;
}
.r-tier { display: block; font-size: 14.5px; color: var(--text); margin-bottom: 5px; }
.r-tier:last-child { margin-bottom: 0; }
.r-tier b {
  display: inline-block;
  min-width: 88px;
  font-family: var(--f-display);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
}
.r-plain li {
  font-size: 15px;
  color: var(--text);
  padding-left: 17px;
  position: relative;
  margin-bottom: 5px;
}
.r-plain li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 7px; height: 1px;
  background: var(--cyan-dim);
}

@media (max-width: 620px) {
  .r-head { flex-direction: column; gap: 14px; }
  .r-contact { text-align: left; }
  .r-skillrow { grid-template-columns: 1fr; gap: 8px; }
}

/* ==========================================================================
   PRINT — resume.html is the page built for paper
   ========================================================================== */
@media print {
  @page { margin: 14mm 14mm 16mm; }

  body.resume-mode {
    background: #fff !important;
    color: #111 !important;
    font-size: 10.5pt;
    line-height: 1.45;
  }
  body.resume-mode .bg-grid,
  body.resume-mode .bg-vignette,
  body.resume-mode .bg-scan,
  .no-print, .r-actions, .skip-link, #boot-bar { display: none !important; }

  .resume-page { max-width: none; padding: 0; margin: 0; }

  .r-head { border-bottom: 2px solid #111; padding-bottom: 10pt; }
  .r-head h1 { color: #000 !important; font-size: 22pt; }
  .r-title   { color: #333 !important; font-size: 9pt; letter-spacing: 2pt; margin-top: 4pt; }
  .r-contact { color: #333 !important; font-size: 8.5pt; line-height: 1.5; }
  .r-contact a { color: #333 !important; text-decoration: none; }

  .r-block { margin-top: 14pt; }
  .r-block > h2 {
    color: #000 !important;
    font-size: 9.5pt;
    letter-spacing: 2pt;
    border-bottom: 0.75pt solid #999;
    padding-bottom: 3pt;
    margin-bottom: 7pt;
  }
  .r-block p, .r-job li, .r-tier, .r-plain li { color: #111 !important; font-size: 10pt; }
  .r-jobtop h3, .r-proj h3 { color: #000 !important; font-size: 11pt; }
  .r-when, .r-loc { color: #444 !important; font-size: 8.5pt; }
  .r-stack { color: #444 !important; font-size: 8.5pt !important; }
  .r-stack b, .r-tier b, .r-at, .r-metric { color: #000 !important; }
  .r-job li::before, .r-plain li::before { background: #666; }
  .r-skillrow { border-bottom: 0.5pt solid #ddd; padding: 5pt 0; }
  .r-skillrow h3 { color: #333 !important; }

  /* keep a job or project from splitting across a page break */
  .r-job, .r-proj, .r-skillrow { break-inside: avoid; page-break-inside: avoid; }
  .r-block > h2 { break-after: avoid; page-break-after: avoid; }
}
