/* ========================================================
   HAMZA'S HOUSE - v4
   OW-leaning. Professional. Each section uses a full palette
   with one dominant accent and its own stage atmosphere.
   ======================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #0a0e16; color: #e8ecf1;
}

body {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
}

button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
a      { color: inherit; text-decoration: none; }

:root {
  --acc:  #ffd166;
  --acc2: #ef476f;
  --acc-dim:  rgba(255, 209, 102, 0.14);
  --acc-glow: rgba(255, 209, 102, 0.4);

  /* atmosphere - overridden per character */
  --atmos-1: rgba(255, 209, 102, 0.06);
  --atmos-2: rgba(239, 71, 111, 0.05);

  /* lighter neutrals than v2 */
  --bg0: #0a0e16;
  --bg1: #141a26;
  --bg2: #1d2533;
  --bg3: #2a3344;
  --line:    rgba(255, 255, 255, 0.07);
  --line-2:  rgba(255, 255, 255, 0.13);
  --line-3:  rgba(255, 255, 255, 0.2);
  --text:    #eef1f6;
  --text-2:  #b8c0cc;
  --text-3:  #707b8c;
  --text-4:  #424b5c;

  /* full palette available everywhere - sections compose with these */
  --c-emerald: #4ade80;
  --c-cyan:    #22d3ee;
  --c-blue:    #60a5fa;
  --c-violet:  #a78bfa;
  --c-pink:    #f472b6;
  --c-rose:    #fb7185;
  --c-red:     #ef4444;
  --c-amber:   #f59e0b;
  --c-gold:    #ffd166;
  --c-orange:  #fb923c;

  --f-display: 'Unbounded', 'Oswald', sans-serif;
  --f-body:    'Inter Tight', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;
}

/* ============================================================
   BOOT - sleeker, OW-leaning
   ============================================================ */

#boot {
  position: fixed; inset: 0; z-index: 3000;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(239, 71, 111, 0.08), transparent 45%),
    radial-gradient(ellipse at 70% 70%, rgba(34, 211, 238, 0.06), transparent 45%),
    radial-gradient(ellipse at 50% 55%, #0c1320 0%, #050810 70%, #000 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
#boot-fx { position: absolute; inset: 0; opacity: 0.7; mix-blend-mode: screen; }
.boot-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(0,0,0,0.85) 100%);
}

.boot-stack { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: center; }

.boot-mark { position: relative; padding: 1.8rem 3rem 1rem; }
.bm-corner { position: absolute; width: 22px; height: 22px; border: 2px solid var(--acc); opacity: 0; }
.bm-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.bm-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.bm-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.bm-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.boot-logo {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.95; letter-spacing: -0.025em;
  color: #fff; white-space: nowrap;
  display: flex; align-items: baseline; gap: 0.25em;
  text-shadow: 0 0 60px rgba(255, 209, 102, 0.3);
}
.bl-lead { color: var(--acc); }
.bl-rest { font-weight: 300; letter-spacing: 0.01em; opacity: 0.92; }

.boot-sub {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.4em;
  color: var(--text-3); text-align: center;
  margin-top: 0.7rem; text-transform: uppercase;
}

.boot-lines {
  width: min(440px, 88vw); margin: 2rem 0 1.6rem;
  font-family: var(--f-mono); font-size: 10px; line-height: 1.75;
}
.bl-row {
  display: grid; grid-template-columns: 14px 1fr auto;
  gap: 0.6rem; align-items: center; opacity: 0;
}
.bl-row .bl-tag    { color: var(--text-4); }
.bl-row .bl-body   { color: var(--text-3); letter-spacing: 0.04em; }
.bl-row .bl-status { color: var(--text-4); font-size: 9px; letter-spacing: 0.15em; border: 1px solid var(--text-4); padding: 1px 6px; }
.bl-row.ok .bl-tag    { color: #3b5a42; }
.bl-row.ok .bl-status { color: #4a7a5a; border-color: #2a3a30; }

/* START button - simplified to just "START" */
.boot-start {
  position: relative; display: flex; flex-direction: column;
  align-items: center; gap: 0.7rem; margin-top: 0.4rem;
  cursor: pointer; opacity: 0;
}
.bs-hex {
  position: relative; display: inline-block;
  width: clamp(220px, 26vw, 300px); height: clamp(58px, 6.8vw, 74px);
  filter: drop-shadow(0 0 35px rgba(255, 209, 102, 0.45));
}
.bs-hex svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bs-hex-bg { fill: rgba(255, 209, 102, 0.1); transition: fill 0.2s ease; }
.bs-hex-stroke { fill: none; stroke: var(--acc); stroke-width: 1.5; transition: stroke-width 0.15s ease; }
.boot-start:hover .bs-hex-bg     { fill: rgba(255, 209, 102, 0.22); }
.boot-start:hover .bs-hex-stroke { stroke-width: 2.4; }

/* properly centered START */
.bs-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  letter-spacing: 0.5em; color: #fff;
  text-shadow: 0 0 18px var(--acc-glow);
  z-index: 2;
  text-indent: 0.5em;  /* compensate for letter-spacing */
}
.bs-glint {
  position: absolute; top: 0; left: -30%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-20deg);
  animation: bs-glint 2.8s ease-in-out infinite;
  z-index: 3; pointer-events: none;
}
@keyframes bs-glint {
  0%, 100% { left: -30%; opacity: 0; }
  40% { opacity: 1; }
  60% { left: 130%; opacity: 0; }
}
.bs-hint {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.35em;
  color: var(--text-3); text-transform: uppercase;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.boot-footer {
  position: absolute; bottom: 1.4rem; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 1.8rem; z-index: 5;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.2em;
  color: var(--text-4);
}
.boot-skip {
  cursor: pointer; padding: 4px 10px; border: 1px solid var(--line);
  transition: all 0.15s ease;
}
.boot-skip:hover { border-color: var(--acc); color: var(--acc); }

/* ============================================================
   APP SHELL
   ============================================================ */

#app {
  position: fixed; inset: 0; z-index: 100;
  display: grid;
  grid-template-rows: 42px 1fr clamp(150px, 18.5vh, 190px);
  background: var(--bg0);
  opacity: 0; pointer-events: none;
}
#app.live { opacity: 1; pointer-events: all; }

/* subtle film grain - lighter than v2's CRT */
#app::after {
  content: ''; position: absolute; inset: 0; z-index: 998;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 65%, rgba(0,0,0,0.45) 100%);
}

/* ============================================================
   TOP HUD
   ============================================================ */

#hud-top {
  grid-row: 1;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 0 1.3rem;
  background: linear-gradient(180deg, rgba(10, 14, 22, 0.94), rgba(10, 14, 22, 0.78));
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 500;
}
#hud-top::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--acc) 50%, transparent 95%);
  opacity: 0.45;
}
.hud-l, .hud-r {
  display: flex; align-items: center; gap: 0.9rem;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--text-3);
}
.hud-r { justify-content: flex-end; }

.hud-icn { width: 16px; height: 16px; color: var(--acc); display: inline-flex; }
.hud-mode { font-family: var(--f-display); font-weight: 600; font-size: 11px; letter-spacing: 0.3em; color: #fff; }
.hud-sub  { color: var(--text-3); padding-left: 0.8rem; border-left: 1px solid var(--line-2); }
.hud-c    { font-family: var(--f-display); letter-spacing: 0.18em; font-size: 11px; color: var(--text-2); font-weight: 500; }

.hud-readout { display: flex; align-items: center; gap: 0.4rem; }
.hud-readout .dot {
  width: 6px; height: 6px; background: #22c55e; border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hud-fps { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }

.hud-btn {
  width: 28px; height: 28px; border: 1px solid var(--line-2);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all 0.15s ease;
}
.hud-btn:hover { border-color: var(--acc); color: var(--acc); background: var(--acc-dim); }
.hud-btn svg { width: 14px; height: 14px; }

/* ============================================================
   STAGE
   ============================================================ */

#stage {
  grid-row: 2; position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, var(--atmos-1), transparent 40%, transparent 60%, var(--atmos-2)),
    radial-gradient(ellipse at 50% 100%, var(--atmos-1) 0%, transparent 50%),
    #050810;
  transition: background 0.6s ease;
}
#bg-canvas, #stage-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
#bg-canvas { z-index: 1; }
#stage-canvas { z-index: 2; pointer-events: none; }

#stage::before {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, transparent 60%, rgba(0,0,0,0.25) 88%, rgba(0,0,0,0.55) 100%);
}

/* PREVIEW (hover state) */
.preview {
  position: absolute; inset: 0; z-index: 20;
  display: grid;
  grid-template-columns: 1fr clamp(190px, 19vw, 250px);
  align-items: flex-end;
  padding: 2.2rem 2.8rem 1.8rem;
  pointer-events: none;
}
.pv-inner { max-width: min(760px, 64vw); }
.pv-codename {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.4em;
  color: var(--acc); text-transform: uppercase; margin-bottom: 0.7rem;
  padding-left: 1rem; position: relative;
}
.pv-codename::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 10px; height: 2px;
  background: var(--acc); transform: translateY(-50%);
}
.pv-headline {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.2rem, 5.3vw, 4.85rem); line-height: 0.92;
  letter-spacing: -0.025em; color: #fff;
  text-shadow: 0 0 70px var(--acc-glow);
  max-width: min(760px, 64vw);
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.pv-sub {
  font-family: var(--f-display); font-weight: 500; font-size: 12px;
  letter-spacing: 0.3em; color: var(--acc2);
  text-transform: uppercase; margin-top: 0.5rem;
}
.pv-divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--acc), transparent);
  margin: 1rem 0 0.8rem;
}
.pv-blurb {
  font-family: var(--f-body); font-size: 14px;
  line-height: 1.6; color: var(--text-2);
  max-width: 58ch; margin-bottom: 1.1rem;
}
.pv-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 0.55rem 1.3rem; max-width: 580px;
}
.pv-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding-bottom: 0.3rem; border-bottom: 1px solid var(--acc);
}
.pv-stat .k { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.25em; color: var(--text-3); text-transform: uppercase; }
.pv-stat .v { font-family: var(--f-display); font-weight: 600; font-size: 12px; color: #fff; letter-spacing: 0.06em; }
.pv-tagline {
  margin-top: 1.1rem;
  font-family: var(--f-display); font-weight: 600;
  font-size: 12px; letter-spacing: 0.32em;
  color: var(--acc); text-transform: uppercase;
}
.pv-sidechips {
  display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end;
  align-self: flex-end;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em;
  color: var(--text-3); text-transform: uppercase;
}
.pv-sidechips .chip {
  padding: 4px 12px; border: 1px solid var(--line);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  background: rgba(255, 255, 255, 0.02);
}

/* SECTION VIEW */
.section-view {
  position: absolute; inset: 0; z-index: 25;
  overflow-y: auto; overflow-x: hidden;
  opacity: 0; pointer-events: none;
  display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--acc) transparent;
}
.section-view.live { opacity: 1; pointer-events: all; }
.section-view::-webkit-scrollbar { width: 4px; }
.section-view::-webkit-scrollbar-thumb { background: var(--acc); }

