/* ============================================================
   Lalit Kumar Portfolio – main.css
   Consolidated from styles.css + projects.css + blog.css
   Optimised: reduced animations, mobile-first, GPU-only transforms
   ============================================================ */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  /* Color — one surface family, one accent, one text stack */
  --bg: #0a1117;
  --bg-alt: #0f1820;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --text: #e9eef2;
  --muted: #8a99a5;
  --muted-2: #5e6b76;
  --accent: #54d3b2;
  --accent-soft: rgba(84, 211, 178, 0.14);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Legacy aliases — keep until Phase 2 cleans up downstream rules */
  --surface-strong: rgba(255, 255, 255, 0.06);
  --highlight: #54d3b2;
  --accent-secondary: #54d3b2;

  /* Type — Inter everywhere, Plex Mono for meta */
  --font-display: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Type scale — fixed, no clamp roulette */
  --text-xs: 0.75rem; /* 12 — stamps, meta */
  --text-sm: 0.8125rem; /* 13 — small body */
  --text-base: 0.9375rem; /* 15 — body */
  --text-lg: 1.0625rem; /* 17 — lead */
  --text-xl: 1.375rem; /* 22 — h4 */
  --text-2xl: 1.75rem; /* 28 — h3 */
  --text-3xl: 2.5rem; /* 40 — h2 */
  --text-4xl: clamp(2.75rem, 5.2vw, 4.25rem); /* hero h1 */

  /* Spacing scale — 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii — only 2 */
  --radius-sm: 8px;
  --radius-md: 12px; /* legacy alias; equal to sm+ */
  --radius-lg: 16px;

  /* Shadow — single, earned */
  --shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 48px rgba(0, 0, 0, 0.35);

  /* Misc */
  --scroll-progress: 0;
  --marquee-duration: 22s;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  isolation: isolate;
}

body::before {
  content: none;
}

/* Scroll-progress bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--highlight),
    var(--accent),
    var(--accent-secondary)
  );
  transform-origin: left;
  transform: scaleX(var(--scroll-progress));
  z-index: 200;
  pointer-events: none;
  will-change: transform;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-secondary);
}
ul,
ol {
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Typography ─────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-4xl);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
}
h2 {
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
h3 {
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}
h4 {
  font-size: var(--text-xl);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
}

p {
  color: var(--muted);
}
p strong {
  color: var(--text);
  font-weight: 600;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px var(--space-3) 3px var(--space-2);
  margin-bottom: var(--space-6);
  font-weight: 400;
}

.section-eyebrow::before {
  content: "lk@build:~$";
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  margin-bottom: var(--space-5);
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex-shrink: 0;
}

.lead {
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
}

.highlight {
  color: var(--text);
  font-weight: 500;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
}

.availability {
  color: var(--accent);
  font-size: var(--text-sm);
  border-left: 1px solid var(--accent);
  padding-left: var(--space-3);
}

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  width: 100%;
}

.panel {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  overflow: hidden;
  z-index: 2;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

/* ── Noise overlay ───────────────────────────────────────────── */
.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  background-size: 160px;
}

/* ── Site header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  background: rgba(10, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.brand {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  margin-left: auto;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.site-nav a {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: transparent;
}

.site-header .cta {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.menu-icon {
  display: block;
  width: 18px;
  height: 12px;
  position: relative;
}
.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.menu-icon::before {
  top: 0;
}
.menu-icon::after {
  bottom: 0;
}

.nav-open .menu-icon::before {
  transform: translateY(5px) rotate(45deg);
}
.nav-open .menu-icon::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* ── CTAs / Buttons ──────────────────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.cta.primary {
  background: var(--accent);
  color: #07181f;
  font-weight: 600;
}
.cta.primary:hover {
  background: #6adcbe;
  color: #07181f;
}

.cta.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.cta.ghost:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

/* Focus visible */
.cta:focus-visible,
.site-nav a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Scroll-triggered reveals ────────────────────────────────── */
/* Only hide elements when JS has loaded — prevents blank page if CDN fails */
.has-js [data-animate] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.has-js [data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── TOC sidebar ─────────────────────────────────────────────── */
.toc {
  position: fixed;
  top: 50%;
  right: var(--space-6);
  transform: translateY(-50%);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: 50;
  opacity: 0.9;
}
.toc:hover {
  opacity: 1;
}

.toc-title {
  display: none;
}

.toc ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toc a {
  font-family: var(--font-body);
  font-size: 0;
  color: var(--muted-2);
  padding: var(--space-2) 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: color 0.15s;
}
.toc a::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--line-strong);
  flex-shrink: 0;
  transition:
    width 0.2s ease,
    background 0.2s ease;
}
.toc a:hover {
  color: var(--text);
  font-size: var(--text-xs);
}
.toc a:hover::before {
  width: 12px;
  background: var(--text);
}
.toc a.active {
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 500;
}
.toc a.active::before {
  width: 28px;
  background: var(--accent);
}

.toc-glow {
  display: none;
}

/* ── Hero section ────────────────────────────────────────────── */
.hero {
  min-height: 92svh;
  display: flex;
  align-items: center;
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 50% at 20% 0%,
    rgba(84, 211, 178, 0.06),
    transparent 60%
  );
  pointer-events: none;
}

.hero #hero-canvas {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: var(--space-20);
  padding-bottom: var(--space-12);
  width: 100%;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: var(--space-16);
  align-items: center;
}

.hero-copy {
  position: relative;
  max-width: 100%;
}

.hero h1 {
  margin: 0 0 var(--space-5);
  max-width: 14ch;
  color: var(--text);
}

.hero h1 .highlight {
  display: block;
  margin-top: var(--space-4);
  /* max-width: 28ch; */
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--muted);
}

.hero .lead {
  max-width: 52ch;
  margin-bottom: var(--space-8);
  color: var(--muted);
}

.hero .lead a {
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}
.hero .lead a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: 0;
}

/* Right column — calendar card */
.hero-board {
  display: flex;
  justify-content: flex-end;
}

.hero-board-card--calendar {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hero-board-card--calendar .hero-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding: 0 var(--space-1);
}

.hero-board-card--calendar .hero-note-kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}

.hero-board-stamp {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding: 0;
  background: transparent;
  border: 0;
}

.hero-board-stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero-calendly {
  width: 100%;
  height: 640px;
  min-width: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .hero-shell {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .hero h1 {
    max-width: 18ch;
  }
  .hero-board {
    justify-content: stretch;
  }
  .hero-calendly {
    height: 600px;
  }
}

@media (max-width: 640px) {
  .hero-content {
    padding-top: var(--space-16);
  }
  .hero-calendly {
    height: 560px;
  }
}

/* Deprecated hero pieces — kept as no-ops so old markup doesn't break layout */
.hero-mini-grid,
.hero-note-card,
.hero-note-card--quote,
.hero-board-card:not(.hero-board-card--calendar),
.hero-status-list,
.hero-board-foot,
.hero-console,
.hero-radar {
  display: none;
}

.hero-signals {
  display: none;
}

.hero-console {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.hero-console p {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: center;
  padding: 0.78rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(84, 211, 178, 0.16);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.hero-console span {
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-console strong {
  max-width: 18ch;
  text-align: right;
  color: rgba(124, 240, 210, 0.95);
  font-weight: 500;
}

.hero-console--contact a {
  color: rgba(124, 240, 210, 0.95);
}

.hero-console--contact a:hover {
  color: var(--accent-secondary);
}

.hero-radar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-radar-item {
  min-height: 116px;
  padding: 0.95rem;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
}

.hero-radar-item span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(226, 236, 241, 0.56);
}

.hero-radar-item strong {
  font-size: 1rem;
  line-height: 1.2;
}

.hero-radar-item small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.hero-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-secondary);
}

.hero-inline-link::after {
  content: " ↘";
}

/* Marquee */
.signal-marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 8%,
    black 92%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 8%,
    black 92%,
    transparent
  );
  margin-bottom: 0.6rem;
}

.signal-track {
  display: flex;
  gap: 1.8rem;
  flex-shrink: 0;
  padding-right: 1.8rem;
  animation: marquee var(--marquee-duration) linear infinite;
  will-change: transform;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.signal-track span {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 236, 241, 0.48);
}

