/* ============================================================
   Jonathan A. Seward — Academic Website
   Design System & Styles
   ============================================================ */

/* --- Custom Properties --- */
:root {
  /* Brand */
  --brand-deep: #17352d;
  --brand-mid: #254b40;
  --brand-accent: #355f52;

  /* Accent — warm gold */
  --accent-base: #c5a55a;
  --accent-light: #d4b96a;
  --accent-subtle: #e3d1a3;
  --accent-emphasis: #b68f42;
  --accent-dark: #a88b3d;
  --accent-glow: rgba(197, 165, 90, 0.15);
  --gold: var(--accent-base);
  --gold-light: var(--accent-light);
  --gold-dark: var(--accent-dark);
  --gold-glow: var(--accent-glow);

  /* Neutrals */
  --white: #ffffff;
  --off-white: #f7f8fa;
  --gray-100: #eef0f3;
  --gray-200: #dde1e7;
  --gray-300: #b8bfc9;
  --gray-400: #8aa197;
  --gray-500: #6f877d;
  --gray-600: #556e65;
  --gray-700: #3d544c;

  /* Ink roles (theme-level text aliases) */
  --ink-strong: #17352d;
  --ink-default: #284d41;
  --ink-soft: #4e7165;
  --ink-muted: #6f8a80;
  --ink-inverse: #ffffff;

  /* Semantic aliases (component compatibility) */
  --text-primary: var(--ink-strong);
  --text-secondary: var(--ink-soft);
  --text-muted: var(--ink-muted);
  --bg-primary: #ffffff;
  --surface-soft-solid: #f2f7f4;
  --surface-card-tint: #f6faf8;
  --surface-soft: rgba(23, 53, 45, 0.08);

  /* Fonts */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;

  /* Typography roles */
  --font-display: var(--font-heading);
  --font-reading: var(--font-body);
  --font-accent: var(--font-serif);
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading-tight: 1.1;
  --leading-snug: 1.35;
  --leading-comfortable: 1.6;
  --leading-base: 1.7;
  --leading-relaxed: 1.8;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.25rem;

  /* Spacing */
  --section-padding: 6rem;
  --container-max: 1140px;
  --copy-measure: 68ch;
  --copy-measure-narrow: 62ch;
  --control-min-hit: 40px;
  --control-min-hit-mobile: 44px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-offset, 80px) + var(--section-nav-offset, 0px) + 0.75rem);
}

section[id],
main[id],
.anchor-target {
  scroll-margin-top: calc(var(--nav-offset, 80px) + var(--section-nav-offset, 0px) + 0.75rem);
}

body {
  font-family: var(--font-reading);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--ink-default);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(9, 20, 17, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
  z-index: 940;
}

#main-content {
  background: var(--surface-soft);
  margin-top: -2px;
  padding-top: 2px;
  position: relative;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open::before {
  opacity: 1;
}

body.research-scroll-lock {
  overscroll-behavior: none;
}

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

a {
  color: var(--gold-dark);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

ul { list-style: none; }

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

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--brand-deep);
  padding: 0.5rem 1.5rem;
  font-weight: var(--weight-semibold);
  z-index: 10000;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus {
  left: 50%;
  transform: translateX(-50%);
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.1rem;
  }
}

/* --- Section --- */
.section {
  padding: var(--section-padding) 0;
}

@media (max-width: 768px) {
  .section {
    padding: clamp(4rem, 11vw, 5.25rem) 0;
  }
}

.about-section,
.teaching-section {
  background: var(--surface-soft);
}

.bg-secondary {
  background: var(--surface-soft-solid);
}

/* Brand-tinted section backgrounds for visual distinction */
.section-brand-tint {
  background: linear-gradient(170deg, rgba(23, 53, 45, 0.035) 0%, rgba(37, 75, 64, 1) 100%);
  border: none;
  position: relative;
}