.sv-back {
  position: absolute; top: 1.1rem; left: 1.1rem; z-index: 5;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.25em;
  color: var(--text-2); padding: 7px 14px;
  border: 1px solid var(--line-2);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(10px);
  transition: all 0.15s ease;
}
.sv-back:hover { border-color: var(--acc); color: var(--acc); background: var(--acc-dim); }

.sv-play {
  position: absolute; bottom: 1.1rem; right: 1.1rem; z-index: 5;
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 12px 26px 12px 30px;
  background: var(--acc); color: #0a0e16;
  font-family: var(--f-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.32em;
  clip-path: polygon(13px 0, 100% 0, calc(100% - 13px) 100%, 0 100%);
  box-shadow: 0 0 35px var(--acc-glow), inset 0 0 0 1px rgba(255,255,255,0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sv-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 45px var(--acc-glow), inset 0 0 0 1px rgba(255,255,255,0.36);
}
.sp-arrow { font-size: 9px; }

.sv-inner {
  flex: 1; width: 100%; margin: 0 auto;
  padding: 3.5rem 3rem 6rem; max-width: 1200px;
}

.sv-heading {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.2rem, 4.8vw, 4rem); line-height: 0.95;
  letter-spacing: -0.025em; color: #fff;
  margin-bottom: 0.8rem;
}
.sv-sub {
  font-family: var(--f-body); font-size: 15px;
  color: var(--text-2); max-width: 68ch;
  margin-bottom: 2.5rem;
  padding-left: 1rem; border-left: 3px solid var(--acc);
}

/* ============================================================
   LAYOUT: HOME - clean intro + bio + facts (no constellation)
   ============================================================ */

.layout-home {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 3rem; align-items: start;
  padding-top: 1rem;
}

.home-intro {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  line-height: 1.45; letter-spacing: -0.01em;
  color: #fff; max-width: 60ch;
  padding: 1.3rem 1.6rem;
  background: linear-gradient(135deg, var(--atmos-1), transparent);
  border-left: 3px solid var(--acc);
}

.home-bio {
  margin-top: 1.8rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.home-bio p {
  font-family: var(--f-body); font-size: 15px; line-height: 1.7;
  color: var(--text-2);
}

/* right column: facts panel */
.home-facts {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  padding: 1.4rem 1.6rem;
  position: relative;
}
.home-facts::before {
  content: 'PROFILE'; position: absolute; top: -8px; left: 16px;
  background: var(--bg0); padding: 0 8px;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.35em;
  color: var(--acc);
}
.home-fact {
  display: grid; grid-template-columns: 100px 1fr; gap: 1rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line);
  font-family: var(--f-body); font-size: 13px;
}
.home-fact:last-child { border-bottom: 0; }
.home-fact .k {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--text-3); text-transform: uppercase; align-self: center;
}
.home-fact .v { color: var(--text); }

/* ============================================================
   LAYOUT: LABS - three concurrent dossiers
   Tab strip on left, full dossier on right.
   Multiple accent colors visible in status / tags / funding.
   ============================================================ */

.layout-labs {
  display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem;
  min-height: 100%;
}
.labs-tabs {
  display: flex; flex-direction: column; gap: 0.5rem;
  position: sticky; top: 1rem; align-self: flex-start;
}
.lab-tab {
  text-align: left; padding: 0.95rem 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}
.lab-tab::after {
  content: ''; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; background: var(--text-4);
  transition: background 0.2s;
}
.lab-tab:hover {
  background: rgba(74, 222, 128, 0.05);
  border-left-color: var(--c-emerald);
}
.lab-tab:hover::after { background: var(--c-emerald); box-shadow: 0 0 8px var(--c-emerald); }
.lab-tab.active {
  background: rgba(74, 222, 128, 0.08);
  border-color: var(--c-emerald);
  border-left-width: 3px;
}
.lab-tab.active::after { background: var(--c-emerald); box-shadow: 0 0 10px var(--c-emerald); }
.lab-tab .lt-name {
  font-family: var(--f-display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.08em; color: #fff; margin-bottom: 0.2rem;
}
.lab-tab .lt-focus {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.05em;
  color: var(--text-3);
}

.lab-dossier { display: flex; flex-direction: column; gap: 1.6rem; }
.lab-dossier-header { padding-bottom: 1.4rem; border-bottom: 2px solid var(--c-emerald); }
.lab-dossier-header .ldh-name {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.7rem, 2.7vw, 2.4rem);
  letter-spacing: -0.01em; color: #fff; margin-bottom: 0.25rem;
}
.lab-dossier-header .ldh-focus {
  font-family: var(--f-body); font-size: 14px; color: var(--text-2);
  margin-bottom: 0.7rem;
}

/* status uses a *different* color than the section accent - full palette in play */
.lab-status-ribbon {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 5px 14px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--c-amber); background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--c-amber);
  text-transform: uppercase;
}
.lab-status-ribbon::before {
  content: ''; width: 5px; height: 5px; background: var(--c-amber);
  border-radius: 50%; box-shadow: 0 0 8px var(--c-amber);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.lab-story p {
  font-family: var(--f-body); font-size: 15px; line-height: 1.75;
  color: var(--text-2); margin-bottom: 0.9rem;
}

.lab-section-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.3em;
  color: var(--c-cyan); text-transform: uppercase;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--line);
  margin-bottom: 0.7rem;
}

.lab-subs { padding-left: 1rem; border-left: 1px solid var(--line-2); }
.lab-sub {
  padding: 0.7rem 0; border-bottom: 1px dashed var(--line);
  display: grid; grid-template-columns: 1.5fr 2fr; gap: 1.5rem; align-items: baseline;
}
.lab-sub:last-child { border-bottom: 0; }
.lab-sub .n {
  font-family: var(--f-display); font-weight: 600; font-size: 13px;
  letter-spacing: 0.1em; color: var(--c-emerald);
  text-transform: uppercase;
}
.lab-sub .d {
  font-family: var(--f-body); font-size: 13px; line-height: 1.55;
  color: var(--text-2);
}

.lab-funding {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--c-violet); letter-spacing: 0.04em;
  padding: 0.7rem 1rem;
  background: rgba(167, 139, 250, 0.05);
  border-left: 2px solid var(--c-violet);
  line-height: 1.55;
}

/* ============================================================
   LAYOUT: CAPSTONE - single-project page
   Big pitch + architecture stages + app modules + deadline ribbon
   Multiple accent colors for visual variety per section.
   ============================================================ */

.layout-capstone { display: flex; flex-direction: column; gap: 1.8rem; }

.cap-pitch {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.4; letter-spacing: -0.005em;
  color: #fff; max-width: 70ch;
  padding: 1.2rem 1.5rem;
  border-left: 3px solid var(--c-red);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), transparent);
}

.cap-arch-title, .cap-app-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 0.5rem; margin-bottom: 0.7rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--line);
}
.cap-arch-title { color: var(--c-red); }
.cap-app-title  { color: var(--c-cyan); }

.cap-arch {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem; position: relative;
}
.cap-stage {
  position: relative; padding: 1.1rem 1rem;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), transparent 60%);
  border-top: 2px solid var(--c-red);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
.cap-stage:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.cap-stage .s-num {
  font-family: var(--f-mono); font-size: 20px;
  color: var(--c-red); line-height: 1; margin-bottom: 0.3rem; font-weight: 300;
}
.cap-stage .s-name {
  font-family: var(--f-display); font-weight: 700; font-size: 11px;
  letter-spacing: 0.25em; color: #fff; margin-bottom: 0.3rem;
}
.cap-stage .s-chip {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.08em;
  color: var(--c-amber); margin-bottom: 0.4rem; text-transform: uppercase;
}
.cap-stage .s-text {
  font-family: var(--f-body); font-size: 11.5px; line-height: 1.5;
  color: var(--text-2);
}

.cap-app {
  padding: 1.2rem 1.5rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.05), transparent);
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.cap-app .app-name {
  font-family: var(--f-display); font-weight: 700; font-size: 18px;
  letter-spacing: 0.06em; color: #fff; margin-bottom: 0.5rem;
}
.cap-app .app-status {
  font-family: var(--f-body); font-size: 13.5px; line-height: 1.6; color: var(--text-2);
  margin-bottom: 0.9rem;
}
.cap-modules { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cap-module {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em;
  padding: 4px 11px;
  color: var(--c-cyan); border: 1px solid var(--c-cyan);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  background: rgba(34, 211, 238, 0.04);
}

.cap-deadline {
  align-self: flex-start;
  font-family: var(--f-display); font-weight: 700;
  font-size: 13px; letter-spacing: 0.32em;
  color: var(--c-red); padding: 9px 18px;
  border: 2px solid var(--c-red);
  background: rgba(239, 68, 68, 0.1); text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

/* ============================================================
   LAYOUT: GALLERY - featured + masonry
   First project gets a wide hero card, rest in adaptive grid.
   ============================================================ */

.layout-gallery { display: grid; gap: 1rem; }

.gallery-grid {
  display: grid; gap: 0.8rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.gallery-grid .featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(34, 211, 238, 0.04) 60%, transparent);
}

.proj-card {
  position: relative;
  padding: 1.2rem 1.3rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-2);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.proj-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 0; height: 2px; background: var(--c-amber);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.proj-card:hover { transform: translateY(-3px); border-color: var(--c-amber); }
.proj-card:hover::before { width: 100%; }

.proj-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.7rem;
}
.proj-tag {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.28em;
  color: var(--c-amber); text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid var(--c-amber);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  white-space: nowrap;
}
.proj-year {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--text-3); white-space: nowrap;
}
.proj-title {
  font-family: var(--f-display); font-weight: 600; font-size: 18px;
  letter-spacing: -0.01em; color: #fff;
}
.proj-body {
  font-family: var(--f-body); font-size: 13px; line-height: 1.6;
  color: var(--text-2); flex: 1;
}
.proj-tech { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: auto; }
.proj-tech .t {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.12em;
  color: var(--text-2); padding: 2px 8px;
  border: 1px solid var(--line-2);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
}

/* ============================================================
   LAYOUT: ARCHIVE - papers ledger + cert split
   ============================================================ */

.layout-archive { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.5rem; }

.arch-section-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.3em;
  color: var(--c-violet); text-transform: uppercase;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--line);
  margin-bottom: 0.6rem;
}

.arch-papers { display: flex; flex-direction: column; gap: 0.4rem; }
.arch-paper {
  position: relative; padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--c-violet);
  display: grid; grid-template-columns: auto 1fr; gap: 0.8rem;
  transition: background 0.2s;
}
.arch-paper:hover { background: rgba(167, 139, 250, 0.05); }

.arch-status {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.15em;
  padding: 4px 10px; text-transform: uppercase; text-align: center;
  border: 1px solid currentColor;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  align-self: start; min-width: 110px;
}
.arch-status.ok   { color: var(--c-emerald); background: rgba(74, 222, 128, 0.06); }
.arch-status.warn { color: var(--c-amber);   background: rgba(245, 158, 11, 0.06); }
.arch-status.done { color: var(--c-blue);    background: rgba(96, 165, 250, 0.06); }

