/* ───── tokens ───── */
:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #161616;
  --line: #1f1f1f;
  --line-2: #2a2a2a;
  --text: #ededed;
  --text-soft: #b6b6b6;
  --text-mute: #6e6e6e;
  --text-faint: #4a4a4a;
  --accent: #ff3030;
  --accent-soft: rgba(255, 48, 48, 0.16);
  --accent-glow: rgba(255, 48, 48, 0.45);
  --green: #4ade80;
  --amber: #f5a524;

  --font-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-script: 'Caveat', 'Comic Sans MS', cursive;

  --max: 1280px;
  --rail: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ───── reset ───── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease), opacity 0.2s var(--ease); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--accent); color: var(--bg); }

/* ───── side rails ───── */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  z-index: 1;
  pointer-events: none;
}
.rail-left  { left: var(--rail); }
.rail-right { right: var(--rail); }

/* faint grid bg */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.25;
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 75%);
}

/* ───── layout container ───── */
.section, .nav, .hero, .footer {
  position: relative;
  z-index: 2;
}
.nav, .hero, .section, .footer-grid {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(40px, 8vw, 96px);
}

/* ───── nav ───── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--accent);
  background: var(--bg-2);
}
.brand-name {
  font-family: var(--font-script);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-soft);
}
.nav-links a {
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta {
  padding: 8px 18px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--text);
  transition: all 0.2s var(--ease);
}
.nav-links a.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

/* ───── hero ───── */
.hero {
  padding-top: 60px;
  padding-bottom: 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 200px);
}
.signature {
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: var(--text-soft);
  margin-bottom: 18px;
}
.headline {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.headline .accent {
  color: var(--accent);
  position: relative;
}
.headline .accent::after {
  content: '';
  position: absolute;
  inset: -4px -6px;
  border: 1px dashed var(--accent);
  border-radius: 4px;
  opacity: 0;
  animation: dash-in 0.6s 0.5s var(--ease) forwards;
}
@keyframes dash-in {
  to { opacity: 0.4; }
}
.lede {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 520px;
  margin-bottom: 36px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ───── buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--line-2);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn-solid {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-solid:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-soft);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-soft);
  transform: translateY(-2px);
}

/* ───── ASCII frame (hero/about portrait) ───── */
.hero-art {
  position: relative;
  display: grid;
  place-items: center;
}
.ascii-frame {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-soft);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 18px 22px;
  white-space: pre;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 0 60px rgba(255, 48, 48, 0.04);
}
/* red eyes — these are the ● chars that have been wrapped via JS */
.ascii-frame .eye {
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent-glow);
}
.ascii-frame .ok    { color: var(--green); }
.ascii-frame .amber { color: var(--amber); }
.ascii-frame .dim   { color: var(--text-mute); }
.ascii-frame .cursor-blink {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}

