/* ============ irani.im — terminal portfolio ============ */
:root {
  --bg: #0a0f1c;
  --bg-2: #0d1526;
  --surface: #101a30;
  --surface-2: #14203a;
  --border: #223252;
  --border-hi: #2f4570;
  --fg: #e6edf7;
  --fg-dim: #8b9cb8;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, .12);
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --red: #ef4444;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --rad: 12px;
  --nav-h: 64px;
  --glow: 0 0 24px rgba(34, 197, 94, .25);
}

/* terminal color themes (set via `theme` command) */
:root[data-term-theme="amber"] { --accent: #fbbf24; --accent-soft: rgba(251,191,36,.12); --glow: 0 0 24px rgba(251,191,36,.25); }
:root[data-term-theme="blue"]  { --accent: #38bdf8; --accent-soft: rgba(56,189,248,.12);  --glow: 0 0 24px rgba(56,189,248,.25); }
:root[data-term-theme="pink"]  { --accent: #f472b6; --accent-soft: rgba(244,114,182,.12); --glow: 0 0 24px rgba(244,114,182,.25); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #04120a; }
a { color: var(--accent); text-decoration: none; }
b, strong { color: var(--fg); font-weight: 700; }
.accent { color: var(--accent); }
.dim { color: var(--fg-dim); }
img { max-width: 100%; }
button { font-family: var(--mono); cursor: pointer; }

/* focus */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ============ ambient background ============ */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(139,156,184,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,156,184,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
}
.bg-blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .35;
  animation: drift 24s ease-in-out infinite alternate;
}
.bg-blob-a { width: 480px; height: 480px; top: -140px; left: -100px; background: rgba(34,197,94,.28); }
.bg-blob-b { width: 520px; height: 520px; top: 30%; right: -180px; background: rgba(34,211,238,.20); animation-delay: -12s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 80px) scale(1.15); }
}

#matrix-canvas {
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none; opacity: 0;
  transition: opacity .6s ease;
}
#matrix-canvas.on { opacity: 1; pointer-events: auto; }

/* cursor glow (desktop only) */
#cursor-glow {
  position: fixed; width: 0; height: 0;
  border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(34,197,94,.07), transparent 65%);
  transform: translate(-50%, -50%);
  pointer-events: none; left: 50%; top: 30%;
}
@media (hover: hover) and (pointer: fine) and (min-width: 821px) {
  #cursor-glow { width: 500px; height: 500px; }
}

/* ============ boot overlay ============ */
#boot {
  position: fixed; inset: 0; z-index: 100;
  background: #060a13;
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 8vh 8vw;
  transition: opacity .5s ease, visibility .5s;
}
#boot.done { opacity: 0; visibility: hidden; }
#boot-log { font-size: clamp(11px, 2.4vw, 14px); color: var(--fg-dim); white-space: pre-wrap; }
#boot-log .ok { color: var(--accent); }
.boot-skip {
  position: absolute; bottom: 24px; right: 28px;
  font-size: 12px; color: var(--fg-dim);
  animation: blink-soft 1.4s ease infinite;
}
@keyframes blink-soft { 50% { opacity: .25; } }