.signals-caption {
  font-size: 0.82rem;
  color: rgba(226, 236, 241, 0.54);
}

/* Metrics */
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}
.metrics li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.metric-value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
}
.metric-label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Sub-hero (projects / blog / wielearn banners) */
.hero--sub {
  min-height: 42vh;
  align-items: flex-end;
  padding-bottom: 3.5rem;
}
.hero--sub .container {
  padding-top: 5rem;
}

/* ── About section ───────────────────────────────────────────── */
.about {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #0a1821 0%, #122430 100%);
}

.about-text {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 138, 91, 0.12),
      transparent 24%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.025)
    );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.about-text::after {
  content: "builder field notes";
  position: absolute;
  top: 1.3rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 236, 241, 0.42);
}

.about-text h2 {
  max-width: 13ch;
  margin-bottom: 1.2rem;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  max-width: 60ch;
}
.about-text p:last-child {
  margin-bottom: 0;
}

.stack {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.stack .section-eyebrow {
  margin: 0;
  padding: 1rem 1.1rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
}

.stack ul {
  padding: 0 1.1rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow);
}

.stack ul li {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.stack ul li:last-child {
  border-bottom: none;
}

/* ── Timeline ────────────────────────────────────────────────── */
.timeline-panel {
  background: linear-gradient(160deg, #08011a 0%, #05000e 100%);
  position: relative;
}

.timeline-header {
  max-width: 620px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.timeline-header h2 {
  margin-bottom: 0.8rem;
}
.timeline-header p {
  color: var(--muted);
}

.timeline-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
}

.timeline-group {
  position: relative;
}

.timeline-group-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.1rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}
.timeline-group-year {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  min-width: 3.5rem;
}
.timeline-group-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.timeline-group-caption {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 300px;
}

.timeline-group-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding-left: clamp(0.5rem, 2vw, 1.5rem);
}

.timeline-item {
  padding: clamp(1.2rem, 2.5vw, 1.6rem) clamp(1.2rem, 2.5vw, 1.8rem);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.timeline-item:hover {
  border-color: rgba(127, 92, 255, 0.3);
  box-shadow: 0 12px 40px rgba(127, 92, 255, 0.15);
}

.timeline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.timeline-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(127, 92, 255, 0.25);
}

.timeline-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 2.8rem;
}
.timeline-month {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.timeline-year {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.timeline-meta h3 {
  flex: 1;
  font-size: 1rem;
}

.timeline-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.timeline-badge--startup {
  color: #ffd580;
  border-color: rgba(255, 213, 128, 0.4);
  background: rgba(255, 213, 128, 0.1);
}
.timeline-badge--academic {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.4);
  background: rgba(196, 181, 253, 0.1);
}
.timeline-badge--por {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.4);
  background: rgba(147, 197, 253, 0.1);
}
.timeline-badge--professional {
  color: #f9a8d4;
  border-color: rgba(249, 168, 212, 0.4);
  background: rgba(249, 168, 212, 0.1);
}

.timeline-item > p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.timeline-bullets li {
  font-size: 0.88rem;
  color: rgba(185, 185, 201, 0.85);
  padding-left: 1.1rem;
  position: relative;
}
.timeline-bullets li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

/* Parallax layers (background decoration, GPU-only) */
.timeline-parallax {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.timeline-parallax--primary {
  background: radial-gradient(
    ellipse 80% 60% at 15% 40%,
    rgba(127, 92, 255, 0.08) 0%,
    transparent 70%
  );
}
.timeline-parallax--secondary {
  background: radial-gradient(
    ellipse 60% 50% at 85% 60%,
    rgba(255, 126, 182, 0.07) 0%,
    transparent 70%
  );
}

/* ── WieLearn startup teaser ─────────────────────────────────── */
.startup-teaser {
  background: linear-gradient(180deg, #0b1821 0%, #09141b 100%);
}
.startup-card {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 2.5rem;
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 138, 91, 0.16),
      transparent 26%
    ),
    linear-gradient(
      135deg,
      rgba(255, 226, 122, 0.14),
      rgba(84, 211, 178, 0.1) 48%,
      rgba(255, 138, 91, 0.1)
    );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.startup-card::after {
  content: "featured build";
  position: absolute;
  top: 1.25rem;
  right: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(7, 19, 29, 0.68);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(247, 240, 228, 0.56);
}
.startup-card h2 {
  margin-bottom: 0.75rem;
}
.startup-card p {
  color: rgba(233, 239, 242, 0.84);
  max-width: 56ch;
}
.startup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  flex-shrink: 0;
}

/* ── Projects grid ───────────────────────────────────────────── */
.projects {
  background:
    radial-gradient(
      circle at 82% 14%,
      rgba(84, 211, 178, 0.1),
      transparent 18%
    ),
    linear-gradient(180deg, #07131d 0%, #0c1823 100%);
}
.projects-intro {
  max-width: 54rem;
}
.projects-intro h2 {
  margin-bottom: 0.8rem;
}
.projects-intro p {
  color: var(--muted);
}

.projects-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.projects-status-strip span,
.projects-status-strip a {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(226, 236, 241, 0.68);
}

.projects-status-strip a:hover {
  color: var(--accent-secondary);
  border-color: rgba(255, 255, 255, 0.14);
}

.projects-glimpse-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 2.5rem;
}

.project-glimpse {
  grid-column: span 4;
  padding: 1.6rem;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.025)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow);
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
}

.project-glimpse:nth-child(1) {
  grid-column: span 5;
}
.project-glimpse:nth-child(2) {
  grid-column: span 4;
  transform: translateY(1.3rem);
}
.project-glimpse:nth-child(3) {
  grid-column: span 3;
}

.project-glimpse:hover {
  border-color: rgba(84, 211, 178, 0.32);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
  transform: translateY(-3px);
}

.project-glimpse-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-secondary);
}

.project-glimpse h3 {
  font-size: 1.05rem;
}
.project-glimpse p {
  color: var(--muted);
  font-size: 0.9rem;
}
.project-glimpse ul li {
  font-size: 0.85rem;
  color: rgba(185, 185, 201, 0.8);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}
.project-glimpse ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-secondary),
    var(--highlight)
  );
}

.project-glimpse footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-glimpse footer span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(226, 236, 241, 0.48);
}

.project-glimpse footer strong {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(247, 240, 228, 0.78);
}

.projects-glimpse-cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Projects page specifics */
.projects-page .hero--sub {
  background: linear-gradient(160deg, #080114 0%, #040008 100%);
}

.project-summary {
  background: var(--bg-alt);
}
.project-summary h2 {
  margin-bottom: 2rem;
}
.project-summary-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
}
.project-summary-item {
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}
.project-summary-item .summary-date {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.project-summary-item h3 {
  font-size: 1rem;
  margin: 0.4rem 0;
}
.project-summary-item p {
  font-size: 0.85rem;
  color: var(--muted);
}

.projects-detail {
  background: var(--bg);
}
.project-detail {
  margin-bottom: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.project-detail:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.project-detail header {
  margin-bottom: 1.8rem;
}
.project-detail h2 {
  margin-bottom: 0.5rem;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
  margin-bottom: 1.5rem;
}

.project-detail p {
  color: var(--muted);
  margin-bottom: 1rem;
}
.project-points li {
  font-size: 0.9rem;
  color: rgba(185, 185, 201, 0.9);
  padding: 0.4rem 0 0.4rem 1.2rem;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.project-points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.project-meta li {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mockup-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 1.4rem;
}
.mockup-card p {
  color: rgba(200, 195, 225, 0.7);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}
.mockup-card ol {
  counter-reset: list;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mockup-card ol li {
  counter-increment: list;
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 1.8rem;
  position: relative;
}
.mockup-card ol li::before {
  content: counter(list);
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
}

.project-cta {
  background: var(--bg-alt);
}
.project-cta-card {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: center;
  padding: clamp(2rem, 4vw, 3rem);
  background: rgba(255, 126, 182, 0.07);
  border: 1px solid rgba(255, 126, 182, 0.2);
  border-radius: var(--radius-lg);
}
.project-cta-card h2 {
  margin-bottom: 0.75rem;
}
.project-cta-card p {
  color: var(--muted);
}
.project-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  flex-shrink: 0;
}

/* ── Project terminal aside ──────────────────────────────────── */
.project-term-aside {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-alt);
  font-family: var(--font-mono);
  position: sticky;
  top: 5.5rem;
  align-self: start;
}

.pta-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
}
.pta-bar span:not(.pta-prompt) {
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
}
.pta-prompt {
  color: var(--accent);
  flex-shrink: 0;
}

.pta-kv {
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pta-kv > div {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}
.pta-kv > div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.pta-kv dt {
  font-size: var(--text-xs);
  color: var(--muted-2);
  white-space: nowrap;
}
.pta-kv dd {
  font-size: var(--text-xs);
  color: var(--muted);
  word-break: break-word;
  line-height: 1.5;
}
.pta-val--ok {
  color: var(--accent);
}

/* ── Project terminal block (numbered output list) ───────────── */
.project-term-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-alt);
  font-family: var(--font-mono);
  margin-top: var(--space-4);
}

