/* ==========================================================================
   ANAM SAJJAD | OFFICIAL AUTHOR & SCHOLARLY PORTFOLIO
   Awwwards-Winning Luxury Architecture (2026 Edition)
   Dark Luxury • Kinetic Motion • Flawless Mobile Fluidity • Zero Distortions
   ========================================================================== */

:root,
[data-theme="dark"] {
  /* Obsidian & Midnight Luxury Palette */
  --bg-deep: #09090b;       /* Deepest Charcoal/Black */
  --bg-surface: #121316;    /* Card Surface */
  --bg-elevated: #1a1c22;   /* Hover / Elevated Layer */
  --bg-glass: rgba(18, 19, 22, 0.88);
  --bg-mesh-1: rgba(56, 189, 248, 0.08);
  --bg-mesh-2: rgba(168, 85, 247, 0.07);
  --bg-mesh-3: rgba(16, 185, 129, 0.05);
  --grain-opacity: 0.025;

  /* High-Contrast Accents */
  --accent-cyan: #38bdf8;    /* Open Science Cyan */
  --accent-purple: #a855f7;  /* Literary Violet */
  --accent-emerald: #10b981; /* Verified Authority Beacon */
  --accent-amber: #f59e0b;   /* Empirical Highlight */

  /* Text Hierarchy */
  --ink-pure: #ffffff;
  --ink-primary: #f4f4f5;
  --ink-secondary: #a1a1aa;
  --ink-muted: #71717a;

  /* Glass Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(56, 189, 248, 0.35);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 20px 40px -15px rgba(56, 189, 248, 0.2);

  /* Buttons & Interactive Elements */
  --btn-pri-bg: #ffffff;
  --btn-pri-text: #09090b;
  --btn-pri-hover: #e4e4e7;
  --btn-out-bg: rgba(255, 255, 255, 0.07);
  --btn-out-hover: rgba(255, 255, 255, 0.14);
  --drawer-bg: rgba(9, 9, 11, 0.96);
  --theme-switch-bg: rgba(255, 255, 255, 0.08);
  --theme-switch-border: rgba(255, 255, 255, 0.15);

  /* Radius & Curves */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Typography Stacks */
  --font-display: 'Syne', sans-serif;
  --font-serif: 'Newsreader', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  /* Warm Editorial Linen / Ivory Palette (Previous Version Aesthetic) */
  --bg-deep: #faf8f5;       /* Warm Ivory Page Background */
  --bg-surface: #ffffff;    /* Pure Crisp Card Surface */
  --bg-elevated: #f4f0e8;   /* Warm Subtle Surface / Hover */
  --bg-glass: rgba(250, 248, 245, 0.92);
  --bg-mesh-1: rgba(141, 91, 18, 0.05);
  --bg-mesh-2: rgba(2, 106, 167, 0.04);
  --bg-mesh-3: rgba(109, 40, 217, 0.03);
  --grain-opacity: 0.015;

  /* Literary & Academic Accents */
  --accent-cyan: #026aa7;     /* Academic Indigo / Slate Blue */
  --accent-purple: #6d28d9;   /* Literary Violet */
  --accent-emerald: #059669;  /* Verified Emerald */
  --accent-amber: #8d5b12;    /* Literary Bronze / Gold */

  /* Text Hierarchy */
  --ink-pure: #121214;        /* Deep Obsidian Primary Headers */
  --ink-primary: #1c1917;     /* High-contrast Stone Charcoal */
  --ink-secondary: #44403c;   /* Slate Charcoal Prose */
  --ink-muted: #78716c;       /* Warm Editorial Muted Metadata */

  /* Borders & Shadows */
  --border-subtle: rgba(18, 18, 20, 0.07);
  --border-glass: rgba(18, 18, 20, 0.12);
  --border-glow: rgba(2, 106, 167, 0.25);
  --shadow-card: 0 4px 18px -2px rgba(18, 18, 20, 0.05), 0 1px 3px -1px rgba(18, 18, 20, 0.03);
  --shadow-hover: 0 14px 32px -4px rgba(18, 18, 20, 0.09);

  /* Buttons & Interactive Elements */
  --btn-pri-bg: #121214;
  --btn-pri-text: #ffffff;
  --btn-pri-hover: #292524;
  --btn-out-bg: #ffffff;
  --btn-out-hover: #f5f5f4;
  --drawer-bg: rgba(250, 248, 245, 0.97);
  --theme-switch-bg: #ffffff;
  --theme-switch-border: rgba(18, 18, 20, 0.15);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background-color: var(--bg-deep);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background-color: var(--bg-deep);
  color: var(--ink-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Subtle Animated Ambient Mesh Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 15% 15%, var(--bg-mesh-1) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, var(--bg-mesh-2) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, var(--bg-mesh-3) 0%, transparent 50%);
  pointer-events: none;
  z-index: -2;
  transition: opacity 0.3s ease;
}

