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

/* ====== VARIABLES ====== */
:root {
  --bg: #0a0e14;
  --bg2: #0d1117;
  --bg3: #161b22;
  --line: #21262d;
  --text: #c9d1d9;
  --muted: #8b949e;
  --accent: #00ff9c;
  --accent2: #58a6ff;
  --accent3: #ff7b72;
  --accent4: #d2a8ff;
  --warn: #f0b72f;
  --ff-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --ff-sans: 'Inter', system-ui, sans-serif;
  --ff-matrix: 'VT323', 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-top: 70px;
}

body {
  font-family: var(--ff-mono);
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
  font-size: 14px;
  line-height: 1.6;
  background-image:
    radial-gradient(at 20% 0%, rgba(0,255,156,0.04) 0%, transparent 50%),
    radial-gradient(at 80% 100%, rgba(88,166,255,0.04) 0%, transparent 50%);
  min-height: 100vh;
}

/* Scanline */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.01) 0px,
    rgba(255,255,255,0.01) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Scrollbar — vertical gradient using the brand palette */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track {
  background: var(--bg2);
  border-left: 1px solid var(--line);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff5f56 0%, #ffbd2e 18%, #27c93f 36%, #58a6ff 56%, #d2a8ff 76%, #ff7b72 100%);
  border: 2px solid var(--bg2);
  background-clip: padding-box;
  border-radius: 6px;
  min-height: 40px;
}
::-webkit-scrollbar-thumb:hover { border-width: 1px; }
/* Firefox fallback (no gradient support — single accent colour) */
html { scrollbar-color: var(--accent) var(--bg2); scrollbar-width: thin; }

/* ====== SCROLL PROGRESS BAR (top, fixed, zero layout impact) ====== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--bg3);
  z-index: 999;
  pointer-events: none;
}
.spb-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff5f56 0%, #ffbd2e 20%, #27c93f 40%, #58a6ff 60%, #d2a8ff 80%, #ff7b72 100%);
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
}
.spb-badge {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 99;
  padding: 3px 8px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.spb-badge.visible { opacity: 1; transform: translateY(0); }
@media (min-width: 600px) {
  .spb-badge { bottom: 20px; left: 20px; font-size: 11px; padding: 4px 9px; }
}

/* ====== TITLEBAR — mobile base ====== */
.titlebar {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
@media (min-width: 600px) {
  .titlebar { padding: 10px 16px; gap: 12px; }
}

.tb-dots { display: flex; gap: 7px; flex-shrink: 0; }
.tb-dot { width: 11px; height: 11px; border-radius: 50%; }
.tb-dot.r { background: #ff5f56; }
.tb-dot.y { background: #ffbd2e; }
.tb-dot.g { background: #27c93f; }
@media (min-width: 600px) {
  .tb-dot { width: 12px; height: 12px; }
}

.tb-title {
  font-size: 10px;
  color: var(--muted);
  flex: 1;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-title span { color: var(--accent); }
.tb-term { color: var(--muted); }
@media (min-width: 480px) {
  .tb-title { font-size: 11px; }
}
@media (min-width: 600px) {
  .tb-title { font-size: 12px; }
}

/* Hamburger: visible on mobile, hidden on desktop */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background-image:
    linear-gradient(var(--bg2), var(--bg2)),
    linear-gradient(135deg, #ff5f56, #ffbd2e, #27c93f, #58a6ff, #d2a8ff, #ff7b72);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: 3px;
  padding: 7px 9px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s, opacity 0.2s;
  flex-shrink: 0;
}
.hamburger:hover { color: var(--accent); opacity: 0.85; }
.hamburger svg { width: 16px; height: 16px; display: block; }

/* Theme toggle — gradient border + glow so 🐧 is visible on dark bg */
#theme-toggle {
  border: 1px solid transparent;
  background-image:
    linear-gradient(var(--bg2), var(--bg2)),
    linear-gradient(135deg, #ff5f56, #ffbd2e, #27c93f, #58a6ff, #d2a8ff, #ff7b72);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  font-size: 15px;
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.25));
  transition: opacity 0.2s, filter 0.2s;
}
#theme-toggle:hover {
  opacity: 0.85;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.4));
  transform: none;
}
.hb-cursor {
  will-change: opacity;
  animation: hb-blink 1.4s step-end infinite;
}
@keyframes hb-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@media (min-width: 900px) {
  .hamburger { display: none; }
}

/* Sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 150;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* ====== LAYOUT — mobile: single column ====== */
.shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 41px);
}
@media (min-width: 900px) {
  .shell { grid-template-columns: 240px 1fr; }
}

/* ====== SIDEBAR — mobile: overlay drawer ====== */
.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--line);
  padding: 24px 0;
  position: fixed;
  /* needed for the absolute close button */
  isolation: isolate;
  top: 0; left: 0;
  height: 100vh;
  width: 260px;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

/* Desktop: sidebar is always visible in the grid */
@media (min-width: 900px) {
  .sidebar {
    position: sticky;
    top: var(--titlebar-h, 41px);
    height: calc(100vh - var(--titlebar-h, 41px));
    width: auto;
    transform: none;
    z-index: 1;
  }
}

/* Close X — top-right corner of sidebar, mobile only */
.sb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
  z-index: 1;
}
.sb-close:hover { border-color: var(--accent3); color: var(--accent3); }
.sb-close svg { width: 12px; height: 12px; display: block; }
@media (min-width: 900px) {
  .sb-close { display: none; }
}

