/* ============================================================
   IT Professional — Terminal CV
   Design System + Full Styles
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Brand — terminal dark theme */
  --brand: #00ff41;
  --brand-light: #33ff66;
  --brand-dark: #00cc33;
  --accent: #00d4ff;
  --accent-light: #33ddff;
  --accent-dark: #00a8cc;

  /* Terminal palette */
  --term-bg: #0a0a0a;
  --term-bg-alt: #0f0f0f;
  --term-surface: #141414;
  --term-surface-hover: #1a1a1a;
  --term-border: #1e1e1e;
  --term-border-light: #2a2a2a;

  /* Text */
  --text-primary: #d4d4d4;
  --text-secondary: #8a8a8a;
  --text-muted: #555;

  /* Semantic */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Prompt colours */
  --prompt-green: #00ff41;
  --prompt-blue: #00d4ff;
  --prompt-yellow: #f59e0b;
  --prompt-red: #ef4444;

  /* Type scale (fluid) */
  --fs-display: clamp(2.2rem, 5vw + 1rem, 4.5rem);
  --fs-h1: clamp(1.8rem, 3vw + 1rem, 3rem);
  --fs-h2: clamp(1.3rem, 2vw + 0.8rem, 2rem);
  --fs-h3: clamp(1.1rem, 1.5vw + 0.6rem, 1.35rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.75rem;

  /* Space */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem;
  --sp-9: 6rem; --sp-10: 8rem;

  /* Radii */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.5);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.6);
  --shadow-glow: 0 0 20px rgba(0,255,65,.08);
  --shadow-glow-accent: 0 0 20px rgba(0,212,255,.08);

  /* Container */
  --container: 1100px;
  --gutter: clamp(1rem, 4vw, 2rem);

  /* Transitions */
  --t-fast: 150ms cubic-bezier(.4,0,.2,1);
  --t-base: 250ms cubic-bezier(.4,0,.2,1);
  --t-slow: 400ms cubic-bezier(.4,0,.2,1);

  /* Font */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-display: 'Chakra Petch', 'JetBrains Mono', 'Consolas', monospace;
  --font-body: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--term-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
}
img, picture { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-light); }
ul { list-style: none; }
::selection { background: var(--brand); color: var(--term-bg); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -48px;
  left: var(--sp-4);
  z-index: 2000;
  padding: var(--sp-2) var(--sp-4);
  background: var(--brand);
  color: var(--term-bg);
  font-size: var(--fs-small);
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: top var(--t-fast);
}
.skip-link:focus {
  top: var(--sp-3);
}

/* ---------- CRT Overlay ---------- */
.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,.03) 0px,
    rgba(0,0,0,.03) 1px,
    transparent 1px,
    transparent 2px
  );
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1001;
  background: var(--term-border);
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 50ms linear;
  box-shadow: 0 0 8px var(--brand);
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Navigation ---------- */
.terminal-nav {
  position: fixed;
  top: 2px;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--term-border);
  padding-top: env(safe-area-inset-top);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  gap: 2px;
}
.nav-logo:hover { color: var(--brand); }
.prompt-symbol { color: var(--brand); }
.nav-sep { color: var(--text-muted); }
.nav-links-desktop { display: none; gap: var(--sp-5); align-items: center; }
.nav-link {
  color: var(--text-secondary);
  font-size: var(--fs-small);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--brand);
  background: rgba(0,255,65,.06);
}
.nav-link.active {
  box-shadow: inset 2px 0 0 var(--brand);
}
.nav-link--cta {
  color: var(--term-bg);
  background: var(--brand);
  font-weight: 600;
}
.nav-link--cta:hover {
  color: var(--term-bg);
  background: var(--brand-light);
  transform: translateY(-1px);
}
@media (min-width: 768px) {
  .nav-links-desktop { display: flex; }
  .nav-toggle { display: none; }
}

/* ---------- Hamburger ---------- */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: all var(--t-base);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0,0,0,.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  z-index: 1002;
  background: var(--term-surface);
  border-left: 1px solid var(--term-border);
  transform: translateX(100%);
  transition: transform var(--t-base);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