.ptb-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--muted-2);
  white-space: nowrap;
}
.ptb-prompt {
  color: var(--accent);
}

.ptb-list {
  padding: var(--space-3) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: ptb;
  list-style: none;
}
.ptb-list li {
  counter-increment: ptb;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--muted);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.ptb-list li:last-child {
  border-bottom: none;
}
.ptb-list li::before {
  content: counter(ptb, decimal-leading-zero) ".";
  color: var(--accent);
  font-size: 0.625rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  padding-top: 0.15em;
}

/* ── WieLearn feature sections ───────────────────────────────── */
.feature {
  background: var(--bg-alt);
}
.feature-header {
  max-width: 580px;
  margin-bottom: 2.5rem;
}
.feature-header h2 {
  margin-bottom: 0.75rem;
}
.feature-header p {
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1.4rem;
}

.feature-card {
  padding: 1.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
}
.feature-card:hover {
  border-color: rgba(84, 211, 178, 0.32);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  transform: translateY(-3px);
}
.feature-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.feature-card h3 {
  font-size: 1.05rem;
}
.feature-card > p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.feature-card ul li {
  font-size: 0.85rem;
  color: rgba(185, 185, 201, 0.85);
  padding: 0.3rem 0 0.3rem 1rem;
  position: relative;
}
.feature-card ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.4rem;
}

.project-card {
  padding: 1.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
}
.project-card:hover {
  border-color: rgba(84, 211, 178, 0.28);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.22);
  transform: translateY(-3px);
}
.project-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--highlight);
  margin-bottom: 0.5rem;
}
.project-card h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}
.project-card > p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}
.project-card ul li {
  font-size: 0.83rem;
  color: rgba(185, 185, 201, 0.8);
  padding: 0.25rem 0 0.25rem 1rem;
  position: relative;
}
.project-card ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Obstacle run game ───────────────────────────────────────── */
.run-panel {
  background: linear-gradient(180deg, #08131d 0%, #03080d 100%);
}

.run-container {
  position: relative;
  text-align: left;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      circle at top right,
      rgba(84, 211, 178, 0.12),
      transparent 28%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.025)
    );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.run-container::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: calc(var(--radius-lg) - 10px);
  border: 1px dashed rgba(255, 226, 122, 0.16);
  pointer-events: none;
}

.run-header h2 {
  margin-bottom: 0.7rem;
}
.run-header p {
  color: var(--muted);
  margin-bottom: 2rem;
}

.run-stage {
  position: relative;
  width: 100%;
  max-width: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.4rem;
  background: linear-gradient(180deg, #061017, #142734);
}

.run-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0 2px,
    transparent 2px 6px
  );
  pointer-events: none;
  opacity: 0.18;
}

#run-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720/220;
}

.run-console {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.run-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.run-stats p {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.run-stats span {
  color: var(--text);
  font-weight: 600;
}
.run-message {
  font-size: 0.85rem;
  color: rgba(226, 236, 241, 0.62);
  width: 100%;
  margin-top: 0.5rem;
}
.run-credit {
  position: absolute;
  top: 1.3rem;
  right: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: rgba(255, 255, 255, 0.32);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ── Coursework ──────────────────────────────────────────────── */
.coursework {
  background: linear-gradient(180deg, #0b1821 0%, #10212c 100%);
}
.coursework-header {
  max-width: 600px;
  margin-bottom: 2.5rem;
}
.coursework-header h2 {
  margin-bottom: 0.75rem;
}
.coursework-header p {
  color: var(--muted);
}

.coursework-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.4rem;
}

.coursework-card {
  grid-column: span 4;
  position: relative;
  padding: 1.6rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}

.coursework-card:nth-child(1) {
  grid-column: span 5;
}
.coursework-card:nth-child(2) {
  grid-column: span 4;
}
.coursework-card:nth-child(3) {
  grid-column: span 3;
}

.coursework-card::before {
  content: "";
  position: absolute;
  top: 1.3rem;
  bottom: 1.3rem;
  left: 1.2rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--accent),
    var(--accent-secondary),
    transparent
  );
}

.coursework-card:hover {
  border-color: rgba(84, 211, 178, 0.28);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}
.coursework-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-left: 0.9rem;
}
.coursework-card ul {
  padding-left: 0.9rem;
}
.coursework-card ul li {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.coursework-card ul li:last-child {
  border-bottom: none;
}

/* ── Achievements ────────────────────────────────────────────── */
.achievements {
  background:
    radial-gradient(
      circle at 15% 16%,
      rgba(255, 138, 91, 0.08),
      transparent 18%
    ),
    linear-gradient(180deg, #08131d 0%, #0d1a24 100%);
}
.achievements-header {
  max-width: 620px;
  margin-bottom: 2.5rem;
}
.achievements-header h2 {
  margin-bottom: 0.75rem;
}
.achievements-header p {
  color: var(--muted);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.4rem;
  align-items: start;
}

.achievement-card {
  grid-column: span 3;
  position: relative;
  padding: 1.8rem;
  background: linear-gradient(
    180deg,
    rgba(255, 248, 232, 0.08),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
}

.achievement-card:nth-child(1) {
  grid-column: span 5;
  transform: rotate(-1deg);
}
.achievement-card:nth-child(2) {
  grid-column: span 3;
  transform: translateY(1rem) rotate(1.2deg);
}
.achievement-card:nth-child(3) {
  grid-column: span 4;
  transform: rotate(-0.6deg);
}
.achievement-card:nth-child(4) {
  grid-column: span 4;
  transform: translateY(-0.4rem) rotate(0.8deg);
}

.achievement-card::before {
  content: "";
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  width: 44px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 226, 122, 0.34);
  opacity: 0.7;
}

.achievement-card:hover {
  border-color: rgba(255, 138, 91, 0.35);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  transform: translateY(-3px) rotate(0deg);
}
.achievement-year {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--highlight);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.6rem;
}
.achievement-card h3 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
}
.achievement-card > p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.9rem;
}
.achievement-card ul li {
  font-size: 0.83rem;
  color: rgba(233, 239, 242, 0.7);
  padding: 0.25rem 0 0.25rem 1rem;
  position: relative;
}
.achievement-card ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--highlight);
}

/* ── Visitor signals ───────────────────────────────────────── */
.visitor-signals {
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(84, 211, 178, 0.12),
      transparent 28%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(255, 138, 91, 0.08),
      transparent 26%
    ),
    var(--bg);
}

.visitor-signals-header {
  max-width: 640px;
  margin-bottom: 2.4rem;
}
.visitor-signals-header h2 {
  margin-bottom: 0.75rem;
}
.visitor-signals-header p {
  color: var(--muted);
}

.visitor-signals-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}

.signal-map-card,
.signal-wall-card,
.signal-form-card {
  padding: clamp(1.4rem, 3vw, 1.8rem);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.signal-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem 1.4rem;
  margin-bottom: 1.2rem;
}

.signal-card-header h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  max-width: 18ch;
}

.signal-card-copy {
  color: rgba(226, 236, 241, 0.58);
  font-size: 0.85rem;
  max-width: 18rem;
}

