/* ============================================================================
   ctOS://KASSAM — THEME ENGINE
   Watch Dogs / cyberpunk hacker OS aesthetic.
   All layout lives here (no dependency on the Tailwind CDN for structure).
   ========================================================================== */

/* ---------- TOKENS ---------- */
:root {
  --base:      #05070a;
  --base-2:    #080b11;
  --panel:     #0b0f16;
  --panel-2:   #0e131c;
  --line:      rgba(0, 229, 255, 0.14);
  --line-soft: rgba(120, 140, 160, 0.10);

  --cyan:    #00e5ff;
  --hack:    #39ff8b;
  --magenta: #ff2bd6;
  --amber:   #ffb000;
  --danger:  #ff3b52;

  --txt:      #d6e2ee;
  --txt-dim:  #8697a8;
  --txt-mute: #4d5c6b;

  --font-mono:    "JetBrains Mono", ui-monospace, monospace;
  --font-term:    "Share Tech Mono", "JetBrains Mono", monospace;
  --font-display: "Orbitron", "Rajdhani", sans-serif;
  --font-ui:      "Rajdhani", "JetBrains Mono", sans-serif;

  --maxw: 1200px;
  --glow-cyan: 0 0 18px rgba(0, 229, 255, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--base);
  color: var(--txt);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--cyan); color: #001014; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--base); }
::-webkit-scrollbar-thumb { background: #16202b; border: 2px solid var(--base); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ============================================================================
   BACKGROUND LAYERS
   ========================================================================== */
#net-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; opacity: 0.55; pointer-events: none;
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 100%);
}
.scanlines {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0, 229, 255, 0.025) 3px,
    rgba(0,0,0,0) 4px
  );
  animation: scan 8s linear infinite;
  opacity: 0.6;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 120% 100% at 50% 40%, transparent 55%, rgba(0,0,0,0.75) 100%);
}
@keyframes scan { from { background-position-y: 0; } to { background-position-y: 100px; } }

main, .nav, .footer { position: relative; z-index: 3; }

/* ============================================================================
   BOOT OVERLAY
   ========================================================================== */
.boot {
  position: fixed; inset: 0; z-index: 200;
  background: var(--base);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__inner { width: min(680px, 88vw); }
.boot__log {
  font-family: var(--font-term);
  color: var(--hack);
  font-size: clamp(11px, 2.6vw, 14px);
  line-height: 1.9;
  margin: 0 0 18px;
  white-space: pre-wrap;
  text-shadow: 0 0 8px rgba(57, 255, 139, 0.4);
  min-height: 200px;
}
.boot__log .ok { color: var(--cyan); }
.boot__log .warn { color: var(--amber); }
.boot__bar { height: 3px; background: #10161d; border-radius: 3px; overflow: hidden; }
.boot__fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--hack)); box-shadow: var(--glow-cyan); transition: width 0.2s linear; }
.boot__meta { margin-top: 12px; font-family: var(--font-term); font-size: 11px; letter-spacing: 3px; color: var(--txt-mute); }

/* ============================================================================
   SHARED PRIMITIVES
   ========================================================================== */
.cursor { color: var(--cyan); animation: blink 1s steps(1) infinite; font-weight: 700; }
@keyframes blink { 50% { opacity: 0; } }

.t-prompt { color: var(--hack); }
.t-cmd { color: var(--cyan); }
.t-line { font-family: var(--font-term); color: var(--txt-dim); margin: 0 0 4px; font-size: 13px; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--txt-mute); }
.dot--live { background: var(--hack); box-shadow: 0 0 10px var(--hack); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.8); } }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-term); font-size: 11px; letter-spacing: 1.5px;
  padding: 6px 12px; border: 1px solid var(--line);
  color: var(--txt-dim); background: rgba(0, 229, 255, 0.03);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.pill--live { color: var(--hack); border-color: rgba(57,255,139,0.3); }
.pill--org { color: var(--cyan); border-color: rgba(0,229,255,0.38); background: rgba(0,229,255,0.06); box-shadow: inset 0 0 12px rgba(0,229,255,0.06); }
.pill[hidden] { display: none; }

