:root {
  --bg: #0b0b10;
  --bg-2: #11121a;
  --text: #eef0f6;
  --muted: #9aa0b4;
  --muted-2: #6b7088;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --card: #14151f;
  --card-hover: #181a26;
  --border: #1f2030;
  --border-strong: #2a2c40;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(34, 211, 238, 0.13), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--text); text-decoration: underline; }
.container { max-width: 920px; margin: 0 auto; padding: 28px 24px 80px; }

/* ===== Nav ===== */
header.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 32px;
  position: relative;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: 0.2px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #0b0b10; font-weight: 800;
}

/* Hamburger toggle button (always shown) */
.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
}
.nav-toggle:hover { border-color: var(--accent); background: var(--card-hover); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-toggle .nav-toggle-icon {
  display: inline-grid; gap: 3px;
}
.nav-toggle .nav-toggle-icon span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Collapsing dropdown panel */
nav.links {
  position: absolute;
  top: calc(100% - 24px);
  right: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 8px;
  display: none;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  z-index: 100;
}
nav.links.open { display: flex; }
nav.links a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
nav.links a:hover, nav.links a:focus-visible {
  color: var(--text);
  background: var(--card-hover);
  text-decoration: none;
  outline: none;
}
nav.links a.active { color: var(--text); background: rgba(124, 92, 255, 0.12); }

/* ===== Now Playing pill ===== */
.now-playing {
  display: none;            /* shown by JS when playing */
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 14px 6px 8px;
  margin-bottom: 18px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
  width: fit-content;
}
.now-playing:hover {
  border-color: #1db954;
  background: var(--card-hover);
  transform: translateY(-1px);
  text-decoration: none;
}
.now-playing.visible { display: inline-flex; }
.np-art {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-2);
}
.np-text {
  display: flex; flex-direction: column;
  gap: 0; min-width: 0; max-width: 280px;
  line-height: 1.2;
}
.np-label {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #1db954;
  display: inline-flex; align-items: center; gap: 5px;
}
.np-label .np-bars {
  display: inline-flex; align-items: end; gap: 1.5px;
  height: 9px;
}
.np-label .np-bars span {
  display: block; width: 2px;
  background: #1db954;
  border-radius: 1px;
  animation: npbar 1s ease-in-out infinite;
}
.np-label .np-bars span:nth-child(1) { height: 30%; animation-delay: 0s; }
.np-label .np-bars span:nth-child(2) { height: 70%; animation-delay: 0.2s; }
.np-label .np-bars span:nth-child(3) { height: 50%; animation-delay: 0.4s; }
@keyframes npbar {
  0%, 100% { transform: scaleY(0.55); }
  50%      { transform: scaleY(1); }
}
.np-song {
  font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 0.86rem;
}
.np-song .np-artist { color: var(--muted); font-weight: 400; }

/* ===== Hero ===== */
section.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
/* Mobile: avatar first (above), then text */
section.hero .avatar-wrap { order: 1; }
section.hero .hero-text { order: 2; }
@media (min-width: 720px) {
  section.hero {
    grid-template-columns: 1fr auto;
    gap: 40px;
  }
  /* Desktop: text on the left, avatar on the right */
  section.hero .hero-text { order: 1; }
  section.hero .avatar-wrap { order: 2; }
}
.avatar-wrap {
  position: relative;
  width: clamp(160px, 28vw, 220px);
  aspect-ratio: 1 / 1;
  justify-self: center;
}
.avatar-wrap::before {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: blur(18px); opacity: 0.45;
  z-index: 0;
}
.avatar-wrap::after {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  z-index: 1;
}
.avatar {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: block;
}
section.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.05; margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.hero .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .eyebrow {
  color: var(--accent-2); font-size: 0.95rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 14px;
}
.hero .tagline {
  color: var(--text); font-size: 1.15rem; margin: 16px 0 10px; max-width: 60ch;
  font-weight: 500;
}
.hero .lead {
  color: var(--muted); font-size: 1rem; max-width: 64ch; margin: 0 0 28px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.social-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
}
.social-btn {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--border-strong);
  background: var(--card);
  border-radius: 50%;
  color: var(--muted);
  transition: transform 0.08s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}