.signal-worldboard {
  position: relative;
  min-height: 390px;
  border-radius: calc(var(--radius-lg) - 6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(12, 30, 58, 0.65),
      rgba(5, 1, 10, 0.96)
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.02)
    );
  overflow: hidden;
}

.signal-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 95%);
  opacity: 0.45;
}

.signal-continent {
  position: absolute;
  background: linear-gradient(
    145deg,
    rgba(84, 211, 178, 0.2),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.04);
  opacity: 0.85;
}

.signal-continent--americas {
  left: 8%;
  top: 12%;
  width: 23%;
  height: 62%;
  border-radius: 42% 58% 44% 56% / 34% 42% 58% 66%;
  transform: rotate(-10deg);
}

.signal-continent--europe-africa {
  left: 40%;
  top: 16%;
  width: 18%;
  height: 54%;
  border-radius: 42% 58% 52% 48% / 28% 34% 66% 72%;
  transform: rotate(8deg);
}

.signal-continent--asia {
  left: 56%;
  top: 16%;
  width: 28%;
  height: 42%;
  border-radius: 42% 58% 48% 52% / 34% 42% 58% 66%;
  transform: rotate(4deg);
}

.signal-continent--oceania {
  left: 76%;
  top: 62%;
  width: 11%;
  height: 16%;
  border-radius: 53% 47% 58% 42% / 44% 53% 47% 56%;
  transform: rotate(10deg);
}

.signal-pin {
  position: absolute;
  left: var(--pin-x);
  top: var(--pin-y);
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(7, 19, 29, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(247, 240, 228, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
  z-index: 2;
  opacity: 0.55;
}

.signal-pin:hover,
.signal-pin.is-active,
.signal-pin.has-signals {
  opacity: 1;
}

.signal-pin:hover,
.signal-pin.is-active {
  transform: translate(-50%, -54%);
  border-color: rgba(84, 211, 178, 0.38);
  background: rgba(84, 211, 178, 0.16);
}

.signal-pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--highlight);
  box-shadow: 0 0 0 0 rgba(255, 138, 91, 0.5);
  animation: signal-pulse 2.2s ease-out infinite;
}

.signal-pin:not(.has-signals) .signal-pin-dot {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: none;
  animation: none;
}

.signal-pin-count {
  font-size: 0.76rem;
  font-weight: 700;
}

.signal-pin-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes signal-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 138, 91, 0.42);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 138, 91, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 138, 91, 0);
  }
}

.signal-map-note {
  margin-top: 1rem;
  color: rgba(226, 236, 241, 0.62);
  font-size: 0.86rem;
}

.signal-wall-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-height: 480px;
  overflow: auto;
  padding-right: 0.2rem;
}

.signal-card {
  padding: 1rem 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.signal-card.is-dim {
  opacity: 0.35;
  transform: scale(0.985);
}

.signal-card.is-active {
  border-color: rgba(84, 211, 178, 0.32);
  background: rgba(84, 211, 178, 0.08);
}

.signal-card--empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
}

.signal-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.signal-stamp,
.signal-date {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.signal-stamp {
  color: var(--highlight);
  font-weight: 700;
}

.signal-date {
  color: rgba(226, 236, 241, 0.45);
}

.signal-card h3 {
  font-size: 1rem;
  margin-bottom: 0.28rem;
}

.signal-city {
  color: rgba(226, 236, 241, 0.68);
  font-size: 0.84rem;
  margin-bottom: 0.65rem;
}

.signal-message {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.signal-form-card {
  background:
    radial-gradient(
      circle at top right,
      rgba(84, 211, 178, 0.12),
      transparent 22%
    ),
    rgba(255, 255, 255, 0.04);
}

.signal-form {
  margin-top: 0.8rem;
}

.signal-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ── Contact section ─────────────────────────────────────────── */
.contact {
  background: linear-gradient(180deg, #07131d 0%, #081119 100%);
}
.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: flex-start;
  padding: clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 138, 91, 0.12),
      transparent 24%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}
.contact-card h2 {
  margin-bottom: 0.75rem;
}
.contact-card > div > p {
  color: var(--muted);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.contact-points {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.contact-points li {
  font-size: 0.9rem;
  color: var(--muted);
}
.contact-points a {
  color: var(--accent);
}
.contact-points a:hover {
  color: var(--accent-secondary);
}

/* Contact / Calendly */
.contact-form-wrap {
  max-width: 760px;
  padding: clamp(1.6rem, 3vw, 2.1rem);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.contact-form-wrap .section-eyebrow {
  margin-bottom: 1.4rem;
}

.contact-calendar-wrap {
  max-width: 100%;
}

.contact-calendar-shell {
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 19, 29, 0.72);
  min-height: 700px;
}

.contact-calendar-shell .calendly-inline-widget {
  min-width: 320px;
  height: 700px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 236, 241, 0.6);
}

.contact-field input,
.contact-field textarea,
.contact-field select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
  resize: vertical;
  width: 100%;
}
.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
.contact-field input:focus,
.contact-field textarea:focus,
.contact-field select:focus {
  border-color: rgba(84, 211, 178, 0.56);
  background: rgba(84, 211, 178, 0.06);
}
.contact-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.65) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.65) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 14px) calc(50% - 2px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.contact-form-footer {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.contact-form-status {
  font-size: 0.88rem;
  line-height: 1.5;
}
.contact-form-status--ok {
  color: #7fffd4;
}
.contact-form-status--err {
  color: var(--highlight);
}

/* ── Blog ─────────────────────────────────────────────────────── */
.blog-page .hero--sub {
  background: linear-gradient(160deg, #06000f 0%, #020005 100%);
}

.blog-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: clamp(1.4rem, 3vw, 2.5rem);
  align-items: end;
}

.blog-hero-copy h1 {
  max-width: 16ch;
  margin-bottom: 1rem;
}
.blog-hero-copy .lead {
  max-width: 62ch;
}
.blog-hero-note {
  margin-top: 1rem;
  max-width: 54ch;
  color: rgba(220, 214, 255, 0.62);
  font-size: 0.88rem;
}

.blog-hero-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  padding: 1.2rem;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08),
    rgba(127, 92, 255, 0.08)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.blog-hero-stat {
  min-height: 120px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-hero-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(220, 214, 255, 0.55);
}

.blog-hero-stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.65rem);
  line-height: 1.2;
  color: var(--text);
}

.blog-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.8rem;
}

.blog-section-head h2 {
  margin-bottom: 0.2rem;
}
.blog-results-note {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 32rem;
}

.blog-spotlight {
  background: var(--bg-alt);
}

.blog-spotlight-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 1.4rem;
}

.blog-featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 1.2rem;
  align-items: stretch;
  padding: clamp(1.4rem, 3vw, 1.8rem);
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 126, 182, 0.14),
      transparent 35%
    ),
    linear-gradient(145deg, rgba(127, 92, 255, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.blog-featured-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.blog-featured-meta,
.blog-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.blog-featured-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  max-width: 16ch;
}

.blog-featured-card h2 a {
  color: var(--text);
}
.blog-featured-card h2 a:hover {
  color: var(--highlight);
}
.blog-featured-card p {
  color: rgba(230, 224, 255, 0.88);
}

.blog-featured-tags,
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.blog-featured-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.blog-featured-thumbnail {
  min-height: 100%;
  border-radius: calc(var(--radius-md) + 2px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.blog-featured-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-archive-note {
  padding: clamp(1.3rem, 3vw, 1.6rem);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.blog-archive-note h3 {
  font-size: 1.2rem;
}
.blog-archive-note p {
  color: var(--muted);
}

.blog-note-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.blog-note-list li {
  position: relative;
  padding-left: 1.1rem;
  color: rgba(230, 224, 255, 0.82);
  font-size: 0.9rem;
}

.blog-note-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--highlight);
}

.blog-link-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-link-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.blog-link-row strong {
  color: var(--text);
  font-size: 0.94rem;
}

.blog-link-row span {
  color: rgba(220, 214, 255, 0.62);
  font-size: 0.82rem;
  line-height: 1.55;
}

.blog-link-row:hover {
  transform: translateY(-2px);
  border-color: rgba(127, 92, 255, 0.38);
  background: rgba(127, 92, 255, 0.08);
}

.blog-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0)
  );
  margin: 0.2rem 0;
}

