/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --bg: #0a1624;
  --bg-elev-1: #0f2133;
  --bg-elev-2: #142a40;
  --border: #213a55;
  --text: #eef2f6;
  --text-dim: #a9b6c4;
  --text-faint: #8a9aac;

  --accent-1: #f2b880; /* light copper */
  --accent-2: #e0954f; /* copper */
  --accent-3: #d0803f; /* book-cover copper */
  --accent-grad: linear-gradient(120deg, var(--accent-1), var(--accent-2) 55%, var(--accent-3));
  --on-accent: #10233a; /* navy text on copper */
  --chart-bar: #e0954f;
  --chart-bar-hover: #f2b880;
  --company-color: #86b6e3;
  --accent-text: #e8a46a;
  --accent-link: #f0b47e;
  --viz-pub: #86b6e3;
  --viz-cert: #c9c8c4;
  --viz-talk: #fbbf24;
  --live: #4ade80;
  --grid-line: rgba(255, 255, 255, 0.045);
  --band: rgba(255, 255, 255, 0.022);

  --radius: 16px;
  --radius-sm: 8px;
  --max-w: 1120px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f5f2;
    --bg-elev-1: #ffffff;
    --bg-elev-2: #efede8;
    --border: #e2ded5;
    --text: #12233a;
    --text-dim: #4a5568;
    --text-faint: #5f6b7a;
    --shadow: 0 10px 30px -14px rgba(16, 35, 58, 0.25);
    --chart-bar: #b5612b;
    --chart-bar-hover: #9a4a12;
    --company-color: #1d4f86;
    --accent-text: #9a4a12;
    --accent-link: #a14f17;
    --viz-pub: #1d4f86;
    --viz-cert: #8a8780;
    --live: #15803d;
    --grid-line: rgba(22, 32, 64, 0.06);
    --band: rgba(30, 45, 90, 0.04);
  }
}
:root[data-theme="light"] {
  --bg: #f6f5f2;
  --bg-elev-1: #ffffff;
  --bg-elev-2: #efede8;
  --border: #e2ded5;
  --text: #12233a;
  --text-dim: #4a5568;
  --text-faint: #5f6b7a;
  --shadow: 0 10px 30px -14px rgba(16, 35, 58, 0.25);
  --chart-bar: #b5612b;
  --chart-bar-hover: #9a4a12;
  --company-color: #1d4f86;
  --accent-text: #9a4a12;
  --accent-link: #a14f17;
  --viz-pub: #1d4f86;
  --viz-cert: #8a8780;
  --live: #15803d;
  --grid-line: rgba(22, 32, 64, 0.06);
  --band: rgba(30, 45, 90, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

html { scroll-behavior: smooth; overflow-x: hidden; }

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(680px 460px at 88% -8%, rgba(208, 128, 63, 0.16), transparent 62%),
    radial-gradient(560px 400px at -8% 12%, rgba(46, 96, 138, 0.22), transparent 60%),
    radial-gradient(520px 380px at 50% 105%, rgba(208, 128, 63, 0.07), transparent 60%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 104px 0; scroll-margin-top: 72px; }
@media (max-width: 640px) { section { padding: 72px 0; } }

.section-head { margin-bottom: 48px; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev-1);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 18px;
}
.section-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-grad); }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; color: var(--text); }
.section-sub { color: var(--text-dim); margin-top: 14px; max-width: 640px; font-size: 1.02rem; }
.inline-link { color: var(--accent-link); font-weight: 600; }
.inline-link:hover { text-decoration: underline; }
.grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============================================================
   Nav (floating pill)
   ============================================================ */
.nav { position: fixed; top: 12px; left: 0; right: 0; z-index: 100; pointer-events: none; }
.nav-inner {
  pointer-events: auto;
  width: min(calc(var(--max-w) - 24px), calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 8px 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.scrolled .nav-inner {
  background: color-mix(in srgb, var(--bg-elev-1) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--accent-grad);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-text { font-weight: 700; font-size: 0.95rem; letter-spacing: -0.01em; white-space: nowrap; }
@media (max-width: 1140px) { .brand-text { display: none; } }

.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a {
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--bg-elev-2); }
.nav-contact-item { display: none; }

.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.theme-toggle, .nav-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.15s ease;
}
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--accent-2); }
.theme-toggle svg { width: 17px; height: 17px; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-links {
    position: fixed;
    top: 76px; left: 16px; right: 16px;
    z-index: 101;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 16px; border-radius: 12px; }
  .nav-contact-item { display: block; }
  .nav-toggle { display: flex; }
}
@media (max-width: 480px) { .nav-cta { display: none; } }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-grad); color: var(--on-accent); }
.btn-primary:hover { box-shadow: 0 8px 24px -8px rgba(208, 128, 63, 0.55); }
.btn-ghost { background: var(--bg-elev-1); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent-2); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; isolation: isolate; padding: 148px 0 88px; }
@media (max-width: 640px) { .hero { padding: 116px 0 64px; } }
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 25%, transparent 75%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero-visual { order: -1; } }

