/* ============================================================
   DAVID TOM FOSS — Entity Home v3.0
   Navy #0A1628 | Gold #C9A96E | Off-white #F8F6F3
   Cormorant Garamond (heading) | Inter (body)
   ============================================================ */

/* ── View Transitions API ── */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation-duration: 0.25s;
  animation-timing-function: ease-out;
}
::view-transition-new(root) {
  animation-duration: 0.25s;
  animation-timing-function: ease-in;
}

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --navy:       #0A1628;
  --navy-mid:   #0f1f3a;
  --navy-light: #162444;
  --gold:       #C9A96E;
  --gold-light: #dfc08a;
  --gold-dim:   #a07d45;
  --offwhite:   #F8F6F3;
  --white:      #ffffff;
  --text:       var(--navy);
  --text-muted: #4a5568;
  --bg:         var(--offwhite);
  --card-bg:    var(--white);
  --card-border:rgba(10,22,40,0.08);
  --nav-bg:     rgba(248,246,243,0.92);
  --section-alt:#F0EDE8;
  --shadow-sm:  0 2px 8px rgba(10,22,40,0.06);
  --shadow-md:  0 8px 32px rgba(10,22,40,0.10);
  --shadow-lg:  0 20px 60px rgba(10,22,40,0.14);
  --radius:     8px;
  --radius-lg:  16px;
  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
  --font-head:  'Cormorant Garamond', Georgia, serif;
  --font-body:  'Inter', -apple-system, sans-serif;
  /* Typography extras */
  --tracking-heading: -0.02em;
  --tracking-label:   0.12em;
  --measure:          65ch;
  /* Warm text for light mode prose */
  --color-text-warm:  #1A1A2E;
}

[data-theme="dark"] {
  --text:       #e8e4dd;
  --text-muted: #9ba3b2;
  --bg:         var(--navy);
  --card-bg:    var(--navy-light);
  --card-border:rgba(201,169,110,0.12);
  --nav-bg:     rgba(10,22,40,0.95);
  --section-alt:#0f1f3a;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.5);
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  cursor: auto;
}

body.lenis-smooth { overflow: hidden; }

/* ── Skip Link ── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  background: var(--gold);
  color: var(--navy);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ── Scroll Progress Bar ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-light));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── SVG Grain Overlay ── */
#noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 182px;
}
[data-theme="dark"] #noise-overlay {
  opacity: 0.10;
  mix-blend-mode: soft-light;
}

/* ── Navigation ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--card-border);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  box-shadow: var(--shadow-md);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color var(--transition);
}
.nav-logo span { color: var(--gold); }
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1.5px;
  bottom: 0;
  left: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: bottom left;
  transition: transform 0.3s ease-out;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--gold); background: rgba(201,169,110,0.08); outline: none; }
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 0;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
}
.lang-btn {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lang-btn.active { color: var(--navy); background: var(--gold); }
.lang-btn:hover:not(.active) { color: var(--gold); }
/* Theme toggle */
.theme-toggle {
  width: 44px; height: 44px;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  font-size: 1rem;
}
.theme-toggle:hover, .theme-toggle:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201,169,110,0.08);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav overlay */
#mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 850;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
#mobile-nav.open { opacity: 1; pointer-events: all; }
#mobile-nav a {
  font-family: var(--font-head);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 300;
  color: var(--offwhite);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
#mobile-nav a:hover { color: var(--gold); }

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

/* ── Hero Section ── */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 2rem 80px;
}

/* Animated gradient hero in dark mode */
[data-theme="dark"] #hero {
  background: linear-gradient(-45deg, #0a1628, #111d35, #182642, #0a1628);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(201,169,110,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(10,22,40,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(248,246,243,0) 0%, transparent 70%);
  animation: meshDrift 18s ease-in-out infinite alternate;
}
[data-theme="dark"] .hero-mesh {
  opacity: 0;
}
@keyframes meshDrift {
  0%   { background-position: 0% 0%, 100% 100%, 50% 50%; }
  100% { background-position: 30% 20%, 70% 80%, 60% 40%; }
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6rem;
  position: relative;
  z-index: 1;
}
.hero-content { max-width: 680px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.75rem;
  opacity: 0;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.0;
  letter-spacing: var(--tracking-heading);
  margin-bottom: 0.4rem;
  overflow: hidden;
}