.blog-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.blog-search {
  flex: 1;
  min-width: 240px;
}
.blog-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  padding: 0.85rem 1.25rem;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.blog-search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.blog-search-input:focus {
  border-color: rgba(127, 92, 255, 0.6);
  background: rgba(127, 92, 255, 0.06);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.blog-tag {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 214, 255, 0.72);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.blog-tag:hover,
.blog-tag.active {
  background: rgba(127, 92, 255, 0.2);
  border-color: rgba(127, 92, 255, 0.5);
  color: var(--text);
}

.blog-controls-note {
  margin-bottom: 1.8rem;
  color: rgba(220, 214, 255, 0.58);
  font-size: 0.84rem;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.4rem;
}

.blog-card {
  grid-column: span 4;
  padding: 1.6rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.035)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    transform 0.25s;
  min-height: 100%;
}
.blog-card:hover {
  border-color: rgba(127, 92, 255, 0.4);
  box-shadow: 0 18px 50px rgba(127, 92, 255, 0.16);
  transform: translateY(-3px);
}

.blog-card--wide {
  grid-column: span 8;
  background:
    radial-gradient(
      circle at top right,
      rgba(127, 92, 255, 0.14),
      transparent 32%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.035)
    );
}

.blog-card .summary-date {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.blog-card-read {
  font-size: 0.75rem;
  color: rgba(220, 214, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-card h3 {
  font-size: 1.08rem;
}
.blog-card h3 a {
  color: var(--text);
}
.blog-card h3 a:hover {
  color: var(--highlight);
}
.blog-card > p {
  color: var(--muted);
  font-size: 0.9rem;
}

.chip--quiet {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(220, 214, 255, 0.7);
}

.blog-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.blog-link::after {
  content: " →";
}
.blog-link:hover {
  color: var(--highlight);
}

.blog-empty {
  text-align: center;
  padding: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: none;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.blog-empty--visible {
  display: block;
}
.blog-card[hidden] {
  display: none;
}

/* ══ Single post ═════════════════════════════════════════════════ */
.single-post-page {
  padding: clamp(4.5rem, 7vw, 7rem) 0 5rem;
}

.post-article {
  max-width: 740px;
  margin: 0 auto;
}

/* ── Terminal file header (vim frontmatter) ──────────────────── */
.post-term-header {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-8);
  background: var(--surface);
  font-family: var(--font-mono);
}

.post-term-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-xs);
  background: rgba(255, 255, 255, 0.015);
  overflow-x: auto;
  white-space: nowrap;
}
.ptm-prompt {
  color: var(--accent);
}
.ptm-cmd {
  color: var(--muted-2);
}

.post-term-frontmatter {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
}
.ptm-fence {
  display: block;
  color: var(--muted-2);
  margin-bottom: var(--space-2);
}
.ptm-fence:last-child {
  margin-bottom: 0;
  margin-top: var(--space-2);
}
.ptm-fields {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: var(--space-3);
  row-gap: 3px;
  padding: var(--space-1) var(--space-3);
}
.ptm-key {
  color: var(--accent);
  user-select: none;
}
.ptm-val {
  color: var(--muted);
}

/* ── Post header ─────────────────────────────────────────────── */
.post-header {
  margin-bottom: var(--space-10);
}

.post-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: var(--space-5);
}

.post-header .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.post-date {
  color: var(--muted);
}

.post-read {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(84, 211, 178, 0.2);
  border-radius: 100px;
  padding: 1px 8px;
  font-size: 0.625rem;
  letter-spacing: 0.02em;
}

.post-thumbnail {
  margin-top: var(--space-6);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
}
.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Post body prose ─────────────────────────────────────────── */
.post-content,
.entry-content {
  color: var(--muted);
  line-height: 1.85;
  font-size: var(--text-base);
}

/* Lead — first paragraph slightly larger */
.post-content > p:first-of-type,
.entry-content > p:first-of-type {
  font-size: var(--text-lg);
  color: rgba(233, 238, 242, 0.88);
  line-height: 1.7;
}

/* Headings */
.post-content h2,
.entry-content h2 {
  font-size: var(--text-2xl);
  color: var(--text);
  margin: 2.75rem 0 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  line-height: 1.2;
}
.post-content h3,
.entry-content h3 {
  font-size: var(--text-xl);
  color: var(--text);
  margin: 2.25rem 0 0.6rem;
  line-height: 1.25;
}
.post-content h4,
.entry-content h4 {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent);
  margin: 2rem 0 0.5rem;
  letter-spacing: 0;
}
.post-content h4::before,
.entry-content h4::before {
  content: "## ";
  color: var(--muted-2);
  font-weight: 400;
}

/* Paragraphs */
.post-content p,
.entry-content p {
  margin-bottom: 1.35rem;
}

/* Links */
.post-content a,
.entry-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(84, 211, 178, 0.3);
  padding-bottom: 1px;
  transition:
    color 0.15s,
    border-color 0.15s;
}
.post-content a:hover,
.entry-content a:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Strong / em */
.post-content strong,
.entry-content strong {
  color: var(--text);
  font-weight: 600;
}
.post-content em,
.entry-content em {
  color: rgba(233, 238, 242, 0.8);
  font-style: italic;
}

/* Lists */
.post-content ul,
.post-content ol,
.entry-content ul,
.entry-content ol {
  padding-left: 1.6rem;
  margin-bottom: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.post-content ul li,
.entry-content ul li {
  list-style: none;
  position: relative;
}
.post-content ul li::before,
.entry-content ul li::before {
  content: "▸";
  position: absolute;
  left: -1.2rem;
  color: var(--accent);
  font-size: 0.7em;
  top: 0.2em;
}
.post-content ol li,
.entry-content ol li {
  list-style: decimal;
}
.post-content ol li::marker,
.entry-content ol li::marker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* Inline code */
.post-content code,
.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(84, 211, 178, 0.07);
  color: var(--accent);
  border: 1px solid rgba(84, 211, 178, 0.18);
  padding: 0.1em 0.45em;
  border-radius: 4px;
}

/* Code block */
.post-content pre,
.entry-content pre {
  background: #0d1117;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-5) var(--space-6);
  overflow-x: auto;
  margin: var(--space-6) 0;
  line-height: 1.65;
  position: relative;
}
.post-content pre::before,
.entry-content pre::before {
  content: attr(data-lang);
  position: absolute;
  top: var(--space-2);
  right: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.post-content pre code,
.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e6edf3;
  font-size: var(--text-sm);
}
.post-content pre::-webkit-scrollbar,
.entry-content pre::-webkit-scrollbar {
  height: 4px;
}
.post-content pre::-webkit-scrollbar-track,
.entry-content pre::-webkit-scrollbar-track {
  background: transparent;
}
.post-content pre::-webkit-scrollbar-thumb,
.entry-content pre::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

/* Blockquote */
.post-content blockquote,
.entry-content blockquote {
  border-left: 2px solid var(--accent);
  padding: var(--space-4) var(--space-6);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-6) 0;
  color: rgba(233, 238, 242, 0.75);
  font-style: italic;
}
.post-content blockquote p:last-child,
.entry-content blockquote p:last-child {
  margin-bottom: 0;
}
.post-content blockquote cite,
.entry-content blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-2);
  font-style: normal;
}
.post-content blockquote cite::before,
.entry-content blockquote cite::before {
  content: "— ";
}

/* HR */
.post-content hr,
.entry-content hr {
  border: none;
  height: 1px;
  background: var(--line);
  margin: var(--space-10) 0;
  position: relative;
}
.post-content hr::after,
.entry-content hr::after {
  content: "· · ·";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 0 var(--space-4);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
}

/* Images */
.post-content img,
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  margin: var(--space-6) auto;
  border: 1px solid var(--line);
}
.post-content figure,
.entry-content figure {
  margin: var(--space-8) 0;
}
.post-content figcaption,
.entry-content figcaption {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-2);
  text-align: center;
  margin-top: var(--space-3);
  letter-spacing: 0.02em;
}