/* ============ nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 44px);
  background: rgba(10, 15, 28, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, transform .35s ease;
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav.hidden { transform: translateY(-100%); }
.nav-logo { font-weight: 700; font-size: 17px; color: var(--fg); display: flex; align-items: center; gap: 6px; }
.prompt-sign { color: var(--accent); }
.caret-mini {
  width: 8px; height: 16px; background: var(--accent);
  display: inline-block; margin-left: 2px;
  animation: blink-soft 1.1s steps(1) infinite;
}
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.nav-links a { color: var(--fg-dim); font-size: 14px; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-idx { color: var(--accent); font-size: 11px; margin-right: 3px; }
.nav-burger { display: none; background: none; border: 0; width: 40px; height: 40px; position: relative; z-index: 60; }
.nav-burger span {
  display: block; width: 22px; height: 2px; margin: 5px auto;
  background: var(--accent); transition: transform .3s, opacity .3s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--accent);
  transition: transform .18s ease, box-shadow .25s ease, background .2s;
  cursor: pointer; min-height: 44px;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--accent); color: #04120a; font-weight: 700; }
.btn-solid:hover { box-shadow: var(--glow); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); transform: translateY(-2px); }
.btn-sm { padding: 7px 14px; min-height: 36px; font-size: 13px; }
.btn-lg { padding: 15px 28px; font-size: 15px; }

/* ============ hero ============ */
.hero {
  min-height: 100dvh;
  padding-top: calc(var(--nav-h) + clamp(24px, 6vh, 80px));
  padding-bottom: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.hero > * { min-width: 0; }
.hero-hello { color: var(--fg-dim); font-size: 14px; margin-bottom: 14px; }
.hero-name {
  font-size: clamp(40px, 6.2vw, 74px);
  line-height: 1.04; font-weight: 700; letter-spacing: -1px;
  margin-bottom: 14px;
  text-shadow: 0 0 40px rgba(34,197,94,.18);
}
.hero-role { color: var(--fg-dim); font-size: clamp(15px, 1.6vw, 18px); margin-bottom: 10px; }
.hero-role strong { color: var(--cyan); }
.hero-type { font-size: clamp(15px, 1.7vw, 19px); min-height: 1.7em; margin-bottom: 18px; }
.caret {
  display: inline-block; width: 10px; height: 1.15em;
  background: var(--accent); vertical-align: text-bottom;
  margin-left: 3px; animation: blink-soft 1s steps(1) infinite;
}
.hero-sum { color: var(--fg-dim); max-width: 54ch; margin-bottom: 26px; font-size: 15px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-stats { display: flex; gap: clamp(20px, 3vw, 44px); flex-wrap: wrap; }
.stat { display: flex; flex-direction: row; align-items: baseline; gap: 2px; flex-wrap: wrap; }
.stat-n, .stat-plus { font-size: clamp(26px, 3vw, 36px); font-weight: 700; color: var(--fg); display: inline; }
.stat-n { font-variant-numeric: tabular-nums; }
.stat-plus { color: var(--accent); }
.stat-l { width: 100%; color: var(--fg-dim); font-size: 12.5px; }

/* ============ terminal ============ */
.terminal {
  background: rgba(13, 21, 38, .92);
  border: 1px solid var(--border);
  border-radius: var(--rad);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(34,197,94,.05), var(--glow);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease, opacity .4s;
  will-change: transform;
}
.terminal::after { /* scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px);
  border-radius: inherit;
}
.terminal.minimized .term-body,
.terminal.minimized .term-chips { display: none; }
.terminal.maximized {
  position: fixed; inset: 12px; z-index: 70; max-height: none !important;
}
.terminal.closed { display: none; }
.terminal.shake { animation: shake .4s ease; }
@keyframes shake {
  20% { transform: translateX(-8px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
}
/* CRT shutdown / boot (close dot resets the terminal) */
.terminal.shutting {
  animation: term-shutdown .45s ease-in forwards;
  pointer-events: none;
}
@keyframes term-shutdown {
  0%   { transform: scale(1, 1); opacity: 1; filter: brightness(1); }
  55%  { transform: scale(1, .015); opacity: 1; filter: brightness(2.6); }
  100% { transform: scale(.001, .002); opacity: 0; filter: brightness(4); }
}
.terminal.booting {
  animation: term-boot .55s cubic-bezier(.2, .8, .3, 1.1) both;
}
@keyframes term-boot {
  0%   { transform: scale(.001, .002); opacity: 0; filter: brightness(3); }
  45%  { transform: scale(1, .015); opacity: 1; filter: brightness(2.2); }
  100% { transform: scale(1, 1); opacity: 1; filter: brightness(1); }
}
.term-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: rgba(20, 32, 58, .9);
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.term-dots { display: flex; gap: 7px; }
.dot { width: 13px; height: 13px; border-radius: 50%; border: 0; padding: 0; transition: transform .15s; }
.dot:hover { transform: scale(1.2); }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.term-title { flex: 1; text-align: center; font-size: 12.5px; color: var(--fg-dim); }
.term-net { font-size: 11px; color: var(--accent); }
.term-body {
  padding: 16px 16px 12px;
  height: clamp(360px, 48vh, 520px);
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.55;
  cursor: text;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hi) transparent;
  overscroll-behavior: contain;
}
.terminal.maximized .term-body { height: auto; flex: 1; font-size: 15px; }
.term-body::-webkit-scrollbar { width: 8px; }
.term-body::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
#term-out { white-space: pre-wrap; word-break: break-word; }
#term-out .t-ok { color: var(--accent); }
#term-out .t-cyan { color: var(--cyan); }
#term-out .t-warn { color: var(--amber); }
#term-out .t-err { color: var(--red); }
#term-out .t-dim { color: var(--fg-dim); }
#term-out .t-bold { font-weight: 700; }
#term-out a { text-decoration: underline; text-underline-offset: 3px; }
#term-out .t-line { animation: term-in .18s ease both; }
@keyframes term-in { from { opacity: 0; transform: translateY(3px); } }
.term-input-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.term-ps1 { color: var(--accent); white-space: nowrap; font-size: 13.5px; }
#term-input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--fg); font-family: var(--mono); font-size: 13.5px;
  caret-color: var(--accent); min-width: 40px;
}
.term-chips {
  display: flex; gap: 8px; padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.term-chips::-webkit-scrollbar { display: none; }
.term-chips button {
  background: var(--surface-2); color: var(--fg-dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 12.5px; white-space: nowrap;
  transition: color .2s, border-color .2s, transform .15s;
  min-height: 32px;
}
.term-chips button:hover { color: var(--accent); border-color: var(--accent); }
.term-chips button:active { transform: scale(.94); }

/* snake board */
.snake-board { line-height: 1.15; font-size: 13px; letter-spacing: 1px; }

/* ascii banner */
#term-out .t-banner { font-size: 11px; line-height: 1.3; letter-spacing: 0; white-space: pre; }
@media (max-width: 480px) {
  #term-out .t-banner { font-size: 8.5px; }
}
@media (max-width: 480px) {
  #term-out .t-banner { font-size: 9px; }
}

/* ============ sections ============ */
.section { padding: clamp(70px, 11vh, 130px) 0; }
.sec-title {
  display: flex; align-items: center; gap: 14px;
  font-size: clamp(22px, 2.6vw, 30px);
  margin-bottom: clamp(30px, 5vh, 54px);
  font-weight: 700;
}
.sec-idx { color: var(--accent); font-size: .75em; font-weight: 400; }
.sec-line { flex: 1; max-width: 320px; height: 1px; background: linear-gradient(90deg, var(--border-hi), transparent); }

/* about */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 60px); align-items: start; }
.about-text, .about-card { min-width: 0; }
.about-text p { color: var(--fg-dim); margin-bottom: 16px; font-size: 15.5px; }
.code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad);
  padding: 22px 24px;
  font-size: 13.5px; line-height: 1.7;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
  position: relative;
}
.code-card::before {
  content: "ali.go"; position: absolute; top: 0; right: 0;
  font-size: 11px; color: var(--fg-dim);
  background: var(--surface-2); border: 1px solid var(--border);
  border-top: 0; border-right: 0;
  padding: 3px 10px; border-radius: 0 var(--rad) 0 8px;
}
.c-kw { color: #c084fc; } .c-cls { color: var(--cyan); } .c-str { color: var(--accent); }
.c-fn { color: #60a5fa; } .c-num { color: var(--amber); } .c-cm { color: var(--fg-dim); font-style: italic; }

/* timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--border) 85%);
  opacity: .5;
}
.tl-item { position: relative; margin-bottom: 30px; }
.tl-dot {
  position: absolute; left: -28px; top: 24px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(34,197,94,.5);
}
.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad);
  padding: 24px 26px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.tl-card:hover { border-color: var(--border-hi); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.tl-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: baseline; margin-bottom: 12px; }
.tl-head h3 { font-size: 17px; }
.tl-at { color: var(--accent); font-weight: 400; font-size: .93em; }
.tl-date { color: var(--fg-dim); font-size: 12.5px; white-space: nowrap; }
.tl-card ul { list-style: none; margin-bottom: 14px; }
.tl-card li { color: var(--fg-dim); font-size: 14px; padding-left: 18px; position: relative; margin-bottom: 7px; }
.tl-card li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* classified / redacted entry */
.tl-dot.classified {
  border-color: var(--amber);
  box-shadow: 0 0 12px rgba(251,191,36,.5);
}
.tl-classified { border-style: dashed; }
.tl-classified h3 {
  color: var(--amber);
  text-shadow: 0 0 18px rgba(251,191,36,.25);
}
.tl-classified .tl-at,
.tl-classified li::before { color: var(--amber); }
.tl-classified .tags span {
  color: var(--amber);
  background: rgba(251,191,36,.1);
  border-color: rgba(251,191,36,.25);
}
.tl-classified .redacted {
  background: var(--amber);
  color: transparent;
  user-select: none;
  border-radius: 3px;
}

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: 11.5px; color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(34,197,94,.25);
  padding: 3px 11px; border-radius: 999px;
  transition: transform .15s ease;
}
.tags span:hover { transform: translateY(-2px); }
.tags-lg span { font-size: 13px; padding: 6px 15px; }

/* skills */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rad); padding: 24px 26px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.skill-card:hover { border-color: var(--border-hi); transform: translateY(-4px); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.skill-card h3 { font-size: 15px; margin-bottom: 16px; color: var(--fg); letter-spacing: .5px; }
.skill-ico { color: var(--accent); margin-right: 8px; }
.skill-card-wide { grid-column: 1 / -1; }

/* projects */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.proj-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rad); padding: 26px;
  color: var(--fg);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.proj-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 20px 60px rgba(0,0,0,.45), var(--glow); }
