@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

/* ============================================================================
   THEME SYSTEM - Dual Mode (Day/Night)
   ============================================================================ */

:root {
  /* Day Mode (Default) */
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --line: #e0e7ff;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --danger: #dc2626;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-overlay: rgba(0, 0, 0, 0.02);

  /* Animations */
  --trans-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --trans-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --trans-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
  --bg: #0f172a;
  --bg-secondary: #1a1f35;
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --line: #334155;
  --accent: #3b82f6;
  --accent-light: #1e40af;
  --danger: #ef4444;
  --surface: rgba(30, 41, 59, 0.95);
  --surface-overlay: rgba(255, 255, 255, 0.02);
}

/* ============================================================================
   RESET & GLOBAL STYLES
   ============================================================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--trans-normal), color var(--trans-normal);
}

/* ============================================================================
   BACKGROUND & AMBIENT DESIGN
   ============================================================================ */

@keyframes subtleFlow {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 800px 800px at 50% -20%, rgba(37, 99, 235, 0.08), transparent 70%);
  animation: subtleFlow 25s ease-in-out infinite;
}

body.dark-mode::before {
  background: radial-gradient(ellipse 800px 800px at 50% -20%, rgba(59, 130, 246, 0.05), transparent 70%);
}

main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* NAVIGATION */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: all var(--trans-normal);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: color var(--trans-fast);
}

.brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: color var(--trans-fast);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--trans-fast);
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta { padding: 8px 16px; font-size: 13px; font-weight: 700; }

.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
  font-size: 18px;
}

.theme-toggle:hover { background: var(--surface-overlay); }

.signup-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(220px, calc(100vw - 48px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: opacity var(--trans-fast), transform var(--trans-fast), visibility var(--trans-fast);
  z-index: 30;
  pointer-events: none;
}

.signup-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.signup-menu-panel {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(16px);
}

.signup-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.menu-close {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: var(--surface-overlay);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--trans-fast);
}

.menu-close:hover { background: var(--line); }

.signup-menu-list { display: grid; }

.signup-menu-item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--trans-fast), color var(--trans-fast);
}

.signup-menu-item:hover {
  background: var(--surface-overlay);
  color: var(--accent);
}

.signup-menu-admin { color: var(--accent); }
.nav-logout-form { display: inline; }

/* ALERTS */
.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  animation: slideDown 300ms ease forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