/* Table */
.post-content table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-6) 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.post-content th,
.entry-content th {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.025);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.post-content td,
.entry-content td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.post-content tr:last-child td,
.entry-content tr:last-child td {
  border-bottom: none;
}
.post-content tr:hover td,
.entry-content tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ── Terminal footer line ────────────────────────────────────── */
.post-term-footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-2);
  padding: var(--space-3) 0 var(--space-4);
  margin-bottom: var(--space-2);
}
.ptf-prompt {
  color: var(--accent);
}
.ptf-cmd {
  color: var(--muted-2);
}

/* ── Post footer + nav ───────────────────────────────────────── */
.post-footer {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.post-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(7, 19, 29, 0.82);
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer p {
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--accent-secondary);
}

/* ── Default page & 404 ──────────────────────────────────────── */
.default-page .container {
  padding-top: 5rem;
  padding-bottom: 4rem;
}
.page-article h1 {
  margin-bottom: 1.5rem;
}
/* .entry-content prose rules are merged into .post-content block above */

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 980px) {
  .toc {
    display: none;
  }
  .split {
    grid-template-columns: 1fr;
  }
  #hero.hero::after {
    display: none;
  }
  .hero-shell {
    grid-template-columns: 1fr;
  }
  .hero-board,
  .hero-radar,
  .hero-mini-grid {
    grid-template-columns: 1fr;
  }
  .hero-note-card--quote {
    transform: none;
  }
  .project-detail-grid {
    grid-template-columns: 1fr;
  }
  .visitor-signals-shell {
    grid-template-columns: 1fr;
  }
  .project-glimpse,
  .project-glimpse:nth-child(1),
  .project-glimpse:nth-child(2),
  .project-glimpse:nth-child(3),
  .coursework-card,
  .coursework-card:nth-child(1),
  .coursework-card:nth-child(2),
  .coursework-card:nth-child(3),
  .achievement-card,
  .achievement-card:nth-child(1),
  .achievement-card:nth-child(2),
  .achievement-card:nth-child(3),
  .achievement-card:nth-child(4) {
    grid-column: span 12;
    transform: none;
  }
  .blog-hero-shell,
  .blog-spotlight-shell,
  .blog-featured-card {
    grid-template-columns: 1fr;
  }
  .blog-card,
  .blog-card--wide {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(7, 19, 29, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    gap: 0.25rem;
    z-index: 100;
  }
  .nav-open .site-nav {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
  .site-header .cta {
    display: none;
  }
  .site-header {
    position: relative;
  }
  .hero {
    min-height: 100svh;
  }
  .hero-content {
    padding-top: 3.5rem;
  }
  .hero-mini-grid {
    margin-bottom: 1.2rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-actions .cta {
    width: 100%;
    justify-content: center;
  }
  .hero-board-card {
    padding: 1rem;
  }
  .startup-card {
    flex-direction: column;
  }
  .startup-card::after {
    position: static;
    display: inline-flex;
    margin-bottom: 0.85rem;
  }
  .project-cta-card {
    flex-direction: column;
  }
  .contact-card {
    flex-direction: column;
  }
  .contact-form-wrap {
    max-width: 100%;
  }
  .contact-form-row {
    grid-template-columns: 1fr;
  }
  .signal-card-header {
    flex-direction: column;
  }
  .signal-worldboard {
    min-height: 330px;
  }
  .timeline-group-caption {
    display: none;
  }
  .timeline-group-header {
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
  }
  .timeline-item {
    padding: 1rem 1.2rem;
  }
  .timeline-meta {
    gap: 0.5rem;
  }
  .metrics {
    flex-direction: column;
    gap: 1rem;
  }
  .metric-value {
    font-size: 1.5rem;
  }
  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  .projects-status-strip {
    flex-direction: column;
    align-items: flex-start;
  }
  .achievements-grid,
  .coursework-grid,
  .projects-glimpse-grid {
    grid-template-columns: 1fr;
  }
  .blog-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .blog-card,
  .blog-card--wide {
    grid-column: span 6;
  }
  .blog-hero-board {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: clamp(1.7rem, 6.5vw, 2.6rem);
  }
  h2 {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
  }
  h3 {
    font-size: clamp(1.05rem, 3.5vw, 1.3rem);
  }
  .hero h1 .highlight {
    font-size: 0.96rem;
  }
  .hero .lead {
    font-size: 0.95rem;
  }
  .badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
  }
  .panel {
    padding: clamp(2rem, 5vw, 3.5rem) 0;
  }
  .metrics {
    gap: 0.8rem;
  }
  .blog-controls {
    flex-direction: column;
  }
  .blog-tags {
    gap: 0.4rem;
  }
  .blog-section-head {
    align-items: flex-start;
  }
  .blog-hero-board {
    grid-template-columns: 1fr;
  }
  .blog-list {
    grid-template-columns: 1fr;
  }
  .blog-card,
  .blog-card--wide {
    grid-column: span 1;
  }
  .blog-featured-actions {
    flex-direction: column;
  }
  .blog-featured-actions .cta {
    width: 100%;
    justify-content: center;
  }
  .signal-worldboard {
    min-height: 280px;
  }
  .signal-pin {
    padding: 0.28rem 0.45rem;
    gap: 0.35rem;
  }
  .signal-pin-label {
    display: none;
  }
  .contact-actions {
    flex-direction: column;
    width: 100%;
  }
  .contact-actions .cta {
    width: 100%;
    justify-content: center;
  }
  .contact-calendar-shell,
  .contact-calendar-shell .calendly-inline-widget {
    min-height: 620px;
    height: 620px;
  }
  .hero-actions .cta {
    font-size: 0.76rem;
    padding: 0.6rem 1.2rem;
  }
  .startup-actions {
    flex-direction: column;
    width: 100%;
  }
  .startup-actions .cta {
    width: 100%;
    justify-content: center;
  }
  .hero-board-card,
  .about-text,
  .startup-card,
  .project-glimpse,
  .coursework-card,
  .achievement-card,
  .signal-map-card,
  .signal-wall-card,
  .signal-form-card,
  .contact-card,
  .contact-form-wrap {
    border-radius: 22px;
  }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-animate] {
    opacity: 1;
    transform: none;
  }
  .scroll-progress-bar {
    display: none;
  }
  .signal-track {
    animation: none;
  }
}

/* ── Print ───────────────────────────────────────────────────── */
@media print {
  .site-header,
  .toc,
  .noise,
  .scroll-progress-bar,
  .run-panel,
  .hero #hero-canvas {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .panel {
    padding: 1.5rem 0;
  }
  .container {
    max-width: 100%;
  }
  a {
    color: #000;
  }
}

/* ── Command Palette ─────────────────────────────────────────── */
#lk-palette {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(8vh, 18vh, 200px);
  pointer-events: none;
}

#lk-palette[hidden] {
  display: none;
}

#lk-palette.is-open {
  pointer-events: auto;
}

.lk-pal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 23, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.16s ease;
}

#lk-palette.is-open .lk-pal-backdrop {
  opacity: 1;
}

.lk-pal-modal {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 2rem));
  background: var(--bg-alt);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 64px rgba(0, 0, 0, 0.6);
  transform: translateY(-12px) scale(0.97);
  opacity: 0;
  transition:
    transform 0.16s ease,
    opacity 0.16s ease;
}

#lk-palette.is-open .lk-pal-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Input row */
.lk-pal-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}

.lk-pal-prompt {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--accent);
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
}

.lk-pal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: var(--text-base);
  color: var(--text);
  caret-color: var(--accent);
  letter-spacing: 0;
  line-height: 1.4;
}

.lk-pal-input::placeholder {
  color: var(--muted-2);
}

.lk-pal-esc-hint {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Results list */
.lk-pal-list {
  max-height: 300px;
  overflow-y: auto;
  padding: var(--space-2) 0;
  overscroll-behavior: contain;
}

.lk-pal-list::-webkit-scrollbar {
  width: 4px;
}
.lk-pal-list::-webkit-scrollbar-track {
  background: transparent;
}
.lk-pal-list::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

.lk-pal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  cursor: pointer;
  transition: background 0.08s;
}

.lk-pal-item:hover,
.lk-pal-item.is-active {
  background: rgba(255, 255, 255, 0.04);
}