/* Subtle Film Grain Noise Texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

/* -------------------------------------------------- CONTAINER & SECTION WRAPPERS */
.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-wrap {
  padding: 36px 0;
}

/* Section Headings */
.section-pretitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.section-head-title {
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 4vw, 2.05rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink-pure);
  margin-bottom: 8px;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.section-head-sub {
  font-size: clamp(0.86rem, 1.8vw, 0.95rem);
  color: var(--ink-secondary);
  line-height: 1.55;
  margin-bottom: 24px;
}

/* -------------------------------------------------- AWWWARDS FLOATING NAVBAR */
.nav-fixed-wrap {
  position: sticky;
  top: 14px;
  z-index: 200;
  padding: 0 16px;
  margin-bottom: 24px;
}

.nav-glass-bar {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-card);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
  flex-shrink: 0;
}

.brand-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-glass);
}

.brand-name-text {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink-pure);
  letter-spacing: -0.01em;
}

.brand-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* Desktop Nav Links */
.nav-menu-desktop {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 16px;
}

.nav-item-link {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.nav-item-link:hover {
  color: var(--ink-pure);
}

.nav-btn-highlight {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--btn-pri-text);
  background: var(--btn-pri-bg);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn-highlight:hover {
  background: var(--btn-pri-hover);
  transform: translateY(-1px);
}

/* Actions Group (Theme Switcher + Mobile Drawer Trigger) */
.nav-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme Toggle Pill Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--theme-switch-bg);
  border: 1px solid var(--theme-switch-border);
  color: var(--ink-pure);
  padding: 5px 12px 5px 7px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
  user-select: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.theme-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent-cyan);
}

.theme-switch-track {
  position: relative;
  width: 32px;
  height: 18px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px;
  pointer-events: none;
}

.theme-switch-icon {
  font-size: 9px;
  line-height: 1;
  z-index: 1;
}

.theme-switch-thumb {
  position: absolute;
  top: 1px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan);
  transition: transform 0.22s var(--ease), background 0.22s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .theme-switch-thumb {
  transform: translateX(13px);
  background: #f59e0b;
}

.theme-toggle-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Mobile Trigger Button */
.nav-mobile-toggle {
  display: none;
  background: var(--theme-switch-bg);
  border: 1px solid var(--theme-switch-border);
  color: var(--ink-pure);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.nav-mobile-toggle:hover {
  border-color: var(--accent-cyan);
}

/* Mobile Fullscreen Menu Drawer */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--drawer-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 300;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.mobile-drawer-overlay.active {
  display: flex;
  animation: drawerFadeIn 0.2s ease;
}

@keyframes drawerFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.mobile-drawer-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--theme-switch-bg);
  border: 1px solid var(--border-glass);
  color: var(--ink-pure);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-drawer-theme-wrap {
  margin-bottom: 24px;
  width: 100%;
  max-width: 260px;
}

.theme-toggle-drawer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--theme-switch-bg);
  border: 1px solid var(--border-glass);
  color: var(--ink-pure);
  padding: 11px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.theme-toggle-drawer-btn:hover {
  border-color: var(--accent-cyan);
}

.mobile-drawer-nav {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-drawer-nav a {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink-pure);
  text-decoration: none;
  transition: var(--transition);
}

.mobile-drawer-nav a:hover {
  color: var(--accent-cyan);
}

.mobile-drawer-cta {
  margin-top: 14px;
  background: var(--btn-pri-bg) !important;
  color: var(--btn-pri-text) !important;
  padding: 12px 28px !important;
  border-radius: var(--radius-full);
  font-size: 0.92rem !important;
  font-weight: 700 !important;
}