/* Notched/cornered panel look */
.notch {
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-term); font-size: 13px; letter-spacing: 2px;
  padding: 14px 26px; cursor: pointer; border: 1px solid var(--line);
  color: var(--txt); background: transparent; transition: all 0.25s var(--ease);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  text-transform: uppercase;
}
.btn__glyph { color: var(--cyan); }
.btn--primary {
  background: linear-gradient(120deg, rgba(0,229,255,0.14), rgba(57,255,139,0.08));
  border-color: var(--cyan); color: #eafcff;
  box-shadow: inset 0 0 20px rgba(0,229,255,0.08);
}
.btn--primary:hover { box-shadow: var(--glow-cyan), inset 0 0 26px rgba(0,229,255,0.18); transform: translateY(-2px); }
.btn--ghost:hover { border-color: var(--hack); color: var(--hack); box-shadow: 0 0 16px rgba(57,255,139,0.25); }

/* ============================================================================
   GLITCH TEXT
   ========================================================================== */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 0);
  opacity: 0; pointer-events: none;
}
.glitch::before { color: var(--magenta); }
.glitch::after  { color: var(--cyan); }
.glitch:hover::before, .glitch.glitching::before {
  opacity: 0.9; animation: glitch-a 0.5s steps(2) 2;
}
.glitch:hover::after, .glitch.glitching::after {
  opacity: 0.9; animation: glitch-b 0.5s steps(2) 2;
}
@keyframes glitch-a {
  0% { transform: translate(0); clip-path: inset(0 0 70% 0); }
  25% { transform: translate(-3px, 1px); clip-path: inset(40% 0 20% 0); }
  50% { transform: translate(2px, -1px); clip-path: inset(10% 0 60% 0); }
  75% { transform: translate(-2px, 0); clip-path: inset(60% 0 5% 0); }
  100% { transform: translate(0); clip-path: inset(0 0 70% 0); }
}
@keyframes glitch-b {
  0% { transform: translate(0); clip-path: inset(60% 0 10% 0); }
  25% { transform: translate(3px, -1px); clip-path: inset(20% 0 50% 0); }
  50% { transform: translate(-2px, 1px); clip-path: inset(70% 0 5% 0); }
  75% { transform: translate(2px, 0); clip-path: inset(15% 0 55% 0); }
  100% { transform: translate(0); clip-path: inset(60% 0 10% 0); }
}

/* ============================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 16px clamp(18px, 5vw, 48px);
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: padding 0.3s var(--ease), background 0.3s;
}
.nav.shrink { padding-top: 10px; padding-bottom: 10px; background: rgba(5,7,10,0.9); }
.nav__brand { font-family: var(--font-term); font-size: 17px; letter-spacing: 1px; white-space: nowrap; }
.nav__prompt { color: var(--txt-mute); }
.nav__handle { color: var(--cyan); text-shadow: var(--glow-cyan); }
.nav__brand .cursor { font-size: 15px; }

.nav__links { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav__links a {
  font-family: var(--font-term); font-size: 13px; letter-spacing: 2px;
  color: var(--txt-dim); position: relative; padding: 4px 0; transition: color 0.2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--cyan); box-shadow: var(--glow-cyan); transition: width 0.25s var(--ease);
}
.nav__links a:hover { color: var(--cyan); }
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  border: 1px solid var(--line); padding: 7px 16px !important; color: var(--hack) !important;
  clip-path: polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px);
}
.nav__cta:hover { background: rgba(57,255,139,0.08); border-color: var(--hack); }
.nav__cta::after { display: none; }

.nav__status { display: flex; align-items: center; gap: 8px; }
.nav__clock { font-family: var(--font-term); font-size: 13px; color: var(--txt-dim); letter-spacing: 1px; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; margin-left: auto; }
.nav__toggle span { width: 26px; height: 2px; background: var(--cyan); transition: 0.3s var(--ease); }
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================================
   HERO
   ========================================================================== */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px clamp(18px, 5vw, 48px) 60px; max-width: var(--maxw); margin: 0 auto; }
.hero__wrap { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 48px; align-items: center; }