.eyebrow-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev-1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 26px;
}
.eyebrow-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }

.hero-hello { font-size: 1.05rem; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 18px;
}
.hero-role {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.hero-tagline { font-size: 1.08rem; color: var(--text-dim); max-width: 540px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.social-row { display: flex; gap: 10px; margin-top: 28px; }
.social-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  color: var(--text-dim);
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.social-btn svg { width: 17px; height: 17px; }
.social-btn:hover { color: var(--text); border-color: var(--accent-2); transform: translateY(-2px); }

.hero-visual { display: flex; justify-content: center; }
.avatar-wrap { position: relative; width: min(360px, 80vw); aspect-ratio: 1 / 1.06; }
.avatar-wrap::before {
  content: "";
  position: absolute;
  inset: 24% 4% 0;
  border-radius: 40px;
  background: var(--accent-grad);
  filter: blur(50px);
  opacity: 0.4;
  z-index: -1;
}
.avatar-blob {
  position: absolute;
  inset: 20% 0 0 0;
  border-radius: 40px;
  background: var(--accent-grad);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.avatar-blob::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1.6px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 65%);
  mask-image: linear-gradient(180deg, #000, transparent 65%);
}
.avatar-blob::after {
  content: "";
  position: absolute;
  width: 75%;
  aspect-ratio: 1;
  right: -22%;
  top: -30%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.avatar-clip { position: absolute; inset: 0; border-radius: 0 0 40px 40px; overflow: hidden; }
.avatar-cutout { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px 10px 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev-1) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.float-card:empty { display: none; }
.float-current { left: -40px; bottom: 30px; }
.float-pubs { right: -32px; top: 30%; padding-left: 14px; }
.fc-num { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.fc-label { display: block; font-size: 0.68rem; color: var(--text-faint); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.fc-value { display: block; font-size: 0.86rem; font-weight: 700; }
@media (max-width: 1100px) { .float-current { left: -16px; } .float-pubs { right: -12px; } }
@media (max-width: 900px) { .avatar-wrap { width: min(300px, 72vw); } }
@media (max-width: 420px) { .float-pubs { display: none; } .float-current { left: 50%; transform: translateX(-50%); bottom: -22px; } }

.hero-proof {
  margin-top: 72px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg-elev-1) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
.proof-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 24px 26px; border-right: 1px solid var(--border); }
.stat-num { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-label { font-size: 0.8rem; color: var(--text-faint); margin-top: 4px; }
.proof-companies { padding: 22px 28px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.proof-label { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.proof-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 960px) {
  .hero-proof { grid-template-columns: 1fr; }
  .proof-companies { border-top: 1px solid var(--border); }
  .stat:last-child { border-right: 0; }
}
@media (max-width: 600px) {
  .proof-stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 18px 20px; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .stat-num { font-size: 1.6rem; }
}

/* ============================================================
   Cards / panels shared
   ============================================================ */
.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { border-color: var(--accent-2); transform: translateY(-3px); box-shadow: var(--shadow); }

.card-media { padding: 0; overflow: hidden; }
.project-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; display: block; background: var(--bg-elev-2); }
.card-media .project-card-body { padding: 20px 24px 26px; }

/* ============================================================
   About (bento grid)
   ============================================================ */
.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "intro intro role loc"
    "intro intro focus focus"
    "code code book interests";
}
.bento-intro { grid-area: intro; }
.bento-role { grid-area: role; }
.bento-location { grid-area: loc; }
.bento-focus { grid-area: focus; }
.bento-code { grid-area: code; }
.bento-book { grid-area: book; }
.bento-interests { grid-area: interests; }
@media (max-width: 1000px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "intro intro" "role loc" "focus focus" "code code" "book interests";
  }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "intro" "role" "loc" "focus" "code" "book" "interests"; }
}

.bento-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.bento-tile:hover { border-color: color-mix(in srgb, var(--accent-2) 55%, var(--border)); box-shadow: var(--shadow); }
.bento-label { font: 600 0.68rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 14px; }
.bento-big { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.bento-sub { color: var(--text-dim); font-size: 0.9rem; margin-top: 4px; }
.bento-meta { margin-top: auto; padding-top: 14px; font: 0.74rem var(--font-mono); color: var(--text-faint); }

.bento-intro { padding: 30px 32px; }
.bento-intro-text { display: flex; flex-direction: column; gap: 14px; }
.bento-intro-text p { color: var(--text-dim); font-size: 1rem; line-height: 1.75; }
.bento-intro-text .bento-lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.bento-intro .tl-more { align-self: flex-start; margin-top: auto; padding-top: 18px; }
@media (max-width: 600px) { .bento-intro { padding: 24px; } }

.bento-role { background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 60%), var(--bg-elev-1); }
.bento-role .bento-big { padding-right: 56px; }

.bento-location {
  min-height: 190px;
  background:
    linear-gradient(to top, var(--bg-elev-1) 40%, transparent),
    radial-gradient(color-mix(in srgb, var(--text-faint) 40%, transparent) 1px, transparent 1.6px) 0 0 / 14px 14px,
    var(--bg-elev-1);
}
.bento-location .bento-big { margin-top: auto; }
.loc-pin { position: absolute; top: 28px; right: 32px; width: 16px; height: 16px; }
.loc-pin span {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 25%, transparent);
}
.loc-pin::before, .loc-pin::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-2);
  opacity: 0;
}