.arch-paper .p-title {
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  color: #fff; margin-bottom: 0.2rem; letter-spacing: -0.005em;
}
.arch-paper .p-meta {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--c-violet); text-transform: uppercase; margin-bottom: 0.3rem;
}
.arch-paper .p-blurb {
  font-family: var(--f-body); font-size: 12.5px; line-height: 1.55;
  color: var(--text-2);
}

/* certs - compact list */
.arch-certs { display: flex; flex-direction: column; }
.arch-cert {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px dashed var(--line);
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem;
  align-items: baseline;
}
.arch-cert .c-title {
  font-family: var(--f-display); font-weight: 500; font-size: 13px; color: #fff;
}
.arch-cert .c-detail {
  font-family: var(--f-body); font-size: 11.5px; color: var(--text-3);
  margin-top: 0.15rem; line-height: 1.4;
}
.arch-cert .c-year {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--c-violet); text-align: right; text-transform: uppercase;
  white-space: nowrap;
}

/* ============================================================
   LAYOUT: SKILLS - bar chart with category lanes
   ============================================================ */

.layout-skills { display: grid; gap: 1.6rem; }

.sk-cat {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line);
  padding: 1.2rem 1.4rem;
}
.sk-cat-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 13px; letter-spacing: 0.3em;
  color: var(--c-cyan); margin-bottom: 0.9rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}
.sk-row {
  display: grid;
  grid-template-columns: 170px 1fr 50px 1.4fr;
  gap: 1rem; align-items: center; padding: 0.55rem 0;
  font-family: var(--f-body); font-size: 13.5px;
}
.sk-row + .sk-row { border-top: 1px dashed var(--line); }
.sk-row .n  { color: #fff; font-weight: 500; letter-spacing: 0.005em; }
.sk-row .bar { height: 4px; background: var(--line); position: relative; overflow: hidden; }
.sk-row .bar .fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--c-cyan), #67e8f9);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.45);
}
.sk-row .y  { font-family: var(--f-mono); font-size: 12px; color: var(--c-cyan); font-weight: 500; }
.sk-row .nt { font-size: 12.5px; color: var(--text-2); }

/* ============================================================
   LAYOUT: TIMELINE - journal-vertical
   ============================================================ */

.layout-timeline { display: flex; flex-direction: column; gap: 0; max-width: 920px; }

.tl-list { position: relative; padding-left: 2.4rem; }
.tl-list::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(180deg, var(--c-pink), var(--line-2), transparent);
}
.tl-item { position: relative; margin-bottom: 1.3rem; }
.tl-item::before {
  content: ''; position: absolute; left: -1.85rem; top: 7px;
  width: 12px; height: 12px; background: var(--c-pink);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.5);
}
.tl-date {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--text-3); margin-bottom: 0.25rem; text-transform: uppercase;
}
.tl-tag {
  font-family: var(--f-display); font-weight: 700; font-size: 10px;
  letter-spacing: 0.2em; color: var(--c-pink); text-transform: uppercase;
  padding: 3px 10px; margin-right: 0.7rem;
  border: 1px solid var(--c-pink);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  display: inline-block; vertical-align: middle;
}
.tl-body {
  font-family: var(--f-body); font-size: 13.5px; line-height: 1.55;
  color: var(--text-2); display: inline;
}

/* ============================================================
   LAYOUT: AFFILIATIONS - colored brand tiles
   Each tile colored to match the company's brand, not the section accent.
   ============================================================ */

.layout-wall { display: flex; flex-direction: column; gap: 1.4rem; }

.wall-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.7rem;
}
.wall-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.1rem 1.3rem;
  background: var(--brand, #0e1b33);
  color: var(--brand-text, #fff);
  border: 1px solid rgba(255, 255, 255, 0.18);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  overflow: hidden;
}
.wall-tile::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.15), transparent 55%);
  pointer-events: none;
}
.wall-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
  filter: brightness(1.08);
}
.wall-tile .wt-n {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(14px, 1.4vw, 17px); line-height: 1.05;
  letter-spacing: -0.005em;
  position: relative; z-index: 1;
}
.wall-tile .wt-r {
  font-family: var(--f-body); font-size: 10.5px; line-height: 1.45;
  opacity: 0.85; position: relative; z-index: 1;
}

/* ============================================================
   LAYOUT: PERSONAL - full-color sub-sections
   Colorful (not all orange). Geography uses flag colors,
   ranks use game colors, teams use team colors.
   ============================================================ */

.layout-personal { display: flex; flex-direction: column; gap: 2.2rem; }

.personal-section-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.3em;
  color: var(--acc); text-transform: uppercase;
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--line);
}

/* geography - flag-colored cards */
.geo-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}
.geo-card {
  position: relative; padding: 1.3rem 1.1rem;
  background: linear-gradient(135deg, var(--gc1, #222), var(--gc2, #444));
  color: #fff;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  overflow: hidden;
}
.geo-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.18), transparent 55%);
  pointer-events: none;
}
.geo-flag { font-size: 2.2rem; margin-bottom: 0.5rem; line-height: 1; display: block; }
.geo-country {
  font-family: var(--f-display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.18em; margin-bottom: 0.15rem;
}
.geo-years {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.3em;
  color: rgba(255,255,255,0.85); margin-bottom: 0.5rem;
}
.geo-note {
  font-family: var(--f-body); font-size: 11.5px; line-height: 1.45;
  color: rgba(255,255,255,0.92);
}

/* ranks - colored per game */
.rank-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.65rem;
}
.rank-card {
  position: relative;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rc, #fff) 14%, transparent), transparent);
  border-left: 3px solid var(--rc, #fff);
}
.rank-card .rg {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--text-3); text-transform: uppercase; margin-bottom: 0.2rem;
}
.rank-card .rr {
  font-family: var(--f-display); font-weight: 700; font-size: 16px;
  letter-spacing: 0.04em; color: var(--rc, #fff);
}

/* teams */
.team-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
}
.team-pill {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 1rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc, #fff) 8%, transparent), transparent);
  border: 1px solid var(--line);
  border-left: 3px solid var(--tc, #fff);
}
.team-pill .ts {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.2em;
  color: var(--text-3); text-transform: uppercase; margin-right: auto;
}
.team-pill .tt {
  font-family: var(--f-display); font-weight: 600; font-size: 13px;
  color: #fff; letter-spacing: 0.06em;
}

/* stories - clean two-col */
.stories-list { display: flex; flex-direction: column; gap: 1rem; }
.story-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 1.3rem;
  padding-bottom: 0.9rem; border-bottom: 1px dashed var(--line);
}
.story-item .t {
  font-family: var(--f-display); font-weight: 700; font-size: 12px;
  letter-spacing: 0.18em; color: var(--c-orange); text-transform: uppercase;
  align-self: start;
}
.story-item .d {
  font-family: var(--f-body); font-size: 13.5px; line-height: 1.6;
  color: var(--text-2);
}

/* lifestyle */
.lifestyle-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.lifestyle-list li {
  font-family: var(--f-body); font-size: 13.5px;
  color: var(--text-2); padding-left: 1.3rem; position: relative;
}
.lifestyle-list li::before {
  content: '▸'; position: absolute; left: 0; color: var(--c-orange);
}

/* ============================================================
   LAYOUT: ASTAKERIA - cinematic
   ============================================================ */

.layout-astakeria {
  display: flex; flex-direction: column; gap: 1.7rem;
  position: relative;
}
.layout-astakeria::before {
  content: '';
  position: absolute; top: -3rem; left: -2.5rem; right: -2.5rem; bottom: -3rem;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(251, 113, 133, 0.1), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 107, 53, 0.08), transparent 50%);
  pointer-events: none; z-index: -1;
}

.ast-hook {
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.01em; color: #fff; line-height: 1.25;
  max-width: 30ch;
}
.ast-hook::before { content: '"'; color: var(--c-rose); margin-right: 0.1em; }
.ast-hook::after  { content: '"'; color: var(--c-rose); margin-left: 0.1em; }

.ast-lore { display: flex; flex-direction: column; gap: 0.9rem; }
.ast-lore p {
  font-family: var(--f-body); font-size: 14.5px; line-height: 1.75;
  color: var(--text-2); max-width: 70ch;
}

.ast-section-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.3em;
  color: var(--c-rose); text-transform: uppercase;
  margin-top: 0.7rem;
}

.ast-pillars {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}
.ast-pillar {
  padding: 1.1rem 1.2rem;
  background: linear-gradient(180deg, rgba(251, 113, 133, 0.05), transparent);
  border-top: 2px solid var(--c-rose);
}
.ast-pillar .n {
  font-family: var(--f-display); font-weight: 700; font-size: 16px;
  letter-spacing: 0.16em; color: var(--c-rose); margin-bottom: 0.35rem;
}
.ast-pillar .d {
  font-family: var(--f-body); font-size: 12.5px; line-height: 1.55;
  color: var(--text-2);
}

.ast-heroes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.55rem;
}
.ast-hero {
  padding: 0.95rem 1.15rem;
  background: rgba(255, 255, 255, 0.025);
  border-left: 2px solid var(--c-rose);
  transition: all 0.2s;
}
.ast-hero:hover { background: rgba(251, 113, 133, 0.06); }
.ast-hero .hn { font-family: var(--f-display); font-weight: 700; font-size: 14px; letter-spacing: 0.13em; color: #fff; margin-bottom: 0.2rem; }
.ast-hero .hr { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--c-rose); text-transform: uppercase; margin-bottom: 0.25rem; }
.ast-hero .ht { font-family: var(--f-body); font-style: italic; font-size: 12px; color: var(--text-2); line-height: 1.5; }

.ast-entropy { display: flex; flex-direction: column; gap: 0.4rem; }
.ast-ex {
  display: grid; grid-template-columns: 1fr 22px 1.3fr;
  gap: 0.8rem; align-items: center;
  padding: 0.7rem 0; border-bottom: 1px dashed var(--line);
}
.ast-ex .ext { font-family: var(--f-body); font-size: 12.5px; color: var(--text); font-style: italic; }
.ast-ex .arrow { font-family: var(--f-mono); font-size: 14px; color: var(--c-rose); text-align: center; font-weight: 500; }
.ast-ex .exc { font-family: var(--f-body); font-size: 12.5px; color: var(--text-2); line-height: 1.55; }

.ast-quote {
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  color: var(--c-rose); letter-spacing: -0.005em;
  padding: 1.3rem 0 0.8rem;
  border-top: 1px solid var(--line); margin-top: 0.8rem;
}

/* ============================================================
   LAYOUT: SOON
   ============================================================ */

.layout-soon {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh;
  text-align: center; gap: 1.4rem;
  font-family: var(--f-mono);
}
.soon-ascii {
  color: var(--text-4); font-size: 10px; line-height: 1.2;
  white-space: pre; margin-bottom: 0.8rem;
}
.soon-heading {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 3rem); color: var(--text-3);
  letter-spacing: 0.3em; animation: flicker 3s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
  52% { opacity: 1; }
  54% { opacity: 0.4; }
}
.soon-body p {
  font-family: var(--f-body); font-size: 13.5px; color: var(--text-3);
  margin-bottom: 0.7rem;
}

/* ============================================================
   TRANSITION + SELECT BAR
   ============================================================ */