.drawer.open {
  transform: translateX(0);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5);
  border-bottom: 1px solid var(--term-border);
}
.drawer-title {
  color: var(--text-secondary);
  font-size: var(--fs-small);
}
.drawer-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--term-border);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all var(--t-fast);
}
.drawer-close:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: var(--sp-4);
  gap: var(--sp-2);
}
.drawer-link {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  color: var(--text-primary);
  font-size: var(--fs-body);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.drawer-link:hover {
  background: rgba(0,255,65,.06);
  color: var(--brand);
}
.prompt-green { color: var(--prompt-green); }
.prompt-blue { color: var(--prompt-blue); }
.prompt-sep { color: var(--text-muted); }
.accent { color: var(--accent); }

/* ---------- Terminal Window ---------- */
.terminal-window {
  background: var(--term-surface);
  border: 1px solid var(--term-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.terminal-window:hover {
  border-color: var(--term-border-light);
  box-shadow:
    var(--shadow-glow),
    -5px 0 14px rgba(0, 212, 255, .22),
    5px 0 14px rgba(0, 255, 65, .22);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--term-bg-alt);
  border-bottom: 1px solid var(--term-border);
}
.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal-dot--red { background: #ff5f57; }
.terminal-dot--yellow { background: #febc2e; }
.terminal-dot--green { background: #28c840; }
.terminal-bar-title {
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.terminal-body {
  padding: var(--sp-5);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: calc(56px + var(--sp-7));
  padding-bottom: var(--sp-7);
  overflow: hidden;
}
.hero .container {
  position: relative;
  z-index: 1;
}

/* Matrix rain canvas behind the hero terminal */
.matrix-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .38;
  pointer-events: none;
}

/* CRT power-on flicker (once, on load) */
.hero-terminal {
  position: relative;
  width: 100%;
  animation: term-flicker 900ms steps(14) 1;
}
@keyframes term-flicker {
  0%   { opacity: .15; }
  10%  { opacity: .95; }
  20%  { opacity: .3; }
  30%  { opacity: 1; }
  40%  { opacity: .55; }
  50%  { opacity: 1; }
  60%  { opacity: .75; }
  70%  { opacity: 1; }
  100% { opacity: 1; }
}

/* CRT scanline sweep — a soft brightness band travelling down the window */
.hero-terminal::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  height: 34%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 255, 65, .045) 42%,
    rgba(0, 212, 255, .03) 55%,
    transparent 100%
  );
  animation: crt-sweep 9s linear infinite;
}
@keyframes crt-sweep {
  0%   { top: -34%; }
  100% { top: 110%; }
}

/* Vim-style status line at the bottom of the hero terminal */
.term-statusline {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-5);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  background: var(--term-bg-alt);
  border-top: 1px solid var(--term-border);
}
.tsl-left {
  color: var(--brand);
  font-weight: 600;
  letter-spacing: .02em;
}
.tsl-file {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--term-border-light);
  text-underline-offset: 3px;
}
.tsl-right {
  margin-left: auto;
  color: var(--text-muted);
}

/* Typed section commands (scroll-triggered) */
.cmd-text {
  color: var(--text-primary);
}
.cmd-caret {
  display: inline-block;
  width: .6em;
  height: 1.1em;
  margin-left: 3px;
  background: var(--brand);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 8px rgba(0,255,65,.4);
  transition: opacity var(--t-fast);
}
.cmd-caret.is-done {
  opacity: 0;
  animation: none;
}
.hero-terminal .terminal-body {
  padding: var(--sp-5) var(--sp-5) var(--sp-7);
  min-height: 420px;
}

/* Boot sequence */
.boot-line {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.8;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 300ms ease, transform 300ms ease;
}
.boot-line.visible {
  opacity: 1;
  transform: none;
}

/* Boot status + typed command */
.boot-ok {
  color: var(--brand);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0,255,65,.35);
}
.boot-line--cmd {
  color: var(--text-primary);
}
.boot-cmd {
  color: var(--text-primary);
}
.boot-caret {
  display: inline-block;
  width: .6em;
  height: 1.1em;
  margin-left: 2px;
  background: var(--brand);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 8px rgba(0,255,65,.4);
}

/* Hero content */
.hero-content {
  opacity: 0;
  transition: opacity 600ms ease;
}
.hero-content.visible {
  opacity: 1;
}

.hero-name {
  font-size: var(--fs-display);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: var(--sp-3);
  letter-spacing: -.02em;
}
.cursor {
  display: inline-block;
  color: var(--brand);
  animation: blink 1s step-end infinite;
  font-weight: 400;
}
@keyframes blink {
  50% { opacity: 0; }
}
.hero-title {
  font-size: var(--fs-h3);
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
}
.hero-role {
  color: var(--accent);
}
.hero-tagline {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  max-width: 650px;
  line-height: 1.7;
  margin-bottom: var(--sp-6);
}
.hero-actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.hero-status {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--success);
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.hero-divider {
  color: var(--term-border-light);
}