/* ───── ascii card (live portrait) ───── */
.ascii-card {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 80px rgba(255, 48, 48, 0.04);
  width: 100%;
  max-width: 480px;
}
.ascii-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
}
.ascii-dots {
  display: inline-flex;
  gap: 6px;
}
.ascii-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.ascii-dots span:nth-child(1) { background: #ff5f57; }
.ascii-dots span:nth-child(2) { background: #febc2e; }
.ascii-dots span:nth-child(3) { background: #28c840; }
.ascii-path {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
}

.ascii-portrait {
  background: #000;
  padding: 12px 14px;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  /* fade in once the canvas is rendered */
  opacity: 0.001;
  transition: opacity 0.6s var(--ease);
}
.ascii-portrait.ascii-ready {
  opacity: 1;
}
.ascii-portrait canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.ascii-portrait::before {
  content: 'rendering...';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--text-mute);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s var(--ease);
}
.ascii-portrait.ascii-ready::before { opacity: 0; }

/* tiny scanline overlay just inside the portrait */
.ascii-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.03) 0,
    rgba(255,255,255,0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}

.ascii-card-foot {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text-soft);
}
.dossier-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  padding: 3px 0;
}
.dossier-row > span:first-child {
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dossier-row > span:last-child::before {
  content: ': ';
  color: var(--text-faint);
}
.dossier-row .ok { color: var(--green); }
.dossier-prompt {
  margin-top: 10px;
  color: var(--text-soft);
}
/* scanline overlay */
.hero-glitch {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: overlay;
}
.hero-art::before {
  content: '';
  position: absolute;
  inset: -20px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  pointer-events: none;
  z-index: -1;
}

/* ───── marquee ───── */
.marquee {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  overflow: hidden;
  position: relative;
}
.marquee::before, .marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after  { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.marquee-track {
  display: inline-flex;
  gap: 24px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.15em;
  animation: marquee 38s linear infinite;
}
.marquee-track span { display: inline-block; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ───── sections ───── */
.section {
  padding-top: 100px;
  padding-bottom: 100px;
  border-top: 1px solid var(--line);
}
.section-head {
  margin-bottom: 56px;
  max-width: 720px;
}
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--text-mute);
  margin-bottom: 16px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--bg-2);
}
.section-head h2 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-head p {
  color: var(--text-soft);
  font-size: 0.98rem;
  max-width: 560px;
}

/* ───── portfolio cards ───── */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--text-faint);
  background: var(--bg-3);
}
.card-art {
  height: 180px;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,48,48,0.06), transparent 50%),
    repeating-linear-gradient(45deg, var(--bg-3), var(--bg-3) 2px, var(--bg-2) 2px, var(--bg-2) 4px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.art-label {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--text-mute);
}
.card:hover .art-label { color: var(--accent); }

/* card-art variants */
.art-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 80px;
}
.art-bars span {
  width: 10px;
  background: var(--text-faint);
  animation: barPulse 1.6s var(--ease) infinite;
}
.art-bars span:nth-child(1) { height: 30%; animation-delay: 0.0s; }
.art-bars span:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.art-bars span:nth-child(3) { height: 90%; animation-delay: 0.2s; }
.art-bars span:nth-child(4) { height: 75%; animation-delay: 0.3s; }
.art-bars span:nth-child(5) { height: 45%; animation-delay: 0.4s; }
.art-bars span:nth-child(6) { height: 80%; animation-delay: 0.5s; }
.art-bars span:nth-child(7) { height: 35%; animation-delay: 0.6s; }
.art-bars span:nth-child(8) { height: 55%; animation-delay: 0.7s; }
@keyframes barPulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.9; }
}
.card:hover .art-bars span { background: var(--accent); }

[data-art="wave"] svg {
  width: 100%;
  height: 100%;
  stroke: var(--text-faint);
  stroke-width: 1.5;
  fill: none;
}
[data-art="wave"] svg path:nth-child(2) { stroke: var(--text-mute); opacity: 0.5; }
.card:hover [data-art="wave"] svg path { stroke: var(--accent); }

.art-grid {
  display: grid;
  grid-template-columns: repeat(4, 14px);
  grid-template-rows: repeat(4, 14px);
  gap: 6px;
}
.art-grid span {
  background: var(--text-faint);
  border-radius: 2px;
  transition: background 0.3s var(--ease);
}
.art-grid span:nth-child(odd) { background: var(--text-mute); }
.card:hover .art-grid span:nth-child(3n) { background: var(--accent); }

