/* ==========================================================================
   Hareesh Ravi — Editorial Atelier Design System
   Fluid full-width responsive layout · Light default + Dark mode toggle
   ========================================================================== */

:root {
  /* Fluid container — scales cleanly with window width */
  --container-width: min(92vw, 1340px);
  --nav-height: 68px;

  /* Typography */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Warm Alabaster Light Palette */
  --bg: #FAF9F6;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #F3F1EC;
  --bg-media: #F5F3EE;
  --bg-nav: rgba(250, 249, 246, 0.84);
  --bg-hero-glow-1: rgba(200, 62, 43, 0.085);
  --bg-hero-glow-2: rgba(37, 99, 235, 0.06);

  --text-primary: #111827;
  --text-secondary: #475569;
  --text-muted: #64748B;

  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);

  --accent: #C83E2B;
  --accent-hover: #A83020;
  --accent-soft: rgba(200, 62, 43, 0.09);
  --accent-border: rgba(200, 62, 43, 0.24);

  --blue: #1D4ED8;
  --blue-soft: rgba(29, 78, 216, 0.08);
  --green: #0F766E;
  --green-soft: rgba(15, 118, 110, 0.09);
  --amber: #B45309;
  --amber-soft: rgba(180, 83, 9, 0.11);

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0B0E14;
  --bg-elevated: #121722;
  --bg-subtle: #181F2E;
  --bg-media: #161C29;
  --bg-nav: rgba(11, 14, 20, 0.84);
  --bg-hero-glow-1: rgba(242, 103, 74, 0.12);
  --bg-hero-glow-2: rgba(96, 165, 250, 0.08);

  --text-primary: #F1F5F9;
  --text-secondary: #B6C2D2;
  --text-muted: #8494AA;

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  --accent: #F2674A;
  --accent-hover: #FF8268;
  --accent-soft: rgba(242, 103, 74, 0.14);
  --accent-border: rgba(242, 103, 74, 0.34);

  --blue: #60A5FA;
  --blue-soft: rgba(96, 165, 250, 0.14);
  --green: #2DD4BF;
  --green-soft: rgba(45, 212, 191, 0.14);
  --amber: #FBBF24;
  --amber-soft: rgba(251, 191, 36, 0.14);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.55);
}

/* ---------- Base Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 68% 48% at 12% -6%, var(--bg-hero-glow-1), transparent 65%),
    radial-gradient(ellipse 56% 42% at 92% 4%, var(--bg-hero-glow-2), transparent 62%);
  background-repeat: no-repeat;
  transition: background-color var(--transition), color var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: var(--container-width);
  margin-inline: auto;
}

/* ---------- Sticky Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--text-primary);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(200, 62, 43, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: var(--radius-full);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.mobile-menu-btn {
  display: none;
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 auto 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 22px;
  box-shadow: var(--shadow-md);
  z-index: 49;
  flex-direction: column;
  gap: 6px;
}

.mobile-drawer.open {
  display: flex;
}

.mobile-drawer .nav-link {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

/* ---------- Sections ---------- */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.section-hero {
  border-top: none;
  padding: 56px 0 48px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 32px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 3vw, 2.55rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 66ch;
}

/* ---------- Hero ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 5.2vw, 4.35rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: var(--text-primary);
}

.hero-tagline {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.hero-bio {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 1.01rem;
  line-height: 1.72;
  max-width: 72ch;
}

.hero-bio p {
  margin: 0;
}

.hero-bio a {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

.hero-bio a:hover {
  text-decoration-color: var(--accent);
}

.social-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}

.social-pill svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.social-pill:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.social-pill:hover svg {
  color: var(--accent);
}

.social-pill.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.social-pill.primary svg {
  color: #FFFFFF;
}

.social-pill.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #FFFFFF;
}

/* Portrait Card */
.portrait-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-md);
  max-width: 410px;
  width: 100%;
  justify-self: end;
}