#transition {
  position: absolute; inset: 0; z-index: 40; pointer-events: none;
  background: var(--bg0);
  opacity: 0;
  backdrop-filter: blur(20px);
}

#selbar {
  grid-row: 3; position: relative; z-index: 400;
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.97), var(--bg0));
  border-top: 1px solid var(--line-2);
  display: flex; flex-direction: column;
}
#selbar::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--acc) 25%, #fff 50%, var(--acc) 75%, transparent 100%);
  opacity: 0.65;
}

.sel-topline {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 1.3rem;
  border-bottom: 1px solid var(--line);
}
.sel-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: 14px; letter-spacing: 0.32em; color: #fff;
}
.sel-title span { color: var(--acc); }

.sel-hint { display: flex; gap: 1.2rem; align-items: center; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em; color: var(--text-3); }
.sh-group { display: flex; align-items: center; gap: 0.4rem; }
.sh-glyph { font-family: var(--f-display); font-weight: 700; font-size: 11px; color: var(--text); letter-spacing: 0; }

.sel-grid {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 5px; padding: 0.5rem 1rem; overflow-x: auto;
  scrollbar-width: none;
}
.sel-grid::-webkit-scrollbar { display: none; }

.sel-bottomline {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; padding: 0.2rem 1rem;
  border-top: 1px solid var(--line);
}
.sb-hex { width: 7px; height: 7px; background: var(--acc); transform: rotate(45deg); box-shadow: 0 0 8px var(--acc-glow); }
.sb-id { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.3em; color: var(--text-2); min-width: 260px; text-align: center; }

/* SLOTS - cleaner, OW-styled */
.slot {
  flex: 0 0 auto;
  width: clamp(70px, 6.6vw, 96px);
  aspect-ratio: 3 / 4;
  position: relative; cursor: pointer;
  background: var(--bg1);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: transform 0.16s cubic-bezier(0.4, 0, 0.2, 1), background 0.12s;
  transform-origin: center bottom;
  opacity: 0;
}
.slot::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 40%, transparent 70%, rgba(0,0,0,0.4) 100%);
  clip-path: inherit; pointer-events: none; z-index: 2;
}
.slot::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  clip-path: inherit; pointer-events: none;
  transition: border-color 0.15s, border-width 0.15s, box-shadow 0.2s;
  z-index: 3;
}
.slot:hover { background: var(--bg2); transform: translateY(-3px); }
.slot:hover::after {
  border-color: var(--s-acc, var(--acc));
  box-shadow: 0 0 18px var(--s-glow, var(--acc-glow));
}
.slot.sel { transform: translateY(-7px); }
.slot.sel::after {
  border-color: var(--s-acc, var(--acc));
  border-width: 2px;
  box-shadow: 0 0 22px var(--s-glow, var(--acc-glow)),
              inset 0 0 22px color-mix(in srgb, var(--s-acc, var(--acc)) 18%, transparent);
}

.slot.soon {
  background: repeating-linear-gradient(0deg, var(--bg1), var(--bg1) 2px, rgba(100, 116, 139, 0.08) 2px, rgba(100, 116, 139, 0.08) 3px);
}
.slot.soon .slot-label { letter-spacing: 0.5em; }

.slot-p1 {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--s-acc, var(--acc)); color: #0a0e16;
  font-family: var(--f-display); font-weight: 700; font-size: 9px; letter-spacing: 0.3em;
  padding: 3px 9px 3px 11px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 5px 100%);
  opacity: 0; transition: opacity 0.15s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 5; pointer-events: none;
}
.slot.sel .slot-p1 { opacity: 1; transform: translateX(-50%) translateY(0); }

.slot-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--s-acc, var(--acc));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 4;
}
.slot:hover .slot-accent, .slot.sel .slot-accent { transform: scaleX(1); }

.slot-portrait {
  position: absolute; inset: 4px 4px 26px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.slot-portrait svg {
  width: 70%; height: 70%;
  color: var(--s-acc, var(--acc));
  opacity: 0.85;
  filter: drop-shadow(0 0 8px var(--s-glow, var(--acc-glow)));
  transition: transform 0.2s ease, opacity 0.15s;
}
.slot:hover .slot-portrait svg { transform: scale(1.1); opacity: 1; }
.slot.sel  .slot-portrait svg { transform: scale(1.14); opacity: 1; }

.slot-label {
  position: absolute; left: 0; right: 0; bottom: 4px;
  font-family: var(--f-display); font-weight: 700;
  font-size: 9px; letter-spacing: 0.16em;
  color: var(--text-2); text-align: center; z-index: 3;
  text-transform: uppercase;
}
.slot:hover .slot-label { color: #fff; }
.slot.sel .slot-label { color: var(--s-acc, var(--acc)); }

.slot-code {
  position: absolute; top: 4px; right: 5px;
  font-family: var(--f-mono); font-size: 7px; letter-spacing: 0.1em;
  color: var(--text-4); z-index: 3; text-transform: uppercase;
}
.slot.sel .slot-code { color: var(--s-acc, var(--acc)); }
.slot-role {
  position: absolute; top: 4px; left: 5px;
  font-family: var(--f-mono); font-size: 7px; letter-spacing: 0.12em;
  color: var(--text-4); z-index: 3; text-transform: uppercase;
}

.hide { display: none !important; }

/* RESPONSIVE */
@media (max-width: 900px) {
  #app { grid-template-rows: 38px 1fr 165px; }
  .preview { padding: 1.4rem 1rem 1rem; grid-template-columns: 1fr; }
  .pv-sidechips { display: none; }
  .sv-inner { padding: 3rem 1.1rem 4rem; }
  .layout-home, .layout-labs, .layout-archive { grid-template-columns: 1fr; }
  .labs-tabs { position: static; flex-direction: row; overflow-x: auto; }
  .lab-tab { min-width: 180px; }
  .cap-arch { grid-template-columns: 1fr; }
  .cap-stage { clip-path: none; }
  .lab-sub { grid-template-columns: 1fr; gap: 0.3rem; }
  .arch-paper { grid-template-columns: 1fr; }
  .sv-back { top: 0.6rem; left: 0.6rem; }
  .sv-play { bottom: 0.6rem; right: 0.6rem; padding: 9px 18px; font-size: 11px; }
  .hud-sub, .hud-c { display: none; }
  .sel-title { font-size: 11px; letter-spacing: 0.22em; }
  .sel-hint { display: none; }
  .slot { width: 60px; }
  .story-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .geo-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   V4 POLISH PASS
   More professional, less templated, still character-select.
   ============================================================ */

:root {
  --bg0: #0b111c;
  --bg1: #121a28;
  --bg2: #1b2637;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f3f6fb;
  --text-2: #c6cfdd;
  --text-3: #8995a8;
}

#stage {
  background:
    radial-gradient(circle at 18% 20%, rgba(96, 165, 250, 0.10), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(244, 114, 182, 0.09), transparent 28%),
    radial-gradient(circle at 65% 85%, rgba(245, 158, 11, 0.09), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 26%, rgba(0,0,0,0.18)),
    #07101c;
}

#app::after {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 20%, transparent 80%, rgba(0,0,0,0.28)),
    radial-gradient(ellipse at 50% 45%, transparent 62%, rgba(0,0,0,0.30) 100%);
}

.boot-sub { color: #9ca8bc; }
.boot-logo { letter-spacing: -0.045em; }
.bs-label { text-indent: 0.48em; }
.bs-hint { color: #aab4c5; }

#hud-top {
  background: linear-gradient(180deg, rgba(12, 18, 29, 0.92), rgba(12, 18, 29, 0.68));
  backdrop-filter: blur(18px);
}
.hud-c { color: #f8fafc; }
.hud-sub { color: #b4bed0; }
.hud-readout { color: #b5c1d5; }

.preview {
  padding: 2.4rem 3rem 1.9rem;
  grid-template-columns: minmax(0, 1fr) clamp(190px, 18vw, 245px);
}
.pv-inner {
  padding: 1.25rem 1.35rem 1.2rem;
  max-width: 720px;
  border-left: 2px solid rgba(255,255,255,0.13);
  background: linear-gradient(90deg, rgba(11,17,28,0.48), rgba(11,17,28,0.18), transparent);
  backdrop-filter: blur(3px);
}
.pv-headline {
  text-shadow: 0 12px 35px rgba(0,0,0,0.45);
}
.pv-blurb { color: #cbd5e1; max-width: 70ch; }
.pv-stats { gap: 0.45rem; }
.pv-stat {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  clip-path: none;
}
.pv-tagline { color: #f8fafc; }

.sv-inner { max-width: 1240px; padding-top: 3.2rem; }
.sv-heading { text-shadow: 0 18px 45px rgba(0,0,0,0.42); }
.sv-sub {
  border-left: 0;
  padding-left: 0;
  color: #c6cfdd;
  position: relative;
}
.sv-sub::before {
  content: '';
  display: inline-block;
  width: 58px;
  height: 2px;
  margin-right: 14px;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--acc), transparent);
}
.sv-back, .sv-play { border-radius: 999px; clip-path: none; }
.sv-play { letter-spacing: 0.22em; }

/* Home as a polished tutorial lobby */
.v4-home {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 2rem;
}
.home-lobby-panel {
  position: relative;
  padding: clamp(1.35rem, 2vw, 2rem);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 10%, rgba(255,209,102,0.14), transparent 30%),
    radial-gradient(circle at 82% 14%, rgba(34,211,238,0.10), transparent 35%),
    linear-gradient(135deg, rgba(255,255,255,0.065), rgba(255,255,255,0.018));
  overflow: hidden;
}
.home-lobby-panel::after {
  content: '';
  position: absolute;
  inset: auto 24px 18px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--c-gold), var(--c-cyan), var(--c-pink), var(--c-gold));
  opacity: 0.13;
  filter: blur(1px);
}
.home-kicker {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--c-gold);
  margin-bottom: 0.9rem;
}
.v4-home .home-intro {
  padding: 0;
  border-left: 0;
  background: transparent;
  max-width: 70ch;
}
.home-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}
.home-step {
  min-height: 145px;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(10, 14, 22, 0.42);
  border: 1px solid rgba(255,255,255,0.11);
}
.home-step span {
  font-family: var(--f-mono);
  color: var(--c-cyan);
  font-size: 11px;
  letter-spacing: 0.2em;
}
.home-step strong {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--f-display);
  font-size: 18px;
  color: #fff;
}
.home-step p {
  margin-top: 0.45rem;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
}
.home-profile-panel {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    rgba(10, 14, 22, 0.40);
  padding: 1.4rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.profile-name {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.05;
  font-size: clamp(1.35rem, 2vw, 2rem);
  color: #fff;
}
.profile-line {
  margin-top: 1rem;
  color: var(--text-2);
  line-height: 1.65;
  font-size: 14px;
}
.profile-facts { margin-top: 1.1rem; }
.home-fact.compact {
  grid-template-columns: 90px 1fr;
  border-color: rgba(255,255,255,0.08);
}

/* Labs: dossier, not three generic tabs */
.v4-labs {
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 1.6rem;
}
.labs-tabs.v4 {
  gap: 0.75rem;
}
.lab-tab.v4 {
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  border-left: 1px solid rgba(255,255,255,0.12);
  padding: 1rem;
  background: rgba(255,255,255,0.035);
  clip-path: none;
}
.lab-tab.v4::after { display: none; }
.lab-tab.v4 .lt-index {
  display: inline-flex;
  width: 32px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(74,222,128,0.12);
  color: var(--c-emerald);
  font-family: var(--f-mono);
  font-size: 10px;
  margin-bottom: 0.65rem;
}
.lab-tab.v4.active,
.lab-tab.v4:hover {
  transform: translateX(4px);
  background:
    radial-gradient(circle at 0 0, rgba(74,222,128,0.16), transparent 45%),
    rgba(255,255,255,0.055);
  border-color: rgba(74,222,128,0.45);
}
.lab-dossier.v4 {
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.12);
  padding: clamp(1.25rem, 2vw, 2rem);
  background:
    radial-gradient(circle at 12% 8%, rgba(74,222,128,0.11), transparent 25%),
    radial-gradient(circle at 92% 18%, rgba(34,211,238,0.10), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
}
.lab-dossier-header.v4 {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255,255,255,0.13);
}
.lab-story.v4 {
  columns: 2 280px;
  column-gap: 2rem;
}
.lab-story.v4 p { break-inside: avoid; }
.lab-signal-list {
  display: grid;
  gap: 0.5rem;
}
.lab-signal-row {
  display: grid;
  grid-template-columns: 54px minmax(150px, 0.7fr) minmax(0, 1.6fr);
  gap: 0.9rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ls-num { font-family: var(--f-mono); color: var(--c-cyan); }
.ls-name { font-family: var(--f-display); font-size: 12px; color: #fff; letter-spacing: 0.08em; }
.ls-desc { color: var(--text-2); font-size: 13px; line-height: 1.55; }

/* Capstone polish */
.v4-capstone .cap-build-window,
.cap-app.v4 {
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
  padding: 1.25rem;
}
.cap-app.v4 {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 1.3rem;
  align-items: start;
}
.cap-app.v4 .cap-app-title { margin-top: 0; }
.cap-module { border-radius: 999px; clip-path: none; }
.cap-stage { border-radius: 16px; clip-path: none; }
.cap-stage:last-child { clip-path: none; }

/* Project shelf */
.v4-gallery { gap: 1.15rem; }
.project-hero-piece {
  min-height: 250px;
  border-radius: 30px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(circle at 10% 10%, rgba(245,158,11,0.20), transparent 25%),
    radial-gradient(circle at 90% 5%, rgba(34,211,238,0.10), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
}
.project-hero-piece .proj-title { font-size: clamp(1.7rem, 3vw, 2.6rem); }
.project-hero-piece .proj-body { max-width: 78ch; font-size: 15px; }
.project-shelf {
  display: grid;
  gap: 0.65rem;
}
.project-shelf-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.032);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.project-shelf-item:hover {
  transform: translateX(6px);
  border-color: rgba(245,158,11,0.45);
  background: rgba(245,158,11,0.055);
}
.shelf-marker {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  color: var(--c-amber);
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.28);
}
.project-shelf-item .proj-body { font-size: 13px; }
.project-shelf-item .proj-tech { margin-top: 0.45rem; }
.proj-tag, .proj-tech .t { border-radius: 999px; clip-path: none; }

/* Archive polish */
.arch-paper.v4 {
  grid-template-columns: 44px auto 1fr;
  border-radius: 22px;
  border-left: 0;
  border: 1px solid rgba(255,255,255,0.10);
}
.arch-index {
  font-family: var(--f-mono);
  color: var(--c-violet);
  opacity: 0.9;
}
.arch-status { border-radius: 999px; clip-path: none; min-width: 112px; }
.arch-cert.v4 {
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.032);
}

