/* =========================================
   Matthias Dogbatsey — Portfolio Stylesheet
   Premium Academic Redesign
   ========================================= */

/* =========================================
   1. Design Tokens & Variables
   ========================================= */
:root {
  /* --- Deep Teal + Navy Palette --- */
  --theme-primary: #0f2744;
  --theme-secondary: #1a3a5c;
  --theme-accent: #2563eb;
  --theme-accent-warm: #0ea5e9;
  --theme-gold: #f59e0b;
  --theme-bg: #f8fafc;
  --theme-text: #0f172a;
  --theme-white: #ffffff;

  /* --- Functional Variables --- */
  --bg: var(--theme-bg);
  --bg-elevated: #ffffff;
  --bg-soft: rgba(37, 99, 235, 0.04);
  --bg-hover: rgba(37, 99, 235, 0.06);
  --accent-light: rgba(37, 99, 235, 0.1);
  --bg-subtle: rgba(37, 99, 235, 0.04);
  --font-display: 'Lora', 'Georgia', 'Times New Roman', serif;
  --bg-card: rgba(255, 255, 255, 0.85);

  --text: var(--theme-text);
  --text-secondary: #334155;
  --text-muted: #4b5768;
  --text-header: var(--theme-white);
  --text-light: #6b7a94;

  --brand: var(--theme-accent);
  --link: var(--theme-accent);
  --accent: var(--theme-accent);
  --accent-warm: var(--theme-accent-warm);
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-mid: rgba(37, 99, 235, 0.2);
  --accent-glow: rgba(37, 99, 235, 0.15);

  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --border-focus: rgba(37, 99, 235, 0.5);

  --shadow-xs: 0 1px 3px rgba(15, 39, 68, 0.06);
  --shadow-soft: 0 4px 24px rgba(15, 39, 68, 0.07), 0 1px 4px rgba(15, 39, 68, 0.04);
  --shadow-lift: 0 12px 40px rgba(15, 39, 68, 0.12), 0 3px 10px rgba(15, 39, 68, 0.06);
  --shadow-glow: 0 0 0 3px rgba(37, 99, 235, 0.15);

  --font-serif: 'Lora', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --max-width: 1000px;
  --nav-height: 64px;

  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- DARK MODE --- */
html[data-theme="dark"] {
  --bg: #060d1a;
  --bg-elevated: #0d1b2e;
  --bg-soft: #0a1628;
  --bg-hover: rgba(255, 255, 255, 0.04);
  --accent-light: rgba(59, 130, 246, 0.12);
  --bg-subtle: rgba(59, 130, 246, 0.06);
  --font-display: 'Lora', 'Georgia', 'Times New Roman', serif;
  --bg-card: rgba(13, 27, 46, 0.9);

  --text: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-header: #e2e8f0;
  --text-light: #64748b;

  --brand: #60a5fa;
  --link: #60a5fa;
  --accent: #3b82f6;
  --accent-warm: #38bdf8;
  --accent-soft: rgba(96, 165, 250, 0.1);
  --accent-mid: rgba(96, 165, 250, 0.22);
  --accent-glow: rgba(59, 130, 246, 0.2);

  --border: rgba(148, 163, 184, 0.1);
  --border-strong: rgba(148, 163, 184, 0.18);
  --border-focus: rgba(96, 165, 250, 0.5);

  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-lift: 0 12px 40px rgba(0, 0, 0, 0.6), 0 3px 10px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* =========================================
   2. Reset & Base
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--transition-med), color var(--transition-med);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--text);
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

h3 {
  font-size: 1.15rem;
}

h4 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

ul,
ol {
  padding-left: 1.5rem;
}

a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-theme="dark"] a:hover {
  color: #93c5fd;
}

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

/* =========================================
   Scroll Progress
   ========================================= */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1001;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #38bdf8, #06b6d4);
  transition: width 0.1s ease-out;
  border-radius: 0 2px 2px 0;
}

/* Layout */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-width);
  padding: 0 1.5rem;
  margin: 0 auto;
}

/* =========================================
   3. Navigation Bar
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: var(--theme-primary);
  color: var(--text-header);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--transition-med), box-shadow var(--transition-med);
}

html[data-theme="dark"] .site-header {
  background-color: rgba(6, 13, 26, 0.95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 30px rgba(0, 0, 0, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 1rem;
}

.nav-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-header);
  white-space: nowrap;
}

.nav-title {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  font-size: 0.875rem;
}

.nav-links a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.nav-links a.is-active {
  background: rgba(37, 99, 235, 0.5);
  color: #ffffff;
  font-weight: 600;
}

.hamburger-menu {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-header);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.2rem;
  transition: opacity var(--transition-fast);
}

.hamburger-menu:hover {
  opacity: 0.8;
}
/* Mobile nav backdrop overlay */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  transition: opacity var(--transition-med);
}

