/* ============================================================
   Kit Horvath — Portfolio
   Dark "command center" aesthetic. Built for the 55-second read.
   ============================================================ */

:root {
  --bg:        #0a0920;   /* deep indigo (Wiz) */
  --bg-2:      #100e2a;
  --surface:   #16142f;
  --surface-2: #1d1b3d;
  --line:      rgba(167, 181, 220, 0.13);
  --line-2:    rgba(167, 181, 220, 0.26);

  --text:      #ecebf7;
  --text-dim:  #a6a4c4;
  --text-mute: #6f6c93;

  --accent:    #7cf6a0;  /* Wiz mint-lime */
  --accent-2:  #a78bfa;  /* violet signal */
  --accent-3:  #dfe33a;  /* logo yellow */
  --danger:    #fb7185;  /* risk path */

  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1160px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-3), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--accent); color: #04120f; padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(100deg, var(--accent), #b7ffcb);
  color: #06210f; box-shadow: 0 8px 30px -10px rgba(124, 246, 160, 0.45);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px rgba(124, 246, 160, 0.55); }
.btn--ghost { background: rgba(255,255,255,0.02); color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(10, 9, 32, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; gap: 24px; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; }
.nav__mark { width: 24px; height: 22px; object-fit: contain; display: block; }
.nav__name { font-size: 16px; letter-spacing: -0.01em; }
.nav__links { margin-left: auto; display: flex; gap: 28px; }
.nav__links a { color: var(--text-dim); font-size: 15px; font-weight: 500; transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__cta { padding: 9px 18px; font-size: 14px; }

@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 0 90px; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(900px 500px at 72% 20%, rgba(167,139,250,0.12), transparent 60%),
    radial-gradient(700px 500px at 15% 80%, rgba(124,246,160,0.10), transparent 60%),
    linear-gradient(180deg, rgba(10,9,32,0.35) 0%, rgba(10,9,32,0.75) 70%, var(--bg) 100%);
}
.hero__content { position: relative; z-index: 2; }

/* Illustrated portrait — floats over the animated canvas */
.hero__portrait {
  position: absolute; z-index: 2; right: 3vw; top: 84px;
  width: clamp(240px, 28vw, 440px); height: auto;
  pointer-events: none; image-rendering: auto;
  filter: drop-shadow(0 18px 50px rgba(0,0,0,0.55));
  animation: heroFloat 6s var(--ease) infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (max-width: 900px) {
  .hero__portrait {
    right: 50%; transform: translateX(50%);
    width: clamp(220px, 60vw, 360px); opacity: 0.28;
  }
  @keyframes heroFloat {
    0%, 100% { transform: translateX(50%) translateY(0); }
    50% { transform: translateX(50%) translateY(-14px); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero__portrait { animation: none; }
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 22px;
}
.hero__eyebrow::before { content:""; width: 26px; height: 1px; background: var(--accent-3); display:inline-block; }
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.04; max-width: 16ch; margin-bottom: 26px;
}
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--text-dim); max-width: 52ch; margin-bottom: 38px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 42px; border: 1px solid var(--line-2); border-radius: 999px; display: flex; justify-content: center; padding-top: 8px;
}
.hero__scroll span { width: 3px; height: 8px; border-radius: 3px; background: var(--accent-3); animation: scrolldot 1.6s var(--ease) infinite; }
@keyframes scrolldot { 0%{opacity:0; transform: translateY(-4px);} 40%{opacity:1;} 100%{opacity:0; transform: translateY(12px);} }

/* ---------- Proof strip ---------- */
.proof { padding: 56px 0 40px; border-top: 1px solid var(--line); }
.proof__ticker {
  display: flex; flex-wrap: wrap; gap: 10px 12px; justify-content: center; margin-bottom: 44px;
}
.proof__ticker span {
  font-size: 13.5px; font-weight: 500; color: var(--text-dim);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.proof__ticker span:nth-child(odd) { color: var(--text); }

.proof__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pcard {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.pcard:hover { transform: translateY(-4px); border-color: var(--line-2); }
.pcard__num {
  font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .1em;
  color: var(--accent); background: rgba(124,246,160,0.08); border: 1px solid rgba(124,246,160,0.2);
  width: fit-content; padding: 5px 11px; border-radius: 8px; margin-bottom: 18px; text-transform: uppercase;
}
.pcard h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pcard p { color: var(--text-dim); font-size: 15px; }

/* ---------- Section heads ---------- */
.section-head { max-width: 40ch; margin-bottom: 48px; }
.section-kicker {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.12; }

/* ---------- Narrative tiles ---------- */
.narrative { padding: 90px 0; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.tile:hover { transform: translateY(-5px); border-color: var(--line-2); }
.tile__media {
  height: 168px; position: relative; display: flex; align-items: center; justify-content: center; gap: 16px;
  background: radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--bg-2));
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.tile__before, .tile__after {
  font-family: var(--font-display); font-size: 13px; font-weight: 600; padding: 10px 14px; border-radius: 10px;
}
.tile__before { color: var(--danger); border: 1px dashed rgba(251,113,133,0.4); background: rgba(251,113,133,0.06); letter-spacing: .04em; }
.tile__after { color: var(--accent); border: 1px solid rgba(124,246,160,0.4); background: rgba(124,246,160,0.08); }
.tile__arrow { color: var(--text-mute); font-size: 20px; }
.tile__media--complexity::before {
  content:""; position:absolute; inset:0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 22px 22px; opacity:.5; mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
}
.chip {
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text);
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  position: relative;
}
.tile__media--collab .chip:not(:last-child)::after {
  content:""; position:absolute; right:-14px; top:50%; width:14px; height:1px; background: var(--accent); opacity:.5;
}
.tile__human, .tile__agent {
  font-family: var(--font-display); font-size: 13px; font-weight: 600; padding: 12px 16px; border-radius: 12px;
}
.tile__human { color: var(--text); border: 1px solid var(--line-2); background: var(--surface); }
.tile__agent { color: var(--accent-2); border: 1px solid rgba(167,139,250,0.4); background: rgba(167,139,250,0.08); }
.tile__link { width: 40px; height: 2px; background: linear-gradient(90deg, var(--text-mute), var(--accent-2)); position: relative; }
.tile__link::after { content:""; position:absolute; right:0; top:50%; transform: translateY(-50%); width:6px; height:6px; border-radius:50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.tile__body { padding: 24px 24px 28px; }
.tile__index { font-family: var(--font-display); font-size: 13px; color: var(--text-mute); font-weight: 700; letter-spacing: .1em; }
.tile__body h3 { font-size: 1.25rem; margin: 10px 0 10px; }
.tile__body p { color: var(--text-dim); font-size: 15px; }

/* ---------- Selected work ---------- */
.work { padding: 90px 0; border-top: 1px solid var(--line); }
.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.case {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.case:hover { transform: translateY(-6px); border-color: var(--line-2); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7); }
.case__media { height: 240px; position: relative; overflow: hidden; }
.case__media::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, transparent 40%, rgba(14,22,38,0.85));
}
.case__media--01 { background: radial-gradient(130% 120% at 20% 20%, #16402f, #100e2a), repeating-linear-gradient(115deg, transparent 0 12px, rgba(124, 246, 160, 0.06) 12px 13px); }
.case__media--02 { background: radial-gradient(130% 120% at 80% 20%, #2a1e52, #100e2a), repeating-linear-gradient(65deg, transparent 0 12px, rgba(167, 139, 250, 0.07) 12px 13px); }
.case__media--03 { background: radial-gradient(130% 120% at 30% 80%, #123a34, #100e2a), repeating-linear-gradient(90deg, transparent 0 14px, rgba(124, 246, 160, 0.05) 14px 15px); }
.case__media--04 { background: radial-gradient(130% 120% at 70% 70%, #2c2350, #100e2a), repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,0.04) 12px 13px); }
.case__media::before {
  content:""; position:absolute; inset:0; opacity:.35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: radial-gradient(90% 90% at 50% 30%, #000, transparent);
}
.case__body { padding: 24px 26px 28px; position: relative; z-index: 1; }
.case__tag { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.case__body h3 { font-size: 1.4rem; margin: 12px 0 8px; }
.case__body p { color: var(--text-dim); font-size: 15px; margin-bottom: 16px; }
.case__link { font-weight: 600; font-size: 15px; color: var(--text); transition: gap .2s; }
.case:hover .case__link { color: var(--accent); }

/* ---------- How I work ---------- */
.how { padding: 90px 0; }
.how__steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.how__step {
  counter-increment: step; position: relative; padding: 28px 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--bg-2));
}
.how__step::before {
  content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-weight: 700;
  font-size: 13px; color: var(--accent); letter-spacing: .1em;
}
.how__k { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin: 10px 0 10px; }
.how__step p { color: var(--text-dim); font-size: 14.5px; }

/* ---------- Resume snapshot ---------- */
.resume { padding: 90px 0; border-top: 1px solid var(--line); }
.resume__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.resume__lead h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 18px; }
.resume__lead p { color: var(--text-dim); margin-bottom: 26px; max-width: 44ch; }
.resume__facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.resume__facts > div { background: var(--surface); padding: 20px 22px; }
.resume__facts dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 6px; }
.resume__facts dd { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 500; color: var(--text); }

/* ---------- Contact ---------- */
.contact { padding: 110px 0; text-align: center; }
.contact__inner h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); max-width: 20ch; margin: 0 auto 16px; }
.contact__inner p { color: var(--text-dim); margin-bottom: 30px; }
.contact__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; color: var(--text-mute); font-size: 14px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .proof__cards { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .how__steps { grid-template-columns: repeat(2, 1fr); }
  .resume__inner { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 560px) {
  .how__steps { grid-template-columns: 1fr; }
  .resume__facts { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Case study pages
   ============================================================ */
.cs-hero { padding: 150px 0 60px; position: relative; overflow: hidden; }
.cs-hero::before {
  content:""; position:absolute; inset:0; z-index:0; opacity:.6;
  background:
    radial-gradient(700px 400px at 78% 0%, rgba(167,139,250,0.12), transparent 60%),
    radial-gradient(600px 400px at 10% 30%, rgba(124,246,160,0.10), transparent 60%);
}
.cs-hero .container { position: relative; z-index: 1; }
.cs-back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 14px; font-weight: 500; margin-bottom: 30px; transition: color .2s var(--ease), gap .2s; }
.cs-back:hover { color: var(--accent); gap: 12px; }
.cs-hero__tag { display:inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.cs-hero__title { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.06; max-width: 18ch; margin-bottom: 22px; }
.cs-hero__intro { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text-dim); max-width: 56ch; }

.cs-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 44px; }
.cs-meta > div { background: var(--surface); padding: 18px 20px; }
.cs-meta dt { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 6px; }
.cs-meta dd { margin: 0; font-family: var(--font-display); font-size: 14.5px; font-weight: 500; }

.cs-body { padding: 30px 0 80px; }
.cs-section { max-width: 760px; margin: 0 auto; padding: 40px 0; border-top: 1px solid var(--line); }
.cs-section:first-child { border-top: 0; }
.cs-section h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 18px; }
.cs-section h2 .cs-step { font-family: var(--font-display); font-size: 13px; color: var(--accent); font-weight: 700; letter-spacing: .1em; display: block; margin-bottom: 8px; }
.cs-section p { color: var(--text-dim); margin-bottom: 16px; font-size: 17px; }
.cs-section p strong { color: var(--text); font-weight: 600; }
.cs-section ul { color: var(--text-dim); padding-left: 20px; margin: 0 0 16px; }
.cs-section li { margin-bottom: 10px; }
.cs-section li::marker { color: var(--accent); }

.cs-figure { max-width: 960px; margin: 40px auto; }
.cs-figure__frame {
  height: 340px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative;
  background: radial-gradient(130% 120% at 30% 10%, var(--surface-2), var(--bg-2));
  display: flex; align-items: center; justify-content: center;
}
.cs-figure__frame::before {
  content:""; position:absolute; inset:0; opacity:.4;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 30px 30px; mask-image: radial-gradient(90% 90% at 50% 40%, #000, transparent);
}
.cs-figure__label { position: relative; z-index: 1; color: var(--text-mute); font-family: var(--font-display); font-size: 14px; letter-spacing: .04em; text-align: center; padding: 0 24px; }
.cs-figure figcaption { text-align: center; color: var(--text-mute); font-size: 13.5px; margin-top: 14px; }
.cs-video {
  display: block; width: 100%; height: auto; border: 1px solid var(--line-2);
  border-radius: var(--radius); background: #000;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}
.cs-videos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px auto 6px; max-width: 960px; }
.cs-figure--tile { max-width: none; margin: 0; }
.cs-figure--tile .cs-video { border-radius: var(--radius-sm); box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.7); }
.cs-figure--tile figcaption { margin-top: 10px; font-size: 13px; }

.cs-triggers { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cs-triggers li {
  color: var(--text-dim); font-size: 15px; line-height: 1.5;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.cs-triggers li b { display: block; color: var(--text); font-family: var(--font-display); font-weight: 600; margin-bottom: 4px; }

.cs-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0 6px; }
.cs-metric { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; background: var(--surface); }
.cs-metric b { font-family: var(--font-display); font-size: 1.9rem; display: block; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.cs-metric span { font-size: 13.5px; color: var(--text-dim); }

/* Building-block cards */
.cs-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 6px; }
.cs-bcard { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px; background: var(--surface); }
.cs-bnum { display: flex; align-items: center; gap: 8px; color: var(--accent-3); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.cs-bnum b { font-family: var(--font-display); color: var(--accent); font-size: 13px; }
.cs-bcard h3 { font-size: 1.05rem; margin-bottom: 8px; }
.cs-bcard p { color: var(--text-dim); font-size: 14px; margin: 0; }

/* Progression timeline */
.cs-timeline { display: grid; gap: 12px; margin: 8px 0 6px; }
.cs-tl { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.cs-tl-k { color: var(--accent-3); font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.cs-tl h3 { font-size: 1rem; margin-bottom: 4px; }
.cs-tl p { color: var(--text-dim); font-size: 14px; margin: 0; }

/* Image gallery */
.cs-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px auto 6px; max-width: 960px; }
.cs-shot { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #0a0920; }

/* Pull-quote */
.cs-quote {
  max-width: 960px; margin: 36px auto 0; padding: 26px 28px; border-radius: var(--radius);
  border: 1px solid var(--line-2); border-left: 4px solid var(--accent);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em;
}
.cs-quote + p { max-width: 960px; margin: 16px auto 0; color: var(--text-dim); }

/* Evidence table */
.cs-table-wrap { max-width: 960px; margin: 24px auto 0; overflow-x: auto; }
.cs-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.cs-table th, .cs-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cs-table th { color: var(--text-mute); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; background: var(--surface); }
.cs-table td { color: var(--text-dim); }
.cs-table tr:last-child td { border-bottom: 0; }

.cs-next { padding: 60px 0 90px; border-top: 1px solid var(--line); text-align: center; }
.cs-next h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 24px; }

@media (max-width: 760px) {
  .cs-meta { grid-template-columns: repeat(2, 1fr); }
  .cs-metrics { grid-template-columns: 1fr; }
  .cs-videos { grid-template-columns: 1fr; }
  .cs-triggers { grid-template-columns: 1fr; }
  .cs-cards { grid-template-columns: 1fr; }
  .cs-gallery { grid-template-columns: 1fr; }
  .cs-tl { grid-template-columns: 1fr; gap: 4px; }
}

/* =========================================================
   Single-viewport network-defense stage (homepage / body.app)
   ========================================================= */
body.app { height: 100vh; overflow: hidden; }
body.app .nav {
  background: rgba(10, 9, 32, 0.55);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom-color: var(--line);
}
.nav__role {
  font-size: 12px; font-weight: 500; color: var(--text-dim);
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; margin-left: 2px;
}

.stage {
  position: relative; height: 100vh; overflow: hidden;
}
.stage__bg, .stage__game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage__bg { z-index: 0; opacity: 0.5; }
.stage__game { z-index: 1; cursor: crosshair; touch-action: none; }

/* Floating HUD layer — click-through except on real controls */
.hud-overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hud-overlay > * { position: absolute; }

/* Intro (top-left) */
.intro {
  top: clamp(84px, 12vh, 128px); left: clamp(20px, 4vw, 56px);
  max-width: min(46vw, 540px); min-width: 0;
}
.intro .hero__eyebrow { margin-bottom: 14px; }
.intro .hero__eyebrow,
.intro__title,
.intro__sub,
.mission__text { text-shadow: 0 2px 20px rgba(5, 4, 20, 0.75); }
.intro__title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 3.2vw, 3rem); line-height: 1.06; margin-bottom: 14px;
}
.intro__sub { color: var(--text-dim); font-size: clamp(0.98rem, 1.2vw, 1.12rem); max-width: 42ch; margin-bottom: 14px; }
.mission__text { font-size: 13.5px; color: var(--text-dim); line-height: 1.45; max-width: 42ch; margin-bottom: 18px; }
.mission__cta { display: flex; gap: 10px; flex-wrap: wrap; pointer-events: auto; }
.mission__cta .btn { padding: 11px 20px; font-size: 14px; }

/* Status HUD (top-right) */
.hud-stack {
  top: clamp(84px, 12vh, 128px); right: clamp(20px, 4vw, 56px);
  display: flex; flex-direction: column; gap: 12px; align-items: stretch;
  width: min(280px, 72vw);
}
.hud-bar {
  width: 100%;
  display: flex; flex-direction: column; gap: 14px; align-items: flex-end;
  padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(16, 14, 42, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.mission__tag {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-3); background: rgba(223, 227, 58, 0.1); border: 1px solid rgba(223, 227, 58, 0.28);
  padding: 4px 9px; border-radius: 7px;
}
.mission__tag.is-active { color: var(--accent); background: rgba(124, 246, 160, 0.1); border-color: rgba(124, 246, 160, 0.3); }
.mission__tag.is-secure { color: #06210f; background: var(--accent); border-color: var(--accent); }
.mission__tag.is-breach { color: #fff; background: var(--danger); border-color: var(--danger); }
.hud__k { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 4px; text-align: right; }
.hud__score { text-align: right; }
.hud__score b { font-family: var(--font-display); font-size: 24px; color: var(--text); }
.hud__score b span { font-size: 14px; color: var(--text-mute); }
.hud__integrity { width: 176px; }
.bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); transition: width .35s var(--ease), background .35s var(--ease); }
.bar.is-low i { background: linear-gradient(90deg, var(--accent-3), var(--danger)); }

/* Case cards (bottom-center) */
.cases {
  left: 50%; transform: translateX(-50%); bottom: clamp(18px, 4vh, 40px);
  display: flex; gap: 14px; width: min(720px, 92vw);
}
.ccard {
  position: relative; display: block; flex: 1; padding: 14px 16px 15px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(22, 20, 47, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), filter .4s var(--ease), opacity .4s var(--ease);
  overflow: hidden;
}
.ccard__idx { font-family: var(--font-display); font-size: 12px; color: var(--text-mute); }
.ccard__tag { display: block; font-size: 11px; letter-spacing: .04em; color: var(--accent-2); margin: 6px 0 4px; }
.ccard__title { font-size: 1.02rem; margin-bottom: 6px; }
.ccard__hint { font-size: 12.5px; color: var(--text-mute); }
.ccard__go { font-size: 13px; font-weight: 600; color: var(--accent); display: none; margin-top: 2px; }
.ccard__lock { position: absolute; top: 12px; right: 14px; font-size: 12px; color: var(--text-mute); }

.ccard.is-locked { filter: grayscale(0.6) brightness(0.82); opacity: 0.72; }
.ccard.is-unlocked { pointer-events: auto; border-color: rgba(124, 246, 160, 0.5); box-shadow: 0 12px 44px -16px rgba(124, 246, 160, 0.55); }
.ccard.is-unlocked .ccard__hint { display: none; }
.ccard.is-unlocked .ccard__go { display: inline-block; }
.ccard.is-unlocked .ccard__lock { opacity: 0; }
.ccard.is-unlocked:hover { transform: translateY(-4px); border-color: var(--accent); }
@keyframes cardUnlock { 0% { transform: scale(0.96); } 55% { transform: scale(1.035); } 100% { transform: scale(1); } }
.ccard.just-unlocked { animation: cardUnlock .5s var(--ease); }

/* Full-screen start / result overlay */
.arena__overlay {
  position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center; background: rgba(8, 7, 26, 0.72);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  transition: opacity .4s var(--ease), visibility .4s;
}
.arena__overlay.is-hidden { opacity: 0; visibility: hidden; }
.arena__panel { max-width: 440px; }
.arena__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-3); }
.arena__h { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 12px 0; }
.arena__p { color: var(--text-dim); font-size: 15px; margin-bottom: 20px; line-height: 1.5; }
/* Signal legend */
.arena__legend { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; text-align: left; font-size: 13px; color: var(--text-dim); }
.arena__legend li { display: flex; align-items: center; gap: 10px; }
.arena__legend b { color: var(--text); font-weight: 600; }
.legend {
  list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 7px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(16, 14, 42, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 12px; color: var(--text-dim); pointer-events: none;
}
.legend li { display: flex; align-items: center; gap: 8px; }
.lg { width: 11px; height: 11px; flex: none; }
.lg--threat { background: var(--danger); transform: rotate(45deg); border-radius: 2px; }
.lg--susp { width: 0; height: 0; background: transparent; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid var(--accent-3); }
.lg--safe { background: #60a5fa; border-radius: 999px; }
@media (max-width: 860px) { .legend { display: none; } }
/* Responsive */
@media (max-width: 860px) {
  .intro { top: 76px; left: 16px; right: 16px; max-width: none; }
  .intro__title { font-size: 1.6rem; }
  .intro__sub { display: none; }
  .hud-stack { top: auto; bottom: calc(clamp(18px, 4vh, 40px) + 128px); right: 16px; left: 16px; width: auto; }
  .hud-bar { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .hud__integrity { width: auto; flex: 1; max-width: 200px; }
  .cases { width: calc(100% - 32px); }
  .nav__role { display: none; }
}
@media (max-width: 540px) {
  .cases { flex-direction: column; gap: 10px; }
  .ccard { padding: 12px 14px; }
}

/* =========================================================
   Resume / CV page
   ========================================================= */
.rs-main { max-width: 900px; margin: 0 auto; padding: 104px 24px 80px; }
.rs-doc {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(26px, 5vw, 54px);
}
.rs-head { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 8px; }
.rs-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; line-height: 1; margin-bottom: 12px; }
.rs-role { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.rs-tag { color: var(--text-dim); font-size: 15px; margin-bottom: 16px; }
.rs-contact { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--text-dim); }
.rs-contact span { display: inline-flex; gap: 6px; }
.rs-contact b { color: var(--text-mute); font-weight: 600; }
.rs-contact a { color: var(--accent-2); }

.rs-section { margin-top: 30px; }
.rs-section > h2 {
  font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line); letter-spacing: -0.01em;
}
.rs-lead { color: var(--text-dim); font-size: 15.5px; line-height: 1.62; }

.rs-chips { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.rs-chips span { font-size: 13px; color: var(--text); padding: 6px 13px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); }

.rs-job { margin-bottom: 22px; }
.rs-job__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; }
.rs-job__title { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; }
.rs-job__org { color: var(--accent-2); font-size: 14px; margin-top: 3px; }
.rs-job__meta { color: var(--text-mute); font-size: 13px; text-align: right; }
.rs-job ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 15px; }
.rs-job li { margin-bottom: 8px; }
.rs-job li::marker { color: var(--accent); }

.rs-earlier { display: grid; gap: 0; }
.rs-earlier__row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.rs-earlier__row:last-child { border-bottom: 0; }
.rs-earlier__role { font-weight: 600; }
.rs-earlier__org { color: var(--text-dim); font-size: 14px; margin-top: 2px; }
.rs-earlier__date { color: var(--text-mute); font-size: 13px; white-space: nowrap; }

.rs-grid2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; }
.rs-foot { text-align: center; color: var(--text-mute); font-size: 13px; margin-top: 34px; font-style: italic; }

@media (max-width: 640px) { .rs-grid2 { grid-template-columns: 1fr; } }

/* =========================================================
   Case-study password gate
   ========================================================= */
body.gate-locked { overflow: hidden; }
body.gate-locked main,
body.gate-locked .footer { display: none; }
html.kh-unlocked body.gate-locked main { display: block; }
html.kh-unlocked body.gate-locked .footer { display: block; }
html.kh-unlocked body.gate-locked { overflow: visible; }
html.kh-unlocked .gate { display: none !important; }

.gate {
  position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
  background:
    radial-gradient(800px 500px at 70% 15%, rgba(167,139,250,0.14), transparent 60%),
    radial-gradient(700px 500px at 15% 85%, rgba(124,246,160,0.10), transparent 60%),
    var(--bg);
}
.gate__card {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 32px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7);
}
.gate__logo { width: 42px; height: 36px; object-fit: contain; display: block; margin: 0 auto 18px; }
.gate__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-3); }
.gate__title { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; margin: 10px 0 12px; }
.gate__msg { color: var(--text-dim); font-size: 15px; line-height: 1.55; margin-bottom: 14px; }
.gate__contact { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 6px; font-size: 14px; color: var(--text-dim); }
.gate__contact b { color: var(--text-mute); font-weight: 600; }
.gate__contact a { color: var(--accent-2); }
.gate__form { display: flex; gap: 10px; }
.gate__form input {
  flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 12px 18px; color: var(--text); font-size: 15px; font-family: var(--font-body);
}
.gate__form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,246,160,0.15); }
.gate__error { color: var(--danger); font-size: 13px; margin: 12px 0 0; }
.gate__error[hidden] { display: none; }
.gate__back { display: inline-block; margin-top: 20px; color: var(--text-mute); font-size: 13px; }
.gate__back:hover { color: var(--text); }

