/* ================================================================
   Data Driven Models — Main Stylesheet
   Premium Dark Theme — CSS Custom Properties Design System
   ================================================================ */

/* SECTION: CSS Variables */
:root {
  --color-bg: #060d1f;
  --color-surface: #0d1b35;
  --color-surface-2: #112040;
  --color-border: rgba(255,255,255,0.08);
  --color-border-hover: rgba(255,255,255,0.18);
  --color-accent: #2563eb;
  --color-blue: #2563eb;
  --color-blue-light: #3b82f6;
  --color-blue-glow: rgba(37,99,235,0.3);
  --color-cyan: #06b6d4;
  --color-green: #10b981;
  --color-green-bg: rgba(16,185,129,0.15);
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-dim: #475569;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --gradient-hero: linear-gradient(135deg, #060d1f 0%, #0d2151 50%, #060d1f 100%);
  --gradient-blue: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));

  --radius-card: 16px;
  --radius-btn: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --font-main: 'Inter', system-ui, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --navbar-height: 96px;
}

/* SECTION: Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-content {
  flex: 1;
}
a { color: var(--color-blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
}

/* SECTION: Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(6,13,31,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 0.3s ease;
}
.navbar-scrolled {
  background: rgba(6,13,31,0.95) !important;
}
.navbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
}
.navbar-brand {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-logo {
  height: 28px;
  width: auto;
  border-radius: 4px;
}
.navbar-brand::before { display: none; }
.navbar-brand:hover { text-decoration: none; color: var(--color-text); }

/* Hamburger button (mobile) */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  flex-direction: column;
  gap: 5px;
}
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Subbar logo */
.subbar-logo {
  height: 18px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 2px;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.navbar-links a {
  color: rgba(255,255,255,0.70);
  font-size: 15.5px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.navbar-links a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--color-text);
  text-decoration: none;
}
.navbar-links a.active {
  color: var(--color-text);
  background: rgba(255,255,255,0.10);
}
.btn-signin {
  border: 1.5px solid rgba(255,255,255,0.35) !important;
  color: var(--color-text) !important;
  padding: 7px 18px !important;
  border-radius: var(--radius-btn) !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s !important;
}
.btn-signin:hover {
  background: rgba(255,255,255,0.10) !important;
  border-color: var(--color-blue-light) !important;
  text-decoration: none !important;
}
.navbar-subbar {
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
  min-height: 36px;
  gap: 0;
}
.subbar-text {
  flex: 1;
  text-align: center;
  padding: 5px 8px;
}
.navbar-subbar a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}
.navbar-subbar a:hover {
  color: var(--color-blue-light);
}
.subbar-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}
.subbar-nav-btn:hover {
  color: #fff;
  background: rgba(59,130,246,0.35);
  border-color: rgba(59,130,246,0.5);
}
.subbar-nav-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}
[data-theme="light"] .subbar-nav-btn {
  background: rgba(15,23,42,0.06);
  border-color: rgba(15,23,42,0.30);
  color: #334155;
}
[data-theme="light"] .subbar-nav-btn:hover {
  color: #0f172a;
  background: rgba(37,99,235,0.12);
  border-color: rgba(37,99,235,0.35);
}

/* SECTION: Page offset for fixed navbar */
.page-content { padding-top: var(--navbar-height); }

/* SECTION: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 24px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.15s, background 0.15s;
  text-decoration: none;
  font-family: var(--font-main);
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--gradient-blue);
  color: var(--color-text);
  box-shadow: 0 4px 15px var(--color-blue-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--color-blue-glow);
}
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-blue);
  background: rgba(37,99,235,0.08);
}
.btn-dark {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.btn-dark:hover {
  background: rgba(37,99,235,0.15);
  transform: translateY(-1px);
}
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* SECTION: Hero */
.hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  padding: 80px 32px;
  position: relative;
  overflow: hidden;
  background: #0a1628;
}
/* Background image layer — sharp, no blur */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/hero-factory.jpg') center top / cover no-repeat;
  z-index: 0;
}
/* Overlay: transparent at top, fades to site background at bottom */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10,22,40,0.15) 0%,
      rgba(10,22,40,0.40) 40%,
      rgba(10,22,40,0.75) 70%,
      #0a1628 100%);
  z-index: 1;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.15), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}
.hero .hero-inner {
  position: relative;
  z-index: 2;
  padding: 48px 40px;
  border-radius: 20px;
  background: rgba(6,13,31,0.35);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.06);
}
.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: var(--color-text);
}
.hero-badge {
  display: inline-block;
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.4);
  color: var(--color-blue-light);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}
.hero-gradient-text {
  background: linear-gradient(90deg, #60a5fa, #06b6d4, #10b981, #60a5fa);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-subtitle {
  font-size: 17px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* SECTION: Stats Bar */
.stats-bar {
  background: var(--color-surface);
  padding: 36px 32px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.stats-grid > div {
  position: relative;
}
.stats-grid > div:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: var(--color-border);
}
.stat-value {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

/* SECTION: Sections generic */
.section { padding: 72px 32px; }
.section-light { background: var(--color-surface); }
.section-white { background: var(--color-bg); }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.3px;
}
.section-subtitle {
  color: var(--color-text-muted);
  font-size: 15px;
  margin-top: 6px;
}
.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-blue-light);
}
.section-link:hover {
  color: var(--color-cyan);
}
.container { max-width: 1100px; margin: 0 auto; }