.nav-backdrop.is-visible {
  opacity: 1;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-med), transform var(--transition-med);
  z-index: 90;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #1d4ed8;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0.75rem;
  text-decoration: none;
}

/* System dark mode auto-detect (when no localStorage preference) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme-set]) {
    color-scheme: dark;
  }
}



.theme-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.theme-toggle button {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  padding: 0.3rem 0.85rem;
  color: rgba(255, 255, 255, 0.88);
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.theme-toggle button:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* =========================================
   4. Hero Section
   ========================================= */
.hero {
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

/* Ambient gradients */
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -15%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.12) 0%, transparent 65%);
  filter: blur(50px);
  z-index: 0;
  animation: floatOrb 12s infinite ease-in-out alternate;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(ellipse, rgba(14, 165, 233, 0.1) 0%, transparent 65%);
  filter: blur(50px);
  z-index: 0;
  animation: floatOrb 15s infinite ease-in-out alternate-reverse;
  pointer-events: none;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(25px, -25px) scale(1.08);
  }
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  animation: fadeUp 0.45s ease both;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

html[data-theme="dark"] .hero-eyebrow {
  color: var(--brand);
}

html[data-theme="dark"] .hero-eyebrow::before {
  background: var(--brand);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
  background: linear-gradient(145deg, var(--theme-primary) 0%, #1e40af 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.5s ease 0.08s both;
}

html[data-theme="dark"] .hero-title {
  background: linear-gradient(145deg, #93c5fd 0%, #bfdbfe 60%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  max-width: 500px;
  animation: fadeUp 0.5s ease 0.16s both;
}

html[data-theme="dark"] .hero-tagline {
  color: var(--text-muted);
}

.hero-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  padding-left: 1rem;
  border-left: 2px solid var(--border-strong);
  margin-bottom: 0.75rem;
  animation: fadeUp 0.5s ease 0.24s both;
}

html[data-theme="dark"] .hero-meta {
  border-left-color: var(--border);
}

.hero-meta p {
  margin-bottom: 0.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  animation: fadeUp 0.5s ease 0.32s both;
}

/* Social icons row */
.hero-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  animation: fadeUp 0.5s ease 0.38s both;
}

.hero-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--brand);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  border: 1px solid var(--border);
}

.hero-social a:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 6px 16px var(--accent-glow);
}

/* Headshot */
.hero-headshot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  animation: scaleIn 0.6s ease 0.12s both;
}



.hero-headshot {
  width: 240px;
  height: 240px;
  border-radius: var(--radius-md);
  object-fit: cover;
  object-position: 50% 20%;
  box-shadow: var(--shadow-lift);
  border: 3px solid var(--border-strong);
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
  display: block;
}

.hero-headshot:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(15, 39, 68, 0.18);
  border-color: var(--accent);
}

html[data-theme="dark"] .hero-headshot {
  border-color: var(--border-strong);
}

html[data-theme="dark"] .hero-headshot:hover {
  border-color: var(--brand);
  box-shadow: 0 20px 48px rgba(0,0,0,0.5);
}


/* Photo meta — name + title shown beneath square headshot */
.hero-photo-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
}

.hero-photo-name {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.hero-photo-title {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* =========================================
   5. Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: #1d4ed8;
  color: #fff;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

html[data-theme="dark"] .btn-primary {
  background: #3b82f6;
}

html[data-theme="dark"] .btn-primary:hover {
  background: #2563eb;
}

.btn-ghost {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
}

.btn-ghost:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-soft {
  background: var(--accent-soft);
  color: var(--brand);
  border-color: transparent;
}

.btn-soft:hover {
  background: var(--brand);
  color: #fff;
}

html[data-theme="dark"] .btn-soft {
  background: rgba(59, 130, 246, 0.12);
  color: var(--brand);
}

html[data-theme="dark"] .btn-soft:hover {
  background: var(--brand);
  color: #fff;
}

/* =========================================
   6. Main & Sections
   ========================================= */
.main {
  flex: 1;
  position: relative;
  z-index: 1;
}

.section {
  padding: 2.5rem 0;
}


/* Section heading — left-aligned editorial style */
.section-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--theme-primary);
  position: relative;
  display: inline-block;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  border-radius: 3px;
  transition: width var(--transition-slow);
}