.sb-section { padding: 0 20px; margin-bottom: 28px; }
.sb-heading {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.sb-heading::before { content: '▾'; color: var(--accent); font-size: 8px; }
.sb-item {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -12px;
  transition: all 0.2s;
  position: relative;
}
.sb-item::before { content: attr(data-icon); margin-right: 10px; color: var(--accent2); }
.sb-section .sb-item:nth-child(2)::before  { color: #10b981; }
.sb-section .sb-item:nth-child(3)::before  { color: #3b82f6; }
.sb-section .sb-item:nth-child(4)::before  { color: #8b5cf6; }
.sb-section .sb-item:nth-child(5)::before  { color: #f59e0b; }
.sb-section .sb-item:nth-child(6)::before  { color: #ef4444; }
.sb-section .sb-item:nth-child(7)::before  { color: #06b6d4; }
.sb-section .sb-item:nth-child(8)::before  { color: #f97316; }
.sb-section .sb-item:nth-child(9)::before  { color: #84cc16; }
.sb-section .sb-item:nth-child(10)::before { color: #ec4899; }
.sb-item:hover { background: var(--bg3); border-left-color: var(--accent); color: var(--accent); }

/* ====== MAIN ====== */
main { padding: 0; }

/* ====== HERO — mobile base ====== */
.hero {
  min-height: calc(100vh - var(--titlebar-h, 41px));
  min-height: calc(100dvh - var(--titlebar-h, 41px));
  padding: 48px 20px 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(0, 255, 156, 0.08), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 70%, rgba(88, 166, 255, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(210, 168, 255, 0.05), transparent 60%);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
@media (min-width: 600px) { .hero { padding: 40px 28px; justify-content: center; } }
@media (min-width: 1024px) { .hero { padding: 60px 40px; } }

.term-prompt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 40px;
  overflow-wrap: break-word;
  word-break: break-all;
}
.term-prompt span { color: var(--accent); }
.term-prompt .arrow { color: var(--accent3); }
@media (min-width: 600px) {
  .term-prompt { font-size: 14px; margin-bottom: 32px; }
}

.hero-title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(3.2rem, 15vw, 7.4rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 56px;
  line-height: 1.05;
  background: linear-gradient(135deg, #ffffff 0%, #c9d1d9 60%, #8b949e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
  overflow-wrap: break-word;
  min-height: 1.1em;
  filter: drop-shadow(0 4px 24px rgba(0, 255, 156, 0.12));
}
@media (min-width: 600px) { .hero-title { margin-bottom: 64px; line-height: 1.1; } }
@media (min-width: 1024px) { .hero-title { margin-bottom: 72px; } }

.hero-return {
  font-family: var(--ff-mono);
  font-size: 0.55em;
  color: var(--accent);
  margin-left: 10px;
  vertical-align: middle;
}

.hero-subtitle {
  font-family: 'MatrixCode', 'Courier New', 'VT323', 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 auto 48px;
  max-width: 100%;
  text-align: left;
  min-height: 10em;
  overflow: hidden;
  will-change: contents;
}
@media (min-width: 600px) {
  .hero-subtitle {
    font-size: 16px; line-height: 1.75;
    margin-bottom: 56px;
    min-height: 5em;
    max-width: 90%;            /* 5% inset each side via margin auto */
  }
}
@media (min-width: 1024px) {
  .hero-subtitle {
    font-size: 17px;
    max-width: 80%;            /* 10% inset each side via margin auto */
  }
}

.hero-subtitle .h  { color: var(--accent); }
.hero-subtitle .tw { color: var(--text);    font-weight: 600; }
.hero-subtitle .ta { color: var(--accent);  font-weight: 600; }
.hero-subtitle .t2 { color: var(--accent2); font-weight: 600; }
.hero-subtitle .t4 { color: var(--accent4); font-weight: 600; }

/* ====== Name typing — smooth character-by-character with caret ====== */
.hero-title { opacity: 0; transition: opacity .35s ease; }
.hero-title.go { opacity: 1; }
.name-caret {
  display: inline-block;
  width: 0.06em;
  height: 0.78em;
  margin-left: 0.06em;
  vertical-align: -0.06em;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--accent);
  animation: name-caret-blink 0.85s step-end infinite;
}
@keyframes name-caret-blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title { opacity: 1; transform: none; filter: none; animation: none; transition: none; }
  .name-caret { animation: none; }
}

.type-caret {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  will-change: opacity;
  animation: caret-blink 0.9s step-end infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
.type-caret.done { animation: caret-blink 1.2s step-end infinite; }

/* Hero entrance — staggered fade-up on first load */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .term-prompt,
.hero .hero-title,
.hero .hero-subtitle,
.hero .hero-meta,
.hero .cta-row {
  opacity: 0;
  animation: hero-rise 0.7s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero .term-prompt   { animation-delay: 0.05s; }
.hero .hero-title    { animation-delay: 0.18s; }
.hero .hero-subtitle { animation-delay: 0.32s; }
.hero .hero-meta     { animation-delay: 0.48s; }
.hero .cta-row       { animation-delay: 0.62s; }
@media (prefers-reduced-motion: reduce) {
  .hero .term-prompt, .hero .hero-title, .hero .hero-subtitle,
  .hero .hero-meta, .hero .cta-row {
    opacity: 1; animation: none;
  }
}

/* ====== Floating particle dots in hero background ====== */
.hero-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-dots span {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px currentColor;
  color: var(--accent);
  opacity: 0;
  animation: dot-float 9s ease-in-out infinite;
}
.hero-dots span:nth-child(1) { left: 8%;  top: 18%; color: var(--accent);  animation-delay: 0s;   }
.hero-dots span:nth-child(2) { left: 84%; top: 24%; color: var(--accent2); animation-delay: 1.2s; }
.hero-dots span:nth-child(3) { left: 18%; top: 76%; color: var(--accent4); animation-delay: 2.4s; }
.hero-dots span:nth-child(4) { left: 90%; top: 80%; color: var(--accent3); animation-delay: 3.6s; width: 4px; height: 4px; }
.hero-dots span:nth-child(5) { left: 50%; top: 10%; color: var(--accent);  animation-delay: 4.8s; width: 3px; height: 3px; }
.hero-dots span:nth-child(6) { left: 72%; top: 52%; color: var(--accent2); animation-delay: 0.6s; width: 4px; height: 4px; }
.hero-dots span:nth-child(7) { left: 32%; top: 32%; color: var(--accent4); animation-delay: 6s;   width: 3px; height: 3px; }
.hero-dots span:nth-child(8) { left: 60%; top: 86%; color: var(--accent);  animation-delay: 2s;   width: 4px; height: 4px; }
.hero-dots span:nth-child(9) { left: 12%; top: 50%; color: var(--accent3); animation-delay: 5.2s; width: 3px; height: 3px; }
.hero-dots span:nth-child(10){ left: 95%; top: 60%; color: var(--accent4); animation-delay: 7.4s; width: 4px; height: 4px; }
.hero-dots span:nth-child(11){ left: 5%;  top: 35%; color: var(--accent2); animation-delay: 1.8s; width: 3px; height: 3px; }
.hero-dots span:nth-child(12){ left: 28%; top: 92%; color: var(--accent);  animation-delay: 3s;   }
.hero-dots span:nth-child(13){ left: 42%; top: 64%; color: var(--accent3); animation-delay: 4.2s; width: 4px; height: 4px; }
.hero-dots span:nth-child(14){ left: 66%; top: 14%; color: var(--accent4); animation-delay: 5.6s; width: 3px; height: 3px; }
.hero-dots span:nth-child(15){ left: 38%; top: 48%; color: var(--accent);  animation-delay: 0.3s; width: 3px; height: 3px; }
.hero-dots span:nth-child(16){ left: 80%; top: 38%; color: var(--accent2); animation-delay: 6.4s; width: 4px; height: 4px; }
.hero-dots span:nth-child(17){ left: 14%; top: 8%;  color: var(--accent3); animation-delay: 8s;   width: 3px; height: 3px; }
.hero-dots span:nth-child(18){ left: 92%; top: 12%; color: var(--accent4); animation-delay: 2.7s; }
.hero-dots span:nth-child(19){ left: 56%; top: 38%; color: var(--accent2); animation-delay: 7s;   width: 3px; height: 3px; }
.hero-dots span:nth-child(20){ left: 24%; top: 58%; color: var(--accent4); animation-delay: 4.6s; width: 4px; height: 4px; }
.hero-dots span:nth-child(21){ left: 76%; top: 96%; color: var(--accent);  animation-delay: 1.4s; width: 3px; height: 3px; }
.hero-dots span:nth-child(22){ left: 48%; top: 78%; color: var(--accent3); animation-delay: 5s;   width: 4px; height: 4px; }
.hero-dots span:nth-child(23){ left: 6%;  top: 86%; color: var(--accent2); animation-delay: 6.8s; width: 3px; height: 3px; }
.hero-dots span:nth-child(24){ left: 86%; top: 70%; color: var(--accent);  animation-delay: 0.9s; width: 3px; height: 3px; }
.hero-dots span { background: currentColor; }
@keyframes dot-float {
  0%   { transform: translate(0, 0)        scale(0.8); opacity: 0;   }
  20%  { opacity: 0.7; }
  50%  { transform: translate(8px, -28px)  scale(1.1); opacity: 0.9; }
  80%  { opacity: 0.5; }
  100% { transform: translate(-6px, -56px) scale(0.7); opacity: 0;   }
}
@media (prefers-reduced-motion: reduce) {
  .hero-dots span { animation: none; opacity: 0.4; }
}

/* ====== Scroll-down cue (only in hero) ====== */
.hero-scroll-cue {
  position: absolute;
  left: 18px; bottom: 16px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  opacity: 0;
  animation: hero-rise 0.7s cubic-bezier(.2,.7,.2,1) forwards 1s;
  transition: color .2s, transform .2s;
  z-index: 2;
}
.hero-scroll-cue,
.hero-scroll-cue:link,
.hero-scroll-cue:visited,
.hero-scroll-cue:active { color: var(--muted); }
.hero-scroll-cue:hover,
.hero-scroll-cue:focus-visible { color: var(--accent); }
.hero-scroll-cue .hsc-arrow {
  display: inline-flex;
  width: 28px; height: 28px;
  min-width: 28px; min-height: 28px;
  max-width: 28px; max-height: 28px;
  flex: 0 0 28px;
  align-items: center; justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-sizing: border-box;
  animation: hsc-bob 1.8s ease-in-out infinite;
}
.hero-scroll-cue .hsc-arrow svg {
  display: block;
  width: 14px; height: 14px;
  min-width: 14px; min-height: 14px;
  max-width: 14px; max-height: 14px;
  flex: 0 0 14px;
}
@media (min-width: 600px) {
  .hero-scroll-cue { left: 28px; bottom: 22px; font-size: 11px; gap: 8px; }
  .hero-scroll-cue .hsc-arrow {
    width: 32px; height: 32px;
    min-width: 32px; min-height: 32px;
    max-width: 32px; max-height: 32px;
    flex-basis: 32px;
  }
  .hero-scroll-cue .hsc-arrow svg {
    width: 16px; height: 16px;
    min-width: 16px; min-height: 16px;
    max-width: 16px; max-height: 16px;
    flex-basis: 16px;
  }
}
@keyframes hsc-bob {
  0%, 100% { transform: translateY(0);  }
  50%      { transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue, .hero-scroll-cue .hsc-arrow { animation: none; opacity: 1; }
}

.hero-meta {
  display: flex; gap: 12px 20px; flex-wrap: wrap;
  margin-bottom: 44px;
}
@media (min-width: 600px) {
  .hero-meta { gap: 14px 28px; margin-bottom: 52px; }
}
.hm-item {
  font-size: 12px;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
@media (min-width: 600px) { .hm-item { font-size: 13px; gap: 10px; } }
.hm-item::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--hm-color, var(--accent));
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.04), 0 0 14px var(--hm-color, var(--accent));
  will-change: opacity, transform;
  animation: pulse 2s ease infinite;
}
.hm-item:nth-child(1) { --hm-color: var(--accent); }
.hm-item:nth-child(2) { --hm-color: var(--accent2); }
.hm-item:nth-child(3) { --hm-color: var(--accent4); }
.hm-item:nth-child(4) { --hm-color: var(--warn); }
.hm-item:nth-child(5) { --hm-color: var(--accent3); }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

/* CTA buttons */
.cta-row { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 24px; }
.cta-row > div:first-child { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cta-social { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 600px) {
  .cta-row { gap: 16px; align-items: flex-start; margin-top: 0; }
  .cta-row > div:first-child { gap: 12px; justify-content: flex-start; }
  .cta-social { gap: 12px; justify-content: flex-start; }
}

.btn {
  font-family: var(--ff-mono);
  font-size: 11px;
  padding: 11px 16px;
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
  box-sizing: border-box;
}
@media (min-width: 600px) {
  .btn { font-size: 12px; padding: 10px 20px; gap: 8px; min-height: 0; }
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: transparent; color: var(--accent); }
.btn.skills { background: var(--accent2); color: var(--bg); border: none; font-weight: 600; }
.btn.skills:hover { background: var(--accent2); filter: brightness(1.15); }
.btn.projects { background: var(--accent); color: var(--bg); border: none; font-weight: 600; }
.btn.projects:hover { background: var(--accent); opacity: 0.8; }
.btn.websites { background: var(--warn); color: var(--bg); border: none; font-weight: 600; }
.btn.websites:hover { background: var(--warn); filter: brightness(1.15); }
.btn.icon {
  background: rgba(22, 27, 34, 0.6);
  border: 1px solid var(--line);
  width: 44px; height: 44px;
  padding: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.btn.icon:hover { transform: translateY(-2px); }
.btn.icon svg { width: 18px; height: 18px; }
/* Brand-coloured social icons */
.cta-social .btn.icon:nth-child(1) { color: #0a66c2; }                                /* LinkedIn */
.cta-social .btn.icon:nth-child(2) { color: #f0f6fc; }                                /* GitHub */
.cta-social .btn.icon:nth-child(3) { color: #ffffff; }                                /* X */
.cta-social .btn.icon:nth-child(4) { color: #00ab6c; }                                /* Medium */
.cta-social .btn.icon:nth-child(5) { color: #ff6719; }                                /* Substack */
.cta-social .btn.icon:nth-child(1):hover { border-color: #0a66c2; box-shadow: 0 6px 20px -6px rgba(10,102,194,.6); background: rgba(10,102,194,.18); }
.cta-social .btn.icon:nth-child(2):hover { border-color: #f0f6fc; box-shadow: 0 6px 20px -6px rgba(240,246,252,.4); background: rgba(255,255,255,.10); }
.cta-social .btn.icon:nth-child(3):hover { border-color: #ffffff; box-shadow: 0 6px 20px -6px rgba(255,255,255,.4); background: rgba(255,255,255,.10); }
.cta-social .btn.icon:nth-child(4):hover { border-color: #00ab6c; box-shadow: 0 6px 20px -6px rgba(0,171,108,.5);  background: rgba(0,171,108,.15); }
.cta-social .btn.icon:nth-child(5):hover { border-color: #ff6719; box-shadow: 0 6px 20px -6px rgba(255,103,25,.5); background: rgba(255,103,25,.15); }
@media (min-width: 600px) {
  .btn.icon { width: 48px; height: 48px; }
  .btn.icon svg { width: 20px; height: 20px; }
}

/* ====== SECTIONS — mobile base ====== */
section.block {
  padding: 28px 16px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 600px) { section.block { padding: 40px 20px; } }
@media (min-width: 1024px) { section.block { padding: 60px 40px; } }

/* Section header — meta always on the right */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--muted);
}
@media (min-width: 600px) { .sec-head { margin-bottom: 32px; gap: 8px 16px; } }
.sec-head .num { color: var(--accent); flex-shrink: 0; }
.sec-head .title {
  font-family: var(--ff-sans);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  min-width: 0;
}
@media (min-width: 600px) { .sec-head .title { font-size: 28px; } }
.sec-head .meta {
  margin-left: auto; /* always pushed to the right */
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ====== ABOUT CODE BLOCK ====== */
.code-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.code-head {
  background: var(--bg3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--muted);
}
@media (min-width: 600px) { .code-head { padding: 8px 16px; gap: 12px; } }
.code-body {
  padding: 16px;
  font-size: 13px;
  line-height: 1.9;
  overflow-x: auto;
  word-break: break-word;
  overflow-wrap: anywhere;
}
@media (min-width: 600px) { .code-body { padding: 24px; font-size: 14px; } }
.code-body .key { color: var(--accent3); }
.code-body .str { color: var(--accent); }
.code-body .num { color: var(--accent4); }
.code-body .com { color: var(--muted); font-style: italic; }
.code-body .fn { color: var(--accent2); }
.code-body .cl {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.code-card.show .cl { opacity: 1; transform: none; }
.code-card.show .cl:nth-child(1)  { transition-delay: 0.05s; }
.code-card.show .cl:nth-child(2)  { transition-delay: 0.14s; }
.code-card.show .cl:nth-child(3)  { transition-delay: 0.23s; }
.code-card.show .cl:nth-child(4)  { transition-delay: 0.32s; }
.code-card.show .cl:nth-child(5)  { transition-delay: 0.41s; }
.code-card.show .cl:nth-child(6)  { transition-delay: 0.50s; }
.code-card.show .cl:nth-child(7)  { transition-delay: 0.59s; }
.code-card.show .cl:nth-child(8)  { transition-delay: 0.68s; }
.code-card.show .cl:nth-child(9)  { transition-delay: 0.77s; }
.code-card.show .cl:nth-child(10) { transition-delay: 0.86s; }

/* ====== SKILLS ANIMATION ====== */
.skill-grid .skill-cat:nth-child(1) { transition-delay: 0.00s; }
.skill-grid .skill-cat:nth-child(2) { transition-delay: 0.08s; }
.skill-grid .skill-cat:nth-child(3) { transition-delay: 0.16s; }
.skill-grid .skill-cat:nth-child(4) { transition-delay: 0.24s; }
.skill-grid .skill-cat:nth-child(5) { transition-delay: 0.32s; }
.skill-grid .skill-cat:nth-child(6) { transition-delay: 0.40s; }
.skill-grid .skill-cat:nth-child(7) { transition-delay: 0.48s; }
.skill-grid .skill-cat:nth-child(8) { transition-delay: 0.56s; }
.skill-cat .tg {
  opacity: 0;
  transform: scale(0.85) translateY(3px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.skill-cat.show .tg { opacity: 1; transform: none; }
.skill-cat.show .tg:nth-child(1) { transition-delay: 0.20s; }
.skill-cat.show .tg:nth-child(2) { transition-delay: 0.26s; }
.skill-cat.show .tg:nth-child(3) { transition-delay: 0.32s; }
.skill-cat.show .tg:nth-child(4) { transition-delay: 0.38s; }
.skill-cat.show .tg:nth-child(5) { transition-delay: 0.44s; }
.skill-cat.show .tg:nth-child(6) { transition-delay: 0.50s; }
.skill-cat.show .tg:nth-child(7) { transition-delay: 0.56s; }
.skill-cat.show .tg:nth-child(8) { transition-delay: 0.62s; }

/* ====== SKILLS GRID ====== */
.skill-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 480px) {
  .skill-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 14px;
  }
}
@media (min-width: 600px) { .skill-grid { gap: 16px; } }

.skill-cat {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
@media (min-width: 600px) { .skill-cat { padding: 20px; } }
.skill-cat::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s;
}
.skill-cat:hover::before { transform: scaleX(1); }
.skill-cat:hover { border-color: var(--accent); transform: translateY(-2px); }
.sc-head {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
@media (min-width: 600px) { .sc-head { font-size: 12px; margin-bottom: 16px; } }
.sc-head .iconnum {
  background: var(--bg3);
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  margin-left: auto;
}
.sc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tg {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: all 0.2s;
}
.tg:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ====== PROJECTS ====== */
.proj-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) {
  .proj-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 20px;
  }
}
.proj {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.proj:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 12px 40px color-mix(in srgb, var(--accent) 12%, transparent); }
.proj-head {
  background: var(--bg3);
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
  display: flex; gap: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.proj-head span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.proj-head .tag { margin-left: auto; color: var(--accent); flex-shrink: 0; }
.proj-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
@media (min-width: 600px) { .proj-body { padding: 24px; } }
.proj-name {
  font-family: var(--ff-sans);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text);
  flex-shrink: 0;
}
@media (min-width: 600px) { .proj-name { font-size: 20px; margin-bottom: 12px; } }
.proj-desc { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; flex: 1; }
@media (min-width: 600px) { .proj-desc { font-size: 13px; margin-bottom: 16px; } }
.proj-stack { display: flex; flex-wrap: wrap; gap: 5px; flex-shrink: 0; }
.proj-stack span {
  font-size: 10px; padding: 3px 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 3px; color: var(--accent2);
}

/* ====== AI STACK ====== */
.ai-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 480px) { .ai-stack { grid-template-columns: 1fr 1fr; gap: 16px; } }
@media (min-width: 900px) { .ai-stack { grid-template-columns: 1fr 1fr 1fr; gap: 24px; } }
.stack-col {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}
@media (min-width: 600px) { .stack-col { padding: 24px; } }
.stack-col h4 {
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
@media (min-width: 600px) { .stack-col h4 { font-size: 16px; margin-bottom: 16px; } }
.stack-col h4::before { content: ''; width: 4px; height: 16px; background: var(--accent); }
.stack-list { list-style: none; }
.stack-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
@media (min-width: 600px) { .stack-list li { padding: 8px 0; font-size: 13px; gap: 10px; } }
.stack-list li::before { content: '→'; color: var(--accent); font-size: 11px; }
.stack-list li:last-child { border-bottom: none; }

/* ====== AI STACK ANIMATION ====== */
.ai-stack .stack-col:nth-child(1) { transition-delay: 0.00s; }
.ai-stack .stack-col:nth-child(2) { transition-delay: 0.10s; }
.ai-stack .stack-col:nth-child(3) { transition-delay: 0.20s; }
.ai-stack .stack-col:nth-child(4) { transition-delay: 0.30s; }
.ai-stack .stack-col:nth-child(5) { transition-delay: 0.40s; }
.ai-stack .stack-col:nth-child(6) { transition-delay: 0.50s; }
.stack-list li {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.stack-col.show .stack-list li { opacity: 1; transform: none; }
.stack-col.show .stack-list li:nth-child(1) { transition-delay: 0.18s; }
.stack-col.show .stack-list li:nth-child(2) { transition-delay: 0.26s; }
.stack-col.show .stack-list li:nth-child(3) { transition-delay: 0.34s; }
.stack-col.show .stack-list li:nth-child(4) { transition-delay: 0.42s; }
.stack-col.show .stack-list li:nth-child(5) { transition-delay: 0.50s; }

/* ====== PASSION CARDS ====== */
.passion-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 480px) {
  .passion-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 14px;
  }
}
@media (min-width: 600px) { .passion-grid { gap: 16px; } }
.passion {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: 52px auto;
}
.passion:hover { transform: translateY(-3px); }
.passion-icon {
  grid-column: 1;
  grid-row: 1;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}
.passion h5 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 14px;
}
@media (min-width: 600px) { .passion h5 { font-size: 12px; } }
.passion p {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  padding: 14px;
}
@media (min-width: 600px) { .passion p { padding: 16px; } }
/* per-card accent — tinted left rail + coloured title + hover glow */
.passion-grid .passion:nth-child(1)  .passion-icon { background: rgba(16,185,129,0.12); border-right-color: rgba(16,185,129,0.35); }
.passion-grid .passion:nth-child(1)  h5 { color: #10b981; }
.passion-grid .passion:nth-child(1):hover  { border-color: rgba(16,185,129,0.5); box-shadow: 0 8px 24px rgba(16,185,129,0.13); }
.passion-grid .passion:nth-child(2)  .passion-icon { background: rgba(59,130,246,0.12); border-right-color: rgba(59,130,246,0.35); }
.passion-grid .passion:nth-child(2)  h5 { color: #3b82f6; }
.passion-grid .passion:nth-child(2):hover  { border-color: rgba(59,130,246,0.5); box-shadow: 0 8px 24px rgba(59,130,246,0.13); }
.passion-grid .passion:nth-child(3)  .passion-icon { background: rgba(139,92,246,0.12); border-right-color: rgba(139,92,246,0.35); }
.passion-grid .passion:nth-child(3)  h5 { color: #8b5cf6; }
.passion-grid .passion:nth-child(3):hover  { border-color: rgba(139,92,246,0.5); box-shadow: 0 8px 24px rgba(139,92,246,0.13); }
.passion-grid .passion:nth-child(4)  .passion-icon { background: rgba(245,158,11,0.12); border-right-color: rgba(245,158,11,0.35); }
.passion-grid .passion:nth-child(4)  h5 { color: #f59e0b; }
.passion-grid .passion:nth-child(4):hover  { border-color: rgba(245,158,11,0.5); box-shadow: 0 8px 24px rgba(245,158,11,0.13); }
.passion-grid .passion:nth-child(5)  .passion-icon { background: rgba(6,182,212,0.12); border-right-color: rgba(6,182,212,0.35); }
.passion-grid .passion:nth-child(5)  h5 { color: #06b6d4; }
.passion-grid .passion:nth-child(5):hover  { border-color: rgba(6,182,212,0.5); box-shadow: 0 8px 24px rgba(6,182,212,0.13); }
.passion-grid .passion:nth-child(6)  .passion-icon { background: rgba(236,72,153,0.12); border-right-color: rgba(236,72,153,0.35); }
.passion-grid .passion:nth-child(6)  h5 { color: #ec4899; }
.passion-grid .passion:nth-child(6):hover  { border-color: rgba(236,72,153,0.5); box-shadow: 0 8px 24px rgba(236,72,153,0.13); }
.passion-grid .passion:nth-child(7)  .passion-icon { background: rgba(249,115,22,0.12); border-right-color: rgba(249,115,22,0.35); }
.passion-grid .passion:nth-child(7)  h5 { color: #f97316; }
.passion-grid .passion:nth-child(7):hover  { border-color: rgba(249,115,22,0.5); box-shadow: 0 8px 24px rgba(249,115,22,0.13); }
.passion-grid .passion:nth-child(8)  .passion-icon { background: rgba(132,204,22,0.12); border-right-color: rgba(132,204,22,0.35); }
.passion-grid .passion:nth-child(8)  h5 { color: #84cc16; }
.passion-grid .passion:nth-child(8):hover  { border-color: rgba(132,204,22,0.5); box-shadow: 0 8px 24px rgba(132,204,22,0.13); }
.passion-grid .passion:nth-child(9)  .passion-icon { background: rgba(239,68,68,0.12); border-right-color: rgba(239,68,68,0.35); }
.passion-grid .passion:nth-child(9)  h5 { color: #ef4444; }
.passion-grid .passion:nth-child(9):hover  { border-color: rgba(239,68,68,0.5); box-shadow: 0 8px 24px rgba(239,68,68,0.13); }
.passion-grid .passion:nth-child(10) .passion-icon { background: rgba(167,139,250,0.12); border-right-color: rgba(167,139,250,0.35); }
.passion-grid .passion:nth-child(10) h5 { color: #a78bfa; }
.passion-grid .passion:nth-child(10):hover { border-color: rgba(167,139,250,0.5); box-shadow: 0 8px 24px rgba(167,139,250,0.13); }

/* ====== CERT LIST ====== */
.cert-list { display: grid; gap: 10px; }
@media (min-width: 600px) { .cert-list { gap: 12px; } }

/* Mobile cert: icon + content stacked side by side */
.cert {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 6px 12px;
  align-items: start;
  transition: all 0.2s;
}
.cert-icon {
  grid-row: 1 / 3;
  width: 40px; height: 40px;
  background: var(--bg3);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.cert-mid h6 {
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.3;
}
.cert-mid span {
  font-size: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.cert-right {
  grid-column: 2;
  font-size: 10px;
  color: var(--muted);
}
.cert:hover { border-color: var(--warn); }

/* Desktop cert: 3-column row */
@media (min-width: 600px) {
  .cert {
    grid-template-columns: 60px 1fr auto;
    grid-template-rows: auto;
    gap: 20px;
    padding: 18px 22px;
    align-items: center;
  }
  .cert-icon { grid-row: auto; width: 48px; height: 48px; font-size: 20px; }
  .cert-mid h6 { font-size: 15px; margin-bottom: 4px; }
  .cert-mid span { font-size: 11px; }
  .cert-right { grid-column: auto; font-size: 11px; }
}

/* ====== EXPERIENCE TIMELINE ====== */
.exp-tl { position: relative; padding-left: 28px; }
@media (min-width: 600px) { .exp-tl { padding-left: 32px; } }
.exp-tl::before {
  content: '';
  position: absolute; left: 7px; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
@media (min-width: 600px) { .exp-tl::before { left: 8px; } }
.exp-row { position: relative; padding-bottom: 28px; }
@media (min-width: 600px) { .exp-row { padding-bottom: 32px; } }
.exp-row::before {
  content: '';
  position: absolute; left: -24px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
@media (min-width: 600px) { .exp-row::before { left: -28px; } }
.exp-row .when { font-size: 10px; color: var(--accent); margin-bottom: 4px; letter-spacing: 0.05em; }
@media (min-width: 600px) { .exp-row .when { font-size: 11px; } }
.exp-row .where {
  font-family: var(--ff-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
@media (min-width: 600px) { .exp-row .where { font-size: 17px; } }
.exp-row .role { font-size: 11px; color: var(--accent2); margin-bottom: 8px; }
@media (min-width: 600px) { .exp-row .role { font-size: 12px; } }
.exp-row .desc { font-size: 12px; color: var(--muted); max-width: 720px; }
@media (min-width: 600px) { .exp-row .desc { font-size: 13px; } }
.exp-row .desc ul { margin-top: 8px; }
.exp-row .desc li { line-height: 1.8; }

/* ====== WEBSITES ====== */
.web-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) {
  .web-list {
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 20px;
  }
}
.sec-tagline {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.7;
}
@media (min-width: 600px) { .sec-tagline { margin-bottom: 32px; } }
.web {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s;
  display: flex;
  flex-direction: column;
}
.web a.url {
  background: var(--bg3);
  border-bottom: 1px solid var(--line);
  padding: 9px 14px;
  font-size: 11px;
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.web a.url:hover { background: var(--accent); color: var(--bg); }
.web p { font-size: 12px; color: var(--muted); line-height: 1.6; padding: 14px 16px 16px; flex: 1; }

/* ====== CONTACT ====== */
.contact-block {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 16px;
  text-align: center;
}
@media (min-width: 600px) { .contact-block { padding: 28px 24px; } }
@media (min-width: 900px) { .contact-block { padding: 36px; } }
.contact-block h3 {
  font-family: var(--ff-sans);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 12px;
}
@media (min-width: 600px) { .contact-block h3 { font-size: 24px; } }
@media (min-width: 900px) { .contact-block h3 { font-size: 28px; margin-bottom: 16px; } }
.contact-block h3 span { color: var(--accent); }
.contact-block p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
@media (min-width: 600px) { .contact-block p { font-size: 13px; margin-bottom: 24px; } }
.contact-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (min-width: 600px) { .contact-row { gap: 12px; } }

.contact-also {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.contact-also span {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--ff-mono);
}
/* Platform brand colors */
.contact-also a[aria-label="Medium"] { color: #02b875; border-color: rgba(2,184,117,0.25); }
.contact-also a[aria-label="Medium"]:hover { border-color: #02b875; background: rgba(2,184,117,0.08); }
.contact-also a[aria-label="X (Twitter)"] { color: #1d9bf0; border-color: rgba(29,155,240,0.25); }
.contact-also a[aria-label="X (Twitter)"]:hover { border-color: #1d9bf0; background: rgba(29,155,240,0.08); }
.contact-also a[aria-label="Substack"] { color: #ff6719; border-color: rgba(255,103,25,0.25); }
.contact-also a[aria-label="Substack"]:hover { border-color: #ff6719; background: rgba(255,103,25,0.08); }

/* hidden form */
.msg-form { display: none; }
.hidden { display: none !important; }

/* ====== FOOTER ====== */
footer {
  border-top: 1px solid var(--line);
  background: var(--bg2);
  font-size: 11px;
  color: var(--muted);
}
.foot-bottom {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 600px) {
  .foot-bottom {
    padding: 16px 20px;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }
}
@media (min-width: 1024px) { .foot-bottom { padding: 20px 40px; } }
.foot-links { display: flex; gap: 12px; flex-wrap: wrap; }
@media (min-width: 600px) { .foot-links { gap: 16px; } }
.foot-links a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.foot-links a:hover { color: var(--accent); }

/* ====== REVEAL ANIMATION ====== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s, transform 0.8s; }
.reveal.show { opacity: 1; transform: translateY(0); }

/* ====== SCROLL TO TOP ====== */
.scroll-to-top {
  position: fixed;
  bottom: 16px; right: 16px;
  z-index: 99;
  width: 44px; height: 44px;
  border-radius: 3px;
  background: var(--bg2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  color: var(--accent);
}
@media (min-width: 900px) {
  .scroll-to-top { bottom: 24px; right: 24px; }
}
.scroll-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-to-top:hover {
  border-color: var(--accent);
  background: var(--bg3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 18%, transparent);
}
.scroll-to-top svg { width: 20px; height: 20px; display: block; }

/* ====== MY PROJECTS ANIMATION ====== */
.proj-grid .proj:nth-child(1) { transition-delay: 0.00s; }
.proj-grid .proj:nth-child(2) { transition-delay: 0.10s; }
.proj-grid .proj:nth-child(3) { transition-delay: 0.20s; }
.proj-grid .proj:nth-child(4) { transition-delay: 0.30s; }
.proj-grid .proj:nth-child(5) { transition-delay: 0.40s; }
.proj-grid .proj:nth-child(6) { transition-delay: 0.50s; }
.proj .proj-stack span {
  opacity: 0;
  transform: scale(0.85) translateY(3px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.proj.show .proj-stack span { opacity: 1; transform: none; }
.proj.show .proj-stack span:nth-child(1) { transition-delay: 0.22s; }
.proj.show .proj-stack span:nth-child(2) { transition-delay: 0.29s; }
.proj.show .proj-stack span:nth-child(3) { transition-delay: 0.36s; }
.proj.show .proj-stack span:nth-child(4) { transition-delay: 0.43s; }
.proj.show .proj-stack span:nth-child(5) { transition-delay: 0.50s; }
.proj.show .proj-stack span:nth-child(6) { transition-delay: 0.57s; }

/* ====== PUBLIC WEBSITES ANIMATION ====== */
.web-list .web:nth-child(1) { transition-delay: 0.00s; }
.web-list .web:nth-child(2) { transition-delay: 0.10s; }
.web-list .web:nth-child(3) { transition-delay: 0.20s; }
.web-list .web:nth-child(4) { transition-delay: 0.30s; }

/* ====== AI PASSIONS ANIMATION ====== */
.passion-grid .passion:nth-child(1)  { transition-delay: 0.00s; }
.passion-grid .passion:nth-child(2)  { transition-delay: 0.07s; }
.passion-grid .passion:nth-child(3)  { transition-delay: 0.14s; }
.passion-grid .passion:nth-child(4)  { transition-delay: 0.21s; }
.passion-grid .passion:nth-child(5)  { transition-delay: 0.28s; }
.passion-grid .passion:nth-child(6)  { transition-delay: 0.35s; }
.passion-grid .passion:nth-child(7)  { transition-delay: 0.42s; }
.passion-grid .passion:nth-child(8)  { transition-delay: 0.49s; }
.passion-grid .passion:nth-child(9)  { transition-delay: 0.56s; }
.passion-grid .passion:nth-child(10) { transition-delay: 0.63s; }

/* ====== EXPERIENCE ANIMATION ====== */
.exp-tl .exp-row:nth-child(1) { transition-delay: 0.00s; }
.exp-tl .exp-row:nth-child(2) { transition-delay: 0.12s; }
.exp-tl .exp-row:nth-child(3) { transition-delay: 0.24s; }
.exp-tl .exp-row:nth-child(4) { transition-delay: 0.36s; }
.exp-tl .exp-row:nth-child(5) { transition-delay: 0.48s; }

/* ====== CERTIFICATIONS ANIMATION ====== */
.cert-list .cert:nth-child(1) { transition-delay: 0.00s; }
.cert-list .cert:nth-child(2) { transition-delay: 0.10s; }
.cert-list .cert:nth-child(3) { transition-delay: 0.20s; }
.cert-list .cert:nth-child(4) { transition-delay: 0.30s; }
.cert-list .cert:nth-child(5) { transition-delay: 0.40s; }
.cert-list .cert:nth-child(6) { transition-delay: 0.50s; }

/* ====== CONNECT ANIMATION ====== */
.contact-block.reveal { transition: opacity 0.2s ease, transform 0.2s ease; }
.contact-block h3,
.contact-block > p,
.contact-row .btn,
.contact-also a {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.contact-block.show h3                             { opacity: 1; transform: none; transition-delay: 0.12s; }
.contact-block.show > p                            { opacity: 1; transform: none; transition-delay: 0.26s; }
.contact-block.show .contact-row .btn:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.40s; }
.contact-block.show .contact-row .btn:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.50s; }
.contact-block.show .contact-also a:nth-of-type(1) { opacity: 1; transform: none; transition-delay: 0.60s; }
.contact-block.show .contact-also a:nth-of-type(2) { opacity: 1; transform: none; transition-delay: 0.67s; }
.contact-block.show .contact-also a:nth-of-type(3) { opacity: 1; transform: none; transition-delay: 0.74s; }