/* SECTION: Section Pill */
.section-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-blue-light);
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.3);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* SECTION: Project Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-blue-glow);
  border-color: var(--color-border-hover);
}
.project-card-placeholder {
  border: 2px dashed var(--color-border);
  background: var(--gradient-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-muted);
  min-height: 220px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.badge-green { background: var(--color-green-bg); color: var(--color-green); }
.badge-grey { background: rgba(71,85,105,0.3); color: var(--color-text-muted); }
.badge-blue { background: rgba(37,99,235,0.15); color: var(--color-blue-light); }
.badge-yellow { background: rgba(234,179,8,0.15); color: #ca8a04; }
.badge-purple { background: rgba(168,124,255,0.15); color: #a87cff; }
.card-partners {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}
.card-subtitle { font-size: 13px; color: var(--color-blue-light); font-weight: 600; margin-top: -6px; }
.card-desc { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; flex: 1; }
.card-footer { margin-top: auto; }

/* SECTION: Capability Cards */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.capabilities-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.steps-grid-4 {
  grid-template-columns: repeat(4, 1fr) !important;
}
.steps-grid-5 {
  grid-template-columns: repeat(5, 1fr) !important;
}

/* Phase blocks */
.phase-block {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 32px 24px 24px;
  margin-bottom: 0;
}
.phase-header {
  text-align: center;
  margin-bottom: 8px;
}
.phase-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.phase-observe {
  background: rgba(16,185,129,0.15);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
}
.phase-simulate {
  background: rgba(37,99,235,0.15);
  color: var(--color-accent);
  border: 1px solid rgba(37,99,235,0.3);
}
.phase-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}
.phase-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Phase connector arrow */
.phase-connector {
  text-align: center;
  padding: 8px 0;
}

/* Coloured step number variants */
.step-number.step-observe {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 20px rgba(16,185,129,0.3), 0 0 40px rgba(16,185,129,0.1);
}
.step-number.step-simulate {
  background: var(--gradient-blue);
  box-shadow: 0 0 20px var(--color-blue-glow), 0 0 40px rgba(37,99,235,0.15);
}
.capability-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.capability-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-blue-glow);
  border-color: var(--color-border-hover);
}
.capability-icon {
  font-size: 32px;
  margin-bottom: 14px;
}
.capability-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}
.capability-desc { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; }

/* (Page back button removed — now integrated in navbar-subbar) */

/* SECTION: How It Works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 15%;
  right: 15%;
  height: 2px;
  border-top: 2px dashed var(--color-border);
  z-index: 0;
}
.step {
  text-align: center;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-blue);
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px var(--color-blue-glow), 0 0 40px rgba(37,99,235,0.15);
}
.step-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}
.step-desc { font-size: 14px; color: var(--color-text-muted); }

/* SECTION: Persona Cards */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.persona-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.3s;
}
.persona-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
}
.persona-icon { font-size: 32px; margin-bottom: 12px; }
.persona-role {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}
.persona-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}
.persona-features {
  list-style: none;
  padding: 0;
}
.persona-features li {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 4px 0;
  padding-left: 18px;
  position: relative;
}
.persona-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-green);
  font-weight: 700;
}

/* SECTION: Partners */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.partner-box {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 16px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.partner-box:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-hover);
}
.partner-box.coordinator {
  border-color: var(--color-blue);
  box-shadow: 0 0 20px var(--color-blue-glow);
  background: rgba(37,99,235,0.08);
}
.partner-logo-placeholder {
  width: 60px;
  height: 40px;
  background: var(--color-surface-2);
  border-radius: 4px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--color-text-muted);
  font-weight: 600;
}
.partner-logo-img {
  width: 90px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  padding: 8px 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}
.partner-link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}
.partner-link:hover {
  text-decoration: none;
  color: inherit;
}
.partner-name { font-size: 12px; font-weight: 600; color: var(--color-text); }
.partner-country { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.coordinator-tag {
  font-size: 10px;
  color: var(--color-blue-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 4px;
}

/* SECTION: Footer */
.footer {
  background: var(--color-surface);
  color: rgba(255,255,255,0.55);
  padding: 40px 32px 24px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, #2563eb, transparent) 1;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border);
}
.footer-brand {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}
.footer-grant { font-size: 12px; line-height: 1.6; }
.footer-left { flex: 1; min-width: 280px; }
.footer-right { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 8px; min-width: 120px; }
.footer-col-title { font-size: 12px; font-weight: 600; color: var(--color-text); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.footer-col a { color: rgba(255,255,255,0.55); font-size: 13px; text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: var(--color-blue-light); text-decoration: none; }
.footer-brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo { height: 28px; width: auto; border-radius: 4px; }
.footer-eu-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.12);
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--color-blue-light);
  font-weight: 600;
  margin-bottom: 8px;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: rgba(255,255,255,0.55); font-size: 13px; text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--color-blue-light); }
.footer-bottom {
  font-size: 12px;
  color: rgba(255,255,255,0.30);
  text-align: center;
}
.eu-flag { font-size: 18px; margin-right: 6px; vertical-align: middle; }

/* Back to Top button */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--color-blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--color-blue-light);
}

/* SECTION: Auth — Register card wider */
.auth-card-wide { max-width: 480px; }
.form-label-inline { display: inline; font-weight: 400; }

/* SECTION: Project Hero Banner */
.project-hero {
  background:
    linear-gradient(135deg, rgba(6,13,31,0.95), rgba(13,33,81,0.9)),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(37,99,235,0.05) 39px, rgba(37,99,235,0.05) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(37,99,235,0.05) 39px, rgba(37,99,235,0.05) 40px);
  padding: 48px 0 52px;
  position: relative;
}
.project-hero-content {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.project-hero-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  flex-shrink: 0;
}
.project-hero-text { flex: 1; }
.project-hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.project-hero-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
}
.project-hero-meta {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}
.project-hero-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0;
}
.breadcrumb-back-light { margin-bottom: 20px; }
.breadcrumb-back-light a { color: rgba(255,255,255,0.6); }
.breadcrumb-back-light a:hover { color: #fff; text-decoration: none; }

/* SECTION: Project Detail helpers */
.breadcrumb-back { font-size: 13px; color: var(--color-text-muted); margin-bottom: 8px; }
.detail-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.detail-meta { color: var(--color-text-muted); font-size: 14px; margin-bottom: 20px; }
.detail-desc { font-size: 16px; line-height: 1.7; margin-bottom: 36px; max-width: 720px; color: var(--color-text-muted); }
.detail-section-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
}
.detail-section-gap { margin-bottom: 36px; }