/* ---------- AES-256 Decode Status (role + mission) ---------- */
.decrypt-status {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-muted);
  min-height: 1.4em;
  margin-bottom: var(--sp-2);
  opacity: 1;
  transition: opacity var(--t-slow);
}
.decrypt-status.is-faded {
  opacity: 0;
}
.ds-cmd {
  color: var(--brand);
}
.ds-bar {
  color: var(--brand);
  letter-spacing: 1px;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(0, 255, 65, .35);
}
.hero-role.is-decrypting,
.hero-tagline.is-decrypting {
  text-shadow: 0 0 10px rgba(0, 255, 65, .35);
}
.hero-role.decrypt-done,
.hero-tagline.decrypt-done {
  text-shadow: 0 0 18px rgba(0, 255, 65, .55);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  min-height: 44px;
  text-decoration: none;
}
.btn-primary {
  background: var(--brand);
  color: var(--term-bg);
  border-color: var(--brand);
  box-shadow: 0 0 16px rgba(0,255,65,.15);
}
.btn-primary:hover {
  background: var(--brand-light);
  color: var(--term-bg);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0,255,65,.25);
}
.btn-primary:active {
  transform: scale(.97);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--term-border-light);
}
.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(0,255,65,.04);
  transform: translateY(-2px);
}
.btn-prompt {
  color: inherit;
  opacity: .6;
}
.btn-cursor {
  animation: blink 1s step-end infinite;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--sp-9) 0;
}
.section--alt {
  background: var(--term-bg-alt);
}
.section-header {
  margin-bottom: var(--sp-7);
}
.prompt-line {
  font-size: var(--fs-h3);
  display: block;
}

/* ---------- Scroll Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
[data-reveal-stagger].in > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].in > *:nth-child(2) { transition-delay: 80ms; }
[data-reveal-stagger].in > *:nth-child(3) { transition-delay: 160ms; }
[data-reveal-stagger].in > *:nth-child(4) { transition-delay: 240ms; }
[data-reveal-stagger].in > *:nth-child(5) { transition-delay: 320ms; }
[data-reveal-stagger].in > *:nth-child(6) { transition-delay: 400ms; }
[data-reveal-stagger].in > * {
  opacity: 1 !important;
  transform: none !important;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
  }
}
.about-text {
  color: var(--text-primary);
  line-height: 1.75;
  margin-bottom: var(--sp-4);
}
.about-text:last-child { margin-bottom: 0; }
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.stat-card {
  background: var(--term-surface);
  border: 1px solid var(--term-border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  text-align: center;
  transition: all var(--t-base);
}
.stat-card:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow:
    var(--shadow-glow),
    -4px 0 12px rgba(0, 212, 255, .2),
    4px 0 12px rgba(0, 255, 65, .2);
}
.stat-number {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  color: var(--brand);
  display: block;
  text-shadow: 0 0 16px rgba(0,255,65,.3);
}
.stat-suffix {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--brand);
}
.stat-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.skill-title {
  font-size: var(--fs-body);
  margin-bottom: var(--sp-4);
  color: var(--text-secondary);
}
.json-key { color: var(--accent); }
.skill-bars {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.skill-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-small);
  color: var(--text-primary);
}
.skill-pct { color: var(--brand); font-weight: 600; }
.skill-bar {
  height: 6px;
  background: var(--term-border);
  border-radius: 3px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(.25,.46,.45,.94);
  box-shadow: 0 0 8px rgba(0,255,65,.25);
}
.skill-fill.animated {
  /* width set by JS */
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.tag {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--brand);
  border: 1px solid rgba(0,255,65,.2);
  border-radius: var(--r-sm);
  background: rgba(0,255,65,.04);
  transition: all var(--t-fast);
}
.tag:hover {
  background: rgba(0,255,65,.1);
  border-color: var(--brand);
  animation: tag-glitch 300ms steps(2, end) 1;
}