.section-heading:hover::after {
  width: 100%;
}

html[data-theme="dark"] .section-heading {
  color: #e2e8f0;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.65;
  max-width: 640px;
}

/* =========================================
   7. Cards — Glassmorphism Style
   ========================================= */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.25rem;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
}

html[data-theme="dark"] .card {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.card:last-child {
  margin-bottom: 0;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}

html[data-theme="dark"] .card:hover {
  border-color: rgba(96, 165, 250, 0.25);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--theme-primary);
  margin-bottom: 0.8rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .card h3 {
  color: #e2e8f0;
  border-bottom-color: var(--border);
}

/* =========================================
   8. Home Page Layout — New Design
   ========================================= */
/* Two-column grid */
.home-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

/* Research interests — tag cloud style with glow effects */
.interests-section {
  margin-bottom: 2rem;
}

.interests-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.interest-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--brand);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
  cursor: default;
  letter-spacing: 0.01em;
}

.interest-tag:hover {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--accent-glow);
}

html[data-theme="dark"] .interest-tag {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.2);
}

html[data-theme="dark"] .interest-tag:hover {
  background: #3b82f6;
  color: #fff;
  border-color: transparent;
}

.interest-tag .tag-icon {
  font-size: 0.7rem;
  opacity: 0.75;
}

/* Research blurb */
.research-blurb {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Education Timeline */

.timeline {
  position: relative;
  margin-top: 0.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom,
      var(--accent) 0%,
      var(--accent-warm) 60%,
      transparent 100%);
  opacity: 0.35;
}

.timeline-item {
  position: relative;
  padding: 0 0 1.4rem 1.8rem;
  transition: all var(--transition-fast);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 0 0 2px var(--border), 0 2px 6px var(--accent-glow);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px var(--accent-mid), 0 3px 10px var(--accent-glow);
}

html[data-theme="dark"] .timeline-dot {
  border-color: var(--bg);
  background: linear-gradient(135deg, #3b82f6, #38bdf8);
}

.timeline-degree {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.4;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-block;
  background: var(--accent-soft);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  letter-spacing: 0.03em;
}

html[data-theme="dark"] .timeline-period {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
}

.timeline-institution {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  line-height: 1.4;
}

.timeline-institution a {
  color: var(--text-muted);
  font-weight: 400;
}

.timeline-institution a:hover {
  color: var(--link);
}

/* =========================================
   9. Certifications — Horizontal Cards
   ========================================= */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: all var(--transition-fast);
}

.cert-item:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
  transform: translateX(3px);
}

html[data-theme="dark"] .cert-item:hover {
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
}

.cert-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-mid));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 0.9rem;
}

html[data-theme="dark"] .cert-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.cert-body {
  flex: 1;
}

.cert-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: block;
}

.cert-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* =========================================
   10. News Timeline — Sleek Vertical Feed
   ========================================= */
.news-feed {
  position: relative;
  margin-top: 0.5rem;
}

.news-feed-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: all var(--transition-fast);
}

.news-feed-item:first-child {
  padding-top: 0;
}

.news-feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.news-feed-item:hover .news-feed-date {
  color: var(--accent);
}

.news-feed-date {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 0.15rem;
  white-space: nowrap;
  transition: color var(--transition-fast);
  letter-spacing: 0.03em;
}

html[data-theme="dark"] .news-feed-date {
  color: var(--text-light);
}

.news-feed-body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
}

.news-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.1rem 0.55rem;
  border-radius: 3px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent);
  margin-right: 0.4rem;
  margin-bottom: 0.15rem;
}

html[data-theme="dark"] .news-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.news-badge.upcoming {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

html[data-theme="dark"] .news-badge.upcoming {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* Older style classes still used in index.html */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.news-item:first-child {
  padding-top: 0;
}

.news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 0.1rem;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

html[data-theme="dark"] .news-date {
  color: var(--brand);
}

.news-content {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.65;
}

/* =========================================
   11. Talks / Conference List
   ========================================= */
.talk-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.talk-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.talk-item:first-child {
  padding-top: 0;
}

.talk-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.talk-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.1rem;
  text-align: right;
  letter-spacing: 0.02em;
}

.talk-content {
  font-size: 0.91rem;
  line-height: 1.65;
}

.talk-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.talk-venue {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* =========================================
   12. Publications
   ========================================= */
.pub-list,
.simple-list,
.teaching-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-list li {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-list li:first-child {
  padding-top: 0;
}

.pub-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pub-citation {
  display: block;
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.pub-citation strong {
  color: var(--text);
}

.pub-citation em {
  font-style: italic;
  color: var(--text);
}

.pub-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.pub-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: transparent;
  transition: all var(--transition-fast);
}

.pub-btn:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
}

/* =========================================
   13. Pills & Tags — Enhanced
   ========================================= */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--brand);
  border: 1px solid rgba(37, 99, 235, 0.15);
  transition: all var(--transition-fast);
  letter-spacing: 0.01em;
}

