/* ==========================================================================
   Google Antigravity Design System — Crisp White & Red Antigravity Tokens
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,400;0,600;1,400&family=Google+Sans+Flex:wght@300;400;500;600;700;800&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=swap');

:root {
  /* Clean White Palette with Google Red Antigravity Accents */
  --theme-bg: #ffffff;
  --theme-surface: #ffffff;
  --theme-surface-container: #f8fafc;
  --theme-surface-elevated: #f1f5f9;
  --theme-surface-on-surface: #0f172a; /* Deep Charcoal Black */
  --theme-surface-on-surface-variant: #0a0a0a; /* Deep Black */
  
  --theme-primary: #0067C5; /* Brand Blue */
  --theme-primary-glow: rgba(39, 130, 228, 0.25);
  --theme-secondary: #00216E; /* Deep Navy */
  --theme-accent: #2782E4; /* Bright Blue */

  --theme-outline: rgba(15, 23, 42, 0.12);
  --theme-outline-hover: rgba(39, 130, 228, 0.4);
  
  /* Shapes & Corners */
  --shape-corner-xs: 4px;
  --shape-corner-sm: 8px;
  --shape-corner-md: 12px;
  --shape-corner-lg: 20px;
  --shape-corner-xl: 32px;
  --shape-corner-rounded: 9999px;

  /* Spacing Tokens */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-4xl: 64px;
  --space-6xl: 96px;
  --space-8xl: 128px;

  /* Typography */
  --font-sans: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'Google Sans Code', monospace;
  
  /* Layout Grid */
  --grid-max-width: 1280px;
  --grid-columns: 12;
  --grid-gutter: 24px;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--theme-bg);
  color: var(--theme-surface-on-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  cursor: default;
}

/* 12-Column Grid Layout Utility */
.grid-container {
  width: 100%;
  max-width: var(--grid-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.grid-row {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gutter);
}

/* Debug Grid Overlay */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: none;
  opacity: 0.6;
}

.grid-overlay.active {
  display: block;
}

.grid-overlay .grid-row {
  height: 100%;
}

.grid-col-visual {
  background-color: rgba(0, 103, 197, 0.04);
  border-left: 1px dashed rgba(0, 103, 197, 0.2);
  border-right: 1px dashed rgba(0, 103, 197, 0.2);
  height: 100%;
}

/* Custom Interactive Red Antigravity Cursor */
.custom-cursor-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9990;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%) scale(1);
  padding: 6px 16px;
  background: var(--theme-surface-on-surface);
  color: #ffffff;
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--shape-corner-rounded);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.2), 0 0 15px var(--theme-primary-glow);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.15s ease-out;
  pointer-events: none;
  white-space: nowrap;
}

.custom-cursor::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--theme-primary);
}

.custom-cursor.visible {
  opacity: 1;
}

.custom-cursor.active {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--theme-primary);
  color: #ffffff;
}

/* Canvas Background Particles */
.morphing-particles-component-section {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.morphing-particles-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Reactive Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-bottom 0.3s ease;
}

.header[data-scroll-reactive="true"].scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--theme-outline);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--theme-surface-on-surface);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--theme-primary);
  transition: transform 0.4s ease;
}

.logo-link:hover .logo-icon {
  transform: rotate(180deg) scale(1.1);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-link {
  color: var(--theme-surface-on-surface-variant);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
  padding: 6px 12px;
  border-radius: var(--shape-corner-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--theme-primary);
  background-color: rgba(0, 103, 197, 0.06);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Button Component Tokens */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--shape-corner-rounded);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: var(--theme-primary);
  color: #ffffff;
  border-color: var(--theme-primary);
  box-shadow: 0 4px 15px var(--theme-primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #004EA7;
  box-shadow: 0 6px 25px var(--theme-primary-glow);
}

.btn-secondary {
  background: #ffffff;
  color: var(--theme-surface-on-surface);
  border-color: var(--theme-outline);
}

.btn-secondary:hover {
  background: var(--theme-surface-container);
  border-color: var(--theme-outline-hover);
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: var(--space-6xl);
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--shape-corner-rounded);
  background: rgba(0, 103, 197, 0.08);
  border: 1px solid rgba(0, 103, 197, 0.25);
  color: var(--theme-primary);
  font-family: var(--font-code);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: #0f172a;
  margin-bottom: var(--space-md);
}