.lk-pal-item.is-active .lk-pal-label {
  color: var(--accent);
}

.lk-pal-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  transition: color 0.1s;
}

.lk-pal-hint {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-2);
  white-space: nowrap;
}

.lk-pal-empty {
  padding: var(--space-8) var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--muted-2);
  text-align: center;
}

/* Footer */
.lk-pal-footer {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.lk-pal-footer span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-2);
}

.lk-pal-footer kbd {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 5px;
  border-radius: 4px;
}

/* ── ⌘K trigger button in header ────────────────────────────── */
.lk-kbd-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.lk-kbd-trigger:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Hero terminal prompt ────────────────────────────────────── */
.hero-prompt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-2);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.hero-prompt-path {
  color: var(--accent);
}

.hero-prompt-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--accent);
  border-radius: 1px;
  animation: cursor-blink 1.1s step-end infinite;
  vertical-align: middle;
  opacity: 0.85;
}

@keyframes cursor-blink {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 0;
  }
}

/* ── kbd hint below hero CTAs ────────────────────────────────── */
.hero-kbd-hint {
  margin-top: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero-kbd-hint kbd {
  font-family: inherit;
  font-size: inherit;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .lk-pal-footer {
    display: none;
  }
  .lk-kbd-trigger {
    display: none;
  }
}

/* ── Now section ─────────────────────────────────────────────── */
.now-header {
  margin-bottom: var(--space-10);
}

.now-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-10);
  align-items: start;
}

.now-block {
  border-top: 1px solid var(--accent);
  padding-top: var(--space-5);
}

.now-block h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.now-block h4::before {
  content: "## ";
  color: var(--muted-2);
  font-weight: 400;
}

.now-block p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
}

.now-block p + p {
  margin-top: var(--space-3);
}

.now-block p a {
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}

.now-block p a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .now-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .now-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ── Hero: last-login session line ───────────────────────────── */
.hero-last-login {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-2);
  margin-bottom: var(--space-2);
  letter-spacing: 0;
}

/* ── About stack: terminal output ────────────────────────────── */
.stack ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.stack li {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.5;
}

.stack li::before {
  content: ">";
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 600;
}

/* ── Terminal project listing (ls -l style) ──────────────────── */
.term-listing {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: var(--space-6);
}

.term-listing-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-5);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-2);
}

.term-listing-bar span:first-child {
  color: var(--accent);
}

.term-listing-head {
  display: grid;
  grid-template-columns: 56px 1fr 120px 180px;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-5);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.term-row {
  display: grid;
  grid-template-columns: 56px 1fr 120px 180px;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5);
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
}
.term-row:last-child {
  border-bottom: 0;
}
.term-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.term-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.term-tag--ship {
  color: var(--accent);
  background: var(--accent-soft);
}
.term-tag--test {
  color: #93c5fd;
  background: rgba(147, 197, 253, 0.08);
  border: 1px solid rgba(147, 197, 253, 0.15);
}
.term-tag--plot {
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
}

.term-row-main strong {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  margin-bottom: var(--space-1);
}

.term-row-main p {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0;
  margin: 0;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.term-year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  align-self: center;
}

.term-bar-track {
  width: 40px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  position: relative;
  flex-shrink: 0;
}

.term-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.term-bar em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-2);
}

.term-note {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0;
}

/* ── Project stage badge ────────────────────────────────────── */
.term-stage {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  align-self: center;
}
.term-stage--live {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(84, 211, 178, 0.22);
}
.term-stage--pre {
  color: #f6a623;
  background: rgba(246, 166, 35, 0.08);
  border: 1px solid rgba(246, 166, 35, 0.2);
}
.term-stage--beta {
  color: #93c5fd;
  background: rgba(147, 197, 253, 0.08);
  border: 1px solid rgba(147, 197, 253, 0.15);
}

/* ── Interested? mailto button (inside term-row-main) ────────── */
.term-interested {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-2);
  padding: 2px 9px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(84, 211, 178, 0.25);
  border-radius: 100px;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
  text-decoration: none;
}
.term-interested::after {
  content: "→";
  font-size: 0.6rem;
}
.term-interested:hover {
  background: rgba(84, 211, 178, 0.2);
  border-color: var(--accent);
  color: var(--text);
}

/* ── Side projects ───────────────────────────────────────────── */
.side-projects {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--line);
}

.side-projects-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-2);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.sp-prompt {
  color: var(--accent);
}

.sp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sp-card {
  background: var(--bg);
  padding: var(--space-5) var(--space-6);
  transition: background 0.12s;
}
.sp-card:hover {
  background: var(--bg-alt);
}

.sp-card-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.sp-card-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.sp-card-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sp-card-year {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--accent);
  margin-top: var(--space-1);
}

.sp-card p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 860px) {
  .sp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .sp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .term-listing-head,
  .term-listing-head .term-col-note {
    display: none;
  }
  .term-row {
    grid-template-columns: 88px 1fr;
  }
  .term-stage,
  .term-note {
    display: none;
  }
}

@media (max-width: 580px) {
  .term-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-4);
  }
  .term-bar {
    display: none;
  }
}

/* ── Career graph ────────────────────────────────────────────── */
.fgraph-section {
  background:
    radial-gradient(
      ellipse 70% 60% at 50% 60%,
      rgba(110, 231, 183, 0.04) 0%,
      transparent 70%
    ),
    radial-gradient(circle, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size:
    auto,
    28px 28px;
  background-position:
    center,
    0 0;
}

.fgraph-header {
  margin-bottom: var(--space-10);
}

/* Container: relative so nodes can be absolutely positioned */
.fgraph {
  position: relative;
  width: 100%;
  height: 380px;
  margin-bottom: var(--space-2);
}

/* SVG fills the container; paths use preserveAspectRatio=none so they
   scale with the container and stay aligned with CSS-% positioned nodes */
.fgraph-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Ghost network elements */
.fgraph-ghosts circle {
  fill: var(--line-strong);
}

.fgraph-ghost-edges line {
  stroke: var(--line);
  stroke-width: 0.5;
}

/* Main paths */
.fgraph-path {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 5 4;
  stroke-dashoffset: 2000;
  animation: fgraph-draw 1.2s ease forwards;
  animation-delay: calc(var(--pi, 1) * 0.22s);
}

@keyframes fgraph-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Nodes */
.fgraph-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.fgraph-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: default;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  animation: fgraph-pop 0.4s ease backwards;
  animation-delay: calc(var(--pi, 1) * 0.22s + 0.4s);
}

@keyframes fgraph-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fgraph-node:hover .fgraph-circle {
  border-color: var(--accent);
  background: var(--bg-alt);
  box-shadow:
    0 0 0 5px rgba(110, 231, 183, 0.07),
    0 0 24px rgba(110, 231, 183, 0.14);
}

.fgraph-year {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.fgraph-role {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  padding: 0 6px;
}

/* Hover tooltip */
.fgraph-tip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  background: var(--bg-alt);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 10;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Nodes near the top get tooltip below; near bottom — above */
.fgraph-node[style*="--y:72%"] .fgraph-tip,
.fgraph-node[style*="--y:65%"] .fgraph-tip,
.fgraph-node[style*="--y:60%"] .fgraph-tip {
  top: auto;
  bottom: calc(100% + 10px);
}

.fgraph-node:hover .fgraph-tip {
  opacity: 1;
}

/* "Now" node */
.fgraph-circle--now {
  border-color: var(--accent);
}
.fgraph-circle--now .fgraph-year {
  color: var(--accent);
}

/* Mobile fallback list (hidden on desktop) */
.fgraph-list {
  display: none;
}

@media (max-width: 700px) {
  .fgraph {
    display: none;
  }

  .fgraph-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .fgraph-list li {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    column-gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--line);
  }
  .fgraph-list li:last-child {
    border-bottom: 0;
  }

  .fgl-year {
    grid-row: span 2;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    padding-top: 2px;
  }

  .fgl-role {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
  }

  .fgl-desc {
    font-size: 0.8125rem;
    color: var(--muted);
  }
}

/* ── Guestbook section ───────────────────────────────────────── */
.guestbook-section .guestbook-header {
  margin-bottom: var(--space-10);
}

