/* ==========================================================
   Prableen Dhooper | Cyber Security Portfolio
   Palette: deep navy, steel panels, teal-cyan signal
   ========================================================== */

:root {
  --bg: #0A1424;
  --bg-2: #0D1A2E;
  --panel: #112038;
  --panel-2: #16294A;
  --rule: #213757;
  --text: #E6EDF5;
  --muted: #93A4BC;
  --signal: #3DD6C4;
  --signal-dim: rgba(61, 214, 196, .12);
  --signal-ink: #0A1424;

  --ok: #48D597;
  --warn: #F2C14E;
  --bad: #FF6B6B;

  --font-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1160px;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--signal); text-underline-offset: 3px; }
a:hover { color: #fff; }

:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; color: #fff; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); }

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

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 16px; top: -60px; background: var(--signal); color: var(--signal-ink); padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--signal); color: var(--signal-ink); }
.btn-primary:hover { background: #fff; color: var(--signal-ink); }
.btn-ghost { border-color: var(--rule); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--signal); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 20, 36, .86);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark path { fill: none; stroke: var(--signal); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .98rem; }
.site-nav a:hover, .site-nav a.is-active { color: #fff; }
.site-nav a.nav-cta { color: var(--signal-ink); background: var(--signal); padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.site-nav a.nav-cta:hover { background: #fff; }

.nav-toggle { display: none; width: 44px; height: 44px; background: transparent; border: 0; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: #fff;
  transition: transform .2s ease;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 72px; overflow: hidden; }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(61,214,196,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,214,196,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
}

.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }

.hero-status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .92rem; font-weight: 500; color: var(--signal);
  border: 1px solid rgba(61,214,196,.35); background: var(--signal-dim);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 28px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 4px rgba(72,213,151,.18); }

.hero h1 { font-size: clamp(2.75rem, 6.6vw, 5rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.hero-role { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 500; color: var(--signal); margin: 14px 0 22px; }
.hero-lede { max-width: 56ch; font-size: 1.12rem; color: #C9D5E3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 22px 0 0; font-weight: 500; font-size: .95rem; }
.hero-links a { color: var(--muted); }
.hero-links a:hover { color: #fff; }

/* Terminal */
.terminal {
  background: #060D19;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(61,214,196,.06), 0 0 60px -20px rgba(61,214,196,.25);
  overflow: hidden;
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #0C172A; border-bottom: 1px solid var(--rule); }
.tl { width: 11px; height: 11px; border-radius: 50%; }
.tl.r { background: #FF5F57; } .tl.y { background: #FEBC2E; } .tl.g { background: #28C840; }
.terminal-title { margin-left: 10px; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.terminal-body {
  margin: 0; padding: 18px 20px 22px;
  font-family: var(--font-mono); font-size: .82rem; line-height: 1.75;
  color: #C9D5E3; white-space: pre; overflow-x: auto;
}
.t-line { display: inline; }
.t-prompt { color: var(--signal); margin-right: 4px; }
.t-head { color: var(--muted); }
.t-ok { color: var(--ok); }
.open { color: var(--ok); font-weight: 500; }
.cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -0.18em; background: var(--signal); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.js-typing .t-line { visibility: hidden; }
.js-typing .t-line.is-shown { visibility: visible; }

/* Stats */
.stats {
  position: relative;
  list-style: none; padding: 0; margin: 64px 0 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--rule); border-radius: var(--radius-lg);
  background: rgba(17, 32, 56, .7);
}
.stats li { padding: 22px 24px; border-left: 1px solid var(--rule); }
.stats li:first-child { border-left: 0; }
.stats strong { display: block; font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: #fff; line-height: 1.1; }
.stats span { display: block; color: var(--muted); font-size: .92rem; line-height: 1.45; margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2, .about-grid h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -0.025em; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.1rem; }

.kicker { font-family: var(--font-mono); font-size: .8rem; color: var(--signal); margin: 0 0 10px; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.about-grid h2 { margin-bottom: 24px; }
.about-grid p { color: #C9D5E3; max-width: 60ch; }
.about-grid .lead { font-size: 1.15rem; color: var(--text); }

.transfer { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 28px; }
.transfer h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 16px; }
.transfer table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.transfer th { text-align: left; font-weight: 600; color: var(--muted); font-size: .85rem; padding: 0 12px 10px 0; border-bottom: 1px solid var(--rule); }
.transfer td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.transfer td:last-child { color: var(--signal); font-weight: 500; }
.transfer tr:last-child td { border-bottom: 0; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.skill-group { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 24px; }
.skill-group h3 { display: flex; align-items: center; gap: 10px; font-size: 1.12rem; font-weight: 600; margin-bottom: 16px; }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: var(--font-mono); font-size: .8rem;
  padding: 5px 10px; color: #D6E0EC;
  background: var(--panel-2); border: 1px solid var(--rule); border-radius: 5px;
}
.tags-small li { font-size: .75rem; padding: 3px 8px; }

/* ---------- Frameworks ---------- */
.fw-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 18px; }

.nist { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 56px; }
.nist-col { background: var(--panel); border: 1px solid var(--rule); border-top: 3px solid var(--signal); border-radius: var(--radius-sm); padding: 18px; }
.nist-col h4 { font-size: 1.05rem; margin-bottom: 8px; }
.nist-col p { margin: 0; font-size: .9rem; color: #B9C6D6; }

.fw-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }

.attack-table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.attack { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 480px; }
.attack th { text-align: left; font-size: .82rem; color: var(--muted); font-weight: 600; background: var(--panel); padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.attack td { padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.attack tr:last-child td { border-bottom: 0; }
.attack td:first-child { color: var(--muted); white-space: nowrap; }
.attack code { color: var(--signal); font-size: .85rem; white-space: nowrap; }

.owasp { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.owasp li { display: flex; gap: 16px; align-items: flex-start; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 16px 18px; }
.owasp code { flex: none; font-size: .85rem; color: var(--signal-ink); background: var(--signal); padding: 3px 8px; border-radius: 4px; font-weight: 500; }
.owasp strong { display: block; color: #fff; font-weight: 600; }
.owasp span { font-size: .92rem; color: #B9C6D6; }

/* ---------- Projects ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 72px; margin-bottom: 72px; border-bottom: 1px solid var(--rule); }
.feature-copy h3 { font-size: clamp(1.8rem, 3.2vw, 2.35rem); font-weight: 700; letter-spacing: -0.02em; }
.feature-sub { font-size: 1.15rem; color: var(--muted); margin: 8px 0 24px; }
.feature-copy .tags { margin-top: 24px; }

.case { margin: 0; }
.case > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.case dt { font-weight: 600; color: var(--signal); font-size: .92rem; }
.case dd { margin: 0; color: #C9D5E3; font-size: .98rem; }

/* Scan panel */
.scan-panel {
  background: #060D19; border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 22px;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.8);
  position: sticky; top: calc(var(--header-h) + 24px);
}
.scan-top { display: flex; gap: 12px; align-items: baseline; background: var(--panel); border-radius: var(--radius-sm); padding: 10px 14px; font-family: var(--font-mono); font-size: .82rem; overflow-wrap: anywhere; }
.scan-label { color: var(--muted); flex: none; }
.scan-score { display: flex; align-items: center; gap: 20px; margin: 22px 0; }
.gauge { position: relative; width: 150px; flex: none; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge-track, .gauge-fill { fill: none; stroke-width: 10; stroke-linecap: round; }
.gauge-track { stroke: var(--panel-2); }
.gauge-fill { stroke: var(--bad); stroke-dasharray: 158; stroke-dashoffset: 158; transition: stroke-dashoffset 1.4s cubic-bezier(.2,.7,.2,1); }
.gauge-value { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; line-height: 1; color: #fff; }
.scan-verdict { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--bad); }
.scan-note { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }

.modules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.modules li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-family: var(--font-mono); font-size: .78rem; background: var(--panel); border-radius: 5px; }
.modules li::before, .legend i { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.modules .ok::before, .legend .ok { background: var(--ok); }
.modules .warn::before, .legend .warn { background: var(--warn); }
.modules .bad::before, .legend .bad { background: var(--bad); }
.legend { display: flex; gap: 18px; margin-top: 14px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Case study: attack chain (a real sequence) */
.case-study { padding-bottom: 72px; margin-bottom: 72px; border-bottom: 1px solid var(--rule); }
.case-head { max-width: 680px; margin-bottom: 32px; }
.case-head h3 { font-size: clamp(1.6rem, 2.8vw, 2rem); font-weight: 700; margin-bottom: 12px; }
.case-head p:last-child { color: var(--muted); }
.chain { list-style: none; counter-reset: step; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.chain li { counter-increment: step; position: relative; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 20px 18px; }
.chain li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-mono); font-size: .8rem; color: var(--signal); margin-bottom: 10px; }
.chain li:not(:last-child)::after {
  content: ""; position: absolute; top: 26px; right: -10px; width: 8px; height: 8px;
  border-top: 2px solid var(--signal); border-right: 2px solid var(--signal); transform: rotate(45deg);
}
.chain li:last-child { border-color: rgba(61,214,196,.45); }
.chain h4 { font-size: 1.05rem; margin-bottom: 8px; }
.chain p { margin: 0; font-size: .9rem; color: #B9C6D6; }

/* Network lab */
.lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; padding-bottom: 72px; margin-bottom: 72px; border-bottom: 1px solid var(--rule); }
.lab h3 { font-size: clamp(1.6rem, 2.8vw, 2rem); font-weight: 700; margin-bottom: 20px; }
.topology { margin: 0; background: #060D19; border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 20px; }
.topology figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; text-align: right; }
.topo-link { stroke: #3A5578; stroke-width: 2; }
.topo-vpn { stroke: var(--signal); stroke-width: 2; stroke-dasharray: 6 5; fill: none; }
.topo-node rect { fill: var(--panel); stroke: #34507A; stroke-width: 1.5; }
.topo-node text { fill: #fff; font-family: var(--font-display); font-size: 14px; font-weight: 600; text-anchor: middle; }
.topo-node text.sub { fill: var(--muted); font-family: var(--font-body); font-size: 11px; font-weight: 400; }
.topo-node.attacker rect { stroke: var(--bad); }
.topo-node.fw rect { stroke: var(--signal); stroke-width: 2; fill: #0E2A35; }
.topo-node.vpn rect { stroke: var(--signal); stroke-dasharray: 4 3; }
.topo-tag { fill: var(--signal); font-family: var(--font-mono); font-size: 11px; }
.topo-arrow { fill: var(--signal); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 24px; margin-bottom: 10px; color: #C9D5E3; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: .5em;
  width: 10px; height: 6px; border-left: 2px solid var(--signal); border-bottom: 2px solid var(--signal);
  transform: rotate(-45deg);
}

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.project { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 24px; }
.project h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.project p:last-of-type { margin-bottom: 0; color: #B9C6D6; font-size: .97rem; }

/* ---------- Experience ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--rule); }
.timeline-item:last-child { border-bottom: 1px solid var(--rule); }
.timeline-date { font-family: var(--font-mono); font-size: .88rem; color: var(--muted); padding-top: 6px; }
.timeline-body h3 { font-size: 1.45rem; font-weight: 600; }
.timeline-org { color: var(--signal); font-weight: 500; margin: 4px 0 16px; }
.timeline-body .checklist { max-width: 72ch; }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.edu { padding: 28px; background: var(--panel); border: 1px solid var(--rule); border-left: 3px solid var(--signal); border-radius: var(--radius-sm); }
.edu-date { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.edu h3 { font-size: 1.35rem; font-weight: 600; }
.edu-org { font-weight: 500; color: var(--signal); margin: 6px 0 12px; }
.edu p:last-child { margin-bottom: 0; color: #B9C6D6; }
.certs { margin-top: 32px; }
.certs h3 { font-size: 1.2rem; margin-bottom: 14px; }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(180deg, var(--bg) 0%, #08263A 100%); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.contact h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em; }
.contact-copy > p { font-size: 1.1rem; color: #C9D5E3; margin: 14px 0 28px; }
.roles-title { font-size: 1rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.roles { margin-bottom: 32px; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.contact-list span { color: var(--muted); }

.contact-form { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 32px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: #fff;
  padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: var(--radius-sm);
  background: #0A1628;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-dim); }
.field.has-error input, .field.has-error textarea { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .88rem; margin: 6px 0 0; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 14px 0 0; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-success { color: var(--ok); }
.form-status.is-error { color: var(--bad); }

/* ---------- Footer ---------- */
.site-footer { background: #071420; color: var(--muted); border-top: 1px solid var(--rule); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; padding-bottom: 24px; font-size: .92rem; }
.footer-inner p { margin: 0; }
.site-footer a { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chain li::after { display: none; }
  .skills-grid, .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fw-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid, .about-grid, .feature, .lab, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .scan-panel { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 48px; }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .section { padding: 72px 0; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--rule);
    padding: 8px 24px 20px; display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 1.05rem; }
  .site-nav a.nav-cta { margin-top: 14px; text-align: center; border-bottom: 0; padding: 12px 16px; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .terminal-body { font-size: .7rem; padding: 14px; min-height: 0; }
  .stats li { padding: 18px; }
  .stats strong { font-size: 1.7rem; }
  .skills-grid, .project-grid, .edu-grid, .nist, .chain { grid-template-columns: minmax(0, 1fr); }
  .case > div { grid-template-columns: 1fr; gap: 4px; }
  .scan-score { flex-direction: column; align-items: flex-start; gap: 12px; }
  .modules li { font-size: .72rem; padding: 7px 8px; gap: 7px; }
  .transfer { padding: 20px; }
  .transfer table { font-size: .88rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 22px; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .footer-inner { flex-direction: column; gap: 8px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .contact-form, .hero-actions, .site-footer, .grid-bg { display: none; }
}