/* SECTION: Empty state */
.empty-state { text-align: center; padding: 60px 0; color: var(--color-text-muted); }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state-hint { font-size: 13px; margin-top: 6px; }
.section-subtitle-spaced { margin-bottom: 32px; }

/* SECTION: Auth Forms */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 32px 16px;
}
.auth-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}
.auth-logo-sub { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
.auth-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}
.auth-desc { font-size: 14px; color: var(--color-text-muted); margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-family: var(--font-main);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s;
  background: var(--color-surface-2);
}
.form-control:focus { border-color: var(--color-blue); }
.form-control::placeholder { color: var(--color-text-dim); }
.form-error { font-size: 12px; color: var(--color-danger); margin-top: 4px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--color-text-muted); }
.auth-footer a { color: var(--color-blue-light); font-weight: 600; }

/* SECTION: Flash messages */
.flash-messages { padding: 12px 32px 0; max-width: 1100px; margin: 0 auto; }
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
  border: 1px solid;
}
.flash-success { background: rgba(16,185,129,0.12); color: var(--color-green); border-color: rgba(16,185,129,0.3); }
.flash-danger  { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.3); }
.flash-info    { background: rgba(37,99,235,0.12); color: var(--color-blue-light); border-color: rgba(37,99,235,0.3); }
.flash-warning { background: rgba(245,158,11,0.12); color: var(--color-warning); border-color: rgba(245,158,11,0.3); }

/* SECTION: Data Explorer — File Browser */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
}
.breadcrumb-link { color: var(--color-blue-light); font-weight: 500; }
.breadcrumb-sep { color: var(--color-text-dim); }
.breadcrumb-current { color: var(--color-text); font-weight: 600; }

.file-stats {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.file-stats-sep { margin: 0 6px; }

/* ── Data Category Cards ───────────────────────────────────── */
.data-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 28px 0;
}
.data-category-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.data-category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(37,99,235,0.10);
  transform: translateY(-2px);
}
.data-category-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37,99,235,0.06);
  border-radius: 12px;
}
.data-category-info {
  flex: 1;
  min-width: 0;
}
.data-category-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.data-category-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 8px;
}
.data-category-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.data-category-title-icon {
  margin-right: 8px;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: -8px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .data-category-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .data-category-card {
    padding: 18px;
    gap: 14px;
  }
}

