/* ===== Tokens ===== */
:root {
  --accent-h: 195;
  --accent: oklch(0.72 0.14 var(--accent-h));
  --accent-soft: oklch(0.72 0.14 var(--accent-h) / 0.14);
  --accent-line: oklch(0.72 0.14 var(--accent-h) / 0.32);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --maxw: 1100px;
  --gutter: clamp(20px, 4vw, 56px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"] {
  --bg: oklch(0.16 0.005 250);
  --bg-2: oklch(0.185 0.006 250);
  --surface: oklch(0.205 0.007 250);
  --surface-2: oklch(0.235 0.008 250);
  --border: oklch(0.28 0.008 250);
  --border-soft: oklch(0.24 0.008 250);
  --fg: oklch(0.965 0.005 250);
  --fg-2: oklch(0.82 0.008 250);
  --muted: oklch(0.62 0.01 250);
  --muted-2: oklch(0.48 0.01 250);
  --shadow: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 24px 60px -30px oklch(0 0 0 / 0.6);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: oklch(0.985 0.003 80);
  --bg-2: oklch(0.965 0.004 80);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.97 0.004 80);
  --border: oklch(0.89 0.005 80);
  --border-soft: oklch(0.93 0.005 80);
  --fg: oklch(0.18 0.005 250);
  --fg-2: oklch(0.32 0.008 250);
  --muted: oklch(0.46 0.01 250);
  --muted-2: oklch(0.62 0.01 250);
  --shadow: 0 1px 0 oklch(1 0 0 / 0.6) inset, 0 18px 50px -28px oklch(0 0 0 / 0.18);
  color-scheme: light;
}

/* ===== Reset-ish ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  letter-spacing: -0.005em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent-soft); color: var(--fg); }

/* Subtle ambient grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 20% 0%, var(--accent-soft), transparent 40%);
  opacity: 0.5;
  z-index: 0;
}

/* ===== Layout primitives ===== */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

.section {
  padding: clamp(72px, 12vw, 140px) 0;
  position: relative;
}
.section + .section { border-top: 1px solid var(--border-soft); }

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.eyebrow .num {
  color: var(--accent);
  font-weight: 500;
}

h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.1; margin: 0; font-weight: 600; }
h2.section-title {
  font-size: clamp(32px, 4.6vw, 52px);
  margin: 18px 0 8px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.section-lede {
  color: var(--muted);
  font-size: 17px;
  max-width: 60ch;
  margin: 0 0 56px;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.header.scrolled { border-bottom-color: var(--border-soft); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.brand .glyph {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), oklch(0.62 0.16 calc(var(--accent-h) - 30)));
  display: grid; place-items: center;
  color: oklch(0.12 0.01 250);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--fg-2);
  position: relative;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--fg); background: var(--surface); }
.nav a.active { color: var(--fg); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
}
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  margin-left: 10px;
  transition: background 0.2s, border-color 0.2s;
}
.theme-toggle:hover { background: var(--surface); border-color: var(--accent-line); }
.theme-toggle svg { width: 16px; height: 16px; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .nav { display: none; }
  .menu-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: var(--gutter); right: var(--gutter);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: var(--shadow);
  }
  .nav.open a { padding: 10px 14px; border-radius: 8px; }
}

/* ===== Hero ===== */
.hero {
  padding: clamp(96px, 18vw, 180px) 0 clamp(64px, 10vw, 120px);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--fg-2);
  margin-bottom: 28px;
}
.hero-status .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: oklch(0.7 0.18 145);
  position: relative;
}
.hero-status .pulse::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 50%;
  background: oklch(0.7 0.18 145 / 0.4);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  70%, 100% { transform: scale(2); opacity: 0; }
}
.hero h1 {
  font-size: clamp(44px, 7.2vw, 84px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
}
.hero h1 .accent {
  color: var(--accent);
  font-style: italic;
  font-family: 'Instrument Serif', 'Inter', serif;
  font-weight: 400;
}
.hero .role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--muted);
  margin-top: 22px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.hero .role .sep { width: 24px; height: 1px; background: var(--border); }