/* Skills readability */
.sk-row {
  grid-template-columns: 145px minmax(150px, 1fr) 44px minmax(240px, 1.2fr);
  border-radius: 14px;
  padding: 0.45rem 0.55rem;
}
.sk-row:hover { background: rgba(34,211,238,0.055); }
.sk-row .nt { color: #d3dbe7; }
.sk-row .bar { background: rgba(255,255,255,0.10); }

/* Wall: brand tiles with logo initials */
.wall-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.wall-tile.v4 {
  border-radius: 26px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 24%, transparent), rgba(255,255,255,0.035)),
    rgba(255,255,255,0.025);
  border: 1px solid color-mix(in srgb, var(--brand) 45%, rgba(255,255,255,0.12));
}
.wt-logo {
  align-self: flex-start;
  min-width: 48px;
  height: 36px;
  padding: 0 0.7rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 13px;
  color: var(--brand-text);
  background: var(--brand);
  box-shadow: 0 10px 25px color-mix(in srgb, var(--brand) 32%, transparent);
}

/* Cleaner mobile behavior */
@media (max-width: 900px) {
  .v4-home, .v4-labs, .layout-archive, .cap-app.v4 { grid-template-columns: 1fr; }
  .home-steps { grid-template-columns: 1fr; }
  .lab-story.v4 { columns: 1; }
  .lab-signal-row { grid-template-columns: 44px 1fr; }
  .ls-desc { grid-column: 2; }
  .sk-row { grid-template-columns: 120px 1fr 42px; }
  .sk-row .nt { grid-column: 1 / -1; padding-left: 0; }
}

/* ============================================================
   FINAL V4 SUPER POLISH OVERRIDES
   Cleaner Overwatch-leaning feel, less Claude-card repetition,
   stronger stage atmospheres, brighter professional presentation.
   ============================================================ */

:root {
  --bg0: #080d16;
  --bg1: #121a28;
  --bg2: #1a2638;
  --bg3: #24324a;
  --glass: rgba(13, 20, 32, 0.58);
  --glass-2: rgba(255,255,255,0.065);
  --line: rgba(255,255,255,0.085);
  --line-2: rgba(255,255,255,0.16);
  --text: #f5f7fb;
  --text-2: #c7d0de;
  --text-3: #8b98ac;
}

body {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 209, 102, 0.08), transparent 28%),
    radial-gradient(circle at 85% 22%, rgba(34, 211, 238, 0.07), transparent 30%),
    radial-gradient(circle at 50% 85%, rgba(239, 71, 111, 0.06), transparent 34%),
    #080d16;
}

#boot {
  background:
    radial-gradient(circle at 28% 26%, rgba(255, 209, 102, 0.12), transparent 30%),
    radial-gradient(circle at 74% 36%, rgba(34, 211, 238, 0.09), transparent 34%),
    linear-gradient(135deg, #070b12 0%, #0d1420 45%, #07131f 100%);
}
#boot::before {
  content: ''; position: absolute; inset: 8%; pointer-events: none;
  border: 1px solid rgba(255,255,255,0.045);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255,209,102,0.18) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgba(34,211,238,0.10) 50%, transparent 50.2%);
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 68%);
}
.boot-logo { filter: drop-shadow(0 12px 34px rgba(0,0,0,0.45)); }
.boot-sub { color: rgba(245, 247, 251, 0.45); }
.boot-lines {
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(6, 10, 16, 0.32);
  backdrop-filter: blur(8px);
}
.bl-row .bl-body { color: rgba(199, 208, 222, 0.72); }
.bl-row.ok .bl-status { color: #65d98c; border-color: rgba(101,217,140,0.28); background: rgba(101,217,140,0.045); }
.bs-hex-bg { fill: rgba(255, 209, 102, 0.135); }
.bs-label { letter-spacing: 0.62em; text-indent: 0.62em; }
.bs-hint { color: rgba(199, 208, 222, 0.52); }

#hud-top {
  background: rgba(8, 13, 22, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.22);
}
.hud-sub, .hud-readout { color: rgba(199,208,222,0.64); }
.hud-mode, .hud-c { text-shadow: 0 0 18px rgba(255,255,255,0.08); }

#stage {
  background:
    radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--acc) 14%, transparent), transparent 27%),
    radial-gradient(circle at 72% 64%, color-mix(in srgb, var(--acc2) 10%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(0,0,0,0.25)),
    #08101b;
}
#stage::before {
  z-index: 4;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 18%, transparent 64%, rgba(0,0,0,0.45) 100%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.12), rgba(0,0,0,0.62) 88%);
}
#stage::after {
  content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  opacity: 0.46;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse at 50% 48%, #000 0%, rgba(0,0,0,0.48) 48%, transparent 82%);
  transform: perspective(900px) rotateX(58deg) translateY(12%);
  transform-origin: center bottom;
}

body[data-char="home"] #stage {
  background:
    radial-gradient(circle at 58% 35%, rgba(255, 209, 102, 0.17), transparent 28%),
    radial-gradient(circle at 26% 38%, rgba(239, 71, 111, 0.10), transparent 30%),
    radial-gradient(circle at 82% 70%, rgba(34, 211, 238, 0.08), transparent 32%),
    linear-gradient(180deg, #0c1625, #070c14 78%);
}
body[data-char="labs"] #stage {
  background:
    radial-gradient(circle at 62% 36%, rgba(74, 222, 128, 0.19), transparent 26%),
    radial-gradient(circle at 24% 72%, rgba(34, 211, 238, 0.11), transparent 34%),
    linear-gradient(180deg, #0b1a19, #071014 72%);
}
body[data-char="capstone"] #stage {
  background:
    radial-gradient(circle at 60% 38%, rgba(239, 68, 68, 0.18), transparent 27%),
    radial-gradient(circle at 30% 70%, rgba(245, 158, 11, 0.10), transparent 32%),
    linear-gradient(180deg, #181019, #080d14 76%);
}
body[data-char="projects"] #stage {
  background:
    radial-gradient(circle at 58% 34%, rgba(245, 158, 11, 0.22), transparent 27%),
    radial-gradient(circle at 22% 75%, rgba(96, 165, 250, 0.08), transparent 36%),
    linear-gradient(180deg, #17140c, #090d13 78%);
}
body[data-char="research"] #stage {
  background:
    radial-gradient(circle at 58% 34%, rgba(167, 139, 250, 0.20), transparent 28%),
    radial-gradient(circle at 24% 72%, rgba(245, 158, 11, 0.08), transparent 34%),
    linear-gradient(180deg, #151224, #080c14 76%);
}
body[data-char="skills"] #stage {
  background:
    radial-gradient(circle at 58% 34%, rgba(34, 211, 238, 0.20), transparent 28%),
    radial-gradient(circle at 26% 72%, rgba(74, 222, 128, 0.08), transparent 34%),
    linear-gradient(180deg, #091824, #070d14 76%);
}
body[data-char="timeline"] #stage {
  background:
    radial-gradient(circle at 55% 35%, rgba(244, 114, 182, 0.18), transparent 30%),
    radial-gradient(circle at 25% 70%, rgba(255, 209, 102, 0.08), transparent 34%),
    linear-gradient(180deg, #17101d, #080d14 78%);
}
body[data-char="affiliations"] #stage {
  background:
    radial-gradient(circle at 56% 38%, rgba(229, 231, 235, 0.16), transparent 30%),
    radial-gradient(circle at 76% 66%, rgba(96, 165, 250, 0.10), transparent 32%),
    linear-gradient(180deg, #111827, #070d14 78%);
}
body[data-char="personal"] #stage {
  background:
    radial-gradient(circle at 58% 34%, rgba(251, 146, 60, 0.20), transparent 30%),
    radial-gradient(circle at 22% 74%, rgba(96, 165, 250, 0.08), transparent 34%),
    linear-gradient(180deg, #17130f, #080d14 76%);
}
body[data-char="astakeria"] #stage {
  background:
    radial-gradient(circle at 58% 36%, rgba(251, 113, 133, 0.19), transparent 28%),
    radial-gradient(circle at 78% 65%, rgba(167, 139, 250, 0.12), transparent 32%),
    linear-gradient(180deg, #1b1018, #080b14 78%);
}

