/* ============================================================
   MANJILA-SEMAAN CLASSIFICATION — STYLESHEET
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --navy-900: #0a1628;
  --navy-800: #0f2040;
  --navy-700: #162d55;
  --navy-600: #1e3d6e;
  --navy-500: #2a5298;
  --gold-400: #c9a84c;
  --gold-300: #d4b96a;
  --gold-200: #e8d49a;
  --gold-100: #f5ecd2;
  --white: #ffffff;
  --off-white: #f8f7f4;
  --text-primary: #14141f;
  --text-secondary: #33404f;
  --text-muted: #55606e;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --section-alt-bg: #f4f6fa;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 6px;
  --radius-lg: 10px;
  --transition: 0.2s ease;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-height: 68px;
}

[data-theme="dark"] {
  --text-primary: #e8e8f0;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
  --border: #2d3748;
  --card-bg: #1a2035;
  --section-alt-bg: #111827;
  --off-white: #0f172a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--off-white);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section--alt {
  background: var(--section-alt-bg);
}

/* ── Section Headers ───────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--gold-400);
  color: var(--navy-900);
}
.btn--primary:hover {
  background: var(--gold-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  border: 1.5px solid var(--gold-400);
  color: var(--gold-400);
  background: transparent;
}
.btn--outline:hover {
  background: var(--gold-400);
  color: var(--navy-900);
}

.btn--full { width: 100%; justify-content: center; }

/* ── Cards ─────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.cards-grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.card--coming-soon {
  border-style: dashed;
  opacity: 0.7;
  pointer-events: none;
}

.class-figures--table-only {
  display: block;
}

.class-figures--table-only .class-table-wrap {
  width: 100%;
}

.class-figures--table-only .class-table {
  width: 100%;
}

.card__badge {
  display: inline-block;
  background: var(--navy-700);
  color: var(--gold-300);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}

[data-theme="dark"] .card__badge {
  background: var(--navy-600);
}

.card__number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-400);
  opacity: 0.4;
  margin-bottom: 12px;
  line-height: 1;
}

.card__title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card__journal {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.card__summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-400);
  transition: color var(--transition);
}
.card__link:hover { color: var(--gold-300); }

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--navy-900);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

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

.navbar__brand {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-300);
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-300);
  background: rgba(201, 168, 76, 0.1);
}

.navbar__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  font-size: 1rem;
  transition: background var(--transition);
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.15);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--navy-800) 100%);
  padding-top: var(--nav-height);
  overflow: hidden;
}

/* ── Hero Variant A: navy gradient (default) ─────────────── */
.hero--a {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--navy-800) 100%);
}

/* ── Hero Variant B: full-bleed photo background ─────────── */
.hero--b {
  background-image: url('../assets/images/Sunil Manjila - Professor Robert Spetzler.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero--b .hero__overlay {
  background: linear-gradient(
    105deg,
    rgba(10, 22, 40, 0.96) 0%,
    rgba(10, 22, 40, 0.88) 40%,
    rgba(10, 22, 40, 0.60) 65%,
    rgba(10, 22, 40, 0.30) 100%
  );
}

.hero--b .hero__content {
  text-align: left;
  margin-left: 0;
  max-width: 600px;
}

.hero--b .hero__ctas {
  justify-content: flex-start;
}

.hero--b .hero__eyebrow,
.hero--b .hero__subtitle,
.hero--b .hero__author {
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* ── Hero Variant Switcher ───────────────────────────────── */
.hero__variant-switcher {
  position: absolute;
  top: calc(var(--nav-height) + 16px);
  right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.hero__variant-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.hero__variant-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(201,168,76,0.4);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__variant-btn.active,
.hero__variant-btn:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--navy-900);
}

@media (max-width: 768px) {
  .hero--b {
    background-size: 0;
  }
  .hero--b .hero__content {
    text-align: center;
    max-width: 100%;
  }
  .hero--b .hero__ctas {
    justify-content: center;
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(42,82,152,0.3) 0%, transparent 70%);
  pointer-events: none;
}

/* Decorative gold line */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
}

.hero__content {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 80px 24px;
  max-width: 800px;
}

.hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  margin-bottom: 16px;
}

.hero__author {
  font-size: 0.9rem;
  color: var(--gold-200);
  letter-spacing: 0.05em;
  margin-bottom: 40px;
}

.hero__ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(201,168,76,0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── About ─────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: start;
}

.about__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 48px;
}


.about__profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  justify-content: center;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-top: 8px;
}

.about__headshot-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--gold-400);
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
  aspect-ratio: 3/4;
}

.about__headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Stacked photo figures inside the photos column */
.about__photo-figure {
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md);
}

.about__photo-figure:first-child {
  border-color: var(--gold-400);
  box-shadow: var(--shadow-lg);
}