.terminal {
  background: linear-gradient(180deg, rgba(11,15,22,0.92), rgba(8,11,17,0.92));
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 0 60px rgba(0,229,255,0.03);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.terminal__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.3); }
.terminal__dot { width: 11px; height: 11px; border-radius: 50%; background: #263340; }
.terminal__dot:nth-child(1) { background: var(--danger); }
.terminal__dot:nth-child(2) { background: var(--amber); }
.terminal__dot:nth-child(3) { background: var(--hack); }
.terminal__title { margin-left: 12px; font-family: var(--font-term); font-size: 12px; color: var(--txt-mute); letter-spacing: 1px; }
.terminal__body { padding: clamp(22px, 4vw, 40px); }

.hero__name {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(30px, 6vw, 58px); line-height: 1.05; margin: 6px 0 18px;
  letter-spacing: 1px; color: #f4feff;
  text-shadow: 0 0 30px rgba(0,229,255,0.25);
}
.hero__role { font-family: var(--font-term); font-size: clamp(16px, 3vw, 24px); color: var(--hack); margin: 4px 0 18px; min-height: 1.4em; text-shadow: 0 0 12px rgba(57,255,139,0.35); }
.typed { white-space: pre; }
.hero__tagline { color: var(--txt-dim); max-width: 54ch; font-size: 14.5px; margin: 0 0 26px; min-height: 3em; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; }

/* Radar node */
.hero__node { display: flex; justify-content: center; }
.radar {
  position: relative; width: min(340px, 78vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(0,229,255,0.06), transparent 70%);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.radar::before, .radar::after {
  content: ""; position: absolute; background: var(--line);
}
.radar::before { width: 100%; height: 1px; }
.radar::after { height: 100%; width: 1px; }
.radar__ring { position: absolute; border: 1px solid rgba(0,229,255,0.18); border-radius: 50%; }
.radar__ring--1 { inset: 12%; }
.radar__ring--2 { inset: 26%; }
.radar__ring--3 { inset: 40%; }
.radar__sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0,229,255,0.35), transparent 25%);
  animation: sweep 4s linear infinite; mask: radial-gradient(circle, transparent 30%, #000 31%);
  -webkit-mask: radial-gradient(circle, transparent 30%, #000 31%);
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar__core {
  z-index: 2; width: 30%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.2), rgba(5,7,10,0.9));
  border: 1px solid var(--cyan); display: grid; place-items: center; text-align: center;
  box-shadow: var(--glow-cyan);
}
.radar__id { font-family: var(--font-display); font-weight: 700; font-size: clamp(16px,4vw,26px); color: #eafcff; }
.radar__sub { font-family: var(--font-term); font-size: 8px; letter-spacing: 1.5px; color: var(--hack); }
.radar__blip { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--hack); box-shadow: 0 0 10px var(--hack); animation: pulse 2s ease-in-out infinite; }
.radar__blip--a { top: 22%; left: 30%; }
.radar__blip--b { top: 64%; left: 68%; animation-delay: .5s; background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
.radar__blip--c { top: 46%; left: 78%; animation-delay: 1s; }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--font-term); font-size: 10px; letter-spacing: 3px; color: var(--txt-mute); }
.scroll-hint__arrow { animation: bob 1.6s ease-in-out infinite; color: var(--cyan); }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ============================================================================
   SECTIONS
   ========================================================================== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 90px clamp(18px, 5vw, 48px); }
.section__head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.section__index { font-family: var(--font-term); color: var(--cyan); font-size: 14px; border: 1px solid var(--line); padding: 4px 10px; }
.section__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 4.5vw, 40px); letter-spacing: 2px; color: #eef7ff; }
.section__sub { font-family: var(--font-term); font-size: 12px; color: var(--txt-mute); letter-spacing: 1px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Stats banner ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 48px; }
.stat { padding: 20px 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(0,229,255,0.04), transparent); text-align: center; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: 0.6; }
.stat__val { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 4vw, 34px); color: var(--cyan); text-shadow: 0 0 16px rgba(0,229,255,0.35); }
.stat__label { font-family: var(--font-term); font-size: 10px; letter-spacing: 1.5px; color: var(--txt-dim); margin-top: 4px; }

/* ---------- Diagnostics ---------- */
.diag { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 40px; align-items: start; }
.mono-note { font-family: var(--font-term); color: var(--txt-dim); font-size: 13px; margin: 0 0 14px; }
.lead { font-size: 15px; color: var(--txt); margin: 0 0 24px; }
.lead b { color: var(--cyan); font-weight: 500; }