.text-gradient {
  background: linear-gradient(135deg, #0f172a 20%, var(--theme-primary) 70%, var(--theme-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--theme-surface-on-surface-variant);
  max-width: 620px;
  margin-bottom: var(--space-xl);
}

.typed-container {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-code);
  color: var(--theme-primary);
  font-weight: 600;
}

.blinking-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background-color: var(--theme-primary);
  margin-left: 4px;
  animation: blink 1s infinite;
}

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

.landing-video-section {
  width: 100%;
  margin-top: var(--space-md);
}

.media-credit {
  margin-top: 6px;
  font-family: var(--font-code);
  font-size: 0.48rem;
  color: var(--theme-surface-on-surface-variant);
  text-align: left;
}

.video-wrapper {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  border: none;
  box-shadow: none;
  background: #0f172a;
}

/* Media — Full Coverage */
.video-wrapper canvas,
.video-wrapper video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Feature Copy & Media */
.feature-explorer-section {
  padding: var(--space-md) 0 var(--space-4xl);
  margin-top: calc(-1 * var(--space-4xl));
  position: relative;
  z-index: 1;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6xl);
}

.feature-item {
  align-items: center;
}

.feature-copy {
  padding: var(--space-xl) 0;
}

.feature-copy h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.feature-copy p {
  color: var(--theme-surface-on-surface-variant);
  font-size: 1.05rem;
  margin-bottom: var(--space-lg);
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-lg);
}

.tag-pill {
  padding: 6px 14px;
  border-radius: var(--shape-corner-rounded);
  background: #f1f5f9 !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
  font-size: 0.82rem;
  font-family: var(--font-code);
  font-weight: 600;
}

.feature-media {
  position: relative;
  border-radius: var(--shape-corner-lg);
  overflow: hidden;
  border: 1px solid var(--theme-outline);
  aspect-ratio: 16 / 10;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  background: #ffffff;
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transition: transform 0.5s ease;
}

.feature-media:hover img {
  transform: scale(1.05);
}

/* Timeline & Solid Cards (100% Opaque Non-transparent) */
.timeline-section {
  padding: var(--space-6xl) 0;
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-top: 1px solid var(--theme-outline);
  border-bottom: 1px solid var(--theme-outline);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--theme-primary), var(--theme-secondary), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-4xl);
}

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

.timeline-dot {
  position: absolute;
  left: -36px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--theme-primary);
  box-shadow: 0 0 10px var(--theme-primary-glow);
  border: 3px solid #ffffff;
}

.timeline-content, .solid-card, .blog-card {
  background-color: #ffffff !important; /* 100% Solid White Opaque */
  background: #ffffff !important;
  border: 1px solid var(--theme-outline) !important;
  border-radius: var(--shape-corner-lg);
  padding: var(--space-xl);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.07) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
  z-index: 2;
}

.timeline-content:hover, .solid-card:hover, .blog-card:hover {
  border-color: var(--theme-outline-hover) !important;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12) !important;
}

.timeline-period {
  font-family: var(--font-code);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--theme-primary);
  margin-bottom: var(--space-xs);
}

.timeline-role {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 1rem;
  color: var(--theme-surface-on-surface-variant);
  margin-bottom: var(--space-md);
}

/* Blog & Publications Controls */
.blog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  position: relative;
  z-index: 2;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff !important;
  border: 1px solid var(--theme-outline);
  border-radius: var(--shape-corner-rounded);
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05);
  width: 100%;
  max-width: 380px;
}

.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--theme-surface-on-surface);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  width: 100%;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: var(--shape-corner-rounded);
  background: #ffffff !important;
  border: 1px solid var(--theme-outline);
  color: var(--theme-surface-on-surface-variant);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--theme-primary) !important;
  color: #ffffff !important;
  border-color: var(--theme-primary) !important;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
  position: relative;
  z-index: 2;
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-code);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--theme-primary);
  margin-bottom: var(--space-md);
}

.blog-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.blog-card p {
  color: var(--theme-surface-on-surface-variant);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
  position: relative;
  z-index: 2;
}

.gallery-card {
  position: relative;
  border-radius: var(--shape-corner-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--theme-outline);
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  color: #ffffff;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.gallery-category {
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--theme-primary);
  margin-bottom: 4px;
}