.file-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.file-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  border-color: var(--color-blue-light);
}
.file-card-folder {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.file-card-folder:hover { text-decoration: none; }
.file-icon { font-size: 24px; flex-shrink: 0; }
.file-format-tag {
  font-size: 10px;
  font-weight: 700;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.file-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 44px;
}
.file-type-excel { background: rgba(16,185,129,0.15); color: #10b981; }
.file-type-csv   { background: rgba(6,182,212,0.15); color: #06b6d4; }
.file-type-pdf   { background: rgba(239,68,68,0.15); color: #ef4444; }
.file-type-word  { background: rgba(37,99,235,0.15); color: #3b82f6; }
.file-type-pptx  { background: rgba(245,158,11,0.15); color: #f59e0b; }
.file-type-pickle, .file-type-numpy, .file-type-h5 { background: rgba(168,85,247,0.15); color: #a855f7; }
.file-type-json  { background: rgba(234,179,8,0.15); color: #eab308; }
.file-type-image, .file-type-png, .file-type-jpg { background: rgba(236,72,153,0.15); color: #ec4899; }
.file-type-video, .file-type-mp4 { background: rgba(99,102,241,0.15); color: #6366f1; }
.file-type-zip, .file-type-gz   { background: rgba(107,114,128,0.15); color: #9ca3af; }
.file-info { flex: 1; min-width: 0; }
.file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.file-actions { flex-shrink: 0; }
.file-section-divider { margin-top: 40px; margin-bottom: 20px; }

.btn-outline-dark {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  padding: 7px 16px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-outline-dark:hover {
  border-color: var(--color-blue-light);
  text-decoration: none;
}

/* SECTION: Data Explorer — Project Data Grid */
.project-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.project-data-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}
.project-data-card:hover {
  box-shadow: 0 8px 30px var(--color-blue-glow);
  border-color: var(--color-border-hover);
}
.project-data-locked { opacity: 0.7; }
.project-data-header { display: flex; align-items: center; justify-content: space-between; }
.project-data-icon { font-size: 24px; }
.project-data-name { font-size: 16px; font-weight: 700; color: var(--color-text); }
.project-data-meta { font-size: 12px; color: var(--color-text-muted); flex: 1; }
.pub-count-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-blue-light);
  background: rgba(37,99,235,0.12);
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 12px;
  padding: 2px 10px;
  margin-top: 4px;
}
.project-data-locked-msg {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 8px;
  background: var(--color-surface-2);
  border-radius: var(--radius-btn);
}

/* SECTION: Data Explorer — Dataset Cards */
.dataset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.dataset-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.dataset-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-blue-glow);
  border-color: var(--color-border-hover);
}
.dataset-format {
  font-size: 11px;
  font-weight: 700;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.dataset-name { font-size: 16px; font-weight: 700; color: var(--color-text); margin: 10px 0 6px; }
.dataset-desc { font-size: 13px; color: var(--color-text-muted); line-height: 1.55; }
.dataset-meta { font-size: 12px; color: var(--color-text-muted); margin-top: 12px; }

/* SECTION: Model Library */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.model-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.model-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-blue-glow);
  border-color: var(--color-border-hover);
}
.model-type-tag {
  font-size: 11px;
  font-weight: 700;
  background: rgba(37,99,235,0.15);
  color: var(--color-blue-light);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.model-name { font-size: 16px; font-weight: 700; color: var(--color-text); margin: 10px 0 4px; }
.model-version { font-size: 12px; color: var(--color-text-muted); margin-bottom: 8px; }
.model-desc { font-size: 13px; color: var(--color-text-muted); line-height: 1.55; }
.model-metric {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.model-metric strong { color: var(--color-text); }

/* SECTION: About */
.about-content { max-width: 760px; }
.about-content p { font-size: 15px; line-height: 1.75; color: var(--color-text-muted); margin-bottom: 16px; }
.about-heading {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin: 28px 0 12px;
}
.about-list {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}
.about-list li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

/* SECTION: About Facts Table */
.about-facts {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 24px;
}
.about-fact {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}
.about-fact:last-child { border-bottom: none; }
.about-fact-label {
  font-weight: 700;
  color: var(--color-text);
  min-width: 160px;
  flex-shrink: 0;
}
.about-fact-value { color: var(--color-text-muted); }

/* SECTION: Work Packages */
.wp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.wp-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.wp-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-hover);
}
.wp-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-blue-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.wp-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}
.wp-desc { font-size: 13px; color: var(--color-text-muted); line-height: 1.6; }
.wp-leader { font-size: 11px; color: var(--color-blue-light); font-weight: 600; margin-top: 10px; letter-spacing: 0.3px; }

/* SECTION: Partner description */
.partner-desc { font-size: 10px; color: var(--color-text-muted); margin-top: 2px; line-height: 1.4; }

/* SECTION: Access notice variants */
.access-notice-ok { border-color: var(--color-green); background: var(--color-green-bg); }

/* SECTION: Research */
.research-heading {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin: 32px 0 16px;
}
.research-item {
  display: flex;
  gap: 20px;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.research-item:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.research-item-icon { font-size: 36px; flex-shrink: 0; }
.research-item-info { flex: 1; }
.research-item-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}
.research-item-desc { font-size: 14px; color: var(--color-text-muted); line-height: 1.65; margin-bottom: 12px; }
.research-item-authors { font-size: 13px; color: var(--color-text); font-weight: 500; margin-bottom: 4px; }
.research-item-venue { font-size: 12px; color: var(--color-blue-light); font-weight: 600; margin-bottom: 8px; }
.research-item-meta { font-size: 12px; color: var(--color-text-muted); }
.research-item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.research-video-wrap { flex-shrink: 0; width: 400px; max-width: 100%; }
.research-video {
  width: 100%;
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
@media (max-width: 768px) {
  .research-item { flex-direction: column; }
  .research-video-wrap { width: 100%; }
}

/* SECTION: Contact */
.contact-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 32px;
  max-width: 480px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.contact-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}
.contact-role { font-size: 14px; color: var(--color-blue-light); font-weight: 600; margin-top: 4px; }
.contact-institution { font-size: 14px; color: var(--color-text-muted); margin-top: 2px; margin-bottom: 16px; }
.contact-details { display: flex; flex-direction: column; gap: 10px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.contact-link:hover { color: var(--color-blue-light); text-decoration: none; }
.contact-icon { font-size: 18px; }

/* SECTION: App Cards */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.app-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}
.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-blue-glow);
  border-color: var(--color-border-hover);
}
.app-card-header { display: flex; align-items: center; justify-content: space-between; }
.app-icon { font-size: 28px; }
.app-card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}
.app-card-subtitle { font-size: 13px; color: var(--color-blue-light); font-weight: 600; margin-top: -4px; }
.app-card-desc { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; flex: 1; }
.app-card-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

/* SECTION: Access Notice */
.access-notice {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 24px;
  color: var(--color-text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* SECTION: Admin */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.admin-stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.admin-stat-warning { border-color: var(--color-warning); background: rgba(245,158,11,0.08); }
.admin-stat-value {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
}
.admin-stat-label { font-size: 12px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--color-border);
}
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  color: var(--color-text-muted);
  background: var(--color-surface);
}
.admin-table tr:hover td {
  background: var(--color-surface-2);
}
.admin-table-name { font-weight: 600; color: var(--color-text); }
.admin-status-active { color: var(--color-green); font-weight: 600; font-size: 13px; }
.admin-status-pending { color: var(--color-warning); font-weight: 600; font-size: 13px; }

.admin-form-container { max-width: 680px; }
.admin-form-section {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 16px;
}
.admin-form-heading {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}
.admin-form-hint { font-size: 13px; color: var(--color-text-muted); margin-bottom: 12px; }
.admin-form-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-select {
  max-width: 400px;
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  padding: 8px 12px;
}
.admin-form-submit { margin-top: 12px; }
.admin-checkbox-grid { display: flex; flex-direction: column; gap: 8px; }
.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--color-text-muted);
}
.admin-checkbox-label input[type="checkbox"] { width: 16px; height: 16px; }
.admin-danger-zone { border-color: var(--color-danger); }

.btn-danger {
  background: var(--color-danger);
  color: var(--color-text);
  padding: 7px 16px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* ── Admin Form Card & Category Tree ───────────────────────── */
.admin-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.admin-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row-3 > .form-group { flex: 1; min-width: 180px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.form-input, .form-select {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text-primary);
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}

.category-tree { margin-top: 12px; }
.category-tree-item {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.category-tree-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
}
.category-tree-child {
  padding-left: 44px;
  background: rgba(37,99,235,0.02);
  border-top: 1px solid var(--border-light);
}
.category-tree-icon { font-size: 1.2rem; flex-shrink: 0; }
.category-tree-name { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
.category-tree-path {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: monospace;
  background: rgba(37,99,235,0.06);
  padding: 2px 8px;
  border-radius: 4px;
}
.category-tree-actions { margin-left: auto; }
.category-tree-children { border-top: 1px solid var(--border-light); }

.inline-form { display: inline; }
.badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; }
.badge-muted { background: rgba(0,0,0,0.08); color: var(--text-muted); }
.text-muted { color: var(--text-muted); }

/* SECTION: Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* SECTION: Upload */
.upload-dropzone {
  border: 2px dashed var(--color-border-hover);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.upload-dropzone:hover,
.upload-dropzone-active {
  border-color: var(--color-blue);
  background: rgba(37, 99, 235, 0.05);
}
.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-dropzone-icon { font-size: 36px; margin-bottom: 8px; }
.upload-dropzone-text p { color: var(--color-text-muted); font-size: 14px; }
.upload-dropzone-hint { font-size: 12px !important; margin-top: 4px; }
.upload-file-list { text-align: left; margin-top: 16px; }
.upload-file-count { font-size: 13px; font-weight: 600; color: var(--color-blue-light); margin-bottom: 8px; }
.upload-file-item {
  font-size: 13px;
  color: var(--color-text);
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
}
.upload-file-item span { color: var(--color-text-muted); }

/* SECTION: Video Admin */
.admin-video-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.admin-video-item:last-child { border-bottom: none; }
.admin-video-info { flex: 1; font-size: 14px; }
.admin-video-type-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-right: 6px;
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-blue-light);
}
.admin-video-desc { color: var(--color-text-muted); font-size: 13px; }