.preview {
  z-index: 21;
  grid-template-columns: minmax(360px, 0.72fr) 1fr;
  align-items: center;
  padding: 2.6rem 3.2rem 2rem;
}
.pv-inner {
  max-width: 620px;
  padding: 1.4rem 1.6rem 1.35rem;
  background: linear-gradient(135deg, rgba(8, 13, 22, 0.40), rgba(255,255,255,0.025));
  border-left: 3px solid var(--acc);
  box-shadow: 0 24px 80px rgba(0,0,0,0.22);
  backdrop-filter: blur(6px);
}
.pv-headline { font-size: clamp(2.8rem, 5.6vw, 5.4rem); }
.pv-blurb { color: rgba(231,237,247,0.82); font-size: 14.5px; }
.pv-stat {
  padding: 0.52rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.pv-stat .v { color: color-mix(in srgb, var(--acc) 64%, white); }
.pv-sidechips .chip {
  opacity: 0.9;
  background: rgba(8, 13, 22, 0.48);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}

.section-view {
  z-index: 30;
  background:
    linear-gradient(90deg, rgba(8,13,22,0.94) 0%, rgba(8,13,22,0.82) 42%, rgba(8,13,22,0.50) 100%);
}
.section-view.live::before {
  content: ''; position: fixed; inset: 42px 0 clamp(150px, 18.5vh, 190px); z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 74% 32%, color-mix(in srgb, var(--acc) 12%, transparent), transparent 26%),
    radial-gradient(circle at 28% 78%, color-mix(in srgb, var(--acc2) 8%, transparent), transparent 32%);
}
.sv-inner {
  max-width: 1320px;
  padding-top: 3.1rem;
}
.sv-heading {
  max-width: 950px;
  text-shadow: 0 20px 80px rgba(0,0,0,0.45);
}
.sv-sub {
  color: rgba(231,237,247,0.78);
  border-left: 0;
  position: relative;
  padding-left: 1.15rem;
}
.sv-sub::before {
  content: ''; position: absolute; left: 0; top: 0.12rem; bottom: 0.12rem; width: 3px; border-radius: 99px;
  background: linear-gradient(var(--acc), var(--acc2));
}

/* HOME FINAL */
.v4-home {
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
}
.home-lobby-panel, .home-profile-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 90px rgba(0,0,0,0.28);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 1.6rem;
  overflow: hidden;
}
.home-lobby-panel { position: relative; }
.home-lobby-panel::after {
  content: ''; position: absolute; right: -12%; top: -20%; width: 42%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,209,102,0.18), transparent 68%);
}
.home-kicker {
  font-family: var(--f-mono); color: var(--acc); letter-spacing: 0.28em; font-size: 10px; text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.home-steps { grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.home-step {
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
}
.profile-name { font-size: clamp(1.1rem, 2vw, 1.45rem); }
.profile-line { color: rgba(231,237,247,0.78); }
.home-fact.compact {
  grid-template-columns: 88px 1fr;
  border-color: rgba(255,255,255,0.09);
}

/* LABS FINAL */
.v4-labs { grid-template-columns: 320px 1fr; gap: 1.6rem; }
.labs-tabs.v4 {
  padding: 0.8rem;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 26px;
  backdrop-filter: blur(10px);
}
.lab-tab.v4 {
  border-radius: 20px;
  clip-path: none;
  border-left: 0;
  background: rgba(255,255,255,0.045);
}
.lab-tab.v4.active {
  background: linear-gradient(135deg, rgba(74,222,128,0.18), rgba(34,211,238,0.08));
  border-color: rgba(74,222,128,0.42);
}
.lt-index { display: block; font-family: var(--f-mono); color: var(--c-amber); font-size: 10px; letter-spacing: 0.24em; margin-bottom: 0.55rem; }
.lab-dossier.v4 {
  border-radius: 30px;
  padding: 1.35rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 90px rgba(0,0,0,0.26);
}
.lab-dossier-header.v4 { border-bottom-color: rgba(74,222,128,0.32); }
.lab-signal-row {
  display: grid; grid-template-columns: 52px minmax(150px, 0.32fr) 1fr;
  gap: 1rem; align-items: start;
  padding: 0.82rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.lab-signal-row:last-child { border-bottom: 0; }
.ls-num { font-family: var(--f-mono); color: var(--c-cyan); letter-spacing: 0.2em; }
.ls-name { font-family: var(--f-display); font-size: 12px; color: #fff; letter-spacing: 0.08em; text-transform: uppercase; }
.ls-desc { color: rgba(231,237,247,0.78); line-height: 1.55; font-size: 13.5px; }

/* CAPSTONE FINAL */
.v4-capstone { gap: 1.15rem; }
.cap-build-window, .cap-app.v4, .cap-pitch {
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 80px rgba(0,0,0,0.22);
  backdrop-filter: blur(10px);
}
.cap-pitch { background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(245,158,11,0.06)); }
.cap-build-window { padding: 1.2rem; background: rgba(255,255,255,0.04); }
.cap-arch { gap: 0.7rem; }
.cap-stage { border-radius: 20px; clip-path: none; }
.cap-app.v4 { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1rem; background: linear-gradient(135deg, rgba(34,211,238,0.11), rgba(255,255,255,0.03)); }
.cap-module { border-radius: 999px; clip-path: none; }

/* PROJECTS FINAL */
.v4-gallery {
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 1.15rem;
  align-items: start;
}
.project-hero-piece {
  position: sticky; top: 1rem;
  min-height: 430px;
  border-radius: 34px;
  padding: 1.7rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 24%, rgba(245,158,11,0.25), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 26px 100px rgba(0,0,0,0.30);
}
.project-hero-piece::after {
  content: 'FEATURED BUILD'; position: absolute; right: -1rem; bottom: 1.8rem;
  font-family: var(--f-display); font-size: clamp(2.3rem, 6vw, 5.6rem); font-weight: 800; letter-spacing: -0.06em;
  color: rgba(255,255,255,0.035); white-space: nowrap; transform: rotate(-4deg);
}
.project-hero-piece .proj-title { font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 0.95; margin-top: 2.2rem; }
.project-hero-piece .proj-body { font-size: 15.5px; max-width: 48ch; margin-top: 1rem; }
.project-shelf { display: flex; flex-direction: column; gap: 0.75rem; }
.project-shelf-item {
  display: grid; grid-template-columns: 58px 1fr; gap: 0.8rem;
  padding: 0.85rem;
  border-radius: 24px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.project-shelf-item:hover {
  transform: translateX(6px);
  border-color: rgba(245,158,11,0.48);
  background: rgba(245,158,11,0.075);
}
.shelf-marker {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  font-family: var(--f-mono); color: var(--c-amber); border: 1px solid rgba(245,158,11,0.42);
  background: rgba(245,158,11,0.06);
}
.project-shelf-item .proj-title { font-size: 16px; }
.project-shelf-item .proj-body { font-size: 13px; }
.proj-tag, .proj-tech .t { border-radius: 999px; clip-path: none; }

/* RESEARCH FINAL */
.v4-archive {
  grid-template-columns: 1.28fr 0.72fr;
  gap: 1.15rem;
}
.v4-archive section, .v4-archive aside {
  border-radius: 30px;
  padding: 1.2rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 26px 90px rgba(0,0,0,0.25);
}
.arch-paper.v4 {
  grid-template-columns: 42px 128px 1fr;
  border-left: 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.09);
}
.arch-index { font-family: var(--f-mono); color: rgba(199,208,222,0.45); }
.arch-cert.v4 { border-radius: 18px; padding: 0.85rem; }

/* WALL FINAL */
.wall-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.wall-tile {
  min-height: 145px;
  border-radius: 26px;
  clip-path: none;
  box-shadow: 0 20px 70px rgba(0,0,0,0.26);
  isolation: isolate;
}
.wall-tile::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 78% 20%, rgba(255,255,255,0.28), transparent 28%);
  opacity: 0.55;
}
.wall-name { font-size: 18px; }

/* PERSONAL FINAL */
.geo-card, .rank-card, .story-item, .team-pill {
  border-radius: 22px;
  clip-path: none;
}
.geo-grid { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
.rank-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.team-row, .sports-row { gap: 0.5rem; }

/* SELECT BAR FINAL */
#selbar {
  background: rgba(7, 11, 18, 0.80);
  backdrop-filter: blur(18px);
  box-shadow: 0 -18px 60px rgba(0,0,0,0.36);
}
.sel-title { letter-spacing: 0.34em; }
.sel-title span:last-child { color: var(--acc); }
.slot {
  border-radius: 14px;
  clip-path: polygon(12px 0, calc(100% - 4px) 0, 100% 12px, calc(100% - 12px) 100%, 4px 100%, 0 calc(100% - 12px));
  background:
    radial-gradient(circle at 50% 22%, var(--s-glow, rgba(255,255,255,0.08)), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015));
}
.slot.sel { transform: translateY(-9px) scale(1.035); }
.slot-portrait { inset: 7px 6px 28px; }
.slot-portrait::before {
  content: ''; position: absolute; inset: 8px 13px 4px; border-radius: 999px 999px 18px 18px;
  background: linear-gradient(180deg, var(--s-glow, rgba(255,255,255,0.08)), transparent);
  opacity: 0.85;
}
.slot-portrait svg { position: relative; z-index: 2; width: 74%; height: 74%; }
.slot-label { bottom: 7px; }

/* TRANSITION FINAL */
#transition {
  background:
    radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--acc) 18%, transparent), transparent 35%),
    rgba(8, 13, 22, 0.54);
  backdrop-filter: blur(10px);
}

@media (max-width: 1000px) {
  .preview { grid-template-columns: 1fr; align-items: end; padding: 1.4rem; }
  .pv-inner { max-width: 100%; }
  .v4-gallery, .v4-labs, .v4-archive, .cap-app.v4 { grid-template-columns: 1fr; }
  .project-hero-piece { position: relative; min-height: auto; }
  .lab-signal-row { grid-template-columns: 42px 1fr; }
  .ls-desc { grid-column: 2; }
  .geo-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}

/* ============================================================
   V4.4 link rails and external project buttons
   ============================================================ */