.gallery-title {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Download & Contact Section */
.download-section-backdrop {
  background: #ffffff !important; /* 100% Solid White Opaque */
  border-radius: var(--shape-corner-xl);
  padding: var(--space-4xl) var(--space-2xl);
  border: 1px solid var(--theme-outline);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  z-index: 2;
}

/* Dialog Modals */
.dialog {
  padding: 0;
  border: none;
  background: transparent;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
  z-index: 9995;
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dialog-content {
  background: #ffffff !important;
  border: 1px solid var(--theme-outline);
  border-radius: var(--shape-corner-xl);
  padding: var(--space-2xl);
  max-width: 760px;
  width: 100%;
  color: var(--theme-surface-on-surface);
  position: relative;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
  max-height: 85vh;
  overflow-y: auto;
}

.dialog-close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--theme-outline);
  color: var(--theme-surface-on-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dialog-close-button:hover {
  background: var(--theme-primary);
  color: #ffffff;
}

/* Dat.GUI Custom Theme & Positioning */
.dg.main {
  position: fixed !important;
  top: 90px !important;
  right: 20px !important;
  z-index: 9980 !important;
  font-family: var(--font-code) !important;
  border-radius: var(--shape-corner-md) !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15) !important;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
  position: relative;
  z-index: 2;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--theme-primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.section-description {
  font-size: 1.1rem;
  color: var(--theme-surface-on-surface-variant);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Left-aligned headers: keep description flush-left, directly under the title */
.section-header[style*="text-align:left"] .section-description,
.section-header[style*="text-align: left"] .section-description {
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

/* Slider Carousel */
.slider-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--shape-corner-xl);
  border: 1px solid var(--theme-outline);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider-slide {
  min-width: 100%;
  aspect-ratio: 21 / 9;
}

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.slider-control-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--theme-outline);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slider-control-button:hover {
  background: var(--theme-primary);
  color: #ffffff;
}

.slider-control-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Responsive Utilities */
@media (max-width: 992px) {
  .grid-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-actions {
    display: none;
  }

  .hero-section {
    padding-top: 100px;
  }

  .blog-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-bar {
    max-width: 100%;
  }

  .nav-list {
    gap: 8px;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
}

/* ==========================================================================
   Phase 1 — Metrics, Research Interests, Academic Profiles, CTA
   ========================================================================== */

/* Homepage value proposition line under the hero subtitle */
.hero-valueprop {
  font-size: 1.05rem;
  color: var(--theme-surface-on-surface-variant);
  max-width: 640px;
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

/* Metrics band */
.metrics-section {
  padding: var(--space-xl) 0;
  position: relative;
  z-index: 1;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.metric {
  background: #ffffff;
  border: 1px solid var(--theme-outline);
  border-radius: var(--shape-corner-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.metric:hover {
  transform: translateY(-4px);
  border-color: var(--theme-outline-hover);
}

.metric-value {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--theme-primary);
  margin-bottom: 8px;
}

.metric-label {
  display: block;
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--theme-surface-on-surface-variant);
  letter-spacing: 0.3px;
}

/* Research interests chips */
.interests-section {
  padding: var(--space-2xl) 0;
  position: relative;
  z-index: 1;
}

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

.interest-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--shape-corner-rounded);
  background: rgba(0, 103, 197, 0.06);
  border: 1px solid rgba(0, 103, 197, 0.18);
  color: var(--theme-surface-on-surface);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.interest-chip:hover {
  transform: translateY(-2px);
  background: rgba(0, 103, 197, 0.12);
}

.interest-chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--theme-primary);
}

/* Academic profiles */
.profiles-section {
  padding: var(--space-2xl) 0;
  position: relative;
  z-index: 1;
}

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: #ffffff;
  border: 1px solid var(--theme-outline);
  border-radius: var(--shape-corner-lg);
  text-decoration: none;
  color: var(--theme-surface-on-surface);
  font-weight: 700;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.profile-card:hover {
  transform: translateY(-4px);
  border-color: var(--theme-outline-hover);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.profile-card .profile-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-card .profile-sub {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--theme-surface-on-surface-variant);
}

.profile-card .profile-arrow {
  color: var(--theme-primary);
  font-weight: 800;
}

.profile-card.soon {
  opacity: 0.7;
  cursor: default;
}

.profile-card.soon:hover {
  transform: none;
  box-shadow: none;
}

/* Final CTA */
.cta-section {
  padding: var(--space-4xl) 0 var(--space-6xl);
  position: relative;
  z-index: 1;
}

.cta-card {
  background: linear-gradient(135deg, #00216E 0%, #0067C5 100%);
  border-radius: var(--shape-corner-xl);
  padding: 56px 48px;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 33, 110, 0.25);
}

.cta-card h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-card p {
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 28px;
  opacity: 0.92;
  line-height: 1.7;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cta-links a {
  padding: 10px 22px;
  border-radius: var(--shape-corner-rounded);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cta-links a.cta-primary {
  background: #ffffff;
  color: #00216E;
}

.cta-links a.cta-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.cta-links a:hover {
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-card { padding: 40px 24px; }
  .cta-card h2 { font-size: 1.8rem; }
}

/* ==========================================================================
   Featured Live Dashboard (embedded Shiny app)
   ========================================================================== */
.dashboard-section {
  padding: var(--space-2xl) 0;
  position: relative;
  z-index: 1;
}

.dashboard-embed {
  position: relative;
  width: 100%;
  border-radius: var(--shape-corner-xl);
  overflow: hidden;
  border: 1px solid var(--theme-outline);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
  background: #ffffff;
}

.dashboard-embed iframe {
  display: block;
  width: 100%;
  height: 78vh;
  min-height: 560px;
  border: 0;
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--theme-outline);
  background: var(--theme-surface-container);
}

.dashboard-toolbar .dash-title {
  font-family: var(--font-code);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--theme-surface-on-surface-variant);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-toolbar .dash-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.dashboard-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .dashboard-embed iframe { height: 70vh; min-height: 460px; }
}

/* ==========================================================================
   Featured dissertation dashboard — cover card (Publications)
   ========================================================================== */
.pub-featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  border: 1px solid var(--theme-outline);
  border-radius: var(--shape-corner-xl);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
  margin-bottom: var(--space-2xl);
}

/* Left: designed "cover" preview of the dashboard */
.pub-cover {
  background: linear-gradient(160deg, #f8fafc 0%, #eef4fb 100%);
  padding: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--theme-outline);
}

.pub-cover .cover-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--theme-outline);
}