/* =========================================================
   Button icons + center agent-deploy hub
   ========================================================= */
.ico { width: 1em; height: 1em; fill: currentColor; flex: none; }
.ico[fill="none"] { fill: none; }
.btn .ico { margin-right: 6px; margin-left: -2px; }

.hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; }
.hub[hidden] { display: none !important; }
.agent-hub {
  position: relative; pointer-events: auto; cursor: pointer;
  display: grid; place-items: center;
  background: none; border: 0; padding: 0; color: var(--accent-2);
  animation: hubToggle 2.4s var(--ease) infinite;
}
.hub.is-open .agent-hub { animation: none; }
@keyframes hubToggle { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.hub--alert .agent-hub__icon { border-color: var(--accent); box-shadow: 0 0 34px -4px rgba(124, 246, 160, 0.9); }
.agent-hub__icon {
  position: relative;
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.35), rgba(10, 9, 32, 0.65));
  border: 1px solid rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 26px -4px rgba(167, 139, 250, 0.75);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.agent-hub__glyph { width: 44px; height: 44px; position: relative; z-index: 1; color: var(--accent-2); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)); }
.agent-hub__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.agent-hub__ring circle { fill: none; stroke: var(--accent); stroke-width: 3; opacity: 0.95; }
.agent-hub.is-holding { animation: none; }
.agent-hub.is-holding .agent-hub__icon { border-color: var(--accent); box-shadow: 0 0 36px -2px rgba(124, 246, 160, 0.95); }
.agent-hub__label {
  font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: .02em; white-space: nowrap;
  background: none; border: 0; padding: 4px 0 0;
  text-shadow: 0 2px 12px rgba(5, 4, 20, 0.95), 0 0 4px rgba(5, 4, 20, 0.95);
}
.agent-hub__label {
  font-size: 12px; font-weight: 600; color: var(--text); letter-spacing: .02em; white-space: nowrap;
}
.agent-hub:hover .agent-hub__icon { border-color: var(--accent); box-shadow: 0 0 32px -2px rgba(124, 246, 160, 0.85); }
.hub-menu {
  position: absolute; left: 50%; bottom: calc(100% + 16px);
  transform: translate(-50%, 8px) scale(0.96);
  display: grid; gap: 8px; justify-items: center;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.hub.is-open .hub-menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) scale(1); }