/* SECTION: CiSMA Logo placements */
.card-project-logo { margin: 8px 0 12px; }
.card-project-logo-img {
  height: 52px;
  width: auto;
  border-radius: 8px;
  background: #fff;
  padding: 4px 8px;
  object-fit: contain;
}
.about-project-logo { margin: 12px 0 20px; }
.about-cisma-logo {
  height: 72px;
  width: auto;
  border-radius: 10px;
  background: #fff;
  padding: 6px 12px;
  object-fit: contain;
}
.research-project-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.research-project-header .section-title { margin-bottom: 0; }
.research-project-logo {
  height: 60px;
  width: auto;
  border-radius: 10px;
  background: #fff;
  padding: 6px 10px;
  object-fit: contain;
  flex-shrink: 0;
}

/* SECTION: Contact Form */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

/* Left panel */
.contact-info-panel { padding-top: 4px; }
.contact-panel-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}
.contact-panel-desc {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 28px;
}
.contact-person {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}
/* Social icons */
.contact-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 20px;
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.3);
  color: var(--color-blue-light);
  transition: all 0.2s;
  text-decoration: none;
}
.social-icon:hover {
  background: var(--color-blue);
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}
.contact-topics { margin-top: 4px; }
.contact-topics-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.contact-topics-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-topics-list li {
  font-size: 14px;
  color: var(--color-text-muted);
  padding-left: 16px;
  position: relative;
}
.contact-topics-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-blue-light);
}

/* Right panel — form */
.contact-form-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 36px;
}
.contact-form-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--color-blue);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.contact-form-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}
.contact-form-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

/* Form elements */
.enquiry-form { display: flex; flex-direction: column; gap: 18px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.form-group input,
.form-group textarea {
  background: var(--color-surface-2, #0d1b35);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--color-text);
  font-family: inherit;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--color-text-muted); }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-blue-light);
}
.form-group textarea { resize: vertical; }
.required { color: #ef4444; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.form-check input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--color-blue);
  flex-shrink: 0;
}
.privacy-link { color: var(--color-blue-light); text-decoration: underline; }

.btn-enquiry {
  width: 100%;
  padding: 14px;
  background: var(--color-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-enquiry:hover { background: #1d4ed8; transform: translateY(-1px); }
.btn-enquiry:active { transform: translateY(0); }

/* SECTION: Responsive */
/* Navbar collapses to hamburger at 1100px to prevent wrapping */
@media (max-width: 1100px) {
  .hamburger { display: flex; }
  .navbar-links {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(6,13,31,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 80px 24px 32px;
    gap: 0;
    box-shadow: -4px 0 24px rgba(0,0,0,0.5);
    z-index: 1000;
  }
  .navbar-links.open { display: flex; }
  .navbar-links li { width: 100%; }
  .navbar-links a {
    display: flex;
    padding: 16px 20px;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: 48px;
    align-items: center;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: background 0.15s ease;
  }
  .navbar-links a:hover {
    background: rgba(255,255,255,0.06);
  }
  .navbar-links a.active {
    background: rgba(59,130,246,0.15);
    color: var(--color-accent);
    font-weight: 600;
    border-left: 3px solid var(--color-accent);
  }
}
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid > div:nth-child(2)::after { display: none; }
  .steps-grid, .steps-grid-4, .steps-grid-5 { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; }
  .steps-grid::before { display: none; }
  .phase-block { padding: 24px 16px 16px; }
  .capabilities-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .persona-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar-main { padding: 0 16px; }
  .section { padding: 48px 16px; }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid, .steps-grid-4, .steps-grid-5 { grid-template-columns: 1fr !important; }
  .capabilities-grid-4 { grid-template-columns: 1fr; }
  .persona-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .hero { padding: 60px 16px; }
  .hero .hero-inner { padding: 20px; }
  .footer-top { flex-direction: column; }
}

/* SECTION: Video Lightbox */
.video-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.video-lightbox.active {
  display: flex;
}
.video-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
}
.video-lightbox-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 960px;
}
.video-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
}
.video-lightbox-close:hover { opacity: 1; }
.video-lightbox-player {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  background: #000;
}

/* SECTION: Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
  padding: 16px 24px;
  animation: slideUp 0.4s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cookie-banner-text {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}
.cookie-link { color: var(--color-blue-light); text-decoration: underline; }
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .cookie-banner-inner { flex-direction: column; text-align: center; }
  .cookie-banner-actions { width: 100%; justify-content: center; }
}

/* ================================================================
   SECTION: Theme Toggle Button
   ================================================================ */