/* -------------------------------------------------- HERO SECTION */
.hero-wrapper {
  padding: 14px 0 28px 0;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.hero-grid-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 36px;
  align-items: center;
  margin-bottom: 28px;
}

.hero-main-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.02;
  color: var(--ink-pure);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.hero-title-italic {
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
  color: var(--ink-secondary);
  font-size: 0.92em;
}

.hero-bio-lead {
  font-size: clamp(0.92rem, 1.8vw, 1.04rem);
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}

.hero-bio-lead strong {
  color: var(--ink-pure);
  font-weight: 600;
}

/* Hero Action CTAs */
.hero-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.btn-primary {
  background: var(--btn-pri-bg);
  color: var(--btn-pri-text);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: var(--btn-pri-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25);
}

.btn-secondary {
  background: var(--btn-out-bg);
  color: var(--ink-pure);
  border: 1px solid var(--border-glass);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--btn-out-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Micro Terminal Link Chips */
.hero-chips-deck {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-link {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.chip-link:hover {
  border-color: var(--accent-cyan);
  color: var(--ink-pure);
}

/* Hero Portrait Card */
.hero-portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease);
}

.hero-portrait-frame:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-hover);
}

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-portrait-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* -------------------------------------------------- INFINITE TICKER MARQUEE */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  padding: 12px 0;
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  background: rgba(18, 19, 22, 0.5);
  margin: 16px 0 28px 0;
}

.marquee-content {
  display: inline-block;
  animation: marqueeScroll 28s linear infinite;
}

.marquee-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-secondary);
  margin-right: 36px;
}

.marquee-item span {
  color: var(--accent-cyan);
  margin-right: 8px;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* -------------------------------------------------- AUTHORITATIVE SCHOLARLY ANCHOR (#authoritative-bio) */
.authoritative-manifesto {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
}

.manifesto-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 8px;
}

.manifesto-copy {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.manifesto-copy strong {
  color: #ffffff;
}

/* -------------------------------------------------- FEATURED RESEARCH MONOGRAPH */
.monograph-bento {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.monograph-bento:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: var(--shadow-hover);
}

.monograph-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.monograph-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.monograph-doi-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
  word-break: break-all;
}

.monograph-doi-tag a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.monograph-doi-tag a:hover {
  text-decoration: underline;
}

.monograph-title {
  font-family: var(--font-serif);
  font-size: clamp(1.28rem, 3.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-pure);
  margin-bottom: 10px;
  letter-spacing: -0.015em;
  word-break: normal;
  overflow-wrap: break-word;
}

.monograph-authorship {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  margin-bottom: 16px;
}

.monograph-authorship strong {
  color: var(--ink-pure);
}

.monograph-abstract {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Macroeconomic Telemetry Bento Subgrid */
.telemetry-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.telemetry-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: var(--transition);
}

.telemetry-cell:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(56, 189, 248, 0.3);
}

.stat-value {
  font-family: var(--font-sans);
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.stat-caption {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* Monograph Action Deck */
.monograph-actions-deck {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-monograph-primary {
  background: var(--btn-pri-bg);
  color: var(--btn-pri-text);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-monograph-primary:hover {
  background: #f4f4f5;
  transform: translateY(-1px);
}

.btn-monograph-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-primary);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
}

.btn-monograph-secondary:hover {
  background: var(--btn-out-hover);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* -------------------------------------------------- BOOKS & ESSAYS SHELF */
.books-shelf {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.book-shelf-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  transition: var(--transition);
}

.book-shelf-item:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 15px 30px -10px rgba(168, 85, 247, 0.15);
}

.book-category-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-purple);
  display: block;
  margin-bottom: 6px;
}

.book-item-title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-pure);
  margin-bottom: 6px;
}

.book-item-desc {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  line-height: 1.55;
  max-width: 620px;
}

.book-status-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* -------------------------------------------------- INSTITUTIONAL STANDING (NO 250 PORTALS LIST) */
.affiliations-subgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.affiliation-unit {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.affiliation-unit:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.3);
}

.affiliation-monogram {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.affiliation-unit h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-pure);
  margin-bottom: 2px;
}

.affiliation-unit p {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  line-height: 1.4;
}

.affiliation-unit code {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

/* -------------------------------------------------- PHOTOGRAPHY GALLERY */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.gallery-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.gallery-tile:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-hover);
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease);
}

.gallery-tile:hover img {
  transform: scale(1.05);
}