/* ---------- Experience Timeline ---------- */
.timeline {
  position: relative;
  padding-left: var(--sp-7);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand), var(--term-border));
}
.timeline-item {
  position: relative;
  margin-bottom: var(--sp-6);
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--sp-7) + 4px);
  top: 20px;
  width: 14px;
  height: 14px;
  background: var(--term-bg);
  border: 2px solid var(--brand);
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 8px rgba(0,255,65,.3);
}
.timeline-item:hover .timeline-marker {
  background: var(--brand);
}
.exp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-2);
}
.exp-role {
  font-size: var(--fs-h3);
  color: #fff;
  font-weight: 600;
}
.exp-company {
  font-size: var(--fs-body);
  color: var(--accent);
}
.exp-date {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}
.exp-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.exp-list li {
  font-size: var(--fs-small);
  color: var(--text-primary);
  line-height: 1.6;
  padding-left: var(--sp-4);
  position: relative;
}
.list-prompt {
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 600;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 768px) {
  .edu-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.edu-log-line {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.log-timestamp {
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.log-level {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.log-level--info {
  color: var(--accent);
  background: rgba(0,212,255,.1);
  border: 1px solid rgba(0,212,255,.2);
}
.log-level--success {
  color: var(--success);
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.2);
}
.edu-title {
  font-size: var(--fs-h3);
  color: #fff;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.edu-school {
  color: var(--accent);
  font-size: var(--fs-body);
  margin-bottom: var(--sp-2);
}
.edu-detail {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: var(--sp-1);
}
.cert-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.cert-list li {
  font-size: var(--fs-small);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.cert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 24px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--term-bg);
  background: var(--brand);
  border-radius: var(--r-sm);
  padding: 0 6px;
  text-transform: uppercase;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.project-card {
  transition: all var(--t-base);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow:
    var(--shadow-glow),
    -5px 0 14px rgba(0, 212, 255, .22),
    5px 0 14px rgba(0, 255, 65, .22);
}
.project-name {
  font-size: var(--fs-h3);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.project-desc {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.project-stats {
  display: flex;
  gap: var(--sp-5);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}
.contact-line {
  padding: var(--sp-2) 0;
  font-size: var(--fs-small);
  border-bottom: 1px solid var(--term-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--sp-1);
}
.contact-line:last-child { border-bottom: none; }
.config-key { color: var(--brand); }
.config-eq { color: var(--text-muted); }
.config-val { color: var(--text-primary); }
.config-val--hash {
  font-size: var(--fs-xs);
  color: var(--accent);
  word-break: break-all;
  cursor: help;
  text-shadow: 0 0 8px rgba(0,212,255,.15);
  user-select: all;
}
.config-comment {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-style: italic;
}
a.config-val:hover { color: var(--accent); }

/* ---------- Form ---------- */
.form-group {
  margin-bottom: var(--sp-4);
}
.form-label {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}
.form-var { color: var(--accent); font-weight: 600; }
.form-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-mono);
  font-size: 16px; /* prevents iOS zoom */
  color: var(--text-primary);
  background: var(--term-bg);
  border: 1px solid var(--term-border);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
  min-height: 44px;
}
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,255,65,.1);
  outline: none;
}
.form-input::placeholder {
  color: var(--text-muted);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.form-eof {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}
.btn-submit {
  width: 100%;
  justify-content: center;
  margin-top: var(--sp-2);
}
.form-feedback {
  margin-top: var(--sp-3);
  font-size: var(--fs-small);
  min-height: 1.5em;
}
.form-feedback.success { color: var(--success); }
.form-feedback.error { color: var(--danger); }

/* ---------- Footer ---------- */
.footer {
  padding: var(--sp-7) 0 var(--sp-5);
  border-top: 1px solid var(--term-border);
  padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom));
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.footer-prompt {
  display: block;
  font-size: var(--fs-small);
  margin-bottom: var(--sp-2);
}
.footer-copy {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: var(--sp-5);
}
.footer-social {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  transition: color var(--t-fast);
}
.footer-social:hover { color: var(--brand); }
.footer-bottom {
  padding-top: var(--sp-4);
  border-top: 1px solid var(--term-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  text-align: center;
}
.footer-ascii {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.footer-clock {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: .06em;
}

/* ============================================================
   Glitch FX — terminal interference effects
   ============================================================ */

/* ---- Card surfaces: RGB-split edge + static interference on hover ---- */
.terminal-window {
  position: relative;
}
.terminal-window::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(
    100deg,
    rgba(0, 255, 65, .05) 0 2px,
    transparent 2px 5px,
    rgba(0, 212, 255, .04) 5px 7px,
    transparent 7px 12px
  );
  transition: opacity var(--t-fast);
}
.terminal-window:hover::before {
  opacity: 1;
  animation: card-static 260ms steps(2, end) 4;
}
@keyframes card-static {
  0%   { background-position: 0 0; }
  50%  { background-position: 7px -4px; }
  100% { background-position: -5px 3px; }
}

/* ---- Hero name: periodic RGB-split burst (mostly idle) ---- */
.hero-name {
  position: relative;
  animation: name-glitch 7.5s linear infinite 3.5s;
}
@keyframes name-glitch {
  0%, 90%, 100% {
    text-shadow: 0 0 14px rgba(0, 255, 65, .12);
    transform: none;
  }
  91% {
    animation-timing-function: steps(1, end);
    text-shadow: -4px 0 var(--accent), 4px 0 var(--brand);
    transform: translate(2px, -1px) skewX(-3deg);
  }
  93% {
    animation-timing-function: steps(1, end);
    text-shadow: 4px 0 var(--accent), -3px 0 var(--brand);
    transform: translate(-3px, 1px);
  }
  95% {
    animation-timing-function: steps(1, end);
    text-shadow: -3px 0 #fff, 3px 0 var(--accent);
    transform: translate(1px, 0) skewX(2deg);
  }
  97% {
    animation-timing-function: steps(1, end);
    text-shadow: 3px 0 var(--brand), -3px 0 var(--accent), 0 0 18px rgba(0, 212, 255, .4);
    transform: none;
  }
  98% {
    animation-timing-function: steps(1, end);
    text-shadow: 0 0 14px rgba(0, 255, 65, .12);
    transform: none;
  }
}

/* One-shot strong burst when the typed name completes */
.hero-name.glitch-burst {
  animation: name-glitch-strong 650ms steps(4, end) 1;
}
@keyframes name-glitch-strong {
  0%   { text-shadow: 0 0 14px rgba(0,255,65,.12); transform: none; }
  25%  { text-shadow: -5px 0 var(--accent), 5px 0 var(--brand), 0 0 24px rgba(0,255,65,.35); transform: translate(-4px, 2px) skewX(-4deg); }
  50%  { text-shadow: 5px 0 var(--accent), -5px 0 var(--brand), 0 0 24px rgba(0,212,255,.35); transform: translate(4px, -2px); }
  75%  { text-shadow: -3px 0 #fff, 3px 0 var(--accent), 0 0 20px rgba(0,255,65,.3); transform: translate(-2px, 1px) skewX(3deg); }
  100% { text-shadow: 0 0 14px rgba(0,255,65,.12); transform: none; }
}

/* ---- Section command headers: brief system-wide hiccup ---- */
.prompt-line {
  animation: cmd-glitch 9s linear infinite;
}
@keyframes cmd-glitch {
  0%, 92%, 100% { text-shadow: none; transform: none; }
  93% {
    animation-timing-function: steps(1, end);
    text-shadow: -2px 0 var(--accent), 2px 0 var(--brand);
    transform: translateX(-1px);
  }
  95% {
    animation-timing-function: steps(1, end);
    text-shadow: 2px 0 var(--accent), -2px 0 var(--brand);
    transform: translateX(1px);
  }
  97% {
    animation-timing-function: steps(1, end);
    text-shadow: -1px 0 #fff, 1px 0 var(--accent), 0 0 12px rgba(0, 212, 255, .35);
    transform: none;
  }
}

/* ---- Real RGB-slice glitch (pseudo layers) on card titles ---- */
.glitch { position: relative; }
.glitch--inline { display: inline-block; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.glitch::before { color: var(--accent); z-index: 1; }
.glitch::after  { color: var(--brand);  z-index: 2; }

.project-card:hover .glitch::before,
.timeline-card:hover .glitch::before,
.feature-card:hover .glitch::before,
.stat-card:hover .glitch::before {
  animation: glitch-slice-a 480ms steps(4, end) 1;
}
.project-card:hover .glitch::after,
.timeline-card:hover .glitch::after,
.feature-card:hover .glitch::after,
.stat-card:hover .glitch::after {
  animation: glitch-slice-b 480ms steps(4, end) 1;
}

@keyframes glitch-slice-a {
  0%   { clip-path: inset(0 0 100% 0); transform: translate(0, 0); opacity: 0; }
  25%  { clip-path: inset(12% 0 58% 0); transform: translate(-3px, 0); opacity: .9; }
  50%  { clip-path: inset(46% 0 26% 0); transform: translate(2px, 1px); opacity: .9; }
  75%  { clip-path: inset(64% 0 10% 0); transform: translate(-2px, 0); opacity: .8; }
  100% { clip-path: inset(0 0 100% 0); transform: translate(0, 0); opacity: 0; }
}
@keyframes glitch-slice-b {
  0%   { clip-path: inset(0 0 100% 0); transform: translate(0, 0); opacity: 0; }
  25%  { clip-path: inset(58% 0 20% 0); transform: translate(3px, 0); opacity: .9; }
  50%  { clip-path: inset(10% 0 72% 0); transform: translate(-2px, -1px); opacity: .9; }
  75%  { clip-path: inset(30% 0 48% 0); transform: translate(3px, 0); opacity: .8; }
  100% { clip-path: inset(0 0 100% 0); transform: translate(0, 0); opacity: 0; }
}

/* ---- Stat number jitter on hover ---- */
.stat-card:hover .stat-number {
  animation: num-glitch 420ms steps(2, end) 1;
}
@keyframes num-glitch {
  0%, 100% {
    text-shadow: 0 0 16px rgba(0,255,65,.3);
    transform: none;
  }
  50% {
    text-shadow: -3px 0 var(--accent), 3px 0 var(--brand), 0 0 16px rgba(0,255,65,.3);
    transform: translateX(-2px);
  }
}

/* ---- Tag flicker on hover ---- */
@keyframes tag-glitch {
  0%, 100% { transform: translate(0, 0); box-shadow: none; }
  50% {
    transform: translate(-1px, 1px);
    box-shadow: -2px 0 0 var(--accent), 2px 0 0 var(--brand);
  }
}

/* ---- Primary button signal burst on hover ---- */
.btn-primary:hover {
  animation: btn-glitch 350ms steps(2, end) 1;
}
@keyframes btn-glitch {
  0%, 100% {
    box-shadow: 0 0 24px rgba(0,255,65,.25);
    transform: translateY(-2px);
  }
  50% {
    box-shadow: -3px 0 0 var(--accent), 3px 0 0 var(--brand), 0 0 24px rgba(0,255,65,.3);
    transform: translateY(-2px) translateX(-1px);
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .boot-line { opacity: 1; transform: none; }
  .hero-content { opacity: 1; }
  [data-reveal] { opacity: 1; transform: none; }
  [data-reveal-stagger] > * { opacity: 1; transform: none; }
  .skill-fill { transition: none; }
  .hero-terminal { animation: none; }
  .hero-terminal::after { animation: none; display: none; }
  .matrix-rain { display: none; }
  .cmd-caret { display: none; }
  .hero-name, .prompt-line { animation: none !important; }
  .glitch::before, .glitch::after { display: none; }
  .terminal-window::before { display: none; }
  .decrypt-status { display: none; }
  .hero-role.is-decrypting, .hero-tagline.is-decrypting { text-shadow: none; }
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--term-bg); }
::-webkit-scrollbar-thumb {
  background: var(--term-border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-dark);
}

/* ---------- Mobile sticky CTA ---------- */
.mobile-cta { display: none; }
@media (max-width: 767px) {
  .mobile-cta {
    display: flex;
    gap: var(--sp-3);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: var(--sp-3) var(--gutter);
    padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom));
    background: rgba(10,10,10,.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--term-border);
  }
  .mobile-cta .btn {
    flex: 1;
    justify-content: center;
  }
  .footer {
    padding-bottom: calc(var(--sp-9) + env(safe-area-inset-bottom));
  }
}

/* ---------- Feature card (competency tiles) ---------- */
.feature-card {
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow:
    var(--shadow-glow),
    -4px 0 12px rgba(0, 212, 255, .2),
    4px 0 12px rgba(0, 255, 65, .2);
}

/* ---------- Contact icons ---------- */
.contact-icon {
  width: 16px;
  height: 16px;
  color: var(--brand);
  margin-right: var(--sp-2);
  flex-shrink: 0;
  align-self: center;
}

/* ---------- Project outcome ---------- */
.project-outcome {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--term-border-light);
}
.outcome-label {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Form status (site-contact-form kit) ---------- */
.form-status {
  margin-top: var(--sp-3);
  font-size: var(--fs-small);
  min-height: 1.5em;
}
.form-status--pending { color: var(--warning); }
.form-status--success { color: var(--success); }
.form-status--error { color: var(--danger); }

/* ---------- Footer social with icons ---------- */
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-social svg {
  width: 15px;
  height: 15px;
}