body.dark-mode .alert-success { background: #064e3b; color: #86efac; }
body.dark-mode .alert-error { background: #7f1d1d; color: #fca5a5; }

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p { margin: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--trans-fast);
}

a:hover { color: var(--accent-light); }
body.dark-mode a:hover { color: #60a5fa; }

/* BUTTONS */
a.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  background: var(--accent);
  color: white;
  padding: 11px 18px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all var(--trans-fast);
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

a.btn:hover, button.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

a.btn:active, button.btn:active { transform: translateY(0); }

button.btn-danger {
  background: var(--danger);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn-ghost:hover { background: var(--accent-light); box-shadow: none; }
body.dark-mode .btn-ghost:hover { background: #1e40af; }

.btn-small { padding: 8px 12px; font-size: 12px; }

/* FLOW LAYOUTS */
section { scroll-margin-top: 80px; }

.full-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 24px;
  text-align: center;
}

.flow-section {
  padding: 120px 24px;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.flow-section:first-of-type { padding-top: 80px; }
.flow-section:last-of-type { padding-bottom: 80px; }

.section-inner { max-width: 900px; margin: 0 auto; }
.section-hero { text-align: center; margin-bottom: 60px; }

.section-title {
  font-size: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}

.section-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 24px 0;
}

.accent-text { color: var(--accent); font-weight: 700; }

/* FLOW CONTAINERS */
.flow-list { display: grid; gap: 60px; margin: 40px 0; }

.flow-item {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: fadeInUp 600ms ease forwards;
}

.flow-item:last-child { border-bottom: none; }
.flow-item:nth-child(2) { animation-delay: 100ms; }
.flow-item:nth-child(3) { animation-delay: 200ms; }
.flow-item:nth-child(4) { animation-delay: 300ms; }
.flow-item:nth-child(5) { animation-delay: 400ms; }

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

.flow-item-title { font-size: 1.8rem; margin-bottom: 16px; color: var(--text); }

.flow-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.flow-item-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.flow-item-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============================================================================
   HOMEPAGE CINEMATIC LAYOUTS
   ============================================================================ */

/* HERO: Full Screen, No Container, Centered */
.home-hero-full {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 24px;
  text-align: center;
  overflow: hidden;
}

.home-hero-content {
  max-width: 800px;
  z-index: 1;
}

.home-hero-full .page-title {
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 24px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.home-hero-full .hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 48px;
  max-width: 700px;
}

/* BASE HOME SECTIONS */
.home-section {
  position: relative;
  padding: 100px 24px;
  margin: 0;
  background: transparent;
}

.home-section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.home-section .section-title {
  text-align: center;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeInDown 1000ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-section .section-title.scroll-reveal {
  animation: none !important;
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-section .section-title.scroll-reveal.visible {
  animation: none !important;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.home-section .section-description {
  text-align: center;
  max-width: 600px;
  margin: 16px auto;
  opacity: 0;
  animation: fadeInUp 1000ms cubic-bezier(0.22, 1, 0.36, 1) 120ms forwards;
}

.home-section .section-description.scroll-reveal {
  animation: none !important;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(5px);
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-section .section-description.scroll-reveal.visible {
  animation: none !important;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* RESEARCH AREAS: Floating Keywords */
.research-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 50px 0;
}

.research-keywords.scroll-reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.research-keywords.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.research-keyword {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  cursor: pointer;
  transition: transform var(--trans-fast), color var(--trans-fast);
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  filter: blur(6px);
  animation: none !important;
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.research-keyword.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  animation: none !important;
}

.research-keyword:nth-child(2) { animation-delay: 120ms; }
.research-keyword:nth-child(3) { animation-delay: 240ms; }
.research-keyword:nth-child(4) { animation-delay: 360ms; }
.research-keyword:nth-child(5) { animation-delay: 480ms; }

.keyword-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  transition: color var(--trans-fast);
}

.keyword-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--trans-fast);
}

.research-keyword:hover {
  transform: translateY(-4px);
}

.research-keyword:hover .keyword-label {
  color: var(--accent);
}

.research-keyword:hover .keyword-description {
  color: var(--text-secondary);
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  margin: 0 8px 8px 0;
  border-radius: 999px;
  background: rgba(22, 28, 45, 0.08);
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1;
}

.choice-list {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(22, 28, 45, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  max-height: 260px;
  overflow: auto;
}

.choice-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.choice-item input {
  margin-top: 3px;
}

/* PROJECTS: One Scene at a Time */
.projects-carousel {
  display: grid;
  gap: 80px;
  margin: 60px 0;
}

.project-scene {
  padding: 60px 40px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  opacity: 0;
  transform: translateY(20px);
  filter: blur(6px);
  animation: none !important;
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow var(--trans-fast), border-color var(--trans-fast);
}

.project-image-card {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.project-image-card .project-scene-content,
.project-image-card h3,
.project-image-card p,
.project-image-card a {
  position: relative;
  z-index: 1;
}

.project-image-card .project-scene-title,
.project-image-card h3 {
  color: #fff;
}

.project-image-card .project-scene-description,
.project-image-card p {
  color: rgba(255, 255, 255, 0.9);
}

.project-scene:nth-child(2) { animation-delay: 160ms; }
.project-scene:nth-child(3) { animation-delay: 320ms; }

.project-scene:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.1);
}

.project-scene-content {
  max-width: 600px;
}

.project-scene-title {
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 700;
}

.project-scene-description {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* PUBLICATIONS: Clean Academic List */
.publications-minimal {
  display: grid;
  gap: 48px;
  margin: 60px 0;
}

.publication-minimal {
  padding: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 32px;
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  animation: none !important;
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform var(--trans-fast);
}

.publication-minimal:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.publication-minimal:nth-child(2) { animation-delay: 160ms; }
.publication-minimal:nth-child(3) { animation-delay: 320ms; }

.publication-minimal:hover {
  transform: translateX(8px);
}

.publication-minimal-title {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.publication-minimal-authors {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

.publication-minimal-summary {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.publication-minimal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.publication-minimal-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.publication-minimal-footer a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

/* GALLERY: Circular rotating wheel */
.gallery-wheel {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.gallery-wheel-shell {
  position: relative;
  width: min(100%, 920px);
  min-height: clamp(460px, 66vw, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
}

.gallery-wheel-ring {
  position: absolute;
  inset: 0;
  --gallery-step: 45deg;
  --gallery-radius: 180px;
  --gallery-rotation: 0deg;
  transform: rotate(var(--gallery-rotation));
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.gallery-wheel-ring.is-dragging {
  transition: none;
}

.gallery-wheel-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112px;
  height: 112px;
  margin: -56px 0 0 -56px;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transform: rotate(calc(var(--gallery-step) * var(--index, 0))) translateY(calc(var(--gallery-radius) * -1));
}

.gallery-wheel-thumb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 25px rgba(22, 28, 45, 0.12);
  background: var(--surface);
  transform: scale(0.92);
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.gallery-wheel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-wheel-item:hover .gallery-wheel-thumb,
.gallery-wheel-item:focus-visible .gallery-wheel-thumb,
.gallery-wheel-item.is-active .gallery-wheel-thumb {
  transform: scale(1);
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
}

.gallery-wheel-center {
  position: relative;
  z-index: 2;
  width: min(100%, 400px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(22, 28, 45, 0.10);
  text-align: center;
}

.gallery-wheel-active-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 22px;
  border: 1px solid rgba(22, 28, 45, 0.08);
}

.gallery-wheel-copy {
  margin-top: 16px;
}

.gallery-wheel-eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.gallery-wheel-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
}

.gallery-wheel-caption {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.gallery-wheel-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 14px 30px rgba(22, 28, 45, 0.12);
  cursor: pointer;
}

.gallery-wheel-nav:hover,
.gallery-wheel-nav:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.gallery-wheel-prev { left: 8px; }
.gallery-wheel-next { right: 8px; }

.gallery-wheel-nav:focus-visible,
.gallery-wheel-item:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.20);
  outline-offset: 3px;
}

/* TEAM PREVIEW: Large Images, Loose Gallery */
.team-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin: 60px 0;
}

.team-gallery-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  filter: blur(6px);
  animation: none !important;
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform var(--trans-fast);
}

.team-gallery-item:nth-child(2) { animation-delay: 160ms; }
.team-gallery-item:nth-child(3) { animation-delay: 320ms; }

.team-gallery-item:hover {
  transform: translateY(-12px);
}

.team-gallery-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.team-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-gallery-item:hover .team-gallery-image {
  transform: scale(1.05);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.15);
}

.avatar-fallback-large {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-light), rgba(37, 99, 235, 0.1));
  color: var(--accent);
  font-size: 52px;
  font-weight: 700;
}

.team-gallery-info {
  text-align: left;
}

.team-gallery-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  transition: color var(--trans-fast);
}

.team-gallery-item:hover .team-gallery-name {
  color: var(--accent);
}

.team-gallery-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* CTA: Minimal & Centered */
.home-section-cta {
  background: var(--bg-secondary);
  padding: 120px 24px;
}

.home-section-cta-inner {
  text-align: center;
}

.home-section-cta .section-title {
  margin-bottom: 24px;
}

.home-section-cta .section-description {
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.home-cta-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
  filter: blur(5px);
  animation: none !important;
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-cta-buttons .btn.scroll-reveal {
  animation: none !important;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(4px);
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-cta-buttons .btn.scroll-reveal.visible {
  animation: none !important;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  opacity: 0;
  transform: translateY(16px);
  filter: blur(5px);
  animation: none !important;
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.section-cta.scroll-reveal {
  animation: none !important;
  opacity: 0;
  transform: translateY(16px);
  filter: blur(5px);
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.section-cta.scroll-reveal.visible {
  animation: none !important;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.section-cta .btn-ghost {
  width: auto;
}

/* HERO SECTIONS */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 24px;
  text-align: center;
  margin-bottom: 60px;
}
.hero-kicker {
  display: inline-block;
  margin-bottom: 24px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: 0;
  opacity: 0;
  animation: fadeInDown 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Scroll Reveal Animation: Slow Fade In/Out */
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Scroll Reveal: Base state (fade out when not visible) */
.scroll-reveal {
  opacity: 0;
  transition: opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  animation: fadeIn 1100ms cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 20px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text);
  opacity: 0;
  animation: fadeInDown 1000ms cubic-bezier(0.22, 1, 0.36, 1) 120ms forwards;
}

.page-title.scroll-reveal {
  animation: none !important;
  transform: translateY(18px);
  filter: blur(6px);
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.page-title.scroll-reveal.visible {
  animation: none !important;
  transform: translateY(0);
  filter: blur(0);
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: fadeInDown 1000ms cubic-bezier(0.22, 1, 0.36, 1) 220ms forwards;
}

.hero-subtitle.scroll-reveal {
  animation: none !important;
  transform: translateY(14px);
  filter: blur(5px);
  transition: opacity 1400ms cubic-bezier(0.22, 1, 0.36, 1), transform 1400ms cubic-bezier(0.22, 1, 0.36, 1), filter 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-subtitle.scroll-reveal.visible {
  animation: none !important;
  transform: translateY(0);
  filter: blur(0);
}

.admin-page-hero {
  padding-top: 24px;
  padding-bottom: 28px;
  min-height: auto;
  margin-bottom: 16px;
}

.admin-page-hero .page-title {
  margin-bottom: 12px;
}

.admin-page-hero .hero-subtitle {
  margin-bottom: 0;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
  opacity: 0;
  animation: fadeInUp 600ms ease 300ms forwards;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.hero-stat strong { font-size: 1.3rem; color: var(--accent); }

/* GRIDS */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }

/* PROJECTS */
.project-showcase {
  padding: 100px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.project-showcase:nth-child(even) { background: var(--bg-secondary); }

.project-card { max-width: 900px; margin: 0 auto; }

.project-card h3 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.project-card p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 24px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.project-meta-item::before { content: "•"; margin-right: 8px; }
.project-meta-item:first-child::before { display: none; }

/* PUBLICATIONS */
.publications-list { display: grid; gap: 40px; margin: 40px 0; }

.publication-item {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: fadeInUp 600ms ease forwards;
}

.publication-item:last-child { border-bottom: none; }
.publication-item:nth-child(2) { animation-delay: 100ms; }
.publication-item:nth-child(3) { animation-delay: 200ms; }
.publication-item:nth-child(4) { animation-delay: 300ms; }

.publication-title { font-size: 1.3rem; margin-bottom: 8px; color: var(--text); }

.publication-authors {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

.publication-summary {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.publication-date { font-size: 0.85rem; color: var(--text-muted); }

.publication-actions { margin-top: 16px; }

/* TEAM */
.member-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.member {
  text-align: center;
  opacity: 0;
  animation: fadeInUp 500ms ease forwards;
}

.member-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  color: inherit;
}

.member-link:hover .member-name,
.member-link:focus-visible .member-name {
  color: var(--accent);
}

.member-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 20px;
}

.member:nth-child(2) { animation-delay: 80ms; }
.member:nth-child(3) { animation-delay: 160ms; }
.member:nth-child(4) { animation-delay: 240ms; }
.member:nth-child(5) { animation-delay: 320ms; }
.member:nth-child(6) { animation-delay: 400ms; }

.member-avatar-wrap { display: flex; justify-content: center; margin-bottom: 16px; }

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  transition: transform var(--trans-fast), border-color var(--trans-fast);
}

.member:hover .avatar {
  transform: scale(1.08);
  border-color: var(--accent);
}

.avatar-fallback {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  border: 2px solid var(--line);
}

body.dark-mode .avatar-fallback {
  background: var(--accent-light);
  color: var(--text);
}

.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--line);
  flex-shrink: 0;
}

.avatar-fallback-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  border: 1.5px solid var(--line);
  flex-shrink: 0;
}

body.dark-mode .avatar-fallback-sm {
  background: var(--accent-light);
  color: var(--text);
}

.member-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.gallery-carousel {
  display: grid;
  gap: 22px;
  justify-items: center;
  margin-top: 28px;
}

.gallery-carousel-stage {
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-inline: auto;
}

.gallery-carousel-main {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 18px;
}

.gallery-carousel-figure {
  width: min(100%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.14);
  background: var(--surface);
}

.gallery-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-carousel.is-rotating .gallery-carousel-image {
  animation: gallery-spin 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-carousel-copy {
  max-width: 420px;
  text-align: center;
}

.gallery-carousel-eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.gallery-carousel-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
}

.gallery-carousel-caption {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-line;
}

.gallery-carousel-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 14px 30px rgba(22, 28, 45, 0.12);
  cursor: pointer;
}

.gallery-carousel-nav:hover,
.gallery-carousel-nav:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.gallery-carousel-thumbs {
  width: min(100%, 920px);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-inline: auto;
}

.gallery-carousel-thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.gallery-carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-carousel-thumb:hover,
.gallery-carousel-thumb:focus-visible,
.gallery-carousel-thumb.is-active {
  transform: translateY(-3px) scale(1.04);
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
}

@keyframes gallery-spin {
  0% {
    transform: scale(0.92) rotate(-10deg);
    filter: blur(2px);
  }
  100% {
    transform: scale(1) rotate(0deg);
    filter: blur(0);
  }
}
.member-name-open {
  display: inline;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: color var(--trans-fast);
}

.member-name-open:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.member-title { font-size: 0.85rem; color: var(--text-secondary); }

.team-section { margin-bottom: 60px; }

.team-section-title {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--text);
  font-weight: 700;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.team-section-intro {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.team-page .flow-section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.team-page .flow-section:first-of-type {
  padding-top: 32px;
}

.team-page .flow-section:last-of-type {
  padding-bottom: 48px;
}

.team-page .team-section {
  margin-bottom: 40px;
}

.team-page .team-section-title {
  margin-bottom: 20px;
  padding-bottom: 12px;
  text-align: center;
}

.team-page .member-layout {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 28px 24px;
  margin: 28px 0 0;
}

.team-page .member {
  width: 140px;
  flex: 0 1 140px;
}

/* Card-like interactive treatment for projects, publications, and members */
.project-card {
  padding: 28px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), border-color var(--trans-fast);
  will-change: transform, box-shadow;
}

.project-image-card {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

.project-image-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.58));
  pointer-events: none;
}

.project-image-card > * {
  position: relative;
  z-index: 1;
}

.project-image-card h3,
.project-image-card p {
  color: #fff;
}

.project-image-card .btn {
  border-color: rgba(255, 255, 255, 0.25);
}


.project-card:hover, .project-card:focus-within {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 18px 40px rgba(2,6,23,0.08);
  border-color: var(--accent);
}

.publication-item {
  padding: 20px;
  border-radius: 10px;
  background: transparent;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), background var(--trans-fast);
}