.portrait-frame {
  border-radius: 13px;
  overflow: hidden;
  aspect-ratio: 4 / 4.25;
  background: var(--bg-media);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.portrait-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px 2px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.portrait-meta strong {
  color: var(--text-primary);
  font-weight: 600;
}

.portrait-loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ---------- News Strip ---------- */
.news-strip {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.news-strip-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.news-strip-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0;
}

.news-strip-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 4px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.news-row {
  display: grid;
  grid-template-columns: 82px 86px minmax(0, 1fr);
  gap: 10px 16px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.news-row:first-child {
  border-top: none;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-tag {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
}

.news-text {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.56;
  color: var(--text-secondary);
}

.news-text strong {
  color: var(--text-primary);
}

/* ---------- Projects List (Reverse Chronological) ---------- */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(290px, 0.78fr) minmax(0, 1.22fr);
  align-items: stretch;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.project-media {
  position: relative;
  background: var(--bg-media);
  border-right: 1px solid var(--border);
  padding: 18px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: auto;
  max-height: 270px;
  object-fit: contain;
  border-radius: 10px;
  transition: transform 280ms ease;
}

.project-media:hover img {
  transform: scale(1.02);
}

.zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(6px);
}

.project-media:hover .zoom-hint,
.pub-media:hover .zoom-hint {
  opacity: 1;
}

.project-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.year-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
}

.project-subtitle {
  margin: -6px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
}

.project-summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.project-highlights {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-highlights li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.project-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.link-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.81rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.pill-link:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.pill-link svg {
  width: 13px;
  height: 13px;
}

/* ---------- Publications ---------- */
.pub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.filter-btn.active {
  background: var(--text-primary);
  color: var(--bg);
  border-color: var(--text-primary);
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  opacity: 0.75;
}

.pub-search-wrap {
  position: relative;
  min-width: 240px;
  flex: 0 1 310px;
}

.pub-search-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.pub-search {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pub-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pub-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.pub-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.pub-card.no-media {
  grid-template-columns: 1fr;
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
}

.pub-card.hidden {
  display: none;
}

.pub-media {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  overflow: hidden;
}

.pub-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pub-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.pub-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.venue-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.award-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--amber-soft);
  color: var(--amber);
}

.pub-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.pub-authors {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.pub-authors a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
}

.pub-authors a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent-border);
}

.author-self {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-primary);
  transition: all var(--transition);
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn.pdf {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}
.action-btn.pdf:hover {
  background: var(--accent);
  color: #FFFFFF;
}

.action-btn.code {
  background: var(--blue-soft);
  border-color: rgba(29, 78, 216, 0.24);
  color: var(--blue);
}
.action-btn.code:hover {
  background: var(--blue);
  color: #FFFFFF;
}

.action-btn.arxiv,
.action-btn.openreview,
.action-btn.project {
  background: var(--green-soft);
  border-color: rgba(15, 118, 110, 0.24);
  color: var(--green);
}
.action-btn.arxiv:hover,
.action-btn.openreview:hover,
.action-btn.project:hover {
  background: var(--green);
  color: #FFFFFF;
}

.action-btn.bibtex:hover {
  background: var(--text-primary);
  color: var(--bg);
  border-color: var(--text-primary);
}

.action-btn.tbd {
  background: var(--bg-subtle);
  border-style: dashed;
  border-color: var(--border-strong);
  color: var(--text-muted);
  cursor: default;
}
.action-btn.tbd:hover {
  transform: none;
}

.pub-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

/* ---------- Experience & Education ---------- */
.experience-list,
.education-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exp-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.exp-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.exp-card.current {
  border-color: var(--accent-border);
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 45%),
    var(--bg-elevated);
}

.org-logo-tile {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.1);
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
  overflow: hidden;
}

.org-logo-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.org-logo-tile svg {
  width: 40px;
  height: 40px;
}

.exp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.exp-role {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.exp-org-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 0.92rem;
}

.exp-org {
  font-weight: 600;
  color: var(--accent);
}