.pub-cover .cover-bar i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #cbd5e1; display: inline-block;
}
.pub-cover .cover-bar i:nth-child(1){ background:#f87171; }
.pub-cover .cover-bar i:nth-child(2){ background:#fbbf24; }
.pub-cover .cover-bar i:nth-child(3){ background:#34d399; }
.pub-cover .cover-bar span {
  margin-left: 8px; font-family: var(--font-code);
  font-size: 0.7rem; color: var(--theme-surface-on-surface-variant);
}

.pub-cover .cover-body { padding: 26px 26px 30px; }

.pub-cover .cover-badge {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--theme-primary);
  background: rgba(0, 103, 197, 0.08);
  border: 1px solid rgba(0, 103, 197, 0.18);
  padding: 5px 12px;
  border-radius: var(--shape-corner-rounded);
  margin-bottom: 14px;
}

.pub-cover .cover-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
  margin-bottom: 8px;
}
.pub-cover .cover-title b { color: var(--theme-primary); font-weight: 800; }

.pub-cover .cover-sub {
  font-size: 0.9rem;
  color: var(--theme-surface-on-surface-variant);
  margin-bottom: 20px;
}

.pub-cover .cover-stats {
  display: flex;
  gap: 26px;
}
.pub-cover .cover-stats .cs-value {
  display: block; font-size: 1.8rem; font-weight: 800; color: var(--theme-primary); line-height: 1;
}
.pub-cover .cover-stats .cs-label {
  display: block; font-family: var(--font-code); font-size: 0.6rem;
  letter-spacing: 0.5px; text-transform: uppercase; color: var(--theme-surface-on-surface-variant); margin-top: 6px;
}

/* Right: description + actions */
.pub-featured .pub-info { padding: 34px 34px; display: flex; flex-direction: column; }
.pub-featured .pub-info .blog-meta { margin-bottom: 12px; }
.pub-featured .pub-info h3 { font-size: 1.35rem; font-weight: 800; color:#0f172a; margin-bottom: 12px; line-height:1.25; }
.pub-featured .pub-info p { color: var(--theme-surface-on-surface-variant); margin-bottom: 16px; }
.pub-featured .pub-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top: auto; }

@media (max-width: 820px) {
  .pub-featured { grid-template-columns: 1fr; }
  .pub-cover { border-right: none; border-bottom: 1px solid var(--theme-outline); }
}

/* ==========================================================================
   Mobile Navigation & Responsive Refinements
   ========================================================================== */

/* Hamburger button — hidden on desktop, shown at <=768px */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--theme-outline);
  border-radius: var(--shape-corner-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--theme-surface-on-surface);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* The "Get In Touch" pill inside the nav list is mobile-only */