.publication-item:hover, .publication-item:focus-within {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(2,6,23,0.06);
  background: var(--surface);
}

.member {
  padding: 12px;
  border-radius: 12px;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.member:hover, .member:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(2,6,23,0.06);
}

/* ADMIN */
.admin-dashboard { padding: 40px 0; }
.admin-section { margin-bottom: 40px; }
.admin-title {
  font-size: 1.5rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 20px 28px;
  margin-top: 12px;
  margin-bottom: 30px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Admin tiles: centered, interactive, accessible hover/focus */
.admin-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 320px;
  flex: 0 0 320px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), border-color var(--trans-fast);
  will-change: transform, box-shadow;
  cursor: pointer;
}

.admin-tile:hover, .admin-tile:focus, .admin-tile:focus-visible {
  transform: translateY(-10px) scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.12);
  outline: none;
}

.admin-tile:active { transform: translateY(-4px) scale(0.999); }

.admin-tile .admin-tile-head { display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 12px; }
.admin-tile .admin-tile-icon { font-size: 22px; display: inline-flex; align-items: center; justify-content: center; }

.admin-tile h3 { margin-top: 0; margin-bottom: 8px; color: var(--text); }
.admin-tile p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }
.admin-tile-icon { width: 32px; height: 32px; margin-bottom: 12px; font-size: 18px; }