.art-ring {
  width: 90px;
  height: 90px;
  border: 1px solid var(--text-faint);
  border-radius: 50%;
  position: absolute;
  animation: spin 12s linear infinite;
}
.art-ring::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  background: var(--text-mute);
  border-radius: 50%;
  top: -3px; left: 50%;
  transform: translateX(-50%);
}
.art-ring-2 {
  width: 130px;
  height: 130px;
  border-style: dashed;
  border-color: var(--text-mute);
  animation: spin 22s linear infinite reverse;
}
.card:hover .art-ring { border-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.art-ascii {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.1;
  color: var(--text-faint);
  letter-spacing: 4px;
  white-space: pre;
}
.card:hover .art-ascii { color: var(--accent); }

.art-dots {
  width: 120px;
  height: 80px;
  background-image: radial-gradient(circle, var(--text-mute) 1.5px, transparent 1.5px);
  background-size: 12px 12px;
  background-position: center;
  mask-image: radial-gradient(ellipse, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse, black 30%, transparent 70%);
}

.card-body { padding: 22px 24px 26px; }
.card-body h3 {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.card-body p {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ───── about ───── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-art {
  display: grid;
  place-items: center;
}
.about-text .kicker { margin-bottom: 18px; }
.about-text h2 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 22px;
  letter-spacing: -0.02em;
}
.about-text p {
  color: var(--text-soft);
  font-size: 0.98rem;
  margin-bottom: 16px;
  max-width: 540px;
}
.about-text em {
  color: var(--accent);
  font-style: italic;
}
.about-text .cta-row { margin-top: 24px; }

/* ───── skills terminal ───── */
.terminal {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
}
.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: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
}
.terminal-body {
  padding: 28px 32px 32px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}
.prompt {
  color: var(--text-soft);
  margin: 8px 0 18px;
}
.prompt .ps {
  color: var(--accent);
  margin-right: 8px;
  font-weight: 700;
}
.cursor {
  display: inline-block;
  color: var(--text);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.skill-block { margin-bottom: 18px; }
.comment {
  color: var(--text-mute);
  margin-bottom: 8px;
  font-size: 0.8rem;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.skill-tags li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-soft);
  transition: all 0.2s var(--ease);
}
.skill-tags li:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ───── contact ───── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 16px;
  padding: 22px 24px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  transition: all 0.25s var(--ease);
}
.contact-card:hover {
  border-color: var(--accent);
  background: var(--bg-3);
  transform: translateY(-3px);
}
.contact-label {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-mute);
}
.contact-value {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--text);
  word-break: break-all;
}
.contact-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-mute);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}
.contact-card:hover .contact-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ───── faq ───── */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  text-align: left;
  color: var(--text);
  transition: color 0.2s var(--ease);
}
.faq-q:hover { color: var(--accent); }
.faq-toggle {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--text-mute);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
  line-height: 1;
}
.faq-q[aria-expanded="true"] .faq-toggle {
  transform: rotate(45deg);
  color: var(--accent);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.faq-q[aria-expanded="true"] + .faq-a { max-height: 400px; }
.faq-a p {
  padding: 0 0 24px;
  color: var(--text-soft);
  font-size: 0.95rem;
  max-width: 760px;
}

/* ───── footer ───── */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 60px;
  margin-top: 60px;
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-mute);
}
.footer-links a:hover { color: var(--text); }
.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot-sep { color: var(--text-faint); }

/* ───── back to top ───── */
.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--text);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ───── reveal ───── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ───── responsive ───── */
@media (max-width: 1000px) {
  .hero-grid, .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about-grid { direction: ltr; }
  .hero { padding-top: 30px; }
  .hero-grid { min-height: auto; }
  .ascii-frame { font-size: 10px; }
}
@media (max-width: 720px) {
  :root { --rail: 14px; }
  .nav, .hero, .section, .footer-grid { padding-inline: 28px; }
  .nav-links {
    position: fixed;
    inset: 80px 14px auto 14px;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    border-radius: 10px;
    padding: 18px;
    gap: 6px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s var(--ease);
    z-index: 30;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { padding: 10px 8px; }
  .nav-links a.nav-cta { text-align: center; margin-top: 4px; }
  .nav-toggle { display: flex; z-index: 40; }
  .nav-toggle.open span:first-child { transform: translateY(3px) rotate(45deg); }
  .nav-toggle.open span:last-child  { transform: translateY(-3px) rotate(-45deg); }
  .ascii-frame { font-size: 8.5px; padding: 14px; }
  .terminal-body { padding: 22px 18px; font-size: 0.82rem; }
  .section { padding-top: 70px; padding-bottom: 70px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
