/* ============================================================
   Pranesh Patel — Portfolio v2.0
   Vanilla CSS · cinematic dark terminal · zero build tools
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0a0d12;
  --bg-soft: #0d1219;
  --panel: #11161f;
  --panel-2: #161d28;
  --border: #223040;
  --border-soft: #1a2431;

  --text: #dde6ee;
  --muted: #8b99a8;
  --muted-2: #6b7a89;

  --green: #4ade80;
  --green-dim: #22c55e;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --red: #f87171;

  --grad: linear-gradient(100deg, var(--green) 0%, var(--cyan) 55%, var(--violet) 100%);
  --grad-soft: linear-gradient(100deg, rgba(74,222,128,.14), rgba(34,211,238,.14), rgba(167,139,250,.14));

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: "Space Grotesk", var(--font-body);

  --nav-h: 64px;
  --radius: 16px;
  --radius-sm: 10px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

section[id], footer[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--green); }
ul { list-style: none; }

::selection { background: rgba(74, 222, 128, 0.3); color: #fff; }

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

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--green); color: #06281a;
  padding: 8px 14px; border-radius: 6px; font-weight: 600; z-index: 300;
}
.skip-link:focus { left: 8px; }

/* ---------- Decorative layers ---------- */
.bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

.grain {
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 400;
  mix-blend-mode: overlay;
}

.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.07) 0%, rgba(34, 211, 238, 0.05) 35%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}
.cursor-glow.is-on { opacity: 1; }
@media (pointer: coarse) { .cursor-glow { display: none; } }

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad);
  z-index: 250;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
}

/* ---------- Boot sequence ---------- */
.boot {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-box { width: min(480px, 88vw); font-family: var(--font-mono); }
.boot-line { font-size: 0.95rem; color: var(--text); margin-bottom: 22px; min-height: 1.6em; }
.boot-bar {
  height: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.boot-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--grad);
  border-radius: 999px;
  transition: width 0.2s linear;
}
.boot-msg { margin-top: 14px; color: var(--muted); font-size: 0.78rem; min-height: 1.2em; }
.boot-skip {
  margin-top: 26px;
  color: var(--muted-2);
  font-size: 0.72rem;
  animation: bootskip 2.4s ease-in-out infinite;
}
@keyframes bootskip { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ---------- Scroll reveal — directional slide system ----------
   Default: rise + fade.
   Variants via data-slide (assigned in main.js):
     left/right/down — directional slides
     scale            — spring pop (overshoot easing)
     blur             — cinematic rise out of focus
     wipe             — clip-path curtain reveal (headings)
   Stagger via --rd delay, set per element in main.js. */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.65s ease,
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--rd, 0s);
}
.reveal[data-slide="left"]   { transform: translateX(-56px); }
.reveal[data-slide="right"]  { transform: translateX(56px); }
.reveal[data-slide="down"]   { transform: translateY(-34px); }
.reveal[data-slide="scale"]  {
  transform: scale(0.88) translateY(22px);
  transition: opacity 0.65s ease, transform 0.8s var(--ease-spring);
  transition-delay: var(--rd, 0s);
}
.reveal[data-slide="blur"]   {
  transform: translateY(30px);
  filter: blur(14px);
  transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  transition-delay: var(--rd, 0s);
  will-change: transform, filter;
}
.reveal[data-slide="wipe"]   {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 100%);
  transition: clip-path 0.9s var(--ease-out);
  transition-delay: var(--rd, 0s);
}

.reveal.visible { opacity: 1; transform: none; filter: none; }
.reveal.visible[data-slide="wipe"] { clip-path: inset(0 0 0 0); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  background: rgba(10, 13, 18, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, height 0.3s ease;
}
.nav.scrolled {
  height: 56px;
  border-bottom-color: var(--border-soft);
  background: rgba(10, 13, 18, 0.94);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand { font-family: var(--font-mono); font-size: 0.92rem; color: var(--text); display: inline-flex; align-items: baseline; }
.nav-brand-prompt { color: var(--green); }
.nav-brand-path { color: var(--cyan); }
.nav-brand-cursor {
  display: inline-block; width: 8px; height: 16px; margin-left: 4px;
  background: var(--green);
  transform: translateY(2px);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 8px;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 4px;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--green); }
.nav-links a.active::after { transform: scaleX(1); }
.nav-links .nav-cta {
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.4);
  margin-left: 8px;
}
.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover { background: rgba(74, 222, 128, 0.12); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s 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 {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 48px) 24px 80px;
  max-width: 1180px;
  margin: 0 auto;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 56px;
  align-items: center;
}