.social-btn:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  color: var(--text);
  transform: translateY(-2px);
  text-decoration: none;
}
.social-btn svg { width: 18px; height: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--card);
  color: var(--text); font-weight: 500; font-size: 0.95rem;
  transition: transform 0.08s ease, border-color 0.2s ease, background 0.2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #5a3df0);
  border-color: transparent;
}
.btn.primary:hover { border-color: transparent; filter: brightness(1.08); }
.btn svg { width: 16px; height: 16px; }

/* ===== Section titles ===== */
h2.section-title {
  margin: 72px 0 18px; font-size: 0.85rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em;
  font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
h2.section-title::before {
  content: ""; width: 24px; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ===== Cards ===== */
.card {
  border: 1px solid var(--border); background: var(--card);
  border-radius: 14px; padding: 22px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
}
.card:hover { border-color: var(--border-strong); background: var(--card-hover); }
.stack { display: grid; gap: 14px; }
.grid-2 { display: grid; gap: 14px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ===== Experience / Research items ===== */
.item-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  align-items: baseline; margin-bottom: 4px;
}
.item-title { font-weight: 600; font-size: 1.05rem; color: var(--text); margin: 0; }
.item-org { color: var(--accent-2); font-weight: 500; }
a.item-org { text-decoration: none; }
a.item-org:hover { text-decoration: underline; color: var(--text); }
.item-meta { color: var(--muted-2); font-size: 0.88rem; white-space: nowrap; }
.item-context {
  color: var(--muted); font-size: 0.92rem; font-style: italic;
  margin: 2px 0 12px;
}
.item ul {
  margin: 0; padding-left: 18px;
  color: var(--muted); font-size: 0.95rem;
}
.item ul li { margin-bottom: 6px; }
.item ul li::marker { color: var(--accent); }

/* Collapsible item via <details>/<summary> */
details.item summary {
  list-style: none;
  cursor: pointer;
  padding: 4px 0;
  position: relative;
  padding-right: 28px;
}
details.item summary::-webkit-details-marker { display: none; }
details.item summary::after {
  content: "";
  position: absolute;
  right: 4px; top: 14px;
  width: 8px; height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
details.item[open] summary::after {
  transform: rotate(-135deg);
  top: 18px;
  border-color: var(--accent-2);
}
details.item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}
details.item > .item-context,
details.item > ul {
  margin-top: 10px;
}
.expand-all {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 0.82rem; font-weight: 500;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  margin-bottom: 14px;
}
.expand-all:hover { color: var(--text); border-color: var(--accent); background: var(--card); }

/* ===== About on resume (centered, no card) ===== */
.about-centered {
  max-width: 64ch;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ===== Gallery (horizontal scroll of images) ===== */
.gallery {
  display: flex; flex-direction: row;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -24px;
  padding: 4px 24px 12px;
  scroll-padding-left: 24px;
}
.gallery::-webkit-scrollbar { display: none; }
@media (min-width: 720px) {
  .gallery { margin: 0; padding: 4px 0 12px; }
}
.gallery-item {
  flex: 0 0 280px;
  scroll-snap-align: start;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  display: grid; place-items: center;
  transition: border-color 0.15s, transform 0.1s;
}
.gallery-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item .gallery-placeholder {
  color: var(--muted-2);
  font-size: 0.78rem;
  text-align: center;
  padding: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gallery-item .gallery-placeholder svg {
  width: 36px; height: 36px;
  display: block; margin: 0 auto 8px;
  opacity: 0.4;
}
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.72), transparent);
  color: var(--text);
  font-size: 0.85rem; font-weight: 500;
}

/* ===== Publications CTA button (replaces inline list on resume) ===== */
.pub-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.pub-cta:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-1px);
}
.pub-cta-text { display: flex; flex-direction: column; gap: 4px; }
.pub-cta-title { font-weight: 600; font-size: 1rem; color: var(--text); }
.pub-cta-sub { color: var(--muted); font-size: 0.88rem; }
.pub-cta-arrow {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: #0b0b10;
  flex-shrink: 0;
}
.pub-cta-arrow svg { width: 14px; height: 14px; }