/* Gold shimmer — dark mode only */
[data-theme="dark"] .hero-name {
  background: linear-gradient(to right, #8a6e2f, #c9a84c, #f6e27a, #f6f2c0, #f6e27a, #c9a84c, #8a6e2f);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: gold-shimmer 8s ease-in-out infinite alternate;
}
@keyframes gold-shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-subtitle {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.5vw, 1.7rem);
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
}
.hero-location {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
}
.hero-location svg { vertical-align: middle; margin-right: 0.3em; }
.hero-bio {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: var(--measure);
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
}
.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  min-height: 44px;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,169,110,0.35); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  border: 1.5px solid var(--card-border);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
  min-height: 44px;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* Hero photo — grayscale to color */
.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(40px);
}
.hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: var(--radius-lg);
  z-index: -1;
  animation: photoFrameDrift 6s ease-in-out infinite alternate;
}
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(201,168,76,0.15), transparent 60%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
@keyframes photoFrameDrift {
  from { transform: translate(0,0); }
  to   { transform: translate(4px,-6px); }
}
.hero-photo {
  width: 260px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  filter: grayscale(100%) contrast(1.05) brightness(0.95);
  transition: filter 0.6s ease;
}
.hero-photo-wrap:hover .hero-photo {
  filter: grayscale(0%);
}

/* ── Section Shared ── */
.section {
  padding: calc(40px + 5vw) 2.5rem;
}
.section.alt-bg { background: var(--section-alt); }
.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.section-tag {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.section-heading {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: var(--tracking-heading);
  margin-bottom: 1.5rem;
}
.section-heading .word { display: inline-block; overflow: hidden; }
.section-heading .word-inner { display: inline-block; transform: translateY(100%); }
.section-lead {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: var(--measure);
  line-height: 1.8;
}

/* ── Ornamental Gold Rule ── */
.gold-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  height: auto;
  background: none;
  margin: 1.5rem 0 2rem;
  font-size: 0.7rem;
  color: var(--gold);
  opacity: 0.6;
}
.gold-rule::before,
.gold-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.4), transparent);
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  margin-top: 3rem;
}
.about-text p {
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: var(--measure);
}
.about-text p:first-child {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 400;
}

/* Light mode warm text */
:root .about-text p,
:root .section-lead,
:root .hero-bio {
  color: var(--color-text-warm);
}
[data-theme="dark"] .about-text p,
[data-theme="dark"] .section-lead,
[data-theme="dark"] .hero-bio {
  color: var(--text-muted);
}
:root .about-text p:first-child {
  color: var(--navy);
}

/* Drop cap — first letter of about section */
.about-text p:first-child::first-letter {
  float: left;
  font-size: 4.5em;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.1em;
  font-family: var(--font-head);
  color: var(--gold);
  font-weight: 300;
}

.about-meta {
  position: sticky;
  top: 100px;
}
.meta-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.meta-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.meta-value {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
}
.meta-value a { color: var(--gold); text-decoration: none; }
.meta-value a:hover { text-decoration: underline; }

/* ── Metrics Banner ── */
#metrics {
  background: var(--navy);
  padding: 80px 2.5rem;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] #metrics { background: var(--navy-mid); }
#metrics::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 100% at 50% 50%, rgba(201,169,110,0.06) 0%, transparent 70%);
}
.metrics-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 1px;
  background: rgba(201,169,110,0.12);
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.metric-item {
  background: var(--navy);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: background var(--transition);
}
[data-theme="dark"] .metric-item { background: var(--navy-mid); }
.metric-item:hover { background: var(--navy-light); }
.metric-number {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: rgba(248,246,243,0.55);
}

/* ── Research Cards ── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 3rem;
}
.research-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.research-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.research-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(201,169,110,0.2); }
.research-card:hover::before { transform: scaleX(1); }
.research-icon {
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
  display: block;
}
.research-card h3 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.research-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ── Publications ── */
.pub-list { margin-top: 3rem; display: flex; flex-direction: column; gap: 32px; }
.pub-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
  transition: transform var(--transition), box-shadow var(--transition);
}
.pub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pub-year {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  opacity: 0.6;
  min-width: 80px;
}
.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}
.pub-badge.peer-reviewed { background: rgba(201,169,110,0.12); color: var(--gold); border: 1px solid rgba(201,169,110,0.25); }
.pub-badge.preprint { background: rgba(22,36,68,0.08); color: var(--text-muted); border: 1px solid var(--card-border); }
[data-theme="dark"] .pub-badge.preprint { background: rgba(255,255,255,0.05); }
.pub-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline;
}
.pub-title::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: bottom left;
  transition: transform 0.3s ease-out;
}
.pub-card:hover .pub-title::after {
  transform: scaleX(1);
}
.pub-meta { font-size: 0.82rem; color: var(--text-muted); }
.pub-links { display: flex; gap: 0.75rem; margin-top: 0.75rem; flex-wrap: wrap; }
.pub-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 3px;
  transition: background var(--transition), color var(--transition);
}
.pub-link:hover { background: var(--gold); color: var(--navy); }