.instructor-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 20px 28px;
  margin-top: 12px;
  margin-bottom: 30px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.instructor-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 320px;
  flex: 0 0 320px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), border-color var(--trans-fast);
  will-change: transform, box-shadow;
  cursor: pointer;
}

.instructor-tile:hover,
.instructor-tile:focus,
.instructor-tile:focus-visible {
  transform: translateY(-10px) scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.12);
  outline: none;
}

.instructor-tile:active { transform: translateY(-4px) scale(0.999); }

.instructor-tile-head { display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 12px; }
.instructor-tile-icon { width: 32px; height: 32px; margin-bottom: 12px; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.instructor-tile h3 { margin-top: 0; margin-bottom: 8px; color: var(--text); }
.instructor-tile p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }


/* FORMS */
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

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

/* AUTH (Login/Register) CARD */
.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 80px 24px;
  flex-wrap: wrap;
}

.auth-intro {
  max-width: 520px;
}

.auth-card {
  max-width: 420px;
  width: 100%;
  padding: 28px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(2,6,23,0.06);
}

.auth-card .form-row { margin-bottom: 14px; }
.auth-card .auth-submit { margin-top: 12px; width: 100%; }

/* small screens: stack intro above form */
@media (max-width: 680px) {
  .auth-shell { padding: 40px 18px; gap: 18px; }
  .auth-intro { text-align: center; }
}