.exp-loc {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.exp-summary {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.exp-advisors {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.exp-advisors a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 2px;
}

.exp-advisors a:hover {
  color: var(--accent);
}

.subsection-heading {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 36px 0 16px;
}

/* ---------- Internships & Mentoring ---------- */
.hiring-callout {
  margin-top: 34px;
  background:
    linear-gradient(125deg, var(--accent-soft), transparent 55%),
    var(--bg-elevated);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
}

.hiring-copy {
  flex: 1 1 460px;
}

.hiring-callout h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hiring-callout p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--text-secondary);
  max-width: 78ch;
}

.hiring-callout p a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

.hiring-callout p a:hover {
  text-decoration-color: var(--accent);
}

.hiring-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intern-cohorts {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.intern-year-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  box-shadow: var(--shadow-xs);
}

.intern-year-header {
  margin-bottom: 6px;
}

.intern-year-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.intern-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.intern-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1.15fr);
  gap: 10px 28px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.intern-row:first-child {
  border-top: none;
}

.intern-person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  text-align: left;
  overflow-wrap: break-word;
}

.intern-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.intern-name:hover {
  color: var(--accent);
}

.intern-affil {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.intern-topic {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  min-width: 0;
  text-align: left;
  overflow-wrap: break-word;
}

.intern-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  text-align: left;
}

.intern-paper-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 5px 11px;
  border-radius: 10px;
  background: var(--green-soft);
  border: 1px solid rgba(45, 212, 191, 0.28);
  color: var(--green);
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

.intern-paper-link:hover {
  background: var(--green);
  color: #0B0E14;
  border-color: var(--green);
}

.intern-paper-link svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.intern-status {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 5px 11px;
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--amber);
  text-align: left;
}

.intern-outcome {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 5px 11px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  text-align: left;
}

/* ---------- Teaching & Service ---------- */
.service-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-xs);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  margin: 0 0 18px;
  color: var(--text-primary);
}

.teaching-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.teaching-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}

.teaching-item:first-child {
  border-top: none;
  padding-top: 0;
}

.teaching-course {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text-primary);
}

.teaching-role {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.teaching-term {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.service-row:first-child {
  border-top: none;
  padding-top: 0;
}

.service-year {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-top: 4px;
}

.service-role-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.venue-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.venue-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.venue-pill svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.85;
}

.venue-pill.outstanding {
  background: var(--amber-soft);
  border-color: rgba(251, 191, 36, 0.36);
  color: var(--amber);
}

.venue-pill.outstanding:hover {
  border-color: var(--amber);
  background: rgba(251, 191, 36, 0.22);
  color: var(--amber);
  transform: translateY(-1px);
}

.venue-star {
  font-size: 0.88rem;
  line-height: 1;
}

.venue-award {
  font-weight: 500;
  padding-left: 6px;
  border-left: 1px solid rgba(251, 191, 36, 0.35);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------- Modals (BibTeX + Lightbox) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 14, 22, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bibtex-dialog {
  width: min(92vw, 720px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bibtex-pre {
  margin: 0;
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-subtle);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
}

.lightbox-dialog {
  max-width: min(94vw, 1280px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-dialog img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  padding: 10px;
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  color: #F1F5F9;
  font-size: 0.9rem;
  text-align: center;
  max-width: 72ch;
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .portrait-card {
    justify-self: start;
    max-width: 340px;
  }
  .pub-card {
    grid-template-columns: 1fr;
  }
  .pub-media {
    height: 190px;
  }
}

@media (max-width: 780px) {
  .project-card {
    grid-template-columns: 1fr;
  }
  .project-media {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: 200px;
    max-height: 280px;
  }
  .intern-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .intern-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .news-row {
    grid-template-columns: auto 1fr;
    gap: 6px 10px;
  }
  .news-text {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  :root {
    --container-width: 92vw;
  }
  .section {
    padding: 46px 0;
  }
  .section-hero {
    padding: 36px 0 36px;
  }
  .news-list {
    padding: 4px 16px;
  }
  .intern-year-block {
    padding: 18px;
  }
  .exp-card {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 18px;
    gap: 14px;
  }
  .org-logo-tile {
    width: 52px;
    height: 52px;
    padding: 5px;
  }
  .hiring-callout {
    padding: 20px;
  }
  .panel-card {
    padding: 20px;
  }
}