/* ── Software ── */
.software-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 3rem;
}
.software-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.software-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(201,169,110,0.2); }
.sw-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; gap: 1rem; }
.sw-name {
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.sw-lang {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--gold);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.sw-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.sw-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.sw-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  transition: opacity var(--transition);
}
.sw-link:hover { opacity: 0.7; }

/* ── Patents ── */
.patents-intro {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}
.patents-count {
  font-family: var(--font-head);
  font-size: 4rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
}
.patents-note { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }
.patent-list { display: flex; flex-direction: column; gap: 0.75rem; }
.patent-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.patent-num {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  white-space: nowrap;
  min-width: 55px;
}
.patent-title { font-size: 0.9rem; color: var(--text); }

/* ── Timeline ── */
.timeline {
  margin-top: 3rem;
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold) 10%, var(--gold) 90%, transparent);
  opacity: 0.3;
}
.timeline-item {
  position: relative;
  padding: 0 0 2.5rem 2.5rem;
  opacity: 0;
  transform: translateX(-20px);
}
.timeline-item.visible { opacity: 1; transform: none; transition: opacity 0.6s, transform 0.6s; }
.timeline-dot {
  position: absolute;
  left: -6px; top: 8px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--gold);
  transition: background var(--transition);
}
.timeline-item:hover .timeline-dot { background: var(--gold); }
.timeline-year {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.timeline-event {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

/* ── Now Section ── */
#now .now-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
  align-items: start;
}
.now-list { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; }
.now-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.now-item:hover { border-color: rgba(201,169,110,0.3); }
.now-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 0.5em;
  animation: badgePulse 3s ease-in-out infinite;
}
.now-item p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }
.now-updated {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1.5rem;
}
.now-sidebar {
  position: sticky;
  top: 100px;
}
.now-status-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.now-status-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.green { background: #4ade80; animation: badgePulse 2s infinite; }
.status-dot.yellow { background: #fbbf24; animation: badgePulse 2.5s infinite; }
.status-dot.blue { background: #60a5fa; animation: badgePulse 3s infinite; }

/* ── Testimonials ── */
.testimonial-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 800px; }
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: -0.5rem; left: 1.5rem;
  font-family: var(--font-head);
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.2;
  line-height: 1;
}
.testimonial-quote {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.testimonial-attribution { display: flex; align-items: center; gap: 1rem; }
.testimonial-name { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.testimonial-role { font-size: 0.82rem; color: var(--text-muted); }
.testimonial-context { font-size: 0.75rem; color: var(--gold); font-style: italic; margin-top: 0.2rem; }

/* ── Media Kit ── */
.mediakit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}
.mediakit-bio-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  grid-column: 1 / -1;
}
.bio-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.bio-tab {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  min-height: 44px;
}
.bio-tab.active { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.bio-content { font-size: 0.92rem; line-height: 1.75; color: var(--text-muted); }
.bio-content[hidden] { display: none; }
.mediakit-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.mediakit-item h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  cursor: pointer;
}
.topic-list { list-style: none; }
.topic-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topic-list li::before { content: '→'; color: var(--gold); font-size: 0.8rem; }
.topic-list li:last-child { border-bottom: none; }

/* ── Affiliations ── */
.affiliations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 3rem;
}
.affil-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.affil-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.affil-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.affil-role { font-size: 0.85rem; font-weight: 600; color: var(--gold); margin-bottom: 0.5rem; }
.affil-id { font-size: 0.78rem; color: var(--text-muted); }