.guestbook-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

/* Entry wall */
.gb-wall {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gb-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
}
.gb-entry:last-child {
  border-bottom: 0;
}
.gb-entry:hover {
  background: rgba(255, 255, 255, 0.025);
}

.gb-entry--new {
  animation: gb-slide-in 0.35s ease forwards;
}
@keyframes gb-slide-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gb-entry-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gb-name {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
}

.gb-date {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted-2);
}

.gb-msg {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0;
}

.gb-empty {
  padding: var(--space-10) var(--space-6);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--muted-2);
}

@media (max-width: 860px) {
  .guestbook-shell {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .gb-entry {
    grid-template-columns: 1fr;
    gap: var(--space-1);
    padding: var(--space-3) var(--space-4);
  }
}

/* ── Terminal wizard window ──────────────────────────────────── */
.tw-window {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0d1117;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 20px 60px rgba(0, 0, 0, 0.5);
}

/* macOS chrome bar */
.tw-chrome {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.tw-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tw-dot--red {
  background: #ff5f57;
}
.tw-dot--yellow {
  background: #febc2e;
}
.tw-dot--green {
  background: #28c840;
}

.tw-chrome-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-2);
  margin-right: 52px; /* visually center past the 3 dots */
  user-select: none;
}

/* Scrollable body */
.tw-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: 400px;
  display: flex;
  flex-direction: column;
}

.tw-body::-webkit-scrollbar {
  width: 4px;
}
.tw-body::-webkit-scrollbar-track {
  background: transparent;
}
.tw-body::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

/* Output area */
.tw-output {
  flex: 1;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* Line variants */
.tw-line {
  color: var(--muted);
  word-break: break-word;
}
.tw-line.tw-system {
  color: var(--muted-2);
}
.tw-line.tw-cmd {
  color: var(--accent);
}
.tw-line.tw-question {
  color: var(--text);
  font-weight: 500;
}
.tw-line.tw-echo {
  color: var(--accent);
  opacity: 0.8;
}
.tw-line.tw-ok {
  color: #4ade80;
}
.tw-line.tw-err {
  color: #f87171;
}
.tw-line.tw-muted {
  color: var(--muted-2);
}

/* Sticky input row */
.tw-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.tw-input-prompt {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.tw-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text);
  caret-color: var(--accent);
  letter-spacing: 0;
  min-width: 0;
}
.tw-input::placeholder {
  color: var(--muted-2);
}

/* ── Terminal status bar (vim-style, fixed bottom) ───────────── */
#term-statusbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 0;
  height: 22px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 0 var(--space-5);
  user-select: none;
  pointer-events: none;
}

.tsb-mode {
  background: var(--accent);
  color: #0a1410;
  font-weight: 700;
  padding: 0 var(--space-3);
  height: 100%;
  display: flex;
  align-items: center;
  letter-spacing: 0.08em;
  margin-right: var(--space-4);
  flex-shrink: 0;
}

.tsb-host {
  color: var(--muted-2);
  flex-shrink: 0;
}

.tsb-sep {
  color: var(--line-strong);
  margin: 0 var(--space-3);
  flex-shrink: 0;
}

.tsb-section {
  color: var(--text);
  flex-shrink: 0;
}

.tsb-fill {
  flex: 1;
}

.tsb-pct {
  color: var(--muted-2);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  #term-statusbar {
    display: none;
  }
}

/* push footer above statusbar */
.site-footer {
  margin-bottom: 22px;
}

/* ── Footer terminal close ───────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-6) 0;
}

.footer-term-line {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-2);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-term-line .ftl-prompt {
  color: var(--accent);
}

.footer-term-line .ftl-cursor {
  display: inline-block;
  width: 6px;
  height: 11px;
  background: var(--muted-2);
  opacity: 0.5;
  border-radius: 1px;
  vertical-align: middle;
  animation: cursor-blink 1.1s step-end infinite;
}

/* ── Hero boot block ─────────────────────────────────────────── */
.hero-boot {
  margin-bottom: var(--space-5);
}

.hero-boot-line {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  line-height: 1.8;
}

.hbl-prompt {
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

.hero-boot-out {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  padding-left: 1ch;
  line-height: 1.8;
  margin-bottom: var(--space-1);
}

/* ── Contact key:value ───────────────────────────────────────── */
.contact-kv {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-5) 0 var(--space-6);
}

.ckv-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.ckv-row dt {
  color: var(--muted-2);
  min-width: 80px;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.ckv-row dd {
  margin: 0;
}

.ckv-row dd a {
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.ckv-row dd a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Social rail ─────────────────────────────────────────────── */
/*
 * Sits in normal flow inside a wrapper that uses position:relative.
 * On wide screens it's pulled out left via negative margin + sticky,
 * so it floats beside the content without a fixed overlay.
 */
.social-rail {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 7000;
  width: 40px;
}

.social-rail-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.social-rail-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--muted-2);
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
  position: relative;
  flex-shrink: 0;
}

.social-rail-link svg {
  display: block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* sr-only label */
.social-rail-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.social-rail-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(110, 231, 183, 0.06);
}

/* tooltip */
.social-rail-link::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}

.social-rail-link:hover::after {
  opacity: 1;
}

.social-rail-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--line-strong), transparent);
  flex-shrink: 0;
}

@media (max-width: 1200px) {
  .social-rail {
    display: none;
  }
}

/* ── Term incubated badge + tooltip ──────────────────────────── */
.term-incubated {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #f6a623;
  background: rgba(246, 166, 35, 0.1);
  border: 1px solid rgba(246, 166, 35, 0.22);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 5px;
  line-height: 1.6;
  position: relative;
  cursor: default;
  white-space: nowrap;
}

/* Tooltip */
.term-incubated[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  padding: 8px 10px;
  background: #161f2a;
  border: 1px solid rgba(246, 166, 35, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  line-height: 1.6;
  white-space: normal;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.15s,
    visibility 0.15s;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Tooltip arrow */
.term-incubated[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(246, 166, 35, 0.3);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.15s,
    visibility 0.15s;
  z-index: 101;
}

.term-incubated[data-tooltip]:hover::after,
.term-incubated[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
}
.term-incubated[data-tooltip]:hover::before,
.term-incubated[data-tooltip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

/* ── Reading list ─────────────────────────────────────────────── */
.reading-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
}

.reading-group-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.reading-group-label::before {
  content: "[ ";
}
.reading-group-label::after {
  content: " ]";
}

.reading-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.reading-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 0;
}

/* Pulsing dot — active book */
.reading-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: reading-pulse 2.4s ease-in-out infinite;
}
@keyframes reading-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 5px var(--accent);
  }
  50% {
    opacity: 0.3;
    box-shadow: 0 0 2px var(--accent);
  }
}

/* Checkmark — done book */
.reading-check {
  flex-shrink: 0;
  width: 6px;
  font-size: 0.625rem;
  color: var(--muted-2);
  line-height: 1;
  user-select: none;
}

.reading-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.reading-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.reading-sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.reading-item--done .reading-title {
  color: var(--muted);
  font-weight: 400;
}

/* +1 pill button */
.reading-also {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted-2);
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
  white-space: nowrap;
  user-select: none;
  line-height: 1.4;
}
.reading-also:hover:not(.reading-also--voted) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.reading-also--voted {
  border-color: var(--accent);
  color: var(--accent);
  cursor: default;
  pointer-events: none;
}

/* count pop animation on click */
@keyframes reading-count-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}
.reading-also--popping .reading-also-count {
  display: inline-block;
  animation: reading-count-pop 0.3s ease-out forwards;
}

/* ── Term listing show-more toggle ──────────────────────────── */
.term-rows-more[hidden] {
  display: none;
}
.term-rows-more {
  display: contents; /* rows slot directly into the grid parent */
}

.term-rows-toggle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
}

.term-show-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.term-show-more:hover {
  color: var(--accent);
}
.term-show-more .tsm-icon {
  display: inline-block;
  transition: transform 0.25s;
}
.term-show-more[aria-expanded="true"] .tsm-icon {
  transform: rotate(180deg);
}
.term-show-more[aria-expanded="true"] .tsm-label {
  /* label is updated by JS */
}