.hero-kicker { font-family: var(--font-mono); color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.hero-name-line {
  display: block;
  font-size: clamp(3rem, 8vw, 5.6rem);
  background: var(--grad);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradShift 7s ease-in-out infinite;
}
.hero-name-line-2 { animation-delay: 1.2s; }
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-name .dot-accent { color: var(--amber); -webkit-text-fill-color: var(--amber); }

.hero-role { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text); margin-bottom: 10px; max-width: 34em; }
.hero-role .hl { color: var(--green); font-weight: 600; }
.hero-tag { font-family: var(--font-mono); color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 7px 14px;
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.07);
  color: #a7f3d0;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  width: fit-content;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
  animation: status-pulse 2.2s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 38px; }

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  display: inline-block;
  position: relative;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn-primary { background: var(--green); color: #06281a; font-weight: 700; }
.btn-primary:hover {
  background: #5ff08c; color: #06281a;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -14px rgba(74, 222, 128, 0.7);
}
.btn-ghost { color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.btn-icon { color: var(--muted); }

.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.hero-facts li { font-size: 0.9rem; color: var(--muted); }
.fact-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--cyan); margin-right: 8px; }
.fact-label::before { content: "["; }
.fact-label::after { content: "]"; }

/* Quick-access chips */
.hero-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
}
.hero-quick-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-2);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.quick-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  transition: all 0.22s var(--ease-out);
}
.quick-link .t-prompt { color: var(--green); }
.quick-link:hover {
  color: var(--green);
  border-color: rgba(74, 222, 128, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(74, 222, 128, 0.5);
}

/* ---------- Terminal ---------- */
.terminal {
  background: rgba(17, 22, 31, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--panel-2); border-bottom: 1px solid var(--border-soft); }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.terminal-title { margin-left: 10px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.terminal-live {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--green);
  display: flex; align-items: center; gap: 5px;
}
.terminal-live::before { content: "●"; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.terminal-body {
  padding: 18px 20px 16px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.75;
  min-height: 320px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.terminal-body::-webkit-scrollbar { width: 6px; }

.term-out { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.term-out .t-line { margin: 0; }
.term-out .t-sep { margin-top: 10px; }

.t-prompt { color: var(--green); }
.t-cmd { color: var(--text); }
.t-out { color: var(--muted); }
.t-acc { color: var(--cyan); }
.t-dim { color: var(--muted-2); }
.t-dir { color: var(--violet); font-weight: 700; }
.t-link { color: var(--green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.t-link:hover { color: #8af0ac; }
.t-err { color: var(--red); }
.t-ok { color: var(--green); }
.t-ascii { color: var(--cyan); line-height: 1.25; white-space: pre; overflow-x: auto; }

.term-input-line { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--border-soft); margin-top: 10px; }
.term-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  caret-color: var(--green);
}
.term-input::placeholder { color: var(--muted-2); }

.t-cursor {
  display: inline-block; width: 8px; height: 15px;
  background: var(--green);
  transform: translateY(3px);
  animation: blink 1.1s steps(1) infinite;
}

/* Hero scroll hint */
.hero-scroll { margin-top: 64px; display: flex; align-items: center; gap: 12px; justify-content: center; color: var(--muted-2); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; }
.hero-scroll-line { width: 1px; height: 44px; background: linear-gradient(var(--green), transparent); animation: scrollpulse 2s ease-in-out infinite; }
@keyframes scrollpulse { 0%, 100% { transform: scaleY(0.4); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
  overflow: hidden;
  padding: 18px 0;
  position: relative;
  z-index: 1;
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-soft), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--bg-soft), transparent); }

.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-reverse .marquee-track { animation-direction: reverse; }

.marquee-content {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-content .m-dot { color: var(--green); font-size: 0.85rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { border-bottom: 1px solid var(--border-soft); background: var(--bg-soft); position: relative; z-index: 1; }
.stats-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 44px 24px; }
.stat { text-align: center; }
.stat-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-suffix { font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 700; color: var(--muted); margin-left: 2px; }
.stat-label { display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

/* ---------- Sections ---------- */
.section { padding: 104px 24px; position: relative; z-index: 1; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-inner { max-width: 1180px; margin: 0 auto; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: baseline;
}
.sec-hash { color: var(--green); margin-right: 10px; }
.section-title::after {
  content: "";
  flex: 0 0 64px;
  height: 3px;
  margin-left: 16px;
  background: var(--grad);
  border-radius: 3px;
  transform-origin: left;
}
.section-title.visible::after { animation: lineGrow 0.9s var(--ease-out) 0.15s both; }
@keyframes lineGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.section-sub { color: var(--muted); max-width: 46em; margin-bottom: 44px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: start; }
.about-copy p { margin-bottom: 18px; color: var(--muted); font-size: 1.02rem; }
.about-copy p strong { color: var(--text); }
.about-lead { font-size: 1.12rem !important; }
.about-lead strong { background: var(--grad-soft); padding: 2px 8px; border-radius: 6px; }

.about-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 70%) var(--my, 0%), var(--grad-soft), transparent 70%);
  pointer-events: none;
}
.about-card-title { color: var(--cyan); margin-bottom: 16px; position: relative; }
.about-list { position: relative; }
.about-list li { padding: 9px 0; border-bottom: 1px dashed var(--border-soft); color: var(--muted); line-height: 1.6; }
.about-list li:last-child { border-bottom: none; }
.about-list .arrow { color: var(--green); margin-right: 8px; }
.about-card-foot { margin-top: 14px; color: var(--muted-2); font-size: 0.78rem; position: relative; }

/* ---------- Featured project ---------- */
.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 56px;
  box-shadow: var(--shadow);
  transition: border-color 0.3s ease;
}
.featured:hover { border-color: rgba(74, 222, 128, 0.4); }
.featured-media { position: relative; display: block; overflow: hidden; }
.featured-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.featured:hover .featured-media img { transform: scale(1.05); }
.featured-media-grad { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, var(--panel)); pointer-events: none; }
.featured-body { padding: 44px 44px 40px; display: flex; flex-direction: column; }
.featured-kicker { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--amber); text-transform: uppercase; margin-bottom: 12px; }
.featured-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; margin-bottom: 16px; }
.featured-title .dot-accent { color: var(--amber); }
.featured-desc { color: var(--muted); font-size: 1rem; margin-bottom: 22px; flex: 1; }
.featured-links { display: flex; align-items: center; gap: 18px; margin-top: 6px; }