.theme-toggle {
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all 0.2s;
  font-size: 18px;
  line-height: 1;
}
.theme-toggle:hover {
  border-color: var(--color-blue-light);
  color: var(--color-text);
  background: rgba(59,130,246,0.1);
}
/* Show sun in dark mode, moon in light mode */
.theme-toggle .icon-sun { display: inline; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

/* ================================================================
   SECTION: Light Theme
   ================================================================ */
[data-theme="light"] {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-border: rgba(15,23,42,0.18);
  --color-border-hover: rgba(15,23,42,0.35);
  --color-accent: #1d4ed8;
  --color-blue-glow: rgba(37,99,235,0.15);
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-dim: #94a3b8;
  --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #f8fafc 100%);
  --gradient-card: linear-gradient(135deg, rgba(0,0,0,0.02), rgba(0,0,0,0.005));
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
}

/* Navbar */
[data-theme="light"] .navbar {
  background: rgba(248,250,252,0.88);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
[data-theme="light"] .navbar-scrolled {
  background: rgba(248,250,252,0.96) !important;
}
[data-theme="light"] .navbar-links a {
  color: rgba(15,23,42,0.70);
}
[data-theme="light"] .navbar-links a:hover {
  color: #0f172a;
  background: rgba(0,0,0,0.05);
}
[data-theme="light"] .navbar-links a.active {
  color: #0f172a;
  background: rgba(0,0,0,0.07);
}
[data-theme="light"] .navbar-brand {
  color: #0f172a;
}
[data-theme="light"] .btn-signin {
  border: 2px solid #94a3b8 !important;
  color: #0f172a !important;
}
[data-theme="light"] .btn-signin:hover {
  background: rgba(37,99,235,0.10) !important;
  border-color: #2563eb !important;
  color: #1e40af !important;
  box-shadow: 0 1px 4px rgba(37,99,235,0.15);
}
[data-theme="light"] .navbar-subbar {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
[data-theme="light"] .navbar-subbar a {
  color: var(--color-blue);
}

/* Hamburger */
[data-theme="light"] .hamburger-line {
  background: var(--color-text);
}

/* Buttons — light theme: ensure strong visible boundaries */
[data-theme="light"] .btn-outline {
  color: #1e293b;
  border: 2px solid #94a3b8 !important;
}
[data-theme="light"] .btn-outline:hover {
  background: rgba(37,99,235,0.08);
  border-color: #2563eb !important;
  color: #1e40af;
  box-shadow: 0 1px 4px rgba(37,99,235,0.15);
}
[data-theme="light"] .btn-outline-dark {
  color: #1e293b;
  border: 2px solid #94a3b8 !important;
}
[data-theme="light"] .btn-outline-dark:hover {
  background: rgba(37,99,235,0.08);
  border-color: #2563eb !important;
  color: #1e40af;
  box-shadow: 0 1px 4px rgba(37,99,235,0.15);
}
[data-theme="light"] .btn-dark {
  background: #e2e8f0;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
}
[data-theme="light"] .btn-dark:hover {
  background: #cbd5e1;
  border-color: #2563eb;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(37,99,235,0.15);
}

/* Cards */
[data-theme="light"] .wp-card,
[data-theme="light"] .capability-card,
[data-theme="light"] .project-card,
[data-theme="light"] .gs-step,
[data-theme="light"] .gs-role-card {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[data-theme="light"] .project-card:hover,
[data-theme="light"] .wp-card:hover,
[data-theme="light"] .capability-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  border-color: rgba(37,99,235,0.3);
}

/* Section alternation */
[data-theme="light"] .section-white {
  background: #f8fafc;
}
[data-theme="light"] .section-light {
  background: #ffffff;
}

/* Hero gradient */
[data-theme="light"] .hero {
  background: #e8eef6;
}
[data-theme="light"] .hero::before {
  filter: saturate(0.5) brightness(1.2);
}
[data-theme="light"] .hero-overlay {
  background:
    linear-gradient(180deg,
      rgba(248,250,252,0.10) 0%,
      rgba(248,250,252,0.35) 40%,
      rgba(248,250,252,0.72) 70%,
      #f8fafc 100%);
}
[data-theme="light"] .hero .hero-inner {
  background: rgba(255,255,255,0.45);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .hero-glow {
  opacity: 0.3;
}

/* Footer */
[data-theme="light"] .footer {
  background: #0f172a;
  color: rgba(255,255,255,0.55);
  border-image: linear-gradient(90deg, transparent, #2563eb, transparent) 1;
}
[data-theme="light"] .footer .footer-brand,
[data-theme="light"] .footer .footer-col-title {
  color: #f1f5f9;
}
[data-theme="light"] .footer-col a {
  color: rgba(255,255,255,0.55);
}
[data-theme="light"] .footer-bottom {
  color: rgba(255,255,255,0.30);
}

/* Partner logos */
[data-theme="light"] .partner-box {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .partner-logo-img {
  background: #ffffff;
}

/* Auth pages */
[data-theme="light"] .auth-page {
  background: linear-gradient(135deg, #e0e7ff 0%, #f8fafc 50%, #dbeafe 100%);
}
[data-theme="light"] .auth-card {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* Data explorer & tables */
[data-theme="light"] .table th {
  background: #f1f5f9;
  color: var(--color-text);
}
[data-theme="light"] .table td {
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .table tr:hover td {
  background: rgba(37,99,235,0.04);
}

/* Research page */
[data-theme="light"] .research-filter-btn {
  border-color: rgba(15,23,42,0.30);
  background: rgba(15,23,42,0.04);
  color: #334155;
}
[data-theme="light"] .research-filter-btn:hover {
  background: rgba(37,99,235,0.08);
  border-color: #2563eb;
  color: #1e40af;
}
[data-theme="light"] .research-filter-btn.active {
  background: var(--color-blue-light);
  color: #fff;
  border-color: var(--color-blue-light);
}

/* Back to top */
[data-theme="light"] .back-to-top {
  background: var(--color-blue);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Cookie banner */
[data-theme="light"] .cookie-banner {
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

/* Flash messages */
[data-theme="light"] .flash {
  border-color: rgba(0,0,0,0.08);
}

/* Badges */
[data-theme="light"] .badge-green {
  background: rgba(16,185,129,0.12);
  color: #047857;
}
[data-theme="light"] .badge-grey {
  background: rgba(0,0,0,0.06);
  color: #475569;
}

/* Admin panel, chatbot, forms */
[data-theme="light"] .form-control {
  background: #ffffff;
  border-color: rgba(15,23,42,0.25);
  color: var(--color-text);
}
[data-theme="light"] .form-control:focus {
  border-color: var(--color-blue-light);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Mobile menu */
@media (max-width: 1100px) {
  [data-theme="light"] .navbar-links.open {
    background: rgba(248,250,252,0.98);
    border-top: 1px solid rgba(0,0,0,0.06);
  }
}

/* ── Part Detail Panel ──────────────────────────────────── */
.part-detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 28px 28px 24px;
}
.part-detail-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
}
.part-detail-subtext {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0 0 18px;
}
[data-theme="light"] .part-detail-panel {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* ── Tables ────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.table th {
  text-align: left;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border-light);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--color-text);
}
.table tr:hover td {
  background: rgba(59,130,246,0.04);
}
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.badge-dark {
  background: rgba(30,41,59,0.7);
  color: #e2e8f0;
}
[data-theme="light"] .badge-dark {
  background: rgba(30,41,59,0.1);
  color: #1e293b;
}

/* ── Collapsible Panels ────────────────────────────────── */
.collapsible-panel {
  padding: 0;
  overflow: hidden;
}
.collapsible-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: background 0.15s ease;
}
.collapsible-toggle:hover {
  background: rgba(59,130,246,0.06);
}
.collapsible-icon {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}
.collapsible-icon-open {
  transform: rotate(90deg);
}
.collapsible-count {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 400;
  white-space: nowrap;
}
.collapsible-body {
  padding: 0 24px 24px;
}
.collapsible-body[hidden] {
  display: none;
}
[data-theme="light"] .collapsible-toggle:hover {
  background: rgba(59,130,246,0.04);
}

/* ================================================================
   SECTION: Responsive — Tablet (1024px)
   ================================================================ */
@media (max-width: 1024px) {
  .section { padding: 56px 20px; }
  .section-title { font-size: 22px; }
  .section-subtitle { font-size: 14px; }
  .hero-title { font-size: clamp(24px, 4.5vw, 38px); }
  .hero-subtitle { font-size: 16px; }
  .app-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .project-data-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .footer-right { gap: 24px; }
}

/* ================================================================
   SECTION: Responsive — Touch targets & form sizing (all mobile)
   ================================================================ */
@media (max-width: 768px) {
  /* Touch targets: min 44px per Apple/Google HIG */
  .btn { min-height: 44px; padding: 12px 20px; font-size: 14px; }
  .btn-sm { min-height: 40px; padding: 10px 14px; }
  .form-control { min-height: 44px; padding: 12px 14px; font-size: 16px; }
  select.form-control { min-height: 44px; }
  .form-row { grid-template-columns: 1fr; }
  .admin-select { max-width: 100%; }

  /* Typography */
  .section-title { font-size: 20px; }
  .section-subtitle { font-size: 13px; }
  .auth-title { font-size: 20px; }
  .auth-card { padding: 24px 16px; }

  /* Tables */
  .admin-table th, .admin-table td { padding: 10px 8px; font-size: 12px; }

  /* Hero */
  .hero { padding: 48px 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Footer */
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-left { min-width: auto; }
  .footer-right { gap: 16px; flex-wrap: wrap; }

  /* Stats */
  .stats-grid { gap: 12px; }
  .stat-value { font-size: 24px; }

  /* Breadcrumb */
  .breadcrumb { font-size: 12px; flex-wrap: wrap; }

  /* Cookie banner */
  .cookie-banner-inner { flex-direction: column; text-align: center; }
  .cookie-banner-actions { width: 100%; justify-content: center; }

  /* Video lightbox */
  .video-lightbox-close { top: -32px; font-size: 28px; }

  /* Icons */
  .research-item-icon { font-size: 28px; }
  .empty-state-icon { font-size: 32px; }
}

/* ================================================================
   SECTION: Responsive — Small phones (480px and below)
   ================================================================ */
@media (max-width: 480px) {
  .section { padding: 36px 12px; }
  .section-title { font-size: 18px; }
  .hero { padding: 36px 12px; }
  .hero-title { font-size: 22px; }
  .hero-subtitle { font-size: 14px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 11px; }
  .app-grid { grid-template-columns: 1fr; }
  .project-data-grid { grid-template-columns: 1fr; }
  .wp-grid { grid-template-columns: 1fr; }
  .navbar-main { padding: 0 12px; }
  .chat-msg { max-width: 92%; font-size: 13px; }
  .form-control { font-size: 16px; } /* prevent iOS zoom on focus */
}

/* Smooth theme transition */
html[data-theme] {
  transition: background-color 0.3s ease, color 0.3s ease;
}
html[data-theme] .navbar,
html[data-theme] .footer,
html[data-theme] .section-white,
html[data-theme] .section-light,
html[data-theme] body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ================================================================
   HOMEPAGE ENRICHMENT — Tiers A / B / C
   Scientific-engineering polish layered on top of the existing dark theme.
   All rules are additive; no existing rules above this line are modified.
   ================================================================ */

/* ---- Typography: IBM Plex Sans + Mono (loaded site-wide) ---- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --font-scientific: 'IBM Plex Sans', 'Inter', system-ui, sans-serif;
  --color-hairline: rgba(255,255,255,0.10);
  --color-paper-tint: rgba(255,255,255,0.02);
}

/* A2 — Numbered section markers (monospace eyebrow) */
.section-marker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}
.section-marker::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--color-text-muted);
  opacity: 0.6;
}

/* A3 — Two-tone section titles */
.section-title .muted {
  color: var(--color-text-muted);
  font-weight: 400;
  font-style: italic;
}

/* B1 — Hero trust strip (concrete numerical claims) */
.hero-trust-strip {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--color-hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 36px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.hero-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hero-trust-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1;
  letter-spacing: -0.01em;
}
.hero-trust-num .unit {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-left: 2px;
}
.hero-trust-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
@media (max-width: 640px) {
  .hero-trust-strip { gap: 24px; }
  .hero-trust-num   { font-size: 18px; }
}

/* B2 — Methodology phase tag (monospace, scientific) */
.phase-tag-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.phase-tag-mono::after {
  content: '';
  flex: 1;
  min-width: 40px;
  height: 1px;
  background: var(--color-hairline);
}

/* B3 — EU funding strip (full-width, bottom of homepage) */
.eu-funding-strip {
  background: var(--color-surface);
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
  padding: 40px 32px;
}
.eu-funding-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}
.eu-flag-block {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--color-text);
}
.eu-flag-stars {
  font-size: 28px;
  line-height: 1;
  color: #ffd700;
  letter-spacing: 1px;
}
.eu-flag-text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}
.eu-flag-text b {
  font-weight: 600;
  color: var(--color-text);
}
.eu-flag-text span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.eu-disclaimer {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 520px;
  font-style: italic;
}
.eu-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-hairline);
  padding: 12px 18px;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.eu-cta:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
}
@media (max-width: 900px) {
  .eu-funding-inner { grid-template-columns: 1fr; gap: 18px; }
  .eu-cta { justify-self: start; }
}

/* C1 — Hairline-rule section dividers (engineering-drawing feel) */
.section + .section {
  border-top: 1px solid var(--color-hairline);
}

/* C3 — Subdued status badges (less marketing-bright) */
.badge.badge-subdued,
.badge-green.badge-subdued {
  background: transparent;
  border: 1px solid rgba(16,185,129,0.4);
  color: rgba(16,185,129,0.95);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.badge.badge-subdued-grey,
.badge-grey.badge-subdued {
  background: transparent;
  border: 1px solid var(--color-text-muted);
  color: var(--color-text-muted);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

/* C4 — Capability card metric stamp (small monospace footer) */
.capability-metric {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 500;
}

/* A1 — Personas: convert grid to interactive tabs */
.persona-tabs-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-hairline);
  background: var(--color-paper-tint);
}
.persona-tab-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--color-hairline);
}
.persona-tab {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--color-hairline);
  padding: 22px 24px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--color-text-muted);
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.persona-tab:last-child { border-right: 0; }
.persona-tab:hover {
  background: rgba(255,255,255,0.03);
  color: var(--color-text);
}
.persona-tab.active {
  background: rgba(37,99,235,0.08);
  color: var(--color-text);
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: -1px;
}
.persona-tab-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.persona-tab-name {
  font-size: 15px;
  font-weight: 600;
}
.persona-tab-icon {
  font-size: 18px;
}
.persona-panel {
  padding: 36px 40px 40px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.persona-panel.persona-hidden { display: none; }
.persona-panel-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.persona-panel-quote {
  font-family: var(--font-scientific);
  font-size: 22px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--color-text);
  font-style: italic;
  margin-bottom: 16px;
}
.persona-panel-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-muted);
}
.persona-panel-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.persona-panel-feature {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-text);
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid var(--color-accent);
}
.persona-panel-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  display: inline-block;
}
.persona-panel-cta:hover {
  text-decoration: underline;
  color: var(--color-blue-light);
}
@media (max-width: 900px) {
  .persona-tab-bar { grid-template-columns: repeat(2, 1fr); }
  .persona-tab { border-right: 1px solid var(--color-hairline); border-bottom: 1px solid var(--color-hairline); }
  .persona-tab:nth-child(2n) { border-right: 0; }
  .persona-panel { grid-template-columns: 1fr; gap: 24px; padding: 28px 24px; }
}