/* ── Connect ── */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}
.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
}
.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(201,169,110,0.25); }
.profile-icon { font-size: 1.5rem; }
.profile-platform {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.profile-card:hover .profile-platform { color: var(--gold); }
.profile-handle { font-size: 0.78rem; color: var(--text-muted); }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(248,246,243,0.7);
  padding: 60px 2.5rem 40px;
}
[data-theme="dark"] footer { background: #050d1a; }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-ornament {
  text-align: center;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-ornament::before,
.footer-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.4), transparent);
}
.footer-diamond { color: var(--gold); font-size: 0.8rem; }
.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 3rem;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--offwhite);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.footer-logo span { color: var(--gold); }
.footer-tagline { font-size: 0.82rem; opacity: 0.55; line-height: 1.6; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-col-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col-links a {
  font-size: 0.82rem;
  color: rgba(248,246,243,0.55);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col-links a:hover { color: var(--gold); }
/* Newsletter */
.footer-newsletter { grid-column: 1 / -1; display: flex; gap: 0; max-width: 380px; margin-top: 1rem; }
.footer-email-input {
  flex: 1;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,169,110,0.2);
  border-right: none;
  border-radius: 4px 0 0 4px;
  color: var(--offwhite);
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  min-height: 44px;
}
.footer-email-input::placeholder { color: rgba(248,246,243,0.35); }
.footer-email-input:focus { border-color: var(--gold); }
.footer-subscribe {
  padding: 0.7rem 1.25rem;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 0 4px 4px 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
  min-height: 44px;
}
.footer-subscribe:hover { background: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(201,169,110,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
  color: rgba(248,246,243,0.4);
}
.footer-bottom a { color: rgba(201,169,110,0.6); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }
.footer-shortcuts { display: flex; gap: 1.5rem; }
.kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 3px;
  font-size: 0.68rem;
  color: rgba(201,169,110,0.5);
}

/* ── Back to Top ── */
#back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 800;
  width: 48px; height: 48px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  pointer-events: none;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
#back-to-top:hover { background: var(--gold-light); transform: translateY(-3px); }

/* ── Scramble Text ── */
.scramble-text { display: inline; }

/* ── Pub Cite Button ── */
.pub-cite-btn {
  background: transparent;
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 3px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  transition: background var(--transition), color var(--transition);
  min-height: 28px;
  font-family: var(--font-body);
}
.pub-cite-btn:hover { background: var(--gold); color: var(--navy); }
.pub-cite-btn svg { flex-shrink: 0; }

/* ── Frameworks & Systems ── */
.frameworks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 3rem;
}
.fw-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.fw-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.fw-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(201,169,110,0.2); }
.fw-card:hover::before { transform: scaleX(1); }
.fw-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.fw-mono {
  font-family: 'Source Code Pro', 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.fw-full-name {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.fw-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.fw-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.fw-badge-ieee { background: rgba(201,169,110,0.12); color: var(--gold); border: 1px solid rgba(201,169,110,0.25); }
.fw-badge-live { background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.25); }
.fw-badge-research { background: rgba(96,165,250,0.12); color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }
.fw-badge-pypi { background: rgba(22,36,68,0.08); color: var(--text-muted); border: 1px solid var(--card-border); }
[data-theme="dark"] .fw-badge-pypi { background: rgba(255,255,255,0.05); }
.fw-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.fw-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 3px;
  transition: background var(--transition), color var(--transition);
}
.fw-link:hover { background: var(--gold); color: var(--navy); }

/* ── Command Palette ── */
#cmd-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(10,22,40,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  transition: opacity 0.2s;
}
#cmd-palette-overlay[hidden] { display: none; }
#cmd-palette {
  background: var(--navy);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: cmdSlideIn 0.2s cubic-bezier(0.16,1,0.3,1);
}
@keyframes cmdSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cmd-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(201,169,110,0.1);
}
.cmd-search-icon { color: rgba(201,169,110,0.5); flex-shrink: 0; }
.cmd-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--offwhite);
  caret-color: var(--gold);
  min-height: 32px;
}
.cmd-search-input::placeholder { color: rgba(248,246,243,0.3); }
.cmd-esc-hint {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(248,246,243,0.3);
  border: 1px solid rgba(248,246,243,0.15);
  border-radius: 3px;
  padding: 0.15rem 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.cmd-results {
  list-style: none;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,169,110,0.2) transparent;
}
.cmd-results:empty::after {
  content: 'No results';
  display: block;
  padding: 1.5rem 1.25rem;
  font-size: 0.85rem;
  color: rgba(248,246,243,0.35);
  font-style: italic;
}
.cmd-group-label {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201,169,110,0.45);
  padding: 0.75rem 1.25rem 0.35rem;
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 2px solid transparent;
}
.cmd-item:hover, .cmd-item.active {
  background: rgba(201,169,110,0.08);
  border-left-color: var(--gold);
}
.cmd-item.active .cmd-item-name { color: var(--gold); }
.cmd-item-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,169,110,0.08);
  border-radius: 6px;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--gold);
}
.cmd-item-name {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(248,246,243,0.85);
  flex: 1;
}
.cmd-item-hint {
  font-size: 0.7rem;
  color: rgba(248,246,243,0.3);
  font-style: italic;
  white-space: nowrap;
}
.cmd-footer {
  display: flex;
  gap: 1.25rem;
  padding: 0.6rem 1.25rem;
  border-top: 1px solid rgba(201,169,110,0.1);
  font-size: 0.7rem;
  color: rgba(248,246,243,0.3);
}
.cmd-footer kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border: 1px solid rgba(248,246,243,0.15);
  border-radius: 3px;
  font-size: 0.62rem;
  color: rgba(248,246,243,0.4);
  margin-right: 0.25rem;
  font-family: var(--font-body);
}