.card-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(10, 13, 18, 0.82);
  border: 1px solid rgba(74, 222, 128, 0.5);
  color: var(--green);
  backdrop-filter: blur(6px);
  z-index: 2;
}

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.filter:hover { color: var(--text); border-color: var(--muted-2); transform: translateY(-1px); }
.filter.active { color: #06281a; background: var(--green); border-color: var(--green); font-weight: 700; box-shadow: 0 8px 24px -10px rgba(74, 222, 128, 0.7); }
.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 7px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--cyan);
  font-size: 0.66rem;
  line-height: 1;
  font-weight: 500;
  transition: inherit;
}
.filter.active .filter-count { background: rgba(6, 40, 26, 0.25); border-color: rgba(6, 40, 26, 0.4); color: #06281a; }

/* ---------- Ghost headline ---------- */
.ghost {
  position: absolute;
  left: 0;
  top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 11rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(139, 153, 168, 0.1);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  will-change: transform;
}
.section-inner { position: relative; }

/* ---------- Horizontal reel (pinned scroll showcase) ---------- */
.reel {
  position: relative;
  height: 400vh;               /* tall wrapper = long scroll distance */
  margin: 8px 0 40px;
}
.reel-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 16px) 0 24px;
}
.reel-head {
  display: flex;
  align-items: baseline;
  gap: 22px;
  flex-wrap: wrap;
  padding: 0 8vw 18px;
}
.reel-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}
.reel-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
  margin: 0;
}
.reel-progress {
  flex: 1;
  height: 3px;
  min-width: 140px;
  background: var(--panel-2);
  border-radius: 3px;
  overflow: hidden;
  align-self: center;
}
.reel-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--grad);
  border-radius: 3px;
}

.reel-track {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 8vw 16px;
  will-change: transform;
}