/* ===== Publications ===== */
.pub { padding: 18px 22px; }
.pub .tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; padding: 3px 8px; border-radius: 6px;
  background: rgba(124, 92, 255, 0.15); color: #b9a8ff;
  margin-bottom: 8px;
}
.pub .tag.coauthor { background: rgba(34, 211, 238, 0.12); color: #8fe6f1; }
.pub .title { font-weight: 600; color: var(--text); margin: 0 0 6px; }
.pub .authors { color: var(--muted); font-size: 0.9rem; margin: 0 0 4px; }
.pub .venue { color: var(--muted-2); font-size: 0.85rem; margin: 0; }

/* ===== Skills ===== */
.skill-group { margin-bottom: 14px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group h4 {
  margin: 0 0 8px; font-size: 0.8rem; font-weight: 600;
  color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.08em;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; padding: 4px 10px; font-size: 0.85rem;
  border: 1px solid var(--border-strong); border-radius: 999px;
  color: var(--muted); background: rgba(255,255,255,0.02);
}

/* ===== Wallet buttons (Apple Wallet + Google Wallet) ===== */
.wallet-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 18px;
  align-items: center;
}
.wallet-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  transition: transform 0.08s ease, opacity 0.15s ease;
  border: 1px solid transparent;
}
.wallet-btn:hover { transform: translateY(-1px); text-decoration: none; }
.wallet-btn:active { transform: translateY(0); }
.wallet-btn.apple {
  background: #000;
  color: #fff;
  border-color: #2a2c40;
}
.wallet-btn.apple:hover { background: #1a1a1a; }
.wallet-btn.google {
  background: #fff;
  color: #1f1f1f;
  border-color: #dadce0;
}
.wallet-btn.google:hover { background: #f8f9fa; }
.wallet-btn svg {
  width: 22px; height: 22px;
  flex-shrink: 0;
}
.wallet-btn .wallet-label {
  display: inline-flex; flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}
.wallet-btn .wallet-label small {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin-bottom: 1px;
}
.wallet-btn .wallet-label strong {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wallet-fallback-note {
  color: var(--muted-2);
  font-size: 0.78rem;
  margin: 4px 0 0;
}

/* ===== Business cards ===== */
/* Mobile: horizontal scroll-snap row that bleeds to the screen edge */
.bcards {
  display: flex;
  flex-direction: row;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Bleed to the viewport edge so the next card peeks past the gutter */
  margin: 0 -24px;
  padding: 4px 24px 12px;
  scroll-padding-left: 24px;
}
.bcards::-webkit-scrollbar { display: none; }
/* Desktop: switch back to a clean 3-column grid */
@media (min-width: 720px) {
  .bcards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}
.bcard {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); background: var(--card);
  border-radius: 14px; padding: 22px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
  /* Mobile horizontal-scroll sizing */
  flex: 0 0 80%;
  max-width: 320px;
  scroll-snap-align: start;
  min-width: 0;
}
@media (min-width: 720px) {
  .bcard { flex: initial; max-width: none; }
}
.bcard:hover { border-color: var(--border-strong); background: var(--card-hover); transform: translateY(-2px); }
.bcard::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--bcard-accent, var(--accent));
}
.bcard .bcard-role {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bcard-accent, var(--accent));
  margin-bottom: 10px;
}
.bcard .bcard-org { font-weight: 600; font-size: 1.1rem; margin: 0 0 6px; color: var(--text); }
.bcard .bcard-desc { color: var(--muted); font-size: 0.92rem; margin: 0 0 18px; flex-grow: 1; }
.bcard .bcard-cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--bcard-accent, var(--accent-2));
  font-size: 0.92rem; font-weight: 500;
  text-decoration: none; align-self: flex-start;
}
.bcard .bcard-cta:hover { text-decoration: underline; }
.bcard .bcard-cta svg { width: 14px; height: 14px; }