.focus-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; flex: 1; }
.focus-item {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.focus-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-grad);
  color: var(--on-accent);
}
.focus-icon svg { width: 19px; height: 19px; }
.focus-name { display: block; font-weight: 700; font-size: 0.95rem; letter-spacing: -0.01em; }
.focus-detail { display: block; margin-top: 4px; font-size: 0.8rem; line-height: 1.45; color: var(--text-dim); }
@media (max-width: 600px) { .focus-item { flex-direction: row; align-items: flex-start; } .focus-icon { flex: none; } }

.bento-code { padding: 0; }
.bento-code .terminal-body { flex: 1; font-size: 0.78rem; }

.bento-book { color: inherit; min-height: 190px; }
.bento-book > :not(img) { position: relative; max-width: calc(100% - 64px); }
.bento-book-title { font-weight: 700; font-size: 1.02rem; line-height: 1.45; }
.bento-book .bento-meta { margin-top: 12px; padding-top: 0; }
.bento-book-cover {
  height: auto;
  position: absolute;
  right: 22px; bottom: -26px;
  width: 112px;
  border-radius: 6px;
  transform: rotate(8deg);
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s ease;
}
.bento-book:hover .bento-book-cover { transform: rotate(3deg) translateY(-6px); }

/* ============================================================
   Terminal code snippet card
   ============================================================ */
.terminal-card {
  background: #0b1a2b;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: #10243a;
  border-bottom: 1px solid #262c36;
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }
.terminal-filename {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #8b949e;
}
.terminal-body {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
  color: #c9d1d9;
}
.terminal-body .tok-kw { color: #ff7b72; }
.terminal-body .tok-fn { color: #d2a8ff; }
.terminal-body .tok-str { color: #a5d6ff; }
.terminal-body .tok-cm { color: #8b949e; font-style: italic; }
.terminal-body .tok-num { color: #79c0ff; }
.terminal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid #262c36;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #6ee7b7;
}
.terminal-status .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.18);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .terminal-status .pulse { animation: none; } }

/* ============================================================
   Career & Research Timeline chart
   ============================================================ */
.career-timeline-card {
  position: relative;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 24px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}
.career-timeline-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--accent-grad);
}
.career-timeline-head { margin-bottom: 30px; }
.career-timeline-title { font-size: 1.05rem; font-weight: 700; }
.career-timeline-sub { font-size: 0.8rem; color: var(--text-faint); margin-top: 3px; }

#career-timeline-chart { position: relative; }
.ct-axis { position: relative; height: 20px; margin-left: 118px; margin-bottom: 10px; }
.ct-axis-year {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  color: var(--text-faint);
}