.nav-cta-item { display: none; }

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

  .header { padding: 10px 0; }

  .logo-link {
    font-size: 1rem;
    gap: 10px;
    white-space: nowrap;
  }

  .logo-icon { width: 28px; height: 28px; }

  /* Nav becomes a dropdown panel under the fixed header */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--theme-outline);
    border-bottom: 1px solid var(--theme-outline);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
    padding: 10px var(--space-lg) 18px;
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    display: none;
  }

  .header.nav-open .site-nav { display: block; }

  /* Opaque top bar while the menu is open, so scrolled content
     doesn't show through behind the logo */
  .header.nav-open {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  /* Touch-sized targets (header nav only) */
  .site-nav .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-size: 1rem;
    padding: 8px 12px;
  }

  .nav-cta-item { display: block; margin-top: 10px; }

  .nav-cta {
    width: 100%;
    min-height: 48px;
  }

  /* The desktop CTA has no room left next to the nav at this width */
  .header-actions { display: none; }
}

@media (max-width: 768px) {
  /* Hero fits a 375px screen without crowding the edges */
  .hero-section { padding-top: 92px; }
  .hero-title { font-size: clamp(2rem, 9vw, 2.9rem); letter-spacing: -0.5px; }

  /* Drop the desktop line break so the title wraps naturally instead of
     stranding the "&" on its own line */
  .hero-title br { display: none; }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-badge { font-size: 0.72rem; padding: 6px 12px; }
  .section-title { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .section-description { font-size: 1rem; }

  /* The typed role can be longer than the screen — let it wrap */
  .typed-container {
    display: inline;
    word-break: break-word;
  }
}

/* Page titles (was an inline font-size, which media queries could not override) */
.page-title { font-size: 3.2rem; }

@media (max-width: 768px) {
  .page-title { font-size: clamp(2rem, 8.5vw, 2.6rem); }
}

/* Timeline: give the cards back the width the rail was eating */
@media (max-width: 768px) {
  .timeline { padding-left: 20px; }
  .timeline-dot { left: -26px; width: 12px; height: 12px; }
  .timeline-item { margin-bottom: var(--space-2xl); }
  .timeline-content, .solid-card, .blog-card { padding: var(--space-lg); }
  .timeline-role { font-size: 1.05rem; }
}

/* Full-width stacked buttons on narrow phones */
@media (max-width: 480px) {
  .hero-section .btn,
  .cta-card .btn {
    width: 100%;
  }

  .grid-container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

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

/* Touch devices: no custom cursor, no hover-lift effects */
@media (hover: none), (pointer: coarse) {
  .custom-cursor-wrapper,
  .custom-cursor { display: none !important; }

  body { cursor: auto; }

  .btn-primary:hover,
  .metric:hover { transform: none; }
}

/* ==========================================================================
   Contact form — responsive fields
   ========================================================================== */
.contact-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--shape-corner-md);
  border: 1px solid var(--theme-outline);
  background: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.contact-input:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px var(--theme-primary-glow);
}

.contact-footer {
  border-top: 1px solid var(--theme-outline);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .contact-field-row { grid-template-columns: 1fr; }

  /* 16px keeps iOS Safari from zooming in when a field gets focus */
  .contact-input { font-size: 16px; }

  .contact-footer { flex-direction: column; align-items: flex-start; }
  .contact-links { gap: 20px; }

  .contact-actions { flex-direction: column; align-items: stretch; }
  .contact-actions .btn { width: 100%; }
}

/* ==========================================================================
   Hero video — play affordance when the file is not auto-loaded
   ========================================================================== */
.video-wrapper { position: relative; }

.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px 12px 18px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--shape-corner-rounded);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.video-play:hover { background: rgba(15, 23, 42, 0.85); }
.video-play[hidden] { display: none; }

.video-play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #ffffff;
}

@media (hover: none), (pointer: coarse) {
  .video-play:hover { background: rgba(15, 23, 42, 0.72); }
}