/* ===== Featured Video ===== */
.video-feature {
  display: grid;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.video-feature:hover { border-color: var(--border-strong); background: var(--card-hover); }
.video-feature::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  opacity: 0.8;
}
@media (min-width: 720px) {
  .video-feature { grid-template-columns: auto 1fr; gap: 28px; }
}
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-meta h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.video-meta .video-pub {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #f97316;
  margin: 0 0 10px;
}
.video-meta p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== Featured Podcast ===== */
.podcast-feature {
  display: grid;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.podcast-feature:hover { border-color: var(--border-strong); background: var(--card-hover); }
.podcast-feature::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #a78bfa, #ec4899);
  opacity: 0.85;
}
@media (min-width: 720px) {
  .podcast-feature { grid-template-columns: auto 1fr; gap: 28px; }
}
.podcast-cover {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 55%),
    linear-gradient(135deg, #6d28d9 0%, #ec4899 100%);
  display: grid; place-items: center;
  color: white;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  position: relative; overflow: hidden;
}
.podcast-cover::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  pointer-events: none;
}
.podcast-cover svg {
  width: 64px; height: 64px;
  opacity: 0.96;
  margin-top: -18px;
}
.podcast-cover-name {
  position: absolute; bottom: 16px; left: 0; right: 0;
  text-align: center;
  font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}
.podcast-meta .podcast-pub {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #c084fc;
  margin: 0 0 8px;
}
.podcast-meta h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.podcast-meta .podcast-details {
  color: var(--muted-2); font-size: 0.85rem;
  margin: 0 0 14px;
}
.podcast-meta p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}
.podcast-listen {
  display: flex; flex-wrap: wrap; gap: 8px;
}

/* ===== Press / Featured In ===== */
.press-stack { display: grid; gap: 14px; }
.press-group {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 18px 22px 14px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s ease;
}
.press-group::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--press-accent, var(--accent));
  opacity: 0.7;
}
.press-group:hover { border-color: var(--border-strong); }
.press-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.press-group-label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--press-accent, var(--accent));
}
.press-group-context {
  font-size: 0.82rem; color: var(--muted-2);
}

/* Horizontal scrolling strip of logo tiles */
.press-strip {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Bleed to the inner edges of the group card so the next tile peeks */
  margin: 0 -22px;
  padding: 2px 22px 6px;
  scroll-padding-left: 22px;
}
.press-strip::-webkit-scrollbar { display: none; }