.about__photo-figure img {
  width: 100%;
  height: 380px;
  display: block;
  object-fit: cover;
  object-position: center 30%;
}

.about__photo-figure figcaption {
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}

/* Document/flyer variant — show full image, no cropping */
.about__photo-figure--doc img {
  height: auto;
  object-fit: unset;
  object-position: unset;
}

/* Profile links inside bio column */
.about__bio .about__profiles {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  justify-content: flex-start;
}

.about__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.about__fig {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.about__fig img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.about__fig figcaption {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 8px;
  text-align: center;
  line-height: 1.4;
}

.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-800);
  color: var(--gold-300);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.4;
  padding: 20px;
  width: 100%;
  height: 100%;
  min-height: 120px;
}

.about__headshot-wrap .img-placeholder {
  min-height: 320px;
  aspect-ratio: 3/4;
}

.about__neil-martin {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.about__neil-martin img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.about__neil-martin figcaption {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
}

.about__bio-text {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.about__credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}

.credential-tag {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--navy-800);
  color: var(--gold-300);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(201,168,76,0.3);
}

[data-theme="dark"] .credential-tag {
  background: var(--navy-700);
}

.about__profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-400);
  border: 1px solid rgba(201,168,76,0.4);
  padding: 6px 14px;
  border-radius: 20px;
  transition: all var(--transition);
}

.profile-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.profile-link:hover {
  background: var(--gold-400);
  color: var(--navy-900);
}

/* ── Classification ────────────────────────────────────────── */
.classification__layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.classification__tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.type-tab {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  transition: all var(--transition);
  cursor: pointer;
}

.type-tab:hover {
  border-color: var(--gold-400);
  background: rgba(201,168,76,0.05);
}

.type-tab.active {
  border-color: var(--gold-400);
  background: var(--navy-800);
}

.type-tab__num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 4px;
}

.type-tab__label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

.type-tab.active .type-tab__label {
  color: var(--white);
}

.classification__panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  min-height: 480px;
}

.type-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.type-panel__svg-wrap {
  background: var(--navy-900);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border: 1px solid rgba(201,168,76,0.2);
}

.type-panel__svg-wrap img {
  max-width: 100%;
  border-radius: var(--radius);
}

.type-panel__info {}

.type-panel__badge {
  display: inline-block;
  background: var(--gold-400);
  color: var(--navy-900);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.type-panel__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.type-panel__position {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-400);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.type-panel__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.type-panel__subtypes {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.type-panel__subtypes h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.subtype-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtype-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.subtype-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-400);
  margin-top: 7px;
  flex-shrink: 0;
}

.classification__note {
  margin-top: 32px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
}

/* ── Paper ─────────────────────────────────────────────────── */
.paper__card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 880px;
  margin: 0 auto;
  border-left: 4px solid var(--gold-400);
  box-shadow: var(--shadow-md);
}

.paper__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  align-items: center;
}

.paper__journal {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.paper__year,
.paper__pmid {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.paper__title {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.paper__authors {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-style: italic;
}

.paper__abstract {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--section-alt-bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold-400);
}

.paper__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Video ─────────────────────────────────────────────────── */
.video__wrapper {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--navy-900);
  aspect-ratio: 16/9;
}

.video__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Contact ───────────────────────────────────────────────── */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.form-label span {
  color: var(--gold-400);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.form-textarea { resize: vertical; min-height: 140px; }

.form-status {
  margin-top: 16px;
  font-size: 0.88rem;
  text-align: center;
  min-height: 24px;
}

.form-status.success { color: #38a169; }
.form-status.error { color: #e53e3e; }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 32px;
  border-top: 1px solid rgba(201,168,76,0.2);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.footer__tagline {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--gold-300);
  margin-bottom: 8px;
  font-style: italic;
}

.footer__affiliation {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
}

.footer__nav a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}

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

.footer__copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  width: 100%;
  text-align: center;
}

/* ── Back to Top ───────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-400);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover { transform: translateY(-3px); }

/* ── Classification Figures (illustration + table) ────────── */
.class-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.class-fig img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--white);
}

.class-fig figcaption {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.class-fig figcaption em {
  display: block;
  margin-top: 6px;
  color: var(--gold-400);
  font-style: italic;
}

.class-table-wrap {
  overflow-x: auto;
}

.class-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.class-table caption {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: left;
  padding: 16px 20px 12px;
  border-bottom: 2px solid var(--navy-700);
  background: var(--navy-800);
  color: var(--white);
}

.class-table thead tr {
  background: var(--navy-700);
}

.class-table thead th {
  padding: 11px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-300);
  border-bottom: 1px solid rgba(201,168,76,0.3);
}

.class-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

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