/* C2 — Apply IBM Plex Sans body-wide (heading family unchanged so existing
   Space Grotesk titles keep their character). Adds a subtle scientific
   typography shift across the site without overwriting any existing rules. */
body {
  font-family: var(--font-scientific);
}
.mono, code, kbd, samp, pre {
  font-family: var(--font-mono);
}

/* T2 — Latest publications panel on the homepage */
.latest-pubs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .latest-pubs-grid { grid-template-columns: 1fr; }
}
.pub-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--color-hairline);
  background: var(--color-paper-tint);
  transition: border-color 0.15s, transform 0.15s;
}
.pub-card:hover {
  border-color: var(--color-text-muted);
  transform: translateY(-2px);
}
.pub-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.pub-card-year {
  background: rgba(37,99,235,0.12);
  color: var(--color-blue-light);
  padding: 3px 8px;
  border-radius: 3px;
}
.pub-card-project { color: var(--color-text); }
.pub-card-type { margin-left: auto; }
.pub-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  margin: 0;
}
.pub-card-authors {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}
.pub-card-venue {
  font-size: 12px;
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.pub-card-doi {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-blue-light);
  text-decoration: none;
  margin-top: auto;
  word-break: break-all;
}
.pub-card-doi:hover {
  text-decoration: underline;
  color: var(--color-cyan);
}