.reel-card {
  flex: 0 0 auto;
  width: min(400px, 76vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  display: block;
  transition: border-color 0.3s ease, transform 0.35s var(--ease-out), box-shadow 0.3s ease;
}
.reel-card:hover {
  border-color: rgba(74, 222, 128, 0.45);
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.95);
}
.reel-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.reel-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 0.7s var(--ease-out); will-change: transform; }
.reel-card:hover .reel-media img { transform: scale(1.02); }
.reel-body { padding: 18px 22px 20px; }
.reel-body h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.reel-body p { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.reel-tags { font-family: var(--font-mono); font-size: 0.7rem; color: var(--cyan); }

.reel-card-plain {
  background: linear-gradient(150deg, var(--panel), var(--panel-2));
  display: flex;
  flex-direction: column;
}
.reel-plain-emoji {
  font-size: 3.4rem;
  text-align: center;
  padding: 34px 0 6px;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.5));
}
.reel-card-cta {
  border-style: dashed;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.reel-card-cta h3 { color: var(--green); }

.archive-title { margin-top: 28px; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(17, 22, 31, 0.9);
  backdrop-filter: blur(8px);
  color: var(--green);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 180;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: rgba(74, 222, 128, 0.5); transform: translateY(-3px); }

/* Terminal gentle float */
.terminal { animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Project cards ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.card:hover {
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(74, 222, 128, 0.08);
  z-index: 5;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(74, 222, 128, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 3;
}
.card:hover::after { opacity: 1; }

.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.card:hover .card-media img { transform: scale(1.07); }
.card-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 13, 18, 0.55));
  pointer-events: none;
}

.card-media-gradient { display: flex; align-items: center; justify-content: center; }
.media-emoji { font-size: 3rem; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.5)); transition: transform 0.4s var(--ease-spring); }
.card:hover .media-emoji { transform: scale(1.15) rotate(-4deg); }