a.proj-card:hover h3 { color: var(--fg); }
.proj-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.proj-folder { color: var(--accent); font-size: 26px; }
.proj-ext { color: var(--fg-dim); font-size: 18px; transition: color .2s, transform .2s; }
.proj-card:hover .proj-ext { color: var(--accent); transform: translate(3px, -3px); }
.proj-card h3 { font-size: 18px; margin-bottom: 4px; }
.proj-sub { color: var(--fg-dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.proj-card p { color: var(--fg-dim); font-size: 13.5px; flex: 1; margin-bottom: 18px; }
.proj-card-wide { grid-column: 1 / -1; }
.proj-more { margin-top: 28px; text-align: center; color: var(--fg-dim); font-size: 14px; }
.proj-more a { text-decoration: underline; text-underline-offset: 4px; }

/* contact */
.contact-box {
  text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(40px, 7vw, 80px) clamp(20px, 5vw, 70px);
  position: relative; overflow: hidden;
}
.contact-box::before {
  content: ""; position: absolute; inset: -1px;
  background: radial-gradient(600px 200px at 50% 0%, rgba(34,197,94,.12), transparent);
  pointer-events: none;
}
.contact-pre { color: var(--fg-dim); font-size: 13.5px; margin-bottom: 16px; }
.contact-box h3 { font-size: clamp(24px, 3.4vw, 40px); margin-bottom: 14px; letter-spacing: -.5px; }
.contact-sub { color: var(--fg-dim); max-width: 56ch; margin: 0 auto 32px; font-size: 15px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* footer */
.footer { text-align: center; padding: 40px 20px 100px; color: var(--fg-dim); font-size: 13px; }
.footer a { text-decoration: underline; text-underline-offset: 3px; }
.footer-hint { margin-top: 10px; font-size: 11.5px; opacity: .75; }
.footer code { color: var(--accent); }

/* copy toast */
#toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--surface-2); color: var(--accent);
  border: 1px solid var(--accent); border-radius: 10px;
  padding: 11px 20px; font-size: 13px; z-index: 95;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: var(--glow);
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* back to top */
#to-top {
  position: fixed; right: 32px; bottom: 32px; z-index: 40;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--accent);
  border: 1px solid var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 50%;
  font-size: 18px; font-family: var(--mono); line-height: 1;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, border-color .25s ease, box-shadow .25s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
#to-top.on { opacity: 1; visibility: visible; transform: none; }
#to-top:hover { border-color: var(--accent); box-shadow: var(--glow); transform: translateY(-3px); }
@media (max-width: 420px) {
  #to-top { right: 22px; bottom: 22px; }
}

/* ============ reveal animations ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* CRT easter-egg mode */
body.crt { animation: crt-flicker 4s infinite; }
body.crt::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 2px, transparent 2px 4px);
}
@keyframes crt-flicker { 92% { opacity: 1; } 93% { opacity: .86; } 94% { opacity: 1; } }