.hero .bio {
  margin-top: 28px;
  font-size: 18px;
  color: var(--fg-2);
  max-width: 56ch;
}
.hero-actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s var(--ease);
}
.btn:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover { background: var(--accent); color: oklch(0.12 0.01 250); border-color: var(--accent); }
.btn svg { width: 14px; height: 14px; }

.hero-portrait {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
}
.hero-portrait .frame {
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.95) contrast(1.02);
}
.hero-portrait .meta {
  position: absolute;
  bottom: -16px; right: -16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow);
}
.hero-portrait .meta .marker {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.hero-portrait .corner {
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--accent);
}
.hero-portrait .corner.tl { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.hero-portrait .corner.tr { top: -4px; right: -4px; border-left: 0; border-bottom: 0; }
.hero-portrait .corner.bl { bottom: -4px; left: -4px; border-right: 0; border-top: 0; }
.hero-portrait .corner.br { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 80px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 28px 0;
}
.hero-stats .stat .num {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-stats .stat .num .plus { color: var(--accent); }
.hero-stats .stat .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
}
@media (max-width: 640px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px 4px; }
}

/* === Hero variant: Compact === */
.hero-compact {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
@media (max-width: 800px) { .hero-compact { grid-template-columns: 1fr; } }
.hero-compact-id { display: flex; align-items: center; gap: 16px; }
img.avatar-sm {
  width: 56px !important;
  height: 56px !important;
  flex: 0 0 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  max-width: 56px;
}
.hero-now {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
  margin-top: 8px;
}
.hero-now .now-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.hero-now .now-header::before {
  content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hero-now .now-row {
  display: flex; justify-content: space-between; gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 7px 0;
  border-top: 1px dashed var(--border-soft);
}
.hero-now .now-row:first-of-type { border-top: 0; }
.hero-now .now-row .k { color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; }
.hero-now .now-row .v { color: var(--fg); text-align: right; }

/* === Hero variant: Text-only === */
.hero-text-only { position: relative; }
.hero-mega {
  font-size: clamp(48px, 8.4vw, 96px) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.04em !important;
  margin: 26px 0 36px !important;
}
.hero-text-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 24px 0;
  margin: 8px 0 32px;
}
@media (max-width: 700px) { .hero-text-meta { grid-template-columns: 1fr; gap: 16px; } }
.hero-text-meta .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.hero-text-meta .v { font-size: 14px; color: var(--fg); }
.signal-tower {
  margin: 60px auto 0;
  display: block;
  max-width: 520px;
  width: 100%;
  opacity: 0.85;
}

/* === Hero variant: Credential strip === */
.hero-credential .cred-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, var(--border-soft) 12px 13px),
    var(--surface);
  position: relative;
}
.cred-strip::before, .cred-strip::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
}
.cred-strip::before { left: -9px; top: 50%; transform: translateY(-50%); }
.cred-strip::after  { right: -9px; top: 50%; transform: translateY(-50%); }
.cred-photo {
  width: 80px; height: 80px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  filter: grayscale(0.15);
}
.cred-fields { display: grid; gap: 10px; }
.cred-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cred-fields .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.cred-fields .v { font-size: 13px; color: var(--fg); font-weight: 500; }
.cred-stamp {
  text-align: center;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  transform: rotate(-4deg);
}
.cred-stamp .stamp-num { font-size: 18px; font-weight: 600; letter-spacing: 0.04em; }
.cred-stamp .stamp-label { font-size: 9px; letter-spacing: 0.15em; margin-top: 2px; opacity: 0.85; }

@media (max-width: 720px) {
  .hero-credential .cred-strip { grid-template-columns: auto 1fr; }
  .cred-stamp { display: none; }
  .cred-row { grid-template-columns: repeat(2, 1fr); }
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p {
  font-size: 17px;
  color: var(--fg-2);
  margin: 0 0 18px;
  max-width: 60ch;
}
.about-aside { display: flex; flex-direction: column; gap: 24px; }
.aside-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: var(--surface);
}
.aside-card h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tags span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--fg-2);
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
}
.lang-list { display: flex; flex-direction: column; gap: 12px; }
.lang-list .row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.lang-list .level { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; }