.gallery-license-footer {
  font-size: 0.78rem;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 14px;
}

/* -------------------------------------------------- DISAMBIGUATION & CONTACT */
.contact-hub {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-card);
}

.contact-triad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.contact-triad-item h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.contact-triad-item p {
  font-size: 0.88rem;
  color: var(--ink-pure);
}

.contact-triad-item a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

.contact-triad-item a:hover {
  text-decoration: underline;
}

/* Official Scholarly Disambiguation Card */
.disambiguation-authority-card {
  background: rgba(18, 19, 24, 0.75);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-left: 3px solid var(--accent-purple);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.disambiguation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.shield-beacon {
  color: var(--accent-cyan);
  font-size: 1rem;
}

.disambiguation-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-purple);
}

.disambiguation-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #d4d4d8;
}

.disambiguation-text strong {
  color: var(--ink-pure);
}

.disambiguation-text a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.disambiguation-text a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------- FOOTER (NO 256 PORTALS LINK) */
.site-footer-terminal {
  padding: 40px 0 32px 0;
  border-top: 1px solid var(--border-glass);
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.footer-anchors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.footer-anchors a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-weight: 500;
}

.footer-anchors a:hover {
  color: var(--ink-pure);
}

/* -------------------------------------------------- LIGHTBOX MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content-card {
  position: relative;
  max-width: 700px;
  width: 100%;
  background: #121316;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8);
}

.modal-content-card img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.modal-close-trigger {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

/* -------------------------------------------------- RESPONSIVE BREAKPOINTS */
@media (max-width: 680px) {
  .container {
    padding: 0 16px;
  }

  .nav-fixed-wrap {
    padding: 0 12px;
    top: 10px;
  }

  .nav-glass-bar {
    padding: 8px 14px;
  }

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

  .nav-mobile-toggle {
    display: inline-flex;
  }

  .hero-pill-badge {
    white-space: normal;
    text-align: center;
    font-size: 0.68rem;
    line-height: 1.4;
    padding: 6px 12px;
  }

  .hero-grid-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-portrait-frame {
    max-width: 260px;
    margin: 0 auto;
  }

  .hero-main-title {
    font-size: 2.45rem;
    line-height: 1.05;
  }

  .hero-bio-lead {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .hero-action-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 12px 20px;
  }

  .hero-chips-deck {
    gap: 6px;
  }

  .chip-link {
    font-size: 0.7rem;
    padding: 5px 8px;
    word-break: break-all;
  }

  .section-head-title {
    font-size: 1.3rem;
    line-height: 1.22;
    letter-spacing: -0.02em;
  }

  .monograph-bento {
    padding: 18px 16px;
  }

  .monograph-title {
    font-size: 1.22rem;
    line-height: 1.3;
  }

  .telemetry-bento-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .monograph-actions-deck {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .btn-monograph-primary,
  .btn-monograph-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 11px 16px;
  }

  .book-shelf-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .affiliations-subgrid {
    grid-template-columns: 1fr;
  }

  .gallery-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-strip .gallery-tile:nth-child(5) {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
  }

  .contact-triad-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .disambiguation-authority-card {
    padding: 14px 16px;
  }
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------- LIGHT THEME SPECIFIC POLISH */
[data-theme="light"] .authoritative-manifesto {
  background: #f7fbfe;
  border: 1px solid rgba(2, 106, 167, 0.18);
  border-left: 3px solid var(--accent-cyan);
}

[data-theme="light"] .disambiguation-authority-card {
  background: #fbf7ff;
  border: 1px solid rgba(109, 40, 217, 0.18);
  border-left: 3px solid var(--accent-purple);
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .hero-pill-badge {
  color: var(--accent-cyan);
  background: #edf6fc;
  border: 1px solid rgba(2, 106, 167, 0.2);
}

[data-theme="light"] .marquee-container {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

[data-theme="light"] .chip-link {
  background: #ffffff;
  color: var(--ink-muted);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .chip-link:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

[data-theme="light"] .affiliation-monogram {
  background: rgba(2, 106, 167, 0.08);
  border: 1px solid rgba(2, 106, 167, 0.2);
  color: var(--accent-cyan);
}

@media (max-width: 440px) {
  .theme-toggle-btn {
    padding: 5px 8px;
  }
  .theme-toggle-label {
    display: none;
  }
}