/* ============ responsive ============ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding-top: calc(var(--nav-h) + 40px); min-height: 0; }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links {
    position: fixed; inset: 0; z-index: 55;
    flex-direction: column; justify-content: center;
    background: rgba(8, 12, 22, .96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    gap: 30px; font-size: 18px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .35s cubic-bezier(.16,1,.3,1), visibility 0s .35s;
  }
  .nav-links a { font-size: 17px; }
  .nav-links.open { transform: none; visibility: visible; transition-delay: 0s; }
  .nav-burger { display: block; }
  .about-grid, .skills-grid, .proj-grid { grid-template-columns: 1fr; }
  .about-text, .about-card { min-width: 0; max-width: 100%; }
  .code-card { font-size: 12px; padding: 18px 16px; }
  .code-card pre, .code-card { white-space: pre; max-width: 100%; }
  .term-body { height: clamp(300px, 45vh, 420px); font-size: 13px; }
  .timeline { padding-left: 22px; }
  .tl-dot { left: -22px; }
  .hero-stats { gap: 18px; }
  .terminal.maximized { inset: 8px; }
}
@media (max-width: 420px) {
  .container { width: calc(100% - 28px); }
  .hero-cta .btn { flex: 1; }
  .tl-card { padding: 18px; }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .bg-blob { animation: none; }
}