/* ===== Experience timeline ===== */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--border), transparent);
}
.tl-item {
  position: relative;
  padding-left: 40px;
  padding-bottom: 44px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: 4px; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
}
.tl-item.current::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.tl-meta .badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tl-item h3 {
  font-size: 22px;
  margin: 0 0 4px;
  font-weight: 600;
}
.tl-item .company {
  font-size: 14px;
  color: var(--fg-2);
  margin-bottom: 14px;
}
.tl-item .company .at { color: var(--muted); }
.tl-item p {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 10px;
  max-width: 68ch;
}
.tl-item ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.tl-item ul li {
  position: relative;
  padding-left: 18px;
  color: var(--fg-2);
  font-size: 14px;
}
.tl-item ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 1px;
  background: var(--muted-2);
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 760px) { .projects-grid { grid-template-columns: 1fr; } }
.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--accent-line); }
.project-card.featured { grid-column: 1 / -1; }
.project-vis {
  aspect-ratio: 16 / 8;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.project-card.featured .project-vis { aspect-ratio: 16 / 7; }
.project-vis .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.6;
  mask-image: radial-gradient(ellipse at center, black 50%, transparent 100%);
}
.project-vis .nodes {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}
.project-vis svg.diagram { width: 80%; height: auto; max-width: 480px; }
.node-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  fill: var(--muted);
  text-anchor: middle;
}
.project-body { padding: 24px 26px 26px; flex: 1; display: flex; flex-direction: column; }
.project-body .top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.project-body h3 { font-size: 20px; font-weight: 600; }
.project-body .links { display: flex; gap: 8px; flex-shrink: 0; }
.project-body .links a {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--muted);
  transition: all 0.2s;
}
.project-body .links a:hover { border-color: var(--accent-line); color: var(--accent); }
.project-body .links a svg { width: 14px; height: 14px; }
.project-body p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 18px;
  flex: 1;
}
.tech-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-stack span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg-2);
}

/* ===== Books ===== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 28px 20px;
}
.book {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s var(--ease);
}
.book:hover { transform: translateY(-4px); }
.book .cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  position: relative;
  box-shadow: 0 12px 28px -16px oklch(0 0 0 / 0.5);
  transition: box-shadow 0.3s var(--ease);
}
.book:hover .cover { box-shadow: 0 24px 40px -20px oklch(0 0 0 / 0.6); }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book .cover .placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px;
  background: linear-gradient(150deg, var(--surface), var(--surface-2));
  font-family: 'Instrument Serif', serif;
  font-size: 14px;
  line-height: 1.2;
  color: var(--fg);
}
.book .cover .placeholder .pl-author {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.book .cover .skel {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.book .title { font-size: 13px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.book .author { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ===== Contact ===== */
.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px);
  background:
    radial-gradient(circle at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
  position: relative;
  overflow: hidden;
}
.contact-card h3 {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  max-width: 18ch;
  margin: 0 0 16px;
}
.contact-card h3 em {
  font-style: italic;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  color: var(--accent);
}
.contact-card p { color: var(--muted); max-width: 50ch; margin: 0 0 32px; font-size: 16px; }
.contact-list { display: grid; gap: 12px; }
.contact-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: all 0.2s var(--ease);
  font-size: 14px;
}
.contact-row:hover { border-color: var(--accent-line); transform: translateX(4px); }
.contact-row .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.contact-row .value { color: var(--fg); font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.contact-row .arrow { color: var(--muted); transition: color 0.2s, transform 0.2s; }
.contact-row:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ===== Footer ===== */
.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--border-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-stagger="1"] { transition-delay: 0.06s; }
.reveal[data-stagger="2"] { transition-delay: 0.12s; }
.reveal[data-stagger="3"] { transition-delay: 0.18s; }
.reveal[data-stagger="4"] { transition-delay: 0.24s; }

/* Tweaks panel small adjustments */
[data-density="compact"] .section { padding: clamp(48px, 8vw, 96px) 0; }
[data-density="compact"] .hero { padding-top: clamp(72px, 12vw, 120px); }