/*
.section-brand-tint::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, calc(100vw - 4rem));
  height: 6px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(197, 165, 90, 0.2) 20%,
    rgba(197, 165, 90, 0.95) 50%,
    rgba(197, 165, 90, 0.2) 80%,
    transparent 100%
  );
  border-radius: 2px;
  clip-path: polygon(0 50%, 14% 22%, 50% 0, 86% 22%, 100% 50%, 86% 78%, 50% 100%, 14% 78%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.92) 30%, rgba(0, 0, 0, 0.92) 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.92) 30%, rgba(0, 0, 0, 0.92) 70%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.section-brand-tint::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, calc(100vw - 4rem));
  height: 6px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(37, 75, 64, 0.75) 18%,
    rgba(37, 75, 64, 0.95) 50%,
    rgba(37, 75, 64, 0.75) 82%,
    transparent 100%
  );
  clip-path: polygon(0 50%, 14% 22%, 50% 0, 86% 22%, 100% 50%, 86% 78%, 50% 100%, 14% 78%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.92) 30%, rgba(0, 0, 0, 0.92) 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.92) 30%, rgba(0, 0, 0, 0.92) 70%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
*/

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.3rem + 2.2vw, var(--text-4xl));
  font-weight: var(--weight-bold);
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-title.light {
  color: var(--white);
}

.section-intro {
  text-align: center;
  max-width: var(--copy-measure-narrow);
  margin: 0 auto 3.5rem;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.section-intro.light {
  color: var(--gray-300);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  min-height: var(--control-min-hit);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-primary {
  background: var(--gold);
  color: var(--brand-deep);
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--brand-deep);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(197, 165, 90, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}

.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-2px);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar.scrolled .nav-container {
  padding: 0.85rem 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--gold);
  letter-spacing: 0.05em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.navbar.scrolled .nav-logo {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-logo:hover {
  color: var(--gold-light);
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu-primary {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}

.nav-menu-secondary {
  display: none;
}

.nav-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(197, 165, 90, 0.28);
  color: var(--gold-dark);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(197, 165, 90, 0.08);
  transition: all var(--duration-fast) var(--ease-out);
}

.nav-secondary-link:hover {
  color: var(--brand-deep);
  border-color: rgba(197, 165, 90, 0.6);
  background: rgba(197, 165, 90, 0.85);
}

.nav-link {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.45rem 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.navbar.scrolled .nav-link {
  color: var(--text-secondary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-out);
}

.navbar.scrolled .nav-toggle span {
  background: var(--text-primary);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 100vw);
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1rem;
    background: var(--brand-deep);
    padding: 1.2rem 1.25rem 1.5rem;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--duration-normal) var(--ease-out);
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
  }

  .nav-menu-primary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 3.5rem;
  }

  .nav-menu-secondary {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(197, 165, 90, 0.28);
  }

  .nav-secondary-link {
    justify-content: flex-start;
    color: var(--accent-subtle);
    border-color: rgba(197, 165, 90, 0.24);
    background: rgba(197, 165, 90, 0.08);
  }

  .nav-secondary-link:hover {
    color: var(--accent-light);
    border-color: rgba(197, 165, 90, 0.5);
    background: rgba(197, 165, 90, 0.2);
  }

  .nav-secondary-cv {
    border-color: rgba(197, 165, 90, 0.62);
    color: var(--accent-light);
  }

  .nav-menu.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-menu-primary .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--control-min-hit-mobile);
    color: var(--accent-subtle);
    font-size: var(--text-lg);
  }

  .navbar.scrolled .nav-menu-primary .nav-link {
    color: var(--accent-subtle);
  }

  .nav-menu-primary .nav-link::after {
    background: var(--accent-emphasis);
  }

  .nav-menu-primary .nav-link:hover {
    color: var(--accent-light);
  }

  .navbar.scrolled .nav-menu-primary .nav-link:hover {
    color: var(--accent-light);
  }

  .nav-menu-primary .nav-link.active,
  .nav-menu-primary .nav-link[aria-current="location"] {
    color: var(--accent-base);
    font-weight: var(--weight-semibold);
    text-shadow: 0 0 10px rgba(197, 165, 90, 0.2);
  }

  .navbar.scrolled .nav-menu-primary .nav-link.active,
  .navbar.scrolled .nav-menu-primary .nav-link[aria-current="location"] {
    color: var(--accent-base);
    font-weight: var(--weight-semibold);
    text-shadow: 0 0 10px rgba(197, 165, 90, 0.2);
  }

  .nav-cv-desktop {
    display: none;
  }
}