.ct-gridlines { position: absolute; left: 118px; right: 0; top: 30px; bottom: 6px; pointer-events: none; }
.ct-gridline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); opacity: 0.7; }

.ct-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 48px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}
.ct-row:hover { background: color-mix(in srgb, var(--bg-elev-2) 55%, transparent); }
.ct-row-label { flex: none; width: 100px; font-size: 0.8rem; color: var(--text-dim); padding-left: 4px; }
.ct-track {
  position: relative;
  flex: 1 1 auto;
  height: 100%;
}

.ct-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 14px;
  border-radius: 7px;
  background: var(--accent-grad);
  opacity: 0.9;
  cursor: default;
  box-shadow: 0 2px 8px -2px rgba(208, 128, 63, 0.35);
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}
.ct-bar:hover, .ct-bar:focus-visible { opacity: 1; box-shadow: 0 4px 14px -3px rgba(208, 128, 63, 0.5); }

.ct-bar-label {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  color: var(--accent-text);
}

.ct-mark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--on-accent);
  cursor: default;
  border: 2px solid var(--bg-elev-1);
  box-shadow: 0 3px 10px -2px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.15s ease, filter 0.15s ease;
}
.ct-mark:hover, .ct-mark:focus-visible {
  box-shadow: 0 6px 16px -3px rgba(0, 0, 0, 0.45);
  filter: brightness(1.12);
}
.ct-mark-pub { background: var(--viz-pub); }
.ct-mark-cert { background: var(--viz-cert); }
.ct-mark-honor { background: var(--viz-talk); }

/* Shared crosshair — hovering/focusing any mark or bar draws a vertical guide through every row */
.ct-guideline-layer {
  position: absolute;
  left: 118px;
  right: 0;
  top: 26px;
  bottom: 0;
  pointer-events: none;
}
.ct-guideline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--accent-2);
  opacity: 0;
  transition: opacity 0.15s ease, left 0.08s ease;
}
.ct-guideline.show { opacity: 0.55; }

/* Entrance animation — bars grow in from the left, marks pop in, staggered via inline transition-delay */
.ct-bar.ct-animate {
  opacity: 0;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.ct-mark.ct-animate {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#career-timeline-chart.ct-in .ct-bar.ct-animate { opacity: 0.85; transform: translateY(-50%) scaleX(1); }
#career-timeline-chart.ct-in .ct-mark.ct-animate { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.ct-bar, .ct-mark { position: absolute; }
.ct-bar .ct-tooltip, .ct-mark .ct-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 0.76rem;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text-dim);
  white-space: normal;
  width: max-content;
  max-width: 280px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.ct-bar .ct-tooltip strong, .ct-mark .ct-tooltip strong { color: var(--text); }
.ct-bar:hover .ct-tooltip, .ct-bar:focus-visible .ct-tooltip,
.ct-mark:hover .ct-tooltip, .ct-mark:focus-visible .ct-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }

.career-timeline-legend { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.ctl-item { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--text-faint); }
.ctl-dot { width: 9px; height: 9px; border-radius: 50%; }
.ctl-roles { background: var(--accent-1); }
.ctl-pubs { background: var(--viz-pub); }
.ctl-certs { background: var(--viz-cert); }
.ctl-honors { background: var(--viz-talk); }

.ct-mobile { display: none; }
@media (max-width: 640px) {
  #career-timeline-chart, .career-timeline-legend, .ct-hint { display: none; }
  .career-timeline-head { margin-bottom: 18px; }
  .ct-mobile { display: block; position: relative; }
  .ct-mobile::before { content: ""; position: absolute; left: 22px; top: 14px; bottom: 14px; width: 2px; background: var(--border); }
}
.ctm-year { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 9px 0; }
.ctm-label {
  position: relative; z-index: 1;
  height: fit-content;
  padding: 3px 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  text-align: center;
  font: 700 0.76rem var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.ctm-body { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.ctm-role { display: flex; gap: 9px; align-items: baseline; font-size: 0.86rem; font-weight: 600; line-height: 1.4; }
.ctm-role .ctl-dot { flex: none; }
.ctm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ctm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  font-size: 0.76rem;
  color: var(--text-dim);
}
.ctm-chip b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ============================================================
   Experience timeline
   ============================================================ */
.timeline { position: relative; max-width: 880px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 24px; bottom: 24px;
  width: 2px;
  background: linear-gradient(var(--accent-2), var(--border) 30%);
  border-radius: 2px;
}
.timeline-item { position: relative; padding-left: 38px; margin-bottom: 18px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: 0; top: 26px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-2);
}
.timeline-item.is-current .timeline-dot { background: var(--accent-grad); border-color: transparent; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-2) 20%, transparent); }
.timeline-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.timeline-card:hover { border-color: color-mix(in srgb, var(--accent-2) 55%, var(--border)); box-shadow: var(--shadow); }
.timeline-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; justify-content: space-between; margin-bottom: 14px; }
.timeline-role { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.timeline-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font-size: 0.88rem; }
.timeline-company { color: var(--company-color); font-weight: 600; }
.timeline-loc { color: var(--text-faint); }
.timeline-loc::before { content: "·"; margin-right: 10px; }
.timeline-date {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 0.76rem; color: var(--text-faint); white-space: nowrap;
}
.now-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--live) 14%, transparent);
  color: var(--live);
  font-weight: 700;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.timeline-points { display: flex; flex-direction: column; gap: 8px; }