.press-tile {
  flex: 0 0 200px;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  min-width: 0;
}
.press-tile:hover {
  border-color: var(--press-accent, var(--accent));
  background: var(--card-hover);
  transform: translateY(-2px);
  text-decoration: none;
}
.press-logo {
  width: 56px; height: 56px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  display: grid; place-items: center;
  padding: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.press-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.press-tile-pub {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.25;
}
.press-tile-title {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Contact ===== */
.contact-row {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.contact-row .btn { flex: 1 1 200px; justify-content: center; }

/* ===== GitHub Activity ===== */
.gh-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.gh-card:hover { border-color: var(--border-strong); background: var(--card-hover); }
.gh-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #22d3ee, #7c5cff);
  opacity: 0.7;
}
.gh-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 14px;
}
.gh-head .gh-title {
  font-weight: 600; color: var(--text);
}
.gh-head .gh-link {
  color: var(--accent-2); font-size: 0.9rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.gh-head .gh-link svg { width: 14px; height: 14px; }
.gh-chart {
  /* Horizontal scroll on narrow screens because the graph is wide */
  width: 100%; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}
.gh-chart img {
  display: block;
  min-width: 720px;     /* keeps the chart readable; user can scroll on small screens */
  width: 100%;
  height: auto;
}
.gh-foot {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 0.78rem;
}

/* ===== Testimonials / Reviews ===== */
.reviews-stack { display: grid; gap: 14px; }
.review {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 24px 22px 20px;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.review:hover { border-color: var(--border-strong); background: var(--card-hover); }
.review-quote {
  position: absolute;
  top: 10px; left: 18px;
  font-size: 3rem; line-height: 1;
  color: var(--accent);
  opacity: 0.25;
  font-family: Georgia, serif;
}
.review-body {
  margin: 14px 0 16px;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.6;
  white-space: pre-line;
}
.review-attr {
  display: flex; flex-direction: column; gap: 3px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.review-name { font-weight: 600; color: var(--text); font-size: 0.95rem; }
.review-meta { color: var(--muted); font-size: 0.85rem; }
.review-connection {
  color: var(--accent-2); font-size: 0.78rem;
  margin-top: 4px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
}

.reviews-empty {
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.review-form-wrap {
  margin-top: 18px;
}
.review-form {
  display: none;
  margin-top: 14px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
}
.review-form.open { display: block; }
.review-form .field {
  margin-bottom: 14px;
}
.review-form label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.review-form input[type="text"],
.review-form textarea {
  width: 100%; padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.review-form input[type="text"]:focus,
.review-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.review-form textarea { resize: vertical; min-height: 110px; }
.review-form .help {
  font-size: 0.78rem; color: var(--muted-2); margin: 4px 0 0;
}
.review-form .field-row { display: grid; gap: 12px; }
@media (min-width: 560px) {
  .review-form .field-row.cols-2 { grid-template-columns: 1fr 1fr; }
}
.review-form .radio-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 4px;
}
.review-form .radio-row label {
  flex: 1 1 auto;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
  margin: 0;
  transition: background 0.15s ease, color 0.15s ease;
  font-size: 0.9rem;
}
.review-form .radio-row label:has(input:checked) {
  background: var(--accent);
  color: white;
}
.review-form .radio-row input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.review-form .name-fields {
  display: none;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
  margin-top: 16px;
}
.review-form .name-fields.shown { display: block; }
.review-form-actions {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 18px;
}
.review-form-note {
  font-size: 0.8rem; color: var(--muted-2);
  margin: 12px 0 0;
}
.review-form-note strong { color: var(--text); }
.review-success {
  display: none;
  margin-top: 14px;
  padding: 18px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 12px;
  color: var(--accent-2);
  font-size: 0.95rem;
}
.review-success.shown { display: block; }
/* Honeypot — hidden from humans, bots fill it */
.review-form .hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}

/* ===== Publication detail page ===== */
.pub-detail-head {
  margin-bottom: 24px;
}
.pub-detail-head .tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; padding: 3px 8px; border-radius: 6px;
  background: rgba(124, 92, 255, 0.15); color: #b9a8ff;
  margin-bottom: 12px;
}
.pub-detail-head .tag.coauthor { background: rgba(34, 211, 238, 0.12); color: #8fe6f1; }
.pub-detail-head h1 {
  font-size: clamp(1.6rem, 3.8vw, 2.2rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 10px;
}
.pub-detail-head .authors { color: var(--muted); font-size: 0.95rem; margin: 0 0 6px; }
.pub-detail-head .venue   { color: var(--muted-2); font-size: 0.85rem; margin: 0; }

.pub-poster {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 22px;
}
.pub-poster img {
  width: 100%; height: auto; display: block;
  border-radius: 10px;
}
.pub-poster .poster-placeholder {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 2px dashed var(--border-strong);
  display: grid; place-items: center; text-align: center;
  color: var(--muted-2); font-size: 0.85rem; padding: 24px;
}
.pub-poster .poster-placeholder svg { width: 48px; height: 48px; opacity: 0.4; margin-bottom: 12px; display: block; margin-left: auto; margin-right: auto; }
.pub-poster .poster-placeholder code {
  background: rgba(124,92,255,0.12); color: var(--accent-2);
  padding: 2px 6px; border-radius: 4px; font-size: 0.78rem;
}

.pub-abstract {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
}
.pub-abstract h2 {
  margin: 0 0 12px;
  font-size: 0.85rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.14em;
  font-weight: 600;
}
.pub-abstract p {
  color: var(--muted); margin: 0 0 12px; font-size: 0.95rem; line-height: 1.65;
}
.pub-abstract p:last-child { margin-bottom: 0; }
.pub-abstract-placeholder {
  color: var(--muted-2); font-style: italic;
  text-align: center; padding: 14px 0;
}
.pub-abstract-placeholder code {
  background: rgba(124,92,255,0.12); color: var(--accent-2);
  padding: 2px 6px; border-radius: 4px; font-size: 0.82rem; font-style: normal;
}

/* ===== Page header (used on subpages like /resume) ===== */
.page-header {
  margin: 0 0 12px;
}
.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 8px 0 6px;
}
.page-header .lead {
  color: var(--muted); font-size: 1rem; margin: 0; max-width: 60ch;
}
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 0.9rem; margin-bottom: 8px;
}
.back-link:hover { color: var(--text); text-decoration: none; }
.back-link svg { width: 14px; height: 14px; }

/* ===== Eats / Restaurants map ===== */
.eats-intro {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 0.98rem;
  max-width: 64ch;
}
.eats-map-wrap {
  position: relative;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
}
.eats-map-wrap::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  z-index: 500;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.85;
  pointer-events: none;
}
#eats-map {
  width: 100%;
  height: clamp(420px, 70vh, 700px);
  background: #0b0b10;
}
/* Leaflet overrides for dark theme */
.leaflet-container {
  background: var(--bg) !important;
  font-family: inherit !important;
}
.leaflet-control-attribution {
  background: rgba(11, 11, 16, 0.7) !important;
  color: var(--muted-2) !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
}
.leaflet-control-attribution a {
  color: var(--accent-2) !important;
}
.leaflet-bar {
  background: var(--card) !important;
  border: 1px solid var(--border-strong) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}
.leaflet-bar a {
  background: var(--card) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
  transition: background 0.15s ease;
}
.leaflet-bar a:hover { background: var(--card-hover) !important; }
/* Custom marker pin */
.eats-pin {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 2px solid var(--bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.45), 0 0 0 6px rgba(124,92,255,0.18);
  display: grid; place-items: center;
  color: #0b0b10;
  font-weight: 700; font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.eats-pin:hover { transform: scale(1.12); }
/* Leaflet popup styled to match */
.leaflet-popup-content-wrapper {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-content {
  margin: 14px 16px !important;
  min-width: 220px; max-width: 280px;
  font-size: 0.9rem !important;
  line-height: 1.45;
}
.leaflet-popup-tip {
  background: var(--card) !important;
  box-shadow: none !important;
}
.leaflet-popup-close-button {
  color: var(--muted) !important;
  padding: 6px 8px !important;
}
.leaflet-popup-close-button:hover { color: var(--text) !important; }
.eats-popup-tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(34,211,238,0.1);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.eats-popup-name {
  font-weight: 700; font-size: 1rem;
  color: var(--text); margin: 0 0 4px;
}
.eats-popup-addr {
  color: var(--muted-2); font-size: 0.78rem;
  margin: 0 0 8px;
}
.eats-popup-note {
  color: var(--muted); font-size: 0.88rem;
  margin: 0 0 10px;
}
.eats-popup-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent-2);
  font-size: 0.82rem; font-weight: 500;
}
.eats-popup-link svg { width: 12px; height: 12px; }

/* List below the map */
.eats-list {
  display: grid; gap: 12px;
  margin-top: 24px;
}
@media (min-width: 640px) { .eats-list { grid-template-columns: 1fr 1fr; } }
.eats-list-item {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-decoration: none;
  color: var(--text);
}
.eats-list-item:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  text-decoration: none;
}
.eats-list-tag {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 4px;
}
.eats-list-name { font-weight: 600; font-size: 1rem; margin: 0 0 4px; }
.eats-list-note { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ===== Footer ===== */
footer {
  margin-top: 72px; padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted-2); font-size: 0.88rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