/* Sticky in-page section navigation */
.section-nav {
  position: sticky;
  top: var(--nav-offset, 80px);
  z-index: 900;
  pointer-events: none;
  background: var(--surface-soft);
}

.section-nav-inner {
  margin: 0 auto 0.35rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
}

.section-progress {
  margin-top: 0;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(23, 53, 45, 0.24);
  overflow: hidden;
}

#section-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(197, 165, 90, 0.4), rgba(197, 165, 90, 1));
  transition: width var(--duration-normal) var(--ease-out);
}

.section-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 auto 2rem;
  max-width: 760px;
}

.section-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  min-height: var(--control-min-hit);
  border-radius: 999px;
  border: 1px solid rgba(37, 75, 64, 0.24);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  transition: all var(--duration-fast) var(--ease-out);
}

.section-chip:hover {
  color: var(--text-primary);
  border-color: rgba(197, 165, 90, 0.5);
  background: rgba(197, 165, 90, 0.12);
}

.section-chip.active {
  color: var(--brand-deep);
  border-color: rgba(197, 165, 90, 0.65);
  background: rgba(197, 165, 90, 0.2);
}

.teaching-section .teaching-chips {
  position: sticky;
  top: calc(var(--nav-offset, 80px) + var(--section-nav-offset, 0px) + 0.65rem);
  z-index: 860;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 auto 2rem;
  max-width: 760px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}

.teaching-section .teaching-chips .section-chip {
  border-color: rgba(37, 75, 64, 0.25);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 768px) {
  .teaching-section .teaching-chips {
    top: calc(var(--nav-offset, 80px) + var(--section-nav-offset, 0px) + 0.45rem);
    gap: 0.4rem;
  }
}

.section-jump {
  position: fixed;
  right: 1rem;
  bottom: 5.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 980;
}

.section-jump-btn {
  min-width: 92px;
  min-height: var(--control-min-hit);
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 75, 64, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--duration-fast) var(--ease-out);
}

.section-jump-btn:hover:not([disabled]) {
  border-color: rgba(197, 165, 90, 0.55);
  background: rgba(197, 165, 90, 0.18);
}

.section-jump-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: var(--control-min-hit);
  padding: 0.55rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 75, 64, 0.3);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  z-index: 980;
}

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

.back-to-top:hover {
  border-color: rgba(197, 165, 90, 0.55);
  background: rgba(197, 165, 90, 0.2);
}

body.menu-open .section-jump,
body.menu-open .back-to-top {
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 900px) {
  .section-jump {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1rem;
    flex-direction: row;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .section-nav-inner {
    margin: 0 auto 0.3rem;
  }

  .section-chip,
  .section-jump-btn,
  .back-to-top,
  .course-toggle,
  .btn-expand,
  .pub-link,
  .slide-fullscreen {
    min-height: var(--control-min-hit-mobile);
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0;
  background: linear-gradient(160deg, var(--brand-deep) 0%, var(--brand-mid) 50%, var(--brand-accent) 100%);
}

#causal-graph-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 30% 50%, transparent 0%, rgba(23,53,45,0.72) 74%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: var(--container-max);
  padding: 2rem;
  width: 100%;
}

.hero-card {
  background: rgba(23, 53, 45, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(197, 165, 90, 0.18);
  border-radius: var(--radius-lg);
  padding: 2.75rem 3rem;
  max-width: 580px;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 0.3s forwards;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25),
              inset 0 1px 0 rgba(255,255,255,0.04);
}

.hero-card-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 1.5rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-image-wrapper {
  flex-shrink: 0;
}

.hero-image {
  width: 130px;
  height: 130px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid rgba(197, 165, 90, 0.5);
  box-shadow: 0 0 0 6px rgba(197, 165, 90, 0.1),
              0 8px 24px rgba(0,0,0,0.35);
}

.hero-text {
  min-width: 0;
  text-align: left;
}

.hero-greeting {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--gold-light);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 1.7vw, 2.65rem);
  font-weight: var(--weight-bold);
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--gold);
  margin-bottom: 0.15rem;
  letter-spacing: 0.01em;
}

.hero-affiliation {
  font-size: var(--text-sm);
  color: var(--gray-300);
  font-weight: var(--weight-regular);
}