.timeline-points li { color: var(--text-dim); font-size: 0.93rem; padding-left: 18px; position: relative; }
.timeline-points li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent-2); opacity: 0.8; }
.tl-more {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  font: 600 0.84rem var(--font);
  color: var(--accent-link);
  cursor: pointer;
}
.tl-more::after { content: " \2193"; }
.tl-more[aria-expanded="true"]::after { content: " \2191"; }
.tl-more:hover { text-decoration: underline; }
@media (max-width: 640px) { .timeline-card { padding: 18px; } .timeline-item { padding-left: 30px; } }

/* ============================================================
   Projects
   ============================================================ */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.project-tag { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-text); }
.project-title { font-size: 1.1rem; font-weight: 700; margin: 10px 0 10px; }
.project-desc { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 16px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.project-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 16px; font-size: 0.85rem; color: var(--accent-link); font-weight: 600; }
.project-grid .card, .card-featured { display: flex; flex-direction: column; }
.project-card-body { display: flex; flex-direction: column; flex: 1; }
.project-card-body > .project-link { align-self: flex-start; }
.card-media .project-image { transition: transform 0.5s ease; }
.card-media:hover .project-image { transform: scale(1.03); }

/* Filters */
.project-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 0.82rem var(--font);
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent-2); }
.filter-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.filter-btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter-count { font-family: var(--font-mono); font-size: 0.7rem; opacity: 0.65; }