.langs { display: flex; flex-direction: column; gap: 10px; }
.lang { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 10px 14px; background: rgba(255,255,255,0.01); }
.lang__code { font-family: var(--font-display); font-weight: 700; color: var(--hack); width: 34px; text-align: center; }
.lang__name { flex: 1; font-size: 14px; }
.lang__level { font-family: var(--font-term); font-size: 10px; letter-spacing: 1px; color: var(--txt-mute); border: 1px solid var(--line); padding: 3px 8px; }

.diag__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.diag-card { border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel), var(--base-2)); padding: 20px; transition: border-color 0.3s, transform 0.3s; }
.diag-card:hover { border-color: var(--cyan); transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.diag-card__top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.diag-card__icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--cyan); flex-shrink: 0; }
.diag-card__icon svg { width: 20px; height: 20px; }
.diag-card__title { font-family: var(--font-ui); font-weight: 700; font-size: 18px; letter-spacing: 0.5px; color: #eef7ff; }
.diag-card__summary { font-size: 13px; color: var(--txt-dim); margin: 0 0 16px; }
.bar { height: 5px; background: #0f1620; border: 1px solid var(--line-soft); position: relative; overflow: hidden; margin-bottom: 6px; }
.bar__fill { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, var(--cyan), var(--hack)); box-shadow: 0 0 10px rgba(0,229,255,0.4); transition: width 1.2s var(--ease); }
.bar__meta { display: flex; justify-content: space-between; font-family: var(--font-term); font-size: 10px; color: var(--txt-mute); letter-spacing: 1px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--font-term); font-size: 10.5px; letter-spacing: 0.5px; padding: 4px 9px; border: 1px solid var(--line); color: var(--txt-dim); background: rgba(0,229,255,0.03); }

/* ---------- Skills matrix ---------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.skill-group { border: 1px solid var(--line); padding: 18px; background: rgba(255,255,255,0.008); }
.skill-group h3 { font-family: var(--font-term); font-size: 12px; letter-spacing: 2px; color: var(--magenta); margin: 0 0 14px; text-transform: uppercase; }
.skill-group .chips .chip:hover { border-color: var(--hack); color: var(--hack); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter { font-family: var(--font-term); font-size: 12px; letter-spacing: 1.5px; padding: 8px 16px; border: 1px solid var(--line); color: var(--txt-dim); background: transparent; cursor: pointer; transition: 0.25s var(--ease); }
.filter:hover { color: var(--cyan); border-color: var(--cyan); }
.filter.active { background: var(--cyan); color: #001014; border-color: var(--cyan); box-shadow: var(--glow-cyan); font-weight: 500; }

/* ---------- Deployments grid ---------- */
.deploy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.node {
  position: relative; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel-2), var(--base-2));
  padding: 22px; overflow: hidden; transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.node.is-hidden { display: none; }
.node::after {
  content: ""; position: absolute; left: 0; right: 0; top: -40%; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(0,229,255,0.12), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.node:hover { border-color: var(--cyan); transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0,0,0,0.5), 0 0 22px rgba(0,229,255,0.12); }
.node:hover::after { animation: feed-sweep 1.1s linear infinite; opacity: 1; }
@keyframes feed-sweep { from { top: -40%; } to { top: 120%; } }