.link-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.pill-link, .project-link, .mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--acc) 55%, rgba(255,255,255,0.15));
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  color: #fff;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.48rem 0.72rem;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.pill-link:hover, .project-link:hover, .mini-link:hover {
  transform: translateY(-1px);
  border-color: var(--acc);
  background: color-mix(in srgb, var(--acc) 18%, rgba(255,255,255,0.04));
  color: #fff;
}
.project-link {
  margin-top: 0.75rem;
  color: var(--acc);
}
.mini-link {
  margin-left: 0.35rem;
  padding: 0.26rem 0.48rem;
  font-size: 8px;
  opacity: 0.9;
}
.wall-link {
  margin: 0.65rem auto 0;
  color: var(--brand-text);
  border-color: color-mix(in srgb, var(--brand-text) 50%, transparent);
}
.lab-signal-row .mini-link {
  vertical-align: middle;
}
.cap-links {
  margin-top: 0.2rem;
  justify-content: flex-start;
}


/* ============================================================
   V4.5 CORRECTION PASS
   - First Hamza hover fixed in JS
   - Projects now use equal tiles with click-to-expand stage
   - Capstone pipeline made less "tab/chip" heavy
   - Stronger per-character stage environments
   - Safer wrapping for long project/app titles
   ============================================================ */

.pv-headline,
.proj-title,
.app-name,
.sv-heading,
.tile-title,
.p-title,
.c-title {
  overflow-wrap: anywhere;
  word-break: normal;
}

.cap-app.v4 {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
}
.cap-app-copy,
.cap-modules {
  min-width: 0;
}
.app-name {
  font-size: clamp(1.45rem, 3vw, 2.45rem);
  line-height: 1;
}

.cap-arch {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
.cap-stage {
  display: grid;
  grid-template-columns: 54px minmax(92px, 0.22fr) minmax(100px, 0.22fr) 1fr;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(239,68,68,0.16), rgba(245,158,11,0.04) 55%, rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.105);
}
.cap-stage .s-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
}
.cap-stage .s-name,
.cap-stage .s-chip,
.cap-stage .s-text {
  min-width: 0;
}
.cap-stage .s-chip {
  margin-bottom: 0;
  color: color-mix(in srgb, var(--acc) 72%, #fff);
}
.cap-stage .s-text {
  color: rgba(231,237,247,0.78);
}

/* Projects: equal shelf tiles, selected project expands into the stage */
.v45-gallery {
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(430px, 1.22fr);
  gap: 1.2rem;
  align-items: stretch;
}
.project-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  align-content: start;
}
.project-tile {
  text-align: left;
  min-height: 124px;
  border-radius: 22px;
  padding: 0.95rem;
  border: 1px solid rgba(255,255,255,0.11);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.028));
  box-shadow: 0 16px 45px rgba(0,0,0,0.20);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.28rem;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.project-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(245,158,11,0.42);
  background:
    radial-gradient(circle at 85% 18%, rgba(245,158,11,0.16), transparent 45%),
    linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
}
.project-tile.active {
  border-color: rgba(245,158,11,0.72);
  background:
    radial-gradient(circle at 85% 18%, rgba(245,158,11,0.24), transparent 48%),
    linear-gradient(135deg, rgba(245,158,11,0.12), rgba(255,255,255,0.035));
}
.tile-num {
  font-family: var(--f-mono);
  color: var(--c-amber);
  letter-spacing: 0.22em;
  font-size: 10px;
}
.tile-tag {
  width: fit-content;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #0a0e16;
  background: var(--c-amber);
}
.tile-title {
  font-family: var(--f-display);
  font-size: clamp(0.92rem, 1.2vw, 1.15rem);
  font-weight: 760;
  line-height: 1.05;
  color: #fff;
  align-self: center;
}
.tile-year {
  font-family: var(--f-mono);
  font-size: 10px;
  color: rgba(231,237,247,0.5);
}
.project-stage {
  position: sticky;
  top: 1rem;
  min-height: 520px;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.13);
  background:
    radial-gradient(circle at 76% 24%, rgba(245,158,11,0.23), transparent 28%),
    radial-gradient(circle at 24% 82%, rgba(96,165,250,0.10), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.025));
  box-shadow: 0 26px 100px rgba(0,0,0,0.30);
  overflow: hidden;
}
.project-stage::after {
  content: 'PROJECT SELECTED';
  position: absolute;
  right: -1.2rem;
  bottom: 1.35rem;
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 6vw, 6rem);
  letter-spacing: -0.065em;
  font-weight: 850;
  color: rgba(255,255,255,0.035);
  transform: rotate(-4deg);
  white-space: nowrap;
}
.project-detail-panel {
  display: none;
  position: relative;
  z-index: 1;
  padding: clamp(1.35rem, 2vw, 2rem);
  min-height: 520px;
}
.project-detail-panel.active {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.project-detail-panel .proj-title {
  font-size: clamp(2.15rem, 4vw, 4.15rem);
  line-height: 0.93;
  margin-top: 1rem;
  max-width: 12ch;
}
.project-detail-panel .proj-body {
  max-width: 60ch;
  margin-top: 1.1rem;
  font-size: 15.5px;
  color: rgba(231,237,247,0.82);
}
.project-detail-panel .proj-tech {
  margin-top: 1rem;
}

/* Project legacy classes hidden from the new renderer if older markup is cached */
.project-hero-piece,
.project-shelf {
  display: none;
}

/* Stronger "environment" overlays so each character feels like a place, not just a color */
#stage::after {
  opacity: 0.55;
  mix-blend-mode: screen;
}
body[data-char="home"] #stage::after {
  background:
    radial-gradient(circle at 16% 25%, rgba(255,209,102,0.22) 0 2px, transparent 3px),
    radial-gradient(circle at 84% 35%, rgba(239,71,111,0.18) 0 2px, transparent 3px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 220px 170px, 260px 210px, 88px 88px, 88px 88px;
}
body[data-char="labs"] #stage::after {
  background:
    radial-gradient(circle at 23% 44%, transparent 0 42px, rgba(74,222,128,0.18) 43px 45px, transparent 46px),
    radial-gradient(circle at 23% 44%, transparent 0 78px, rgba(34,211,238,0.11) 79px 81px, transparent 82px),
    linear-gradient(90deg, rgba(74,222,128,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(34,211,238,0.055) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
}
body[data-char="capstone"] #stage::after {
  background:
    linear-gradient(30deg, transparent 45%, rgba(239,68,68,0.10) 46% 47%, transparent 48%),
    linear-gradient(150deg, transparent 40%, rgba(245,158,11,0.08) 41% 42%, transparent 43%),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 190px 120px, 210px 160px, 64px 64px, 64px 64px;
}
body[data-char="projects"] #stage::after {
  background:
    linear-gradient(90deg, transparent 0 16%, rgba(245,158,11,0.12) 16.2% 16.8%, transparent 17% 33%, rgba(96,165,250,0.09) 33.2% 33.8%, transparent 34%),
    linear-gradient(0deg, transparent 0 68%, rgba(255,255,255,0.05) 68.5% 69.5%, transparent 70%);
  background-size: 360px 220px, 100% 140px;
}
body[data-char="research"] #stage::after {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(167,139,250,0.12) 12.2% 12.7%, transparent 13% 24%, rgba(255,255,255,0.055) 24.2% 24.7%, transparent 25%),
    linear-gradient(0deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 260px 100%, 100% 58px;
}
body[data-char="skills"] #stage::after {
  background:
    radial-gradient(circle at 35% 42%, rgba(34,211,238,0.16) 0 4px, transparent 5px),
    radial-gradient(circle at 65% 62%, rgba(74,222,128,0.12) 0 3px, transparent 4px),
    linear-gradient(90deg, rgba(34,211,238,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(34,211,238,0.04) 1px, transparent 1px);
  background-size: 120px 120px, 160px 160px, 48px 48px, 48px 48px;
}
body[data-char="timeline"] #stage::after {
  background:
    linear-gradient(90deg, transparent 0 49.5%, rgba(244,114,182,0.16) 49.7% 50.3%, transparent 50.5%),
    radial-gradient(circle at 50% 25%, rgba(255,209,102,0.12) 0 5px, transparent 6px),
    radial-gradient(circle at 50% 55%, rgba(244,114,182,0.12) 0 5px, transparent 6px);
  background-size: auto, auto, auto;
}
body[data-char="affiliations"] #stage::after {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    radial-gradient(circle at 70% 24%, rgba(96,165,250,0.12), transparent 30%);
  background-size: 130px 110px, 130px 110px, auto;
}
body[data-char="personal"] #stage::after {
  background:
    linear-gradient(90deg, rgba(108,171,221,0.12), rgba(254,190,16,0.08), rgba(0,122,51,0.10), rgba(196,30,58,0.10), rgba(189,48,57,0.10)),
    radial-gradient(circle at 20% 30%, rgba(251,146,60,0.13), transparent 28%);
  background-size: 100% 8px, auto;
  background-repeat: no-repeat;
  background-position: 0 78%, center;
}
body[data-char="astakeria"] #stage::after {
  background:
    radial-gradient(circle at 70% 34%, rgba(251,113,133,0.18), transparent 24%),
    linear-gradient(110deg, transparent 0 42%, rgba(167,139,250,0.10) 43% 44%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(251,113,133,0.12), transparent 46%);
}
body[data-char="soon"] #stage::after {
  background:
    repeating-linear-gradient(90deg, rgba(148,163,184,0.10) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(0deg, rgba(148,163,184,0.06) 0 1px, transparent 1px 17px);
}

/* Personal correction */
.personal-section-title {
  letter-spacing: 0.16em;
}
.lifestyle-list li {
  text-transform: none;
}

@media (max-width: 980px) {
  .v45-gallery {
    grid-template-columns: 1fr;
  }
  .project-stage {
    position: relative;
    min-height: 390px;
  }
  .project-detail-panel {
    min-height: 390px;
  }
  .project-tile-grid {
    grid-template-columns: 1fr;
  }
  .cap-stage {
    grid-template-columns: 44px 1fr;
  }
  .cap-stage .s-chip,
  .cap-stage .s-text {
    grid-column: 2;
  }
}

/* ============================================================
   V4.6 FINAL POLISH PASS
   Recruiter-readable signal strips, cleaner project proof blocks,
   stronger stage ambience, and less generic section chrome.
   ============================================================ */

.recruiter-strip {
  margin: 1.05rem 0 1.25rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid color-mix(in srgb, var(--acc) 24%, rgba(255,255,255,0.08));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--acc) 10%, transparent), transparent 42%),
    linear-gradient(90deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 18px 55px rgba(0,0,0,0.18);
}
.rs-title {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: color-mix(in srgb, var(--acc) 82%, #fff);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.rs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}
.rs-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.075);
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(244,247,251,0.9);
  font-family: var(--f-body);
  font-size: 12px;
  line-height: 1.1;
}

.proj-proof {
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem;
  border-left: 2px solid var(--acc);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--acc) 12%, transparent), rgba(255,255,255,0.025));
  color: rgba(232,238,247,0.86);
  font-size: 13px;
  line-height: 1.55;
}
.proj-proof span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--acc);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Make the select bar feel more like a premium roster, not simple icons. */
.slot {
  isolation: isolate;
}
.slot::before {
  content: '';
  position: absolute;
  inset: 4px 7px 14px;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--s-acc) 32%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.018));
  opacity: 0.18;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.slot:hover::before,