/* Hide hero kicker on auth/login pages to remove pill/button-like line */
.auth-shell .hero-kicker { display: none; }

/* ADMIN TEAM MODALS */
.admin-team-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 20px;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 500;
}

.btn-secondary:hover {
  background: var(--line);
}

/* TEAM REPORT */
.admin-team-report {
  padding: 40px 24px;
  background: var(--bg);
  max-width: 1200px;
  margin: 20px auto;
  border-radius: 12px;
}

.report-header {
  margin-bottom: 32px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 16px;
}

.report-heading {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.report-timestamp {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

/* INSTRUCTOR GROUP SECTION */
.instructor-group {
  margin-bottom: 40px;
  padding: 0;
}

.instructor-heading {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* ASSIGNMENT TABLE */
.assignment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.assignment-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}

.assignment-table tbody tr {
  transition: background var(--trans-fast);
}

.assignment-table tbody tr:hover {
  background: var(--bg-secondary);
}

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

.assignment-table .col-name {
  width: 60%;
}

.assignment-row {
  background: transparent;
}

.unassigned-row {
  background: rgba(220, 38, 38, 0.02);
}

.unassigned-row:hover {
  background: rgba(220, 38, 38, 0.06);
}

/* Column widths for new table layout */
.assignment-table .col-sl { width: 8%; text-align: left; }
.assignment-table .col-id { width: 32%; color: var(--text-muted); }

/* UNASSIGNED SECTION */
.unassigned-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid var(--line);
}

.unassigned-heading {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--danger);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  margin-top: auto;
  padding: 18px 20px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg-secondary);
}