.node--featured { border-color: rgba(57,255,139,0.28); }
.node__cornerTag { position: absolute; top: 0; right: 0; font-family: var(--font-term); font-size: 9px; letter-spacing: 1px; padding: 3px 8px; color: #001014; background: var(--hack); }
.node__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.node__cat { font-family: var(--font-term); font-size: 10px; letter-spacing: 1.5px; color: var(--cyan); }
.node__name { font-family: var(--font-ui); font-weight: 700; font-size: 20px; letter-spacing: 0.5px; color: #eef7ff; margin: 2px 0 2px; line-height: 1.15; }
.node__code { font-family: var(--font-term); font-size: 11px; letter-spacing: 1px; color: var(--magenta); margin-bottom: 12px; }
.node__summary { font-size: 13px; color: var(--txt-dim); margin: 0 0 16px; }
.node__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.node__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.node__status { font-family: var(--font-term); font-size: 10px; letter-spacing: 1px; display: inline-flex; align-items: center; gap: 6px; }
.node__status .dot { width: 6px; height: 6px; }
.st-FLAGSHIP { color: var(--hack); } .st-FLAGSHIP .dot { background: var(--hack); box-shadow: 0 0 8px var(--hack); }
.st-DEPLOYED { color: var(--cyan); } .st-DEPLOYED .dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.st-ACTIVE   { color: var(--amber); } .st-ACTIVE .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.st-RD       { color: var(--magenta); } .st-RD .dot { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.node__access { font-family: var(--font-term); font-size: 11px; letter-spacing: 1.5px; color: var(--txt-dim); border: 1px solid var(--line); padding: 6px 12px; transition: 0.25s var(--ease); }
.node__access:hover { color: #001014; background: var(--cyan); border-color: var(--cyan); }
.node__year { font-family: var(--font-term); font-size: 10px; color: var(--txt-mute); }

/* ---------- Intel feed ---------- */
.intel { position: relative; padding-left: 28px; }
.intel::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--cyan), transparent); }
.intel-item { position: relative; margin-bottom: 22px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel), transparent); padding: 18px 20px; transition: border-color 0.3s, transform 0.3s; }
.intel-item::before { content: ""; position: absolute; left: -25px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--base); border: 2px solid var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.intel-item:hover { border-color: var(--cyan); transform: translateX(4px); }
.intel-item__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.intel-item__date { font-family: var(--font-term); font-size: 12px; color: var(--cyan); letter-spacing: 1px; }
.intel-item__type { font-family: var(--font-term); font-size: 9px; letter-spacing: 1.5px; padding: 3px 8px; border: 1px solid var(--line); }
.type-NEWS { color: var(--cyan); } .type-RELEASE { color: var(--hack); }
.type-MILESTONE { color: var(--amber); } .type-AWARD { color: var(--magenta); }
.type-POST { color: var(--magenta); }
.intel-item__src { font-family: var(--font-term); font-size: 9px; letter-spacing: 1.5px; color: #001014; background: var(--magenta); padding: 3px 7px; }
.intel-item__title { font-family: var(--font-ui); font-weight: 600; font-size: 17px; color: #eef7ff; margin: 0 0 6px; display: block; }
.intel-item__title--link { transition: color 0.2s; }
.intel-item__title--link:hover { color: var(--cyan); }
.intel-item__ext { color: var(--cyan); font-size: 13px; }
.intel-item__body { font-size: 13.5px; color: var(--txt-dim); margin: 0; }

/* ---------- Record ---------- */
.record { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rec { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); padding: 14px 16px; background: rgba(255,255,255,0.008); transition: border-color 0.3s, transform 0.3s; }
.rec:hover { border-color: var(--hack); transform: translateY(-3px); }
.rec__badge { font-family: var(--font-term); font-size: 10px; letter-spacing: 1px; padding: 6px 8px; border: 1px solid var(--line); flex-shrink: 0; align-self: flex-start; }
.rec--CERT .rec__badge { color: var(--cyan); }
.rec--ROLE .rec__badge { color: var(--hack); }
.rec--EDU  .rec__badge { color: var(--amber); }
.rec--AWARD .rec__badge { color: var(--magenta); }
.rec__org { font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: #eef7ff; }
.rec__title { font-size: 12.5px; color: var(--txt-dim); }
.rec__year { font-family: var(--font-term); font-size: 11px; color: var(--txt-mute); margin-left: auto; flex-shrink: 0; align-self: flex-start; }

/* ---------- Experience (Operational History) ---------- */
.xp { display: grid; gap: 16px; }
.xp-co { border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel), transparent); padding: 22px; transition: border-color 0.3s, transform 0.3s; }
.xp-co:hover { border-color: var(--cyan); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,0.4); }
.xp-co__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.xp-co__logo { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--cyan); border: 1px solid var(--line); background: rgba(0,229,255,0.05); box-shadow: inset 0 0 14px rgba(0,229,255,0.06); }
.xp-co__name { font-family: var(--font-ui); font-weight: 700; font-size: 19px; color: #eef7ff; margin: 0; letter-spacing: 0.3px; }
.xp-co__meta { font-family: var(--font-term); font-size: 11px; letter-spacing: 1px; color: var(--txt-mute); margin-top: 3px; }
.xp-roles { display: grid; gap: 20px; }
.xp-roles--multi { padding-left: 22px; position: relative; }
.xp-roles--multi::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--cyan), transparent); }
.xp-role { position: relative; }
.xp-roles--multi .xp-role::before { content: ""; position: absolute; left: -21px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--base); border: 2px solid var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.xp-roles--multi .xp-role--current::before { border-color: var(--hack); box-shadow: 0 0 10px var(--hack); }
.xp-role__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xp-role__title { font-family: var(--font-ui); font-weight: 600; font-size: 16.5px; color: #eef7ff; margin: 0; }
.xp-role__badge { font-family: var(--font-term); font-size: 9px; letter-spacing: 1px; color: #001014; background: var(--hack); padding: 2px 7px; box-shadow: 0 0 10px rgba(57,255,139,0.35); }
.xp-role__period { font-family: var(--font-term); font-size: 12px; color: var(--cyan); letter-spacing: 0.5px; margin: 4px 0 2px; }
.xp-role__arr { font-family: var(--font-term); font-size: 10px; color: var(--txt-mute); letter-spacing: 1px; display: block; margin-bottom: 8px; }
.xp-role__summary { font-size: 13.5px; color: var(--txt-dim); margin: 8px 0 12px; }
.xp-role__bullets { list-style: none; margin: 10px 0 12px; padding: 0; }
.xp-role__bullets li { position: relative; padding-left: 18px; margin-bottom: 6px; font-size: 13px; color: var(--txt-dim); }
.xp-role__bullets li::before { content: "▹"; position: absolute; left: 0; color: var(--hack); }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 36px; }
.edu-card { border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel), transparent); padding: 18px 20px; transition: border-color 0.3s, transform 0.3s; }
.edu-card:hover { border-color: var(--amber); transform: translateY(-3px); }
.edu-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.edu-card__title { font-family: var(--font-ui); font-weight: 700; font-size: 17px; color: #eef7ff; margin: 0; }
.edu-card__year { font-family: var(--font-term); font-size: 11px; color: var(--amber); white-space: nowrap; }
.edu-card__org { font-family: var(--font-term); font-size: 12px; color: var(--cyan); letter-spacing: 0.5px; margin: 4px 0 8px; }
.edu-card__detail { font-size: 13px; color: var(--txt-dim); margin: 0; }

/* ---------- Certification Manifest ---------- */
.manifest { border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel-2), var(--base-2)); }
.manifest__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.3); }
.manifest__title { font-family: var(--font-term); font-size: 13px; letter-spacing: 2px; color: var(--cyan); text-shadow: var(--glow-cyan); }
.manifest__count { font-family: var(--font-term); font-size: 11px; letter-spacing: 1.5px; color: var(--hack); border: 1px solid rgba(57,255,139,0.3); padding: 4px 10px; }
.manifest__issuers { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.manifest__chip { font-family: var(--font-term); font-size: 11px; letter-spacing: 1px; color: var(--txt-dim); border: 1px solid var(--line); padding: 5px 10px; display: inline-flex; align-items: center; gap: 8px; }
.manifest__chip b { color: var(--cyan); font-weight: 700; }
.manifest__body { max-height: 460px; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 18px 18px; }
.manifest__body::-webkit-scrollbar { width: 8px; }
.cert-group { margin-top: 16px; }
.cert-group__head { position: sticky; top: 0; background: linear-gradient(180deg, var(--panel-2), rgba(14,19,28,0.9)); font-family: var(--font-term); font-size: 11px; letter-spacing: 2px; color: var(--magenta); padding: 8px 0; display: flex; align-items: center; gap: 10px; z-index: 1; border-bottom: 1px solid var(--line-soft); }
.cert-group__n { color: var(--txt-mute); border: 1px solid var(--line); padding: 1px 7px; font-size: 10px; }
.cert-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); }
.cert-row:hover .cert-row__title { color: var(--cyan); }
.cert-row__mark { color: var(--hack); font-size: 11px; }
.cert-row__title { flex: 1; font-size: 13px; color: var(--txt); transition: color 0.2s; }
.cert-row__date { font-family: var(--font-term); font-size: 11px; color: var(--txt-mute); white-space: nowrap; }