/* Featured (live) projects */
.project-featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 24px; margin-bottom: 24px; }
.card-featured { padding: 0; overflow: hidden; position: relative; }
.card-featured::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent-grad); }
.browser-frame {
  display: block;
  margin: 24px 24px 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: var(--bg-elev-2);
  box-shadow: 0 -6px 30px -14px rgba(208, 128, 63, 0.45);
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.browser-bar i:nth-child(1) { background: #f87171; }
.browser-bar i:nth-child(2) { background: #fbbf24; }
.browser-bar i:nth-child(3) { background: #34d399; }
.browser-url {
  flex: 1; min-width: 0; margin-left: 8px; padding: 3px 12px;
  border-radius: 999px; background: var(--bg-elev-1);
  font: 0.7rem var(--font-mono); color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-frame img { display: block; width: 100%; aspect-ratio: 900 / 388; object-fit: cover; object-position: top; transition: transform 0.6s ease; }
.card-featured:hover .browser-frame img { transform: scale(1.025); }
.card-featured .project-card-body { padding: 22px 26px 26px; border-top: 1px solid var(--border); }
.card-featured .project-title { font-size: 1.3rem; }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 0.7rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--live);
}
.live-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 var(--live);
  animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); }
  100% { box-shadow: 0 0 0 8px transparent; }
}
.card-featured .chip-row { margin-bottom: 22px; }
.card-featured .project-link {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: var(--on-accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-featured .project-link:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(208, 128, 63, 0.7); }
@media (prefers-reduced-motion: reduce) {
  .live-badge::before { animation: none; }
  .card-media:hover .project-image, .card-featured:hover .browser-frame img { transform: none; }
}

/* ============================================================
   Skills
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.skill-card { padding: 22px 24px; }
.skill-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.skill-card-icon {
  width: 30px; height: 30px;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--accent-text);
}
.skill-card-icon svg { width: 16px; height: 16px; }
.skill-card-title { font-weight: 700; font-size: 0.98rem; flex: 1; }
.skill-count {
  min-width: 28px; height: 24px; padding: 0 8px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  font: 600 0.72rem var(--font-mono);
  color: var(--text-dim);
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag { font-size: 0.8rem; padding: 5px 11px; border-radius: 8px; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text-dim); transition: color 0.15s ease; }
.skill-card:hover .skill-tag { color: var(--text); }

/* ============================================================
   Publications / Certifications lists
   ============================================================ */
.list-panel { display: flex; flex-direction: column; gap: 14px; max-width: 880px; }
.list-item {
  display: flex; justify-content: space-between; gap: 20px; align-items: flex-start;
  padding: 18px 22px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.list-item:hover { border-color: var(--accent-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.list-item-title { font-weight: 650; font-size: 0.96rem; margin-bottom: 4px; }
.list-item-sub { font-size: 0.83rem; color: var(--text-faint); }
.list-item-date { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.78rem; color: var(--text-faint); white-space: nowrap; }
.list-item-link { font-size: 0.8rem; color: var(--accent-link); font-weight: 600; white-space: nowrap; }

.pub-group-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 30px 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.pub-group-title:first-child { margin-top: 0; }
.pub-count { margin-left: 10px; padding: 1px 8px; border-radius: 999px; background: var(--bg-elev-2); border: 1px solid var(--border); font-size: 0.68rem; color: var(--text-dim); }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); max-width: none; }

/* ============================================================
   Published book highlight
   ============================================================ */
.book-card {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 880px;
  margin-bottom: 32px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--bg-elev-1);
  border: 1px solid transparent;
  background-image: linear-gradient(var(--bg-elev-1), var(--bg-elev-1)), var(--accent-grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.book-cover {
  height: auto;
  width: 88px;
  flex: none;
  border-radius: 6px;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
}
.book-body { flex: 1 1 auto; min-width: 0; }
.book-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-text);
}
.book-title-bn { font-size: 1.15rem; font-weight: 700; margin-top: 6px; }
.book-title-en { font-size: 0.85rem; color: var(--text-faint); margin-top: 2px; font-style: italic; }
.book-desc { font-size: 0.9rem; color: var(--text-dim); margin-top: 10px; max-width: 60ch; }
.book-meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.book-stars { color: #fbbf24; font-size: 0.95rem; letter-spacing: 1px; }
.book-rating-count { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint); }
.book-cta {
  flex: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-link);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .book-card { flex-direction: column; align-items: flex-start; text-align: left; }
  .book-cta { margin-top: 6px; }
}

/* ============================================================
   Academic / additional projects (compact grid)
   ============================================================ */
.mini-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.mini-project {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.mini-project:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.mini-project-title { font-weight: 650; font-size: 0.92rem; margin-bottom: 10px; }

.mini-project-media { padding: 0; overflow: hidden; }
.mini-project-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; display: block; background: var(--bg-elev-2); }
.mini-project-media .mini-project-body { padding: 16px 20px 20px; }
.mini-project-media .mini-project-title { margin-bottom: 10px; }

/* ============================================================
   Certificate badge gallery
   ============================================================ */
.cert-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.cert-badge {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.cert-badge:hover { border-color: var(--accent-2); transform: translateY(-3px); }
.cert-badge img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
  background: var(--bg-elev-2);
}
.cert-badge figcaption { font-size: 0.76rem; color: var(--text-faint); }

/* ============================================================
   Education
   ============================================================ */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.edu-card { display: flex; flex-direction: column; gap: 4px; }
.mini-item-title { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; margin-top: 6px; }
.mini-item-org { color: var(--text-dim); font-size: 0.9rem; }
.mini-item-meta { color: var(--text-faint); font-size: 0.76rem; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mini-item-detail { color: var(--text-faint); font-size: 0.84rem; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--border); }

/* ============================================================
   Show all / show fewer
   ============================================================ */
.show-more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.list-panel + .show-more-wrap { justify-content: flex-start; }
.show-more {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev-1);
  color: var(--text);
  font: 600 0.86rem var(--font);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.show-more::after { content: "\2193"; color: var(--accent-link); }
.show-more[aria-expanded="true"]::after { content: "\2191"; }
.show-more:hover { border-color: var(--accent-2); transform: translateY(-1px); }

/* ============================================================
   Talks, teaching & recognition
   ============================================================ */