.site-footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  text-align: center;
}

.site-footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer-copy a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.site-footer-copy a:hover {
  text-decoration: underline;
}

.admin-request-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-member-section {
  margin-top: 20px;
}

.admin-member-section-title {
  margin: 0 0 12px;
  font-size: 1rem;
}

.admin-member-list {
  display: grid;
  gap: 12px;
}

.admin-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: grab;
  transition: all var(--trans-fast);
}

.admin-member-row:active {
  cursor: grabbing;
}

.admin-member-row.is-dragging {
  opacity: 0.5;
  background: rgba(37, 99, 235, 0.05);
}

.admin-member-row.drop-target {
  border: 2px solid var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.admin-member-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: grab;
  flex-shrink: 0;
}

.admin-member-drag-handle:active {
  cursor: grabbing;
}

.admin-member-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.admin-member-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.admin-member-name {
  font-weight: 700;
}

.admin-role-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.admin-member-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-inline-form {
  margin: 0;
}

.admin-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-mini-btn-primary {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
}

.admin-mini-btn-danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.admin-modal.is-open {
  display: block;
}

.admin-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(6px);
}

.modal-backdrop,
.member-public-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(6px);
}

.admin-modal .modal-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 32px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1;
  padding: 32px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.admin-modal .modal-card {
  width: min(920px, calc(100vw - 40px));
  max-height: calc(100vh - 64px);
  overflow: auto;
}

.admin-modal .modal-card--compact {
  width: min(760px, calc(100vw - 40px));
}

.modal-card,
.member-public-card {
  width: min(920px, calc(100vw - 40px));
  max-height: calc(100vh - 64px);
  overflow: auto;
}

.admin-modal .admin-requests-card {
  width: min(1040px, calc(100vw - 40px));
}

.admin-requests-card {
  width: min(1040px, calc(100vw - 40px));
}

.member-public-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.member-public-modal.is-open {
  display: flex;
}

.member-public-card {
  position: relative;
  z-index: 1;
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.22);
}

body.modal-open {
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-team-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.admin-team-form-grid .form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-team-form-grid .form-row label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.admin-team-form-grid .form-row input,
.admin-team-form-grid .form-row select,
.admin-team-form-grid .form-row textarea {
  width: 100%;
}

.admin-team-form-grid .errorlist {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

.modal-alert {
  margin-bottom: 0;
}

.admin-team-form-grid .form-row input,
.admin-team-form-grid .form-row select,
.admin-team-form-grid .form-row textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 14px;
  font: inherit;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast), background var(--trans-fast);
}

.admin-team-form-grid .form-row input:focus,
.admin-team-form-grid .form-row select:focus,
.admin-team-form-grid .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.admin-team-form-grid .form-row .errorlist + input,
.admin-team-form-grid .form-row .errorlist + select,
.admin-team-form-grid .form-row .errorlist + textarea {
  border-color: #ef4444;
}