.class-table tbody td {
  padding: 10px 20px;
  color: var(--text-secondary);
  vertical-align: top;
}

.class-table tbody td:first-child {
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  min-width: 90px;
}

.row-type-main td {
  background: rgba(42,82,152,0.06);
}

.row-type-main td:first-child {
  color: var(--navy-600);
}

[data-theme="dark"] .row-type-main td {
  background: rgba(42,82,152,0.15);
}

[data-theme="dark"] .row-type-main td:first-child {
  color: var(--gold-300);
}

.row-type-sub td:first-child {
  padding-left: 32px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.class-table tbody tr:hover td {
  background: rgba(201,168,76,0.05);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 300px 1fr;
    gap: 40px;
  }
  .classification__layout {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 900px) {
  .class-figures {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }

  .navbar__nav {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--navy-900);
    flex-direction: column;
    padding: 24px;
    gap: 8px;
    border-bottom: 1px solid rgba(201,168,76,0.2);
  }

  .navbar__nav.open { display: flex; }
  .navbar__brand { font-size: 0.9rem; }
  .hamburger { display: flex; }

  .nav-link {
    font-size: 0.95rem;
    padding: 10px 16px;
    width: 100%;
  }

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

  .about__photos {
    max-width: 400px;
    margin: 0 auto;
  }

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

  .classification__tabs {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
  }

  .type-tab {
    flex: 1;
    min-width: 120px;
  }

  .type-panel {
    grid-template-columns: 1fr;
  }

  .paper__card { padding: 28px 24px; }
  .contact-form { padding: 28px 20px; }

  .hero__ctas { flex-direction: column; align-items: center; }
  .paper__actions { flex-direction: column; }

  .back-to-top { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
  .section-title { font-size: 1.6rem; }
  .cards-grid, .cards-grid--3 {
    grid-template-columns: 1fr;
  }
}

/* ── Classification legend ───────────────────────────────────── */
.class-legend {
  margin: 24px 0 32px;
  padding: 20px 24px;
  background: var(--section-alt-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.class-legend__title {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 14px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.class-legend__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 32px;
}

.class-legend__grid li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.class-legend__abbr {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 4px 10px;
  background: var(--navy-800);
  color: var(--gold-200);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 5px;
  letter-spacing: 0.03em;
}

@media (max-width: 600px) {
  .class-legend__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Video link ──────────────────────────────────────────────── */
.video__link {
  margin-top: 18px;
  text-align: center;
  font-size: 0.9rem;
}

.video__link a {
  color: #2a5298;
  text-decoration: underline;
  word-break: break-word;
}

[data-theme="dark"] .video__link a {
  color: #7fa8e0;
}

/* ── About footnote ──────────────────────────────────────────── */
.about__row:last-of-type {
  margin-bottom: 0;
}

.about__footnote {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  line-height: 1.7;
  color: #2a5298;
}

.about__footnote a {
  color: #2a5298;
  text-decoration: underline;
  word-break: break-word;
}

[data-theme="dark"] .about__footnote,
[data-theme="dark"] .about__footnote a {
  color: #7fa8e0;
}

/* ── Innovation Section ──────────────────────────────────────── */
.innov__pi-credit {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.innov__pi-credit a {
  color: #2a5298;
  text-decoration: underline;
  word-break: break-word;
}

[data-theme="dark"] .innov__pi-credit a {
  color: #7fa8e0;
}

.innov__row {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 32px;
}

.innov__row--reverse {
  grid-template-columns: 7fr 5fr;
}

.innov__row-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  margin-inline: auto;
}

.innov__row--reverse .innov__row-figure {
  margin-left: auto;
  margin-right: 0;
}

.innov__row:not(.innov__row--reverse) .innov__row-figure {
  margin-left: 0;
  margin-right: auto;
}

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

.innov__row-figure figcaption {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 12px;
  background: var(--section-alt-bg);
  text-align: center;
  flex-shrink: 0;
  align-self: stretch;
}

.innov__row-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.innov__doc-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

.innov__row-text .innov__doc-text:last-child {
  margin-bottom: 0;
}

.innov__collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.innov__collage-item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
}

.innov__collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.innov__collage-item:hover img {
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .innov__row,
  .innov__row--reverse {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .innov__row--reverse .innov__row-figure {
    order: 2;
  }
  .innov__row-figure img {
    min-height: 280px;
  }
  .innov__collage {
    grid-template-columns: 1fr;
  }
}

.innov__patent-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-left: 3px solid var(--gold-400);
  padding-left: 12px;
}

.innov__patent-note svg {
  flex-shrink: 0;
  color: var(--gold-400);
}

.innov__collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.innov__collage-item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
}

.innov__collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.innov__collage-item:hover img {
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .innov__photo-figure img {
    height: 240px;
  }
}

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