.pill:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
}

html[data-theme="dark"] .pill {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.2);
}

html[data-theme="dark"] .pill:hover {
  background: #3b82f6;
  color: #fff;
}

/* =========================================
   14. Teaching Table
   ========================================= */
.teaching-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.teaching-table tr {
  border-bottom: 1px solid var(--border);
}

.teaching-table tr:last-child {
  border-bottom: none;
}

.teaching-table td {
  padding: 0.75rem 0;
  vertical-align: middle;
  line-height: 1.5;
}

.teaching-semester {
  width: 130px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  padding-right: 1rem !important;
  white-space: nowrap;
}

html[data-theme="dark"] .teaching-semester {
  color: var(--brand);
}

.teaching-course a {
  font-weight: 500;
  color: var(--link);
}

.teaching-course .note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

/* simple list */
.simple-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.65;
}

.simple-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.simple-list li:first-child {
  padding-top: 0;
}

.teaching-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.65;
}

.teaching-list li:last-child {
  border-bottom: none;
}

/* =========================================
   15. Awards / Service Table
   ========================================= */
.awards-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.awards-table tr {
  border-bottom: 1px solid var(--border);
}

.awards-table tr:last-child {
  border-bottom: none;
}

.awards-table td {
  padding: 0.9rem 0;
  vertical-align: top;
  line-height: 1.5;
}

.awards-year {
  width: 65px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  padding-right: 1rem !important;
  padding-top: 1rem !important;
  white-space: nowrap;
}

html[data-theme="dark"] .awards-year {
  color: var(--brand);
}

.awards-title {
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 0.2rem;
}

.awards-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* =========================================
   16. Contact Layout
   ========================================= */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.contact-item:hover {
  padding-left: 0.25rem;
}

.contact-item:first-of-type {
  padding-top: 0;
}

.contact-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 0.9rem;
  margin-top: 0.1rem;
  transition: all var(--transition-fast);
}

.contact-item:hover .contact-icon {
  background: var(--brand);
  color: #fff;
}

html[data-theme="dark"] .contact-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}

.contact-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-value {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.55;
}

/* =========================================
   17. CV / PDF Frame
   ========================================= */
.pdf-frame {
  width: 100%;
  height: 820px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  display: block;
}

/* =========================================
   18. Research Image Grid
   ========================================= */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.image-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}

.image-card img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0.6rem;
}

.image-card-caption {
  padding: 1rem 1.1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.image-card-caption strong {
  color: var(--theme-primary);
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

html[data-theme="dark"] .image-card-caption strong {
  color: #e2e8f0;
}

html[data-theme="dark"] .image-card-caption {
  color: var(--text-muted);
}

/* =========================================
   19. 404 Page
   ========================================= */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
  gap: 1.25rem;
  padding: 4rem 1rem;
}

.error-code {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--border-strong);
  letter-spacing: -0.04em;
  user-select: none;
}

.error-msg {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-muted);
}

/* =========================================
   20. Footer — Refined
   ========================================= */