/* ── ⌘K Badge in navbar ── */
.cmd-k-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  color: var(--text-muted);
  min-height: 32px;
}
.cmd-k-badge:hover, .cmd-k-badge:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,169,110,0.06);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.cmd-k-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9600;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(10,22,40,0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastIn 0.3s cubic-bezier(0.16,1,0.3,1) forwards;
  pointer-events: all;
  max-width: 280px;
}
.toast.hiding {
  animation: toastOut 0.25s ease-in forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(20px) scale(0.95); }
}
.toast-icon { flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 1280px) {
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .nav-inner { padding: 0 1.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-photo-wrap { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-meta { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .affiliations-grid { grid-template-columns: repeat(2, 1fr); }
  .profiles-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
  .now-grid { grid-template-columns: 1fr !important; }
  .frameworks-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: calc(32px + 4vw) 1.5rem; }
}
@media (max-width: 768px) {
  .section { padding: 56px 1.5rem; }
  .research-grid { grid-template-columns: 1fr; }
  .software-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .affiliations-grid { grid-template-columns: 1fr; }
  .profiles-grid { grid-template-columns: repeat(2, 1fr); }
  .mediakit-grid { grid-template-columns: 1fr; }
  .pub-card { grid-template-columns: 1fr; gap: 0.75rem; }
  .pub-year { font-size: 1.8rem; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .frameworks-grid { grid-template-columns: 1fr; }
  #cmd-palette { max-width: calc(100vw - 2rem); }
  #cmd-palette-overlay { padding-top: 8vh; padding-left: 1rem; padding-right: 1rem; }
  .cmd-k-badge { display: none; }
  .about-meta { grid-template-columns: 1fr; }
  .research-card, .software-card, .fw-card { padding: 1.5rem; }
  .pub-card { padding: 1.5rem; }
  #metrics { padding: 48px 1.5rem; }
  .metric-item { padding: 1.5rem 1rem; }
  .patents-intro { flex-direction: column; gap: 1rem; text-align: center; }
  .patents-count { font-size: 3rem; }
  .patent-abstract { padding: 0 0 0 2rem; }
  .patent-item.open .patent-abstract { padding: 0.5rem 0 1rem 2rem; }
  .hero-bio { font-size: 0.92rem; }
  #hero { padding: 100px 1.5rem 60px; }
  .testimonial-card { padding: 1.5rem; }
  .mediakit-bio-card { padding: 1.5rem; }
  .mediakit-item { padding: 1.5rem; }
  .bio-tabs { flex-wrap: wrap; }
  .footer-top { gap: 2rem; }
}
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn-primary, .hero-ctas .btn-secondary { width: 100%; justify-content: center; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-number { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .profiles-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .nav-inner { padding: 0 1rem; }
  .lang-btn { padding: 0.3rem 0.45rem; font-size: 0.68rem; }
  .section { padding: 40px 1rem; }
  #hero { padding: 90px 1rem 48px; }
  .section-heading { font-size: clamp(1.6rem, 6vw, 2.5rem); }
  .hero-name { font-size: clamp(2.4rem, 11vw, 4rem); }
  .hero-subtitle { font-size: clamp(0.95rem, 3.5vw, 1.3rem); }
  .about-text p:first-child::first-letter { font-size: 3em; }
  .pub-links { gap: 0.5rem; }
  .pub-link { font-size: 0.68rem; padding: 0.15rem 0.5rem; }
  .sw-links { gap: 0.5rem; }
  .fw-links { gap: 0.5rem; }
  .fw-mono { font-size: 1rem; }
  .patent-item { flex-direction: column; gap: 0.25rem; padding: 0.85rem 1rem; }
  .patent-num { min-width: auto; }
  .patent-abstract, .patent-item.open .patent-abstract { padding-left: 0; }
  .now-item { padding: 1rem; }
  .testimonial-quote { font-size: 1.1rem; }
  .footer-newsletter { max-width: 100%; }
  .pub-ranking { flex-direction: column; text-align: center; gap: 0.5rem; }
  .profile-card { padding: 1rem; }
  .affil-card { padding: 1.25rem; }
  .affil-name { font-size: 1.1rem; }
  .meta-card { padding: 1.25rem; }
}
@media (max-width: 360px) {
  .nav-controls { gap: 0.35rem; }
  .lang-switcher { display: none; }
  .hero-name { font-size: clamp(2rem, 10vw, 3.5rem); }
  .metric-number { font-size: 1.6rem; }
  .metric-label { font-size: 0.6rem; }
  .footer-shortcuts { display: none; }
}

/* ── Print ── */
@media print {
  #navbar, #noise-overlay,
  #back-to-top, #scroll-progress, #metrics, .hero-ctas, .hero-mesh,
  .hero-photo-wrap, footer .footer-newsletter, .hamburger, #mobile-nav,
  #cmd-palette-overlay, #toast-container, .cmd-k-badge { display: none !important; }
  body { color: #000 !important; background: #fff !important; cursor: auto !important; font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  .section { padding: 1.5rem 0; break-inside: avoid; }
  .card, .pub-card, .software-card, .research-card { border: 1px solid #ccc !important; break-inside: avoid; }
  h1, h2, h3 { color: #000 !important; }
  .section-heading, .hero-name { font-size: 18pt !important; }
}

/* ── SSRN Ranking Badge ── */
.pub-ranking { display:flex; align-items:center; gap:1rem; margin-bottom:2.5rem; padding:1rem 1.5rem; border:1px solid var(--gold-20); border-radius:8px; background:rgba(201,169,110,0.04); }
.ranking-badge { font-family:'Cormorant Garamond',serif; font-size:1.5rem; font-weight:700; color:var(--gold); white-space:nowrap; }
.ranking-text { font-size:0.85rem; color:var(--text-secondary); }
[data-theme="dark"] .pub-ranking { background:rgba(201,169,110,0.06); }
[data-theme="dark"] .ranking-text { color:var(--text-light-secondary); }

/* ── eJournal Tags ── */
.pub-ejournal { font-size:0.72rem; margin-top:0.5rem; color:var(--gold); font-weight:500; letter-spacing:0.03em; opacity:0.85; }

/* ── Distributed Badge ── */
.pub-badge.distributed { background:rgba(34,197,94,0.12); color:#16a34a; }
[data-theme="dark"] .pub-badge.distributed { background:rgba(34,197,94,0.15); color:#4ade80; }

/* ── Publication CTA Links ── */
.pub-cta { margin-top:2rem; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; }
.pub-cta a { color:var(--gold); font-size:0.8rem; font-weight:600; letter-spacing:0.05em; text-decoration:none; transition:color 0.2s; }
.pub-cta a:hover { color:var(--gold-light); }

/* ── Expandable Patent Abstracts ── */
.patent-item { cursor:pointer; transition:background 0.2s; }
.patent-item:hover { background:rgba(201,169,110,0.04); }
.patent-abstract { max-height:0; overflow:hidden; transition:max-height 0.4s ease, padding 0.3s ease; padding:0 0 0 3.5rem; font-size:0.78rem; color:var(--text-secondary); line-height:1.7; }
.patent-item.open .patent-abstract { max-height:300px; padding:0.5rem 0 1rem 3.5rem; }
.patent-item .patent-title::after { content:' +'; font-weight:400; color:var(--gold); opacity:0.6; font-size:0.8em; }
.patent-item.open .patent-title::after { content:' −'; }
[data-theme="dark"] .patent-abstract { color:var(--text-light-secondary); }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-mesh { animation: none !important; }
  [data-theme="dark"] #hero { animation: none !important; }
  [data-theme="dark"] .hero-name { animation: none !important; }
  body { cursor: auto !important; }
}