.talk-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  margin-bottom: 20px;
  border-radius: 22px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-elev-1), var(--bg-elev-1)) padding-box,
    var(--accent-grad) border-box;
  overflow: hidden;
}
.talk-media { display: flex; flex-direction: column; gap: 20px; padding: 22px; background: var(--bg-elev-2); border-right: 1px solid var(--border); justify-content: center; }
.talk-media img { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 489; border-radius: 14px; box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.45); }
.talk-featured-body { padding: 30px 34px; display: flex; flex-direction: column; }
.talk-featured-title { font-size: clamp(1.25rem, 2.2vw, 1.55rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; margin-top: 14px; }
.talk-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.talk-stat { padding: 12px 16px; background: var(--bg-elev-1); display: flex; flex-direction: column; gap: 2px; }
.talk-stat + .talk-stat { border-left: 1px solid var(--border); }
.talk-stat-num { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.talk-stat-label { color: var(--text-dim); font-size: 0.78rem; }
@media (max-width: 860px) {
  .talk-featured { grid-template-columns: 1fr; }
  .talk-media { padding: 16px; gap: 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .talk-featured-body { padding: 24px 22px; }
}

.talk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.talk-card { display: flex; flex-direction: column; padding: 24px; }
.talk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.talk-type {
  --type-color: var(--accent-2);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px 4px 5px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--type-color) 40%, var(--border));
  background: color-mix(in srgb, var(--type-color) 10%, transparent);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
}
.talk-icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--type-color);
  color: var(--on-accent);
}
.talk-icon svg { width: 13px; height: 13px; }
.talk-teaching { --type-color: var(--accent-1); }
.talk-talk { --type-color: var(--accent-2); }
.talk-press { --type-color: var(--viz-pub); }
.talk-judge { --type-color: #fbbf24; }
.talk-milestone { --type-color: var(--viz-cert); }
.talk-date { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.76rem; color: var(--text-faint); }
.talk-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; margin-top: 16px; }
.talk-org { color: var(--company-color); font-size: 0.86rem; font-weight: 600; margin-top: 6px; }
.talk-desc { color: var(--text-dim); font-size: 0.92rem; margin-top: 12px; }
.talk-link { margin-top: auto; padding-top: 16px; align-self: flex-start; font-size: 0.86rem; font-weight: 600; color: var(--accent-link); }
.talk-link:hover { text-decoration: underline; }
.talk-featured .talk-link {
  margin-top: 22px; padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: var(--on-accent);
}
.talk-featured .talk-link:hover { text-decoration: none; box-shadow: 0 8px 20px -8px rgba(208, 128, 63, 0.7); }

/* ============================================================
   Contact
   ============================================================ */
.contact-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 56px;
  border-radius: 28px;
  border: 1px solid transparent;
  background:
    radial-gradient(600px 300px at 0% 0%, color-mix(in srgb, var(--accent-1) 12%, transparent), transparent 70%) padding-box,
    radial-gradient(500px 300px at 100% 100%, color-mix(in srgb, var(--accent-3) 14%, transparent), transparent 70%) padding-box,
    linear-gradient(var(--bg-elev-1), var(--bg-elev-1)) padding-box,
    var(--accent-grad) border-box;
}
.contact-panel .section-sub { margin-bottom: 28px; }
.contact-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.contact-links { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.contact-link {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 55%, var(--bg-elev-1));
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.contact-link:hover { border-color: var(--accent-2); transform: translateX(4px); }
.contact-icon {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--bg-elev-2);
  color: var(--text);
}
.contact-icon svg { width: 18px; height: 18px; }
.contact-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.contact-label { font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
.contact-value { font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-arrow { color: var(--text-faint); transition: color 0.15s ease; }
.contact-arrow svg { width: 16px; height: 16px; display: block; }
.contact-link:hover .contact-arrow { color: var(--accent-link); }
@media (max-width: 900px) { .contact-panel { grid-template-columns: 1fr; padding: 40px 28px; gap: 32px; } }
@media (max-width: 480px) { .contact-panel { padding: 32px 18px; border-radius: 22px; } }

/* ============================================================
   Footer
   ============================================================ */
footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--text-faint); font-size: 0.82rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* back to top */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ============================================================
   Alternating section bands
   ============================================================ */
.section-band {
  background: linear-gradient(180deg, transparent, var(--band) 140px, var(--band) calc(100% - 140px), transparent);
}

/* ============================================================
   Mouse-follow spotlight on cards
   ============================================================ */
.card, .timeline-card, .list-item, .talk-featured { position: relative; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card::after, .bento-tile::after, .timeline-card::after, .list-item::after, .talk-featured::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 60%);
  }
  .card:hover::after, .bento-tile:hover::after, .timeline-card:hover::after, .list-item:hover::after, .talk-featured:hover::after { opacity: 1; }
}