.g1 { background: linear-gradient(135deg, #16283a, #1d2f1d); }
.g2 { background: linear-gradient(135deg, #1d2433, #15262c); }
.g3 { background: linear-gradient(135deg, #251d33, #1a2529); }
.g4 { background: linear-gradient(135deg, #33231d, #142a1f); }
.g5 { background: linear-gradient(135deg, #1c2b2b, #2a1d26); }
.g6 { background: linear-gradient(135deg, #1e1f2c, #25261a); }
.g7 { background: linear-gradient(135deg, #16283a, #241d33); }
.g8 { background: linear-gradient(135deg, #1d2c24, #202030); }

.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.card-desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 16px; flex: 1; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.card-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.07);
  border: 1px solid rgba(34, 211, 238, 0.2);
  padding: 3px 9px;
  border-radius: 6px;
}

.card-links {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono); font-size: 0.8rem;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}
.card-links a { color: var(--green); font-weight: 600; }
.card-links a:hover { color: #8af0ac; }
.card-private { color: var(--muted-2); font-size: 0.76rem; }
.card-status { color: var(--muted-2); margin-left: auto; font-size: 0.76rem; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; border-left: 2px solid var(--border); margin-left: 8px; padding-left: 34px; position: relative; }
.timeline-item { position: relative; padding-bottom: 48px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -41px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--green);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12);
  transition: box-shadow 0.3s ease;
}
.timeline-item.visible::before { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0.22); }

.timeline-org { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--text); }
.timeline-role { font-family: var(--font-mono); color: var(--cyan); font-size: 0.85rem; margin: 4px 0 2px; }
.timeline-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted-2); margin-bottom: 14px; }
.timeline-body ul li { color: var(--muted); font-size: 0.95rem; padding: 5px 0 5px 22px; position: relative; }
.timeline-body ul li::before { content: "▸"; position: absolute; left: 0; color: var(--green); font-size: 0.85rem; }

/* ---------- Skills ---------- */
.skills-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.skill-heading { font-family: var(--font-mono); font-size: 0.82rem; color: var(--cyan); text-transform: lowercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.skill-heading::before { content: "/* "; }
.skill-heading::after { content: " */"; }
.skill-block + .skill-block .skill-heading { margin-top: 28px; }

.bars { display: flex; flex-direction: column; gap: 15px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 34px; align-items: center; gap: 14px; }
.bar-name { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text); }
.bar {
  height: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0%;
  background: var(--grad);
  border-radius: 999px;
  transition: width 1.2s var(--ease-out);
}
.bar-row.visible .bar-fill { width: calc(var(--w) * 1%); }
.bar-val { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 6px 13px;
  border-radius: 8px;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.chip:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }
.chip-hot { border-color: rgba(74, 222, 128, 0.45); color: var(--green); font-weight: 700; }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
.edu-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.edu-card:hover { border-color: rgba(34, 211, 238, 0.4); box-shadow: 0 24px 50px -30px rgba(0,0,0,0.9); }
.edu-degree { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin-bottom: 6px; }
.edu-school { color: var(--cyan); font-size: 0.92rem; }
.edu-date { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted-2); margin: 4px 0 14px; }
.edu-list li { color: var(--muted); font-size: 0.88rem; padding: 4px 0; line-height: 1.55; }
.achievements { padding-top: 8px; }

/* ---------- Contact ---------- */
.contact-inner { text-align: center; }
.contact-lead { color: var(--muted); font-size: 1.05rem; max-width: 34em; margin: 0 auto 48px; }

.email-mega {
  display: block;
  width: fit-content;
  margin: 0 auto 56px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  padding: 20px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-spring), border-color 0.3s ease, box-shadow 0.3s ease;
}
.email-mega:hover {
  color: var(--text);
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: 0 30px 70px -30px rgba(74, 222, 128, 0.5);
}
.email-mega::before {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
}
.email-mega:hover::before { left: 130%; }
.email-mega-label { display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--green); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 760px; margin: 0 auto; }
.contact-link.contact-link-email { grid-column: 1 / -1; justify-content: center; text-align: center; }
.contact-link-email .contact-arrow { margin-left: 0; }
.contact-link {
  display: flex; align-items: center; gap: 16px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--panel);
  transition: all 0.25s ease;
  text-align: left;
}
.contact-link:hover { border-color: rgba(34, 211, 238, 0.45); color: var(--text); transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0,0,0,0.9); }
.contact-ico {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700;
  color: var(--green);
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 10px;
}
.contact-label { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted-2); letter-spacing: 0.05em; margin-bottom: 2px; }
.contact-link > span:nth-child(2) { font-family: var(--font-mono); font-size: 0.92rem; min-width: 0; overflow-wrap: anywhere; }
.contact-arrow { margin-left: auto; color: var(--muted-2); transition: transform 0.25s ease, color 0.25s ease; }
.contact-link:hover .contact-arrow { transform: translate(3px, -3px); color: var(--green); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 24px 56px;
  text-align: center;
  background: var(--bg-soft);
  position: relative;
  z-index: 1;
}
.footer p { color: var(--muted-2); font-size: 0.85rem; margin-bottom: 10px; }
.footer-mono { font-family: var(--font-mono); font-size: 0.8rem !important; }
.footer-mono a { color: var(--muted); }
.footer-mono a:hover { color: var(--green); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .terminal { max-width: 640px; }
  .about-grid { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
  .featured-media { aspect-ratio: 16 / 9; }
  .featured-media-grad { background: linear-gradient(180deg, transparent 60%, var(--panel)); }
  .skills-wrap { grid-template-columns: 1fr; gap: 36px; }
  .edu-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; z-index: 210; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 13, 18, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px 22px;
    gap: 4px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease-out);
    z-index: 205;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 0.95rem; }
  .nav-links a::after { display: none; }
  .nav-links .nav-cta { margin-left: 0; text-align: center; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .projects-grid { grid-template-columns: minmax(0, 1fr); }
  .edu-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .btn-copy { width: 100%; }
  .section { padding: 76px 20px; }
  .hero { padding-top: calc(var(--nav-h) + 36px); }
  .timeline { margin-left: 4px; padding-left: 26px; }
  .timeline-item::before { left: -33px; }
  .terminal-body { max-height: 340px; }
  .bar-row { grid-template-columns: 88px 1fr 30px; gap: 10px; }

  /* Reel: native horizontal snap-scroll on mobile (no pinning) */
  .reel { height: auto; margin: 8px 0 28px; }
  .reel-pin { position: static; height: auto; padding: 0; overflow: visible; }
  .reel-head { padding: 0 4px 14px; }
  .reel-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 20px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .reel-track::-webkit-scrollbar { display: none; }
  .reel-card { scroll-snap-align: start; width: 78vw; }
  .reel-progress { display: none; }
  .ghost { top: -6px; }
  .to-top { right: 18px; bottom: 18px; width: 44px; height: 44px; }
}

@media (max-width: 440px) {
  .hero-ctas .btn { width: 100%; text-align: center; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr; }
  .email-mega { width: 100%; padding: 18px 20px; }
  .featured-body { padding: 28px 24px; }
}

/* ---------- Command palette (⌘K) ---------- */
.nav-palette {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 12px;
  padding: 6px 10px;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-palette:hover { color: var(--text); border-color: var(--cyan); }
.nav-palette-kbd { font-size: 0.68rem; color: var(--cyan); }

.palette {
  position: fixed; inset: 0;
  z-index: 500;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 14vh 20px 20px;
}
.palette[hidden] { display: none; }
.palette-overlay {
  position: absolute; inset: 0;
  background: rgba(4, 6, 10, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.18s ease;
}
.palette-panel {
  position: relative;
  width: 100%; max-width: 560px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: palSlide 0.22s var(--ease-out);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes palSlide { from { opacity: 0; transform: translateY(-12px) scale(0.98); } }
.palette-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.palette-glyph { color: var(--green); font-size: 1.05rem; }
.palette-input {
  flex: 1;
  background: none; border: none; outline: none;
  font-family: var(--font-mono); font-size: 0.95rem;
  color: var(--text);
}
.palette-input::placeholder { color: var(--muted-2); }
.palette-kbd {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--muted-2);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 7px;
}
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 42vh; overflow-y: auto; }
.palette-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-family: var(--font-mono); font-size: 0.86rem;
  color: var(--muted);
}
.palette-item .palette-ico { width: 20px; text-align: center; color: var(--cyan); }
.palette-item .palette-hint { margin-left: auto; font-size: 0.7rem; color: var(--muted-2); }
.palette-item.active, .palette-item:hover { background: rgba(74, 222, 128, 0.1); color: var(--text); }
.palette-empty { padding: 14px 12px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 600;
  padding: 10px 18px;
  font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--green);
  background: var(--panel-2);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 10px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Copy email button ---------- */
.btn-copy {
  margin-top: 14px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
}
.btn-copy.copied {
  background: #5ff08c;
  box-shadow: 0 16px 40px -14px rgba(74, 222, 128, 0.7);
}
.btn-copy:active { transform: translateY(0); }

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal[data-slide] { opacity: 1; transform: none; filter: none; clip-path: inset(0 0 0 0); transition: none; }
  .nav-brand-cursor, .t-cursor, .hero-scroll-line, .terminal-live::before, .boot-skip { animation: none; }
  .hero-name-line, .section-title::after, .status-dot { animation: none; }
  .marquee-track { animation: none; }
  .bg-canvas, .cursor-glow { display: none; }
  .terminal, .reel-card, .to-top { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Performance: render off-screen sections lazily ---------- */
@media (min-width: 761px) {
  .stats, #experience, #skills, #education, #contact, .footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 900px;
  }
}

/* ---------- Interaction extras (JS-driven) ---------- */
[data-parallax] { will-change: transform; }
[data-parallax].reveal { transition: opacity 0.8s var(--ease-out); }
[data-ghost] { will-change: transform; }

@media (hover: hover) and (pointer: fine) {
  .cursor-glow.hot { width: 640px; height: 640px; }

  /* fast transform while tilting, so reveal animation doesn't fight the tilt */
  .card.tilt.tilting, .edu-card.tilt.tilting { transition: transform 0.12s ease-out; }

  .magnetic { transition: transform 0.3s var(--ease-out); }
  .magnetic.m-moving { transition: transform 0.09s linear; }
}
@media (pointer: coarse) {
  .magnetic { transform: none !important; transition: none; }
}

/* ---------- Print: clean paper output for recruiters ---------- */
@media print {
  .boot, .bg-canvas, .grain, .cursor-glow, .progress, .nav, .nav-palette,
  .to-top, .palette, .terminal, .marquee, .hero-scroll, .hero-quick,
  .filters, .footer-mono, .btn-copy, .toast, #toast { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  .hero { min-height: auto; padding-top: 8px; }
  .hero-facts { display: none; }
  .section, .stats { padding: 24px 8px; break-inside: avoid-page; }
  .reel-pin { position: static !important; height: auto; overflow: visible; transform: none !important; }
  .reel-track { overflow: visible; }
  .reel-head .reel-progress, .reel-nav { display: none; }
  .reveal, .reveal.visible { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; transition: none !important; }
  .bar-fill { width: 100% !important; }
  .ghost { display: none; }
  .card, .edu-card, .contact-link, .email-mega, .about-card { break-inside: avoid-page; }
  a { color: #111 !important; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #444; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  * { -webkit-print-color-adjust: economy; print-color-adjust: economy; }
}