.hero-divider {
  width: 40px;
  height: 2px;
  background: rgba(197, 165, 90, 0.4);
  border: none;
  margin: 0 auto 1rem;
}

.hero-tagline {
  font-size: var(--text-sm);
  color: rgba(184, 191, 201, 0.9);
  line-height: 1.75;
  text-align: center;
  max-width: 54ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.75rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-400);
  z-index: 10;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 1.5s forwards;
}

.scroll-text {
  font-size: var(--text-xs);
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-arrow {
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* Hero responsive */
@media (max-width: 640px) {
  .hero-content {
    padding-bottom: 4rem;
  }

  .scroll-indicator {
    bottom: 0.8rem;
    flex-direction: row;
    gap: 0.35rem;
    align-items: center;
  }

  .scroll-text {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  .scroll-arrow {
    width: 18px;
    height: 18px;
  }

  .hero-card {
    padding: 2rem 1.5rem;
    max-width: 100%;
    margin: 0 0.5rem;
  }

  .hero-card-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-title { font-size: var(--text-3xl); }
  .hero-tagline { text-align: center; }
  .hero-image { width: 110px; height: 110px; }
  .hero-cta { justify-content: center; flex-wrap: wrap; }
  .hero-divider { margin: 0 auto 1rem; }
}

@media (max-height: 640px) {
  .hero-content {
    padding-bottom: 4rem;
  }

  .scroll-indicator {
    bottom: 0.8rem;
    flex-direction: row;
    gap: 0.35rem;
    align-items: center;
  }

  .scroll-text {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  .scroll-arrow {
    width: 18px;
    height: 18px;
  }

  .hero-title { font-size: var(--text-3xl); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
  margin-top: 2.5rem;
}

.about-narrative p {
  margin-bottom: 1.25rem;
  color: var(--ink-default);
  line-height: var(--leading-relaxed);
}

.about-narrative {
  max-width: var(--copy-measure);
}

.about-narrative p.lead {
  font-family: var(--font-accent);
  font-size: var(--text-xl);
  color: var(--text-primary);
  line-height: var(--leading-comfortable);
  margin-bottom: 1.75rem;
}

.about-narrative strong {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.about-narrative em {
  font-family: var(--font-accent);
}

/* Stats */
.about-stats {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--gold-dark);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
}

/* Interests */
.about-interests h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.interest-tags li {
  background: var(--gold-glow);
  color: var(--gold-dark);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border: 1px solid rgba(197, 165, 90, 0.2);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .about-stats {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESEARCH
   ============================================================ */
.research-section {
  padding-bottom: 4rem;
}

.research-category {
  margin-bottom: 3rem;
  transition: filter var(--duration-normal) var(--ease-out);
}

.research-category .publications-grid {
  overflow: hidden;
  max-height: none;
  opacity: 1;
  transition: max-height var(--duration-slow) var(--ease-out),
              opacity var(--duration-normal) var(--ease-out);
}

.research-category.is-collapsed .publications-grid {
  opacity: 0;
  pointer-events: none;
}

.research-category.is-expanded .category-title {
  border-bottom-color: rgba(197, 165, 90, 0.35);
}

.research-category.is-attention .category-title {
  animation: categoryPulse 0.78s var(--ease-out) 1;
}

@keyframes categoryPulse {
  0% {
    border-bottom-color: rgba(197, 165, 90, 0.35);
    text-shadow: none;
  }
  35% {
    border-bottom-color: rgba(197, 165, 90, 0.92);
    text-shadow: 0 0 10px rgba(197, 165, 90, 0.18);
  }
  100% {
    border-bottom-color: rgba(197, 165, 90, 0.35);
    text-shadow: none;
  }
}

.category-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}

.category-title.is-clickable {
  cursor: pointer;
  user-select: none;
}

.category-title.is-clickable:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

.category-icon {
  color: var(--gold);
  display: flex;
}

.publications-grid {
  display: grid;
  gap: 1rem;
}

.publication-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.2rem 1.05rem;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

.publication-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(197, 165, 90, 0.3);
}

.pub-title {
  font-family: var(--font-display);
  font-size: 1.03rem;
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-snug);
  margin-bottom: 0.4rem;
}

.pub-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.pub-journal {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--ink-default);
  font-size: var(--text-sm);
}

.pub-year {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: var(--weight-semibold);
  color: var(--gold-dark);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pub-authors {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.pub-tag {
  background: var(--surface-soft-solid);
  color: var(--text-muted);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: 1px solid var(--gray-200);
}

.publication-card.has-abstract:not(.is-expanded) .pub-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.publication-card.has-abstract:not(.is-expanded) .pub-authors {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.publication-card.has-abstract:not(.is-expanded) .pub-meta .pub-tag:nth-child(n+3) {
  display: none;
}

.publication-card.has-abstract.is-expanded {
  padding: 1.45rem;
}

.pub-abstract {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out),
              padding var(--duration-slow) var(--ease-out);
}

.pub-abstract-inner {
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.pub-abstract-inner.no-figure {
  grid-template-columns: 1fr;
}

.pub-abstract-text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
}

.pub-abstract-text p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
}

@media (max-width: 768px) {
  .pub-abstract-inner {
    grid-template-columns: 1fr;
  }
}

.pub-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.25rem;
}

.btn-expand {
  background: none;
  border: 1px solid var(--gray-200);
  min-height: var(--control-min-hit);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-expand:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: var(--gold-glow);
}

.pub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-min-hit);
  padding: 0.4rem 1rem;
  border: 1px solid rgba(197, 165, 90, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(197, 165, 90, 0.08);
  color: var(--gold-dark);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  transition: all var(--duration-fast) var(--ease-out);
}

.pub-link:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--brand-deep);
}