/* ============================================================
   Ambient motion (only when the visitor allows motion)
   ============================================================ */
@keyframes float-y { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes grad-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes border-shift { from { background-position: 0 0, 0% 50%; } to { background-position: 0 0, 100% 50%; } }
@keyframes contact-border-shift { from { background-position: 0 0, 0 0, 0 0, 0% 50%; } to { background-position: 0 0, 0 0, 0 0, 100% 50%; } }
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(3.2); opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .float-current { animation: float-y 6s ease-in-out infinite; }
  .float-pubs { animation: float-y 6s ease-in-out -3s infinite; }
  .hero h1 .grad { background-size: 200% 100%; animation: grad-shift 7s ease-in-out infinite alternate; }
  .card-featured::before { background-size: 200% 100%; animation: grad-shift 5s ease-in-out infinite alternate; }
  .talk-featured { background-size: 100% 100%, 300% 300%; animation: border-shift 6s ease-in-out infinite alternate; }
  .contact-panel { background-size: auto, auto, 100% 100%, 300% 300%; animation: contact-border-shift 7s ease-in-out infinite alternate; }
  .loc-pin::before { animation: ping 2.4s ease-out infinite; }
  .loc-pin::after { animation: ping 2.4s ease-out 1.2s infinite; }
}

/* ============================================================
   Display type + in-section subheadings
   ============================================================ */
.hero h1, .section-title, .contact-title, .talk-featured-title, .subsection-title, .stat-num, .fc-num, .talk-stat-num {
  font-family: var(--font-display);
}
.hero h1 { letter-spacing: -0.035em; }
.section-title, .contact-title { letter-spacing: -0.025em; }

.subsection-head { margin: 64px 0 22px; }
.subsection-title { font-size: clamp(1.3rem, 2.2vw, 1.6rem); font-weight: 700; letter-spacing: -0.02em; }
.subsection-sub { color: var(--text-dim); margin-top: 6px; max-width: 640px; }

/* ============================================================
   Company logos (always on a white tile so dark logos stay legible)
   ============================================================ */
.logo-tile {
  display: grid;
  place-items: center;
  flex: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.logo-tile img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.proof-company { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.88rem; letter-spacing: -0.01em; color: var(--text-dim); }
.proof-mark { width: 30px; height: 30px; padding: 3px; border-radius: 8px; transition: transform 0.2s ease; }
.proof-company:hover .proof-mark { transform: translateY(-2px); }
.proof-logos { gap: 10px 18px; }

.fc-logo { width: 40px; height: 40px; padding: 5px; border-radius: 11px; }
.bento-corner-logo { position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; padding: 6px; }

.timeline-title { display: flex; align-items: flex-start; gap: 14px; }
.tl-logo { width: 48px; height: 48px; padding: 6px; }
@media (max-width: 640px) { .tl-logo { width: 40px; height: 40px; padding: 5px; } .timeline-title { gap: 12px; } }

/* With an odd number of live products, the first (newest) one spans the full row, image beside text. */
@media (min-width: 900px) {
  .project-featured > .card-featured:first-child:nth-last-child(odd):not(:only-child) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
  }
  .project-featured > .card-featured:first-child:nth-last-child(odd):not(:only-child) .browser-frame {
    margin: 24px 0 24px 24px;
    border-bottom: 1px solid var(--border);
    border-radius: 10px;
  }
  .project-featured > .card-featured:first-child:nth-last-child(odd):not(:only-child) .project-card-body {
    border-top: 0;
    padding: 28px 32px;
  }
  .project-featured > .card-featured:first-child:nth-last-child(odd):not(:only-child) .project-title { font-size: 1.5rem; }
}

/* Brand motto (matches the LinkedIn cover) */
.hero-motto {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-text);
  margin-bottom: 14px;
}
.hero-motto::before { content: ""; width: 34px; height: 3px; border-radius: 2px; background: var(--accent-3); }