/* T2 — ORCID sign-in button on /auth/login */
.btn-orcid {
  background: #A6CE39;
  color: #1a1a1a !important;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
}
.btn-orcid:hover {
  background: #8FB52E;
  color: #1a1a1a !important;
  text-decoration: none;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-hairline);
}
.auth-orcid-note {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.5;
}

/* T2 — Capability-card SVG icons (replace emoji which renders inconsistently) */
.capability-icon svg {
  width: 32px;
  height: 32px;
  display: block;
  color: var(--color-blue-light);
}
.capability-card:hover .capability-icon svg {
  color: var(--color-cyan);
  transition: color 0.2s;
}

/* T2 — Newsletter signup strip (sits above the EU funding strip) */
.newsletter-strip {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
  padding: 32px;
}
.newsletter-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .newsletter-inner { grid-template-columns: 1fr; gap: 20px; }
}
.newsletter-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.newsletter-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 6px;
}
.newsletter-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}
.newsletter-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
  position: relative;
}
.newsletter-input {
  font-family: var(--font-scientific);
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--color-hairline);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: 6px;
  transition: border-color 0.15s;
}
.newsletter-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-blue-glow);
}
.newsletter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.newsletter-btn:hover:not(:disabled) { background: var(--color-blue-light); }
.newsletter-btn:disabled { opacity: 0.6; cursor: wait; }
.newsletter-msg {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  min-height: 18px;
  margin-top: 4px;
}
.newsletter-msg.ok { color: var(--color-green); }
.newsletter-msg.err { color: var(--color-danger); }

/* T2 — Last-updated stamp at bottom of homepage */
.last-updated-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 18px 32px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.last-updated-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 6px var(--color-green-bg);
  animation: dm-pulse 2.4s infinite;
}