/* ============================================================
   TEACHING
   ============================================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.course-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.9rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.35rem 1.2rem;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.course-card.is-open {
  border-color: rgba(197, 165, 90, 0.4);
}

.course-icon {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  color: var(--gold);
  margin-bottom: 0;
}

.course-header {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 0;
}

.course-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 0.35vw, var(--text-xl));
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.course-code {
  font-size: var(--text-sm);
  color: var(--gold-dark);
  font-weight: var(--weight-medium);
  font-family: var(--font-display);
}

.course-toggle {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: var(--control-min-hit);
  margin-top: 0.8rem;
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 75, 64, 0.24);
  background: rgba(23, 53, 45, 0.03);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all var(--duration-fast) var(--ease-out);
}

.course-toggle:hover {
  color: var(--brand-deep);
  border-color: rgba(197, 165, 90, 0.55);
  background: rgba(197, 165, 90, 0.14);
}

.course-details {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--duration-slow) var(--ease-out),
              opacity var(--duration-normal) var(--ease-out),
              margin-top var(--duration-normal) var(--ease-out);
}

.course-card.is-open .course-details {
  opacity: 1;
  margin-top: 0.85rem;
}

.course-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
  margin-bottom: 0.85rem;
}

.course-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.topic-tag {
  background: var(--gold-glow);
  color: var(--gold-dark);
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.teaching-note {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 2rem;
  max-width: 700px;
  margin: 3rem auto 0;
}

.teaching-note h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.teaching-note p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
}

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  max-width: 750px;
  margin: 2.5rem auto 0;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--gray-200));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

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

.timeline-marker {
  position: absolute;
  left: -3rem;
  top: 4px;
  width: 24px;
  height: 24px;
  background: var(--white);
  border: 3px solid var(--gold);
  border-radius: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) var(--ease-out);
}

.timeline-item:hover .timeline-marker {
  background: var(--gold-glow);
}

.timeline-marker.education {
  background: var(--gold);
  color: var(--white);
}

.timeline-marker.icon {
  background: var(--brand-mid);
  border-color: var(--gold);
  color: var(--gold);
}

.timeline-content {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.timeline-item:hover .timeline-content {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--gold-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.timeline-org {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.timeline-description {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-base);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
  background: linear-gradient(160deg, var(--brand-deep) 0%, var(--brand-mid) 50%, var(--brand-accent) 100%);
  color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--gray-300);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a.contact-item:hover {
  color: var(--gold);
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(197, 165, 90, 0.1);
  border: 1px solid rgba(197, 165, 90, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
}

.contact-label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.15rem;
}

.contact-value {
  display: block;
  font-size: var(--text-sm);
  color: var(--gray-300);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  color: var(--gray-300);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: all var(--duration-normal) var(--ease-out);
}

.social-link:hover {
  background: rgba(197, 165, 90, 0.1);
  border-color: rgba(197, 165, 90, 0.3);
  color: var(--gold);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .social-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--brand-deep);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.5rem 0;
  text-align: center;
}

.footer p {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.fade-in-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.fade-in-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* ============================================================
   NAV CV BUTTON
   ============================================================ */