/* ---------- Connect ---------- */
.section--connect { padding-bottom: 40px; }
.connect__line { font-family: var(--font-term); font-size: clamp(14px, 3vw, 20px); color: var(--hack); margin: 0 0 30px; }
.connect__links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.conn {
  display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel-2), var(--base-2)); transition: 0.3s var(--ease); position: relative; overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.conn:hover { border-color: var(--cyan); transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,0.45), 0 0 20px rgba(0,229,255,0.14); }
.conn__icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--cyan); flex-shrink: 0; }
.conn__icon svg { width: 22px; height: 22px; }
.conn__label { font-family: var(--font-term); font-size: 10px; letter-spacing: 1.5px; color: var(--txt-mute); }
.conn__value { font-family: var(--font-ui); font-weight: 600; font-size: 15px; color: #eef7ff; word-break: break-all; }
.conn__arrow { margin-left: auto; color: var(--cyan); font-size: 18px; transition: transform 0.25s; }
.conn:hover .conn__arrow { transform: translate(4px, -4px); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px clamp(18px, 5vw, 48px); max-width: var(--maxw); margin: 0 auto; }
.footer__row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.footer__brand { font-family: var(--font-term); color: var(--cyan); font-size: 15px; }
.footer__domain { font-family: var(--font-term); font-size: 13px; color: var(--txt-dim); }
.footer__note { font-family: var(--font-term); font-size: 11px; letter-spacing: 1px; color: var(--txt-mute); display: flex; align-items: center; gap: 8px; margin: 0; }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .hero__wrap { grid-template-columns: 1fr; }
  .hero__node { order: -1; }
  .radar { width: min(240px, 60vw); }
  .diag { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: 1fr 1fr; }
  .record { grid-template-columns: 1fr; }
  .edu { grid-template-columns: 1fr; }

  .nav__links {
    position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; width: min(280px, 80vw);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px;
    padding: 40px; background: rgba(6,9,13,0.97); backdrop-filter: blur(14px);
    border-left: 1px solid var(--line); transform: translateX(100%); transition: transform 0.35s var(--ease); margin-left: 0;
    overflow-y: auto;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 16px; }
  .nav__toggle { display: flex; }
  .nav__status { display: none; }
  .nav { justify-content: space-between; }
}