.slot.sel::before {
  opacity: 0.72;
  transform: translateY(0) scale(1);
}
.slot-portrait svg {
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--s-acc) 50%, transparent));
}
.slot.sel .slot-portrait svg {
  filter: drop-shadow(0 0 24px color-mix(in srgb, var(--s-acc) 78%, transparent));
}

/* Sharper section readability without turning every layout into cards. */
.sv-heading {
  text-shadow: 0 18px 60px rgba(0,0,0,0.35), 0 0 34px color-mix(in srgb, var(--acc) 16%, transparent);
}
.sv-sub {
  max-width: 920px;
  color: rgba(216,225,238,0.78);
}
.layout-gallery.v45-gallery {
  align-items: stretch;
}
.project-tile-grid {
  align-content: start;
}
.project-detail-panel.active {
  box-shadow: 0 24px 90px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.07);
}

/* More distinct stage atmospheres through silhouettes and prop-like light layers. */
body[data-char="labs"] #stage::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), transparent 20%, transparent 62%, rgba(0,0,0,0.42) 100%),
    radial-gradient(circle at 21% 48%, rgba(74,222,128,0.14), transparent 18%),
    radial-gradient(circle at 82% 42%, rgba(34,211,238,0.10), transparent 24%),
    linear-gradient(90deg, transparent 0 18%, rgba(255,255,255,0.035) 18.2% 18.6%, transparent 19% 79%, rgba(255,255,255,0.03) 79.2% 79.6%, transparent 80%);
}
body[data-char="capstone"] #stage::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 20%, transparent 62%, rgba(0,0,0,0.50) 100%),
    radial-gradient(circle at 70% 38%, rgba(239,68,68,0.16), transparent 26%),
    linear-gradient(120deg, transparent 0 44%, rgba(245,158,11,0.08) 44.4% 45.2%, transparent 46%);
}
body[data-char="projects"] #stage::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 20%, transparent 62%, rgba(0,0,0,0.48) 100%),
    linear-gradient(90deg, rgba(245,158,11,0.06), transparent 25% 70%, rgba(96,165,250,0.05)),
    radial-gradient(ellipse at 50% 88%, rgba(245,158,11,0.16), transparent 42%);
}
body[data-char="research"] #stage::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 20%, transparent 64%, rgba(0,0,0,0.52) 100%),
    linear-gradient(90deg, transparent 0 16%, rgba(167,139,250,0.10) 16.2% 16.8%, transparent 17% 84%, rgba(255,255,255,0.045) 84.2% 84.7%, transparent 85%);
}
body[data-char="skills"] #stage::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 20%, transparent 64%, rgba(0,0,0,0.48) 100%),
    radial-gradient(circle at 30% 34%, rgba(34,211,238,0.13), transparent 22%),
    radial-gradient(circle at 76% 70%, rgba(74,222,128,0.10), transparent 28%);
}
body[data-char="affiliations"] #stage::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.075), transparent 20%, transparent 62%, rgba(0,0,0,0.40) 100%),
    radial-gradient(ellipse at 50% 72%, rgba(255,255,255,0.11), transparent 48%);
}

/* Responsive guardrails for the new recruiter strips. */
@media (max-width: 900px) {
  .rs-chips span { font-size: 11px; }
  .recruiter-strip { clip-path: none; border-radius: 14px; }
}


/* v4.7 preview headline stability for longer titles */
body[data-char="capstone"] .pv-headline,
body[data-char="research"] .pv-headline,
body[data-char="projects"] .pv-headline,
body[data-char="labs"] .pv-headline {
  max-width: min(820px, 66vw);
  font-size: clamp(2.05rem, 4.8vw, 4.55rem);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* v4.7.1 title wrapping fix
   Keep words intact in the preview headline, then scale the title down instead of
   breaking a final letter onto its own line. */
.pv-headline {
  max-width: min(820px, 66vw);
  font-size: clamp(2.05rem, 4.8vw, 4.55rem);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

body[data-char="capstone"] .pv-headline,
body[data-char="research"] .pv-headline,
body[data-char="projects"] .pv-headline,
body[data-char="labs"] .pv-headline {
  max-width: min(880px, 68vw);
  font-size: clamp(1.95rem, 4.55vw, 4.35rem);
}

@media (max-width: 900px) {
  .pv-headline,
  body[data-char="capstone"] .pv-headline,
  body[data-char="research"] .pv-headline,
  body[data-char="projects"] .pv-headline,
  body[data-char="labs"] .pv-headline {
    max-width: 100%;
    font-size: clamp(1.85rem, 9vw, 3.25rem);
  }
}

/* ============================================================
   v4.7.3 BOOT DUAL-MODE PICKER
   Replaces the single START button with a two-mode chooser.
   Pro mode → cv.html. Interactive mode → existing flow.
   ============================================================ */

.boot-picker {
  position: relative; z-index: 6;
  display: flex; flex-direction: column; align-items: center;
  width: min(880px, 92vw);
  margin-top: 1.4rem;
  opacity: 0;
}

.bp-prompt {
  display: flex; align-items: center; justify-content: center;
  gap: 0.85rem;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.42em; color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.bp-prompt-arrow { color: var(--acc); }
.bp-prompt-text { color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 12px; letter-spacing: 0.32em; }

.bp-modes {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.1rem;
  align-items: stretch;
  width: 100%;
}

.bp-mode {
  position: relative;
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: 1.5rem 1.5rem 1.3rem;
  text-align: left;
  background: linear-gradient(140deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012));
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.bp-mode::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--bp-acc, var(--acc)) 18%, transparent), transparent 50%);
  opacity: 0; transition: opacity 0.25s ease;
  pointer-events: none;
}
.bp-mode::after {
  content: ''; position: absolute; left: 0; top: 0;
  height: 3px; width: 100%;
  background: var(--bp-acc, var(--acc));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.bp-mode:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--bp-acc, var(--acc)) 50%, rgba(255,255,255,0.15));
  background: linear-gradient(140deg,
    color-mix(in srgb, var(--bp-acc, var(--acc)) 8%, rgba(255,255,255,0.045)),
    rgba(255,255,255,0.018));
  box-shadow: 0 14px 38px color-mix(in srgb, var(--bp-acc, var(--acc)) 22%, transparent),
              inset 0 1px 0 rgba(255,255,255,0.08);
}
.bp-mode:hover::before { opacity: 1; }
.bp-mode:hover::after  { transform: scaleX(1); }

.bp-pro { --bp-acc: #ffd166; }
.bp-int { --bp-acc: #ef476f; }

.bp-mode-tag {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--bp-acc);
}
.bp-mode-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  letter-spacing: 0.04em; color: #fff;
  line-height: 1.05;
}
.bp-mode-sub {
  font-family: var(--f-body); font-size: 12px;
  color: var(--text-3); font-style: italic;
  margin-top: -0.15rem;
}
.bp-mode-list {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 0.28rem;
  margin: 0.4rem 0 0.6rem;
  border-top: 1px dashed rgba(255,255,255,0.1);
  padding-top: 0.6rem;
}
.bp-mode-list li {
  font-family: var(--f-body); font-size: 12px;
  color: var(--text-2); padding-left: 1rem;
  position: relative; line-height: 1.4;
}
.bp-mode-list li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--bp-acc); font-size: 9px; top: 2px;
}
.bp-mode-cta {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--f-display); font-weight: 700;
  font-size: 11px; letter-spacing: 0.28em;
  color: #0a0e16;
  background: var(--bp-acc);
  padding: 7px 16px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--bp-acc) 32%, transparent);
}

.bp-divider {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0.5rem;
  padding: 0 0.3rem;
}
.bp-divider-line {
  flex: 1; width: 1px; min-height: 24px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.15), transparent);
}
.bp-divider-or {
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.32em; color: var(--text-4);
  text-transform: uppercase;
}

.bp-foot {
  margin-top: 1.05rem;
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.18em; color: var(--text-4);
  text-transform: uppercase;
}
.bp-hint::before { content: '· '; }
.bp-hint::after  { content: ' ·'; }

@media (max-width: 760px) {
  .boot-picker { width: min(380px, 92vw); margin-top: 1rem; }
  .bp-modes { grid-template-columns: 1fr; gap: 0.7rem; }
  .bp-divider { flex-direction: row; padding: 0.2rem 0; }
  .bp-divider-line { width: auto; min-height: 1px; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent); }
  .bp-mode { padding: 1.1rem 1.2rem; }
  .bp-mode-title { font-size: 1rem; }
  .bp-mode-list { gap: 0.22rem; }
  .bp-mode-list li { font-size: 11.5px; }
}

/* ============================================================
   v4.7.4 HUD MODE TOGGLES (HOME + PRO MODE on interactive)
   Plus resume link disable styling.
   ============================================================ */

.hud-cv-toggle, .hud-home-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 4px 11px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-2);
  text-transform: uppercase;
  margin-right: 0.4rem;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.hud-home-toggle:hover {
  color: var(--acc2);
  border-color: var(--acc2);
  background: rgba(239, 71, 111, 0.08);
}
.hud-home-toggle .hcv-arrow { color: var(--acc2); }

.hud-cv-toggle {
  /* Pro mode is the recruiter shortcut — make it slightly more obvious */
  color: var(--acc);
  border-color: var(--acc);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.10), rgba(255, 209, 102, 0.02));
  font-weight: 700;
  letter-spacing: 0.32em;
  padding: 5px 13px;
  position: relative;
  animation: hud-pro-pulse 2.6s ease-in-out infinite;
}
.hud-cv-toggle::after {
  content: ''; position: absolute; inset: -2px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  border: 1px solid var(--acc);
  opacity: 0;
  pointer-events: none;
  animation: hud-pro-ring 2.6s ease-in-out infinite;
}
.hud-cv-toggle:hover {
  color: #0a0e16;
  background: var(--acc);
  border-color: var(--acc);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.55);
  animation: none;
}
.hud-cv-toggle:hover::after { opacity: 0; animation: none; }
.hud-cv-toggle .hcv-arrow { color: var(--acc); }
.hud-cv-toggle:hover .hcv-arrow { color: #0a0e16; }

@keyframes hud-pro-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 209, 102, 0); }
  50%      { box-shadow: 0 0 14px rgba(255, 209, 102, 0.45); }
}
@keyframes hud-pro-ring {
  0%, 100% { opacity: 0; transform: scale(1); }
  40%      { opacity: 0.55; transform: scale(1.06); }
  100%     { opacity: 0; transform: scale(1.14); }
}

@media (max-width: 900px) {
  .hcv-label { display: none; }
  .hud-cv-toggle, .hud-home-toggle { padding: 4px 8px; }
  .hud-cv-toggle::after { display: none; }
}

/* Resume link disabled state — both interactive and CV mode */
.is-disabled, .resume-disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: auto;
  position: relative;
}
.is-disabled::after, .resume-disabled::after {
  content: 'updating';
  position: absolute; top: -8px; right: -6px;
  font-family: var(--f-mono); font-size: 8px;
  letter-spacing: 0.18em; padding: 1px 5px;
  color: #0a0e16; background: var(--acc);
  border-radius: 2px;
}