.nav-cv {
  background: var(--gold);
  color: var(--brand-deep) !important;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}

.nav-cv:hover {
  background: var(--gold-light);
  color: var(--brand-deep) !important;
}

.nav-cv::after { display: none !important; }

/* ============================================================
   SLIDES SECTION
   ============================================================ */
.slides-section {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--gray-200);
}

.subsection-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.75rem;
}

.subsection-intro {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
}

.slides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.slide-card-expandable {
  background: linear-gradient(180deg, var(--white) 0%, var(--surface-card-tint) 100%);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.slide-card-expandable:hover {
  border-color: rgba(197, 165, 90, 0.35);
  box-shadow: 0 10px 24px rgba(20, 44, 36, 0.12);
  transform: translateY(-2px);
}

.slide-card-expandable.is-open {
  border-color: rgba(197, 165, 90, 0.45);
  box-shadow: 0 14px 32px rgba(20, 44, 36, 0.16);
}

.slide-card-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(242,247,244,0.96) 100%);
  border: none;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.slide-card-toggle:hover {
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(236,244,240,1) 100%);
}

.slide-card-expandable.is-open .slide-card-toggle {
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(238,246,242,1) 100%);
}

.slide-icon {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(197, 165, 90, 0.12);
  border: 1px solid rgba(197, 165, 90, 0.2);
  color: var(--gold);
  flex-shrink: 0;
}

.slide-card-toggle h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: 0.2rem;
}

.slide-card-toggle p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.slide-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--gray-400);
  transition: transform var(--duration-normal) var(--ease-out);
}

.slide-card-toggle[aria-expanded="true"] .slide-chevron {
  transform: rotate(180deg);
}

.slide-embed {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  background: linear-gradient(180deg, rgba(23, 53, 45, 0.04) 0%, rgba(197, 165, 90, 0.07) 100%);
  transition: max-height var(--duration-slow) var(--ease-out),
              opacity var(--duration-normal) var(--ease-out);
}

.slide-card-expandable.is-open .slide-embed {
  opacity: 1;
}

.slide-embed iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 1px solid rgba(36, 56, 49, 0.18);
  border-radius: 12px;
  margin: 0.8rem 0.8rem 0.6rem;
  width: calc(100% - 1.6rem);
  box-shadow: 0 12px 26px rgba(15, 25, 35, 0.2);
}

.slide-fullscreen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-min-hit);
  margin: 0 0.8rem 0.85rem;
  width: calc(100% - 1.6rem);
  text-align: center;
  padding: 0.55rem 0.9rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: 10px;
  border: 1px solid rgba(197, 165, 90, 0.35);
  color: var(--gold-dark);
  background: rgba(255, 255, 255, 0.88);
  transition: all var(--duration-fast) var(--ease-out);
}

.slide-fullscreen:hover {
  background: rgba(197, 165, 90, 0.2);
  border-color: rgba(197, 165, 90, 0.55);
}

@media (max-width: 768px) {
  .slide-embed iframe {
    height: 280px;
  }
}

/* ============================================================
   CV DOWNLOAD BAR
   ============================================================ */
.cv-download-bar {
  text-align: center;
  margin-bottom: 2.5rem;
}

.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--gold-dark);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-cv:hover {
  background: var(--gold);
  color: var(--brand-deep);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(197, 165, 90, 0.3);
}

/* ============================================================
   INTERACTIVE CHARTS
   ============================================================ */
.pub-figure {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.pub-figure h5 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.interactive-chart {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.interactive-chart canvas {
  width: 100% !important;
  height: auto !important;
  cursor: crosshair;
}

.chart-caption {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: var(--leading-comfortable);
  margin-top: 0.75rem;
  font-style: italic;
}

.chart-tooltip {
  position: absolute;
  background: var(--brand-deep);
  color: var(--white);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-family: var(--font-display);
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in-on-scroll {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}