@media (max-width: 560px) {
  .diag__grid { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .terminal__body { padding: 20px; }
}

@media (max-width: 430px) {
  .hero { padding-top: 104px; }
  .hero__name { font-size: clamp(26px, 8.5vw, 40px); }
  .terminal__body { padding: 18px; }
  .btn { width: 100%; justify-content: center; }
  .hero__cta { width: 100%; }
  .nav__brand { font-size: 15px; }
  .section__head { gap: 10px 12px; }
  .xp-co, .diag-card, .node, .conn { padding: 18px; }
  .manifest__body { max-height: 380px; }
}

/* Touch devices (no hover): keep affordances visible + add tap feedback */
@media (hover: none) {
  .btn:active { transform: translateY(1px); }
  .node:active, .conn:active, .diag-card:active, .intel-item:active, .xp-co:active, .edu-card:active { border-color: var(--cyan); }
  .filter:active { color: var(--cyan); border-color: var(--cyan); }
}

/* Clickable current-company badge (hero) */
.pill--org[href] { text-decoration: none; cursor: pointer; transition: all 0.25s var(--ease); }
.pill--org[href]:hover, .pill--org[href]:active { color: #eafcff; border-color: var(--cyan); background: rgba(0,229,255,0.12); box-shadow: var(--glow-cyan); }
.pill__ext { font-size: 12px; }

/* Clickable company name (experience) */
.xp-co__name--link { cursor: pointer; transition: color 0.2s; }
.xp-co__name--link:hover { color: var(--cyan); }
.xp-co__ext { font-size: 12px; color: var(--cyan); }

/* ============================================================================
   MOTION SAFETY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .scanlines, .radar__sweep, #net-canvas { display: none; }
  .reveal { opacity: 1; transform: none; }
}