.admin-team-wide {
  grid-column: 1 / -1;
}

.admin-team-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.admin-request-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.admin-requests-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 24px;
}

.admin-request-list {
  display: grid;
  gap: 12px;
}

.admin-request-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.admin-request-item.is-active {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.admin-request-name,
.admin-request-date {
  display: block;
}

.admin-request-detail {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.admin-team-card,
.admin-requests-card,
.modal-card {
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.22);
}

/* Popup / modal surfaces should always inherit the theme foreground color. */
.signup-menu-panel,
.modal-card,
.member-public-card,
.admin-team-card,
.admin-requests-card,
.project-modal-card,
.publication-modal-card,
.toast-notice {
  color: var(--text);
}

.signup-menu-panel :is(h1, h2, h3, h4, h5, h6, p, span, li, strong, small, label, div),
.modal-card :is(h1, h2, h3, h4, h5, h6, p, span, li, strong, small, label, div),
.member-public-card :is(h1, h2, h3, h4, h5, h6, p, span, li, strong, small, label, div),
.admin-team-card :is(h1, h2, h3, h4, h5, h6, p, span, li, strong, small, label, div),
.admin-requests-card :is(h1, h2, h3, h4, h5, h6, p, span, li, strong, small, label, div),
.project-modal-card :is(h1, h2, h3, h4, h5, h6, p, span, li, strong, small, label, div),
.publication-modal-card :is(h1, h2, h3, h4, h5, h6, p, span, li, strong, small, label, div),
.toast-notice :is(h1, h2, h3, h4, h5, h6, p, span, li, strong, small, label, div) {
  color: inherit;
}

.signup-menu-panel .muted,
.modal-card .muted,
.member-public-card .muted,
.admin-team-card .muted,
.admin-requests-card .muted,
.project-modal-card .muted,
.publication-modal-card .muted,
.toast-notice .muted {
  color: var(--text-muted);
}
/* UTILITIES */
.muted { color: var(--text-muted); font-size: 0.9rem; padding: 20px 0; text-align: center; }
.divider { height: 1px; background: var(--line); margin: 60px 0; }
.accent-highlight { color: var(--accent); font-weight: 700; }
.centered { text-align: center; max-width: 800px; margin: 0 auto; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.session-classroom {
  padding-top: 20px;
}

.session-classroom-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.session-classroom-header,
.attendance-heading,
.session-classroom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.session-classroom-header,
.attendance-card {
  padding: 24px;
}

.session-classroom-header .page-title,
.attendance-heading h2 {
  margin: 4px 0 8px;
}

.session-meta {
  margin: 0;
  color: var(--text-muted);
}

.session-static-action {
  pointer-events: none;
}

.attendance-help {
  margin: 0;
  padding: 0;
  text-align: left;
}

.attendance-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
}

.attendance-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.attendance-table th,
.attendance-table td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.attendance-table th {
  background: var(--bg-secondary);
  font-size: 0.9rem;
}

.attendance-table td:first-child span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.attendance-table select {
  min-width: 140px;
}

.attendance-table input {
  min-width: 210px;
}

.attendance-submit {
  display: flex;
  justify-content: flex-end;
  padding-top: 20px;
}

.attendance-empty {
  padding: 36px 12px 20px;
  text-align: center;
}

.attendance-empty .muted {
  margin: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; }
  .nav-links { order: 3; width: 100%; gap: 4px; }
  .nav-links a { font-size: 12px; padding: 6px 8px; }
  .flow-section { padding: 60px 20px; }
  .section-title { font-size: clamp(1.3rem, 3vw, 2rem); }
  .page-title { font-size: clamp(1.8rem, 4vw, 2.5rem); }
  .hero { min-height: 50vh; padding: 60px 20px; }
  .hero-subtitle { font-size: 1rem; }
  .grid, .grid-2 { grid-template-columns: 1fr; }
  .member-layout { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 20px; }
  .avatar { width: 80px; height: 80px; }
  .avatar-fallback { width: 80px; height: 80px; font-size: 22px; }
  .admin-grid { flex-direction: column; align-items: center; }
  .admin-tile { width: min(100%, 360px); flex-basis: auto; }
  .admin-team-form-grid,
  .admin-requests-grid {
    grid-template-columns: 1fr;
  }
  .admin-member-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-member-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .modal,
  .modal-shell,
  .member-public-modal {
    align-items: flex-start;
    padding: 72px 12px 18px;
  }
  .admin-modal .modal-shell {
    padding: 72px 12px 18px;
    align-items: flex-start;
  }
  .admin-modal .modal-card,
  .modal-card,
  .member-public-card {
    width: min(100%, 920px);
    max-height: calc(100vh - 90px);
  }

  .admin-modal .modal-card--compact {
    width: min(100%, 760px);
  }
  .full-screen { min-height: auto; padding: 60px 20px; }
  .project-showcase { padding: 60px 20px; }
  .home-section { padding: 70px 20px; }
  .home-section .section-title { font-size: clamp(1.3rem, 3vw, 2rem); }
  .home-hero-full { padding: 60px 20px; min-height: 80vh; }
  .home-hero-full .page-title { font-size: clamp(2rem, 5vw, 3.5rem); }
  .home-hero-full .hero-subtitle { font-size: 1rem; margin-bottom: 36px; }
  .research-keywords { gap: 16px; }
  .research-keyword { padding: 16px; margin: 0 4px; }
  .projects-carousel { gap: 48px; }
  .project-scene { padding: 40px 24px; }
  .project-scene-title { font-size: 1.5rem; }
  .publications-minimal { gap: 32px; }
  .publication-minimal { padding-bottom: 24px; }
  .publication-minimal-title { font-size: 1.1rem; }
  .gallery-carousel-stage { grid-template-columns: 1fr; }
  .gallery-carousel-nav { display: none; }
  .gallery-carousel-main { padding: 14px; }
  .gallery-carousel-figure { width: min(78vw, 360px); }
  .gallery-carousel-thumb { width: 64px; height: 64px; }
  .team-gallery { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
  .home-section-cta { padding: 70px 20px; }
  .home-cta-buttons { gap: 10px; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 12px 16px; }
  .brand { font-size: 1rem; }
  .nav-links { gap: 2px; }
  .nav-links a { font-size: 11px; padding: 4px 6px; }
  .flow-section { padding: 40px 16px; }
  .section-title { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
  .page-title { font-size: clamp(1.5rem, 3vw, 2rem); }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-stats { flex-direction: column; gap: 12px; }
  .member-layout { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 16px; }
  .avatar { width: 60px; height: 60px; }
  .avatar-fallback { width: 60px; height: 60px; font-size: 18px; }
  .btn { width: 100%; text-align: center; }
  a.btn-ghost { width: auto; }
  .site-footer { padding: 16px 16px 20px; }
  .site-footer-inner { width: min(100%, calc(100% - 8px)); }
  .home-section { padding: 50px 16px; }
  .home-section .section-title { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
  .home-hero-full { padding: 40px 16px; min-height: 80vh; }
  .home-hero-full .page-title { font-size: clamp(1.5rem, 4vw, 2.5rem); }
  .home-hero-full .hero-subtitle { font-size: 0.95rem; margin-bottom: 28px; }
  .research-keywords { flex-direction: column; gap: 12px; }
  .research-keyword { padding: 12px; }
  .keyword-label { font-size: 1rem; }
  .keyword-description { font-size: 0.8rem; }
  .projects-carousel { gap: 32px; }
  .project-scene { padding: 24px 16px; }
  .project-scene-title { font-size: 1.3rem; }
  .project-scene-description { font-size: 0.95rem; }
  .publications-minimal { gap: 24px; }
  .publication-minimal { padding-bottom: 16px; }
  .publication-minimal-title { font-size: 1rem; }
  .publication-minimal-authors { font-size: 0.9rem; }
  .publication-minimal-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .gallery-carousel-main { padding: 12px; }
  .gallery-carousel-title { font-size: 1rem; }
  .gallery-carousel-caption { font-size: 0.88rem; }
  .gallery-carousel-thumb { width: 58px; height: 58px; }
  .team-gallery { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; }
  .team-gallery-name { font-size: 1rem; }
  .team-gallery-role { font-size: 0.8rem; }
  .home-section-cta { padding: 50px 16px; }
  .home-cta-buttons { flex-direction: column; gap: 8px; }
  .home-cta-buttons .btn, .home-cta-buttons .btn-ghost { width: 100%; }
}

@media print {
  .nav, .theme-toggle, .btn { display: none; }
  body { background: white; color: black; }
  a { color: #0066cc; }
}