.site-footer {
  background: linear-gradient(135deg, #060d1a 0%, #0d1b2e 100%);
  color: #ffffff;
  padding: 2.5rem 0;
  margin-top: auto;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9, #06b6d4);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.site-footer>.container>div:first-child {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.site-footer .muted {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.81rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.site-footer a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

/* =========================================
   21. Utility Classes
   ========================================= */
.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: 0.875rem;
}

.muted {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* =========================================
   22. Background (particles canvas)
   ========================================= */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background-color: var(--bg);
  transition: background-color var(--transition-med);
}

/* =========================================
   23. Research focus area mini-cards
   ========================================= */
.focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.focus-card {
  padding: 1rem 1.1rem;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  transition: all var(--transition-fast);
}

.focus-card:hover {
  background: var(--accent-soft);
  border-left-color: var(--accent-warm);
  transform: translateX(2px);
}

html[data-theme="dark"] .focus-card {
  background: rgba(59, 130, 246, 0.06);
  border-color: var(--border);
  border-left-color: #3b82f6;
}

html[data-theme="dark"] .focus-card:hover {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: #38bdf8;
}

.focus-card-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.focus-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* =========================================
   24. Scroll Reveal Animations
   ========================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-eyebrow {
  animation: fadeUp 0.45s ease both;
}

.hero-title {
  animation: fadeUp 0.5s ease 0.08s both;
}

.hero-tagline {
  animation: fadeUp 0.5s ease 0.16s both;
}

.hero-meta {
  animation: fadeUp 0.5s ease 0.24s both;
}

.hero-actions {
  animation: fadeUp 0.5s ease 0.32s both;
}

.hero-headshot-wrap {
  animation: scaleIn 0.6s ease 0.1s both;
}

/* =========================================
   25. Responsive
   ========================================= */
@media (max-width: 840px) {

  .hero-inner,
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-headshot-wrap {
    order: -1;
  }

  .hero-headshot {
    width: 200px;
    height: 200px;
  }

  .hero-inner {
    gap: 2rem;
  }

  .news-item,
  .news-feed-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .talk-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .talk-date {
    text-align: left;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    height: var(--nav-height);
    padding: 0 1.25rem;
  }

  .hamburger-menu {
    display: block;
    order: -1;
  }

  .nav-left {
    margin: 0 auto;
  }

  .site-header {
    height: auto;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 260px;
    height: 100vh;
    background: var(--theme-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    transition: left var(--transition-med);
    z-index: 99;
    gap: 0.25rem;
  }

  html[data-theme="dark"] .nav-links {
    background: #060d1a;
  }

  .nav-links.is-open {
    left: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
    padding: 0.65rem 0.5rem;
    width: 100%;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1.25rem 1.4rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .teaching-semester {
    width: 100px;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-headshot {
    width: 170px;
    height: 170px;
  }
}
/* Upcoming event badge */
.badge-upcoming {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d97706;
  margin-right: 0.4rem;
  padding: 0.1rem 0.5rem;
  background: rgba(217, 119, 6, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

html[data-theme="dark"] .badge-upcoming {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
}

/* =========================================
   Contact Form
   ========================================= */
.contact-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.form-input {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

html[data-theme="dark"] .form-input {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.65;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-status {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-status.success { color: #16a34a; }
.form-status.error   { color: #dc2626; }

html[data-theme="dark"] .form-status.success { color: #4ade80; }
html[data-theme="dark"] .form-status.error   { color: #f87171; }

/* =========================================
   Publication abstract (collapsible)
   ========================================= */
.pub-abstract {
  margin-top: 0.6rem;
  margin-bottom: 0.1rem;
}

.pub-abstract summary {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  user-select: none;
  transition: color var(--transition-fast);
}

.pub-abstract summary:hover {
  color: var(--accent);
}

.pub-abstract summary::marker { display: none; }
.pub-abstract summary::-webkit-details-marker { display: none; }

.pub-abstract summary::before {
  content: '▶';
  font-size: 0.6rem;
  display: inline-block;
  transition: transform var(--transition-fast);
}

.pub-abstract[open] summary::before {
  transform: rotate(90deg);
}

.pub-abstract p {
  margin-top: 0.6rem;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.75;
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* =========================================
   Publication count badge (dynamic)
   ========================================= */
.pub-count-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-weight: 600;
}

html[data-theme="dark"] .pub-count-badge {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
}

/* =========================================
   Extracted inline style classes
   ========================================= */

/* Shared card intro paragraph */
.card-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Card header row (flex row with title + badge) */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* Section title inside a card header */
.card-section-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Section heading with top spacing (replaces margin-top: 2.5rem inline) */
.section-heading--spaced {
  margin-top: 2.5rem;
}

/* Focus area grid (research page, 2-col) */
.focus-area-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (max-width: 640px) {
  .focus-area-grid {
    grid-template-columns: 1fr;
  }
}

/* Focus area card (research page) */
.focus-area-card {
  padding: 1rem;
  background: var(--bg-soft);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.focus-area-title {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.focus-area-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Connect online list (contact page) */
.connect-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Social profile buttons — left-aligned with icon */
.btn-social {
  justify-content: flex-start;
  gap: 0.75rem;
}

.social-btn-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ORCID identifier inline */
.orcid-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* CV page: name + date labels */
.cv-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.cv-last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Workshop description paragraph (talk page) */
.workshop-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* Small inline icon (arrow after text) */
.icon-inline-sm {
  font-size: 0.75rem;
  margin-left: 0.4rem;
}

/* Visually hidden (for table captions, screen-reader only) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