.hub-opt {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: rgba(16, 14, 42, 0.92); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 9px 15px; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.7);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.hub-opt[hidden] { display: none !important; }
.hub-opt:hover { transform: translateY(-2px); border-color: var(--accent); }
.hub-opt .ico { width: 15px; height: 15px; }
.hub-opt--agent .ico { color: var(--accent-2); }
.hub-opt--posture .ico { color: var(--accent); }

/* Security posture suggestion card (near the center action) */
.posture {
  position: absolute; left: 50%; top: calc(50% + 96px); transform: translateX(-50%);
  width: min(320px, 84vw); pointer-events: auto; text-align: left;
  background: rgba(16, 14, 42, 0.86); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 16px 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  animation: postureIn .35s var(--ease);
}
.posture__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--accent); }
.posture__icon { width: 18px; height: 18px; flex: none; }
.posture__tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.posture__text { font-size: 14.5px; color: var(--text); margin-bottom: 14px; line-height: 1.4; }
.posture__cta { display: flex; align-items: center; gap: 12px; }
.posture__cta .btn { padding: 9px 18px; font-size: 14px; }
.posture__dismiss { background: none; border: 0; color: var(--text-mute); font-size: 13px; cursor: pointer; padding: 6px; }
.posture__dismiss:hover { color: var(--text); }
@keyframes postureIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 860px) { .posture { left: 16px; right: 16px; width: auto; top: 84px; bottom: auto; transform: none; animation: none; } }

/* Print / Save-as-PDF */
@media print {
  @page { margin: 14mm; }
  body.resume { background: #fff; }
  .nav, .rs-print { display: none !important; }
  .rs-main { padding: 0; max-width: none; }
  .rs-doc { border: 0; border-radius: 0; background: #fff; padding: 0; }
  .rs-name, .rs-job__title, .rs-section > h2, .rs-earlier__role, .rs-chips span { color: #111 !important; }
  .rs-lead, .rs-tag, .rs-contact, .rs-job ul, .rs-earlier__org, .rs-job__meta, .rs-earlier__date, .rs-foot { color: #333 !important; }
  .rs-role, .rs-job__org, .rs-contact a { color: #8a1f45 !important; }
  .rs-section > h2, .rs-head, .rs-earlier__row { border-color: #ddd !important; }
  .rs-chips span { border-color: #ccc !important; background: #fff !important; }
  .rs-job li::marker { color: #8a1f45; }
}
