/* === Root Variables === */
:root {
  /* darker palette tuned for stronger contrast */
  --bg-primary: #01030a;
  --bg-elevated: rgba(6, 12, 22, 0.88);
  --bg-highlight: rgba(10, 30, 40, 0.6);
  --bg-card: rgba(4, 14, 22, 0.9);
  --border-glow: rgba(0, 200, 210, 0.28);
  --accent-cyan: #00f5a0;
  --accent-blue: #00c7e0;
  --accent-purple: #6f3adf;
  /* UI sizing tokens for consistent spacing and curves */
  --card-radius: 1.5rem;
  --card-padding: clamp(1.25rem, 2.4vw, 2rem);
  --control-radius: 0.9rem;
  --icon-size: 72px;
  --text-primary: #dbeefc;
  --text-secondary: #6f8aa6;
  --text-muted: rgba(148, 163, 184, 0.7);
  --shadow-glow: 0 0 28px rgba(0, 200, 220, 0.12);
  --section-max-width: 1120px;
  --section-tight-width: 900px;
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
}

/* === Body & Typography === */
body {
  font-family: "Titillium Web", sans-serif;
  line-height: 1.65;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(0, 217, 245, 0.08),
      transparent 45%
    ),
    radial-gradient(circle at 80% 10%, rgba(124, 58, 237, 0.1), transparent 55%),
    var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

body.dark-mode {
  --bg-primary: #01030a;
  --bg-elevated: rgba(6, 12, 22, 0.88);
  --bg-highlight: rgba(10, 30, 40, 0.6);
  --bg-card: rgba(4, 14, 22, 0.9);
  --border-glow: rgba(0, 200, 210, 0.28);
  --accent-cyan: #00f5a0;
  --accent-blue: #00c7e0;
  --accent-purple: #6f3adf;
  --text-primary: #dbeefc;
  --text-secondary: #6f8aa6;
  --shadow-glow: 0 0 28px rgba(0, 200, 220, 0.12);
  background-color: transparent;
  color: var(--text-primary);
}

body.light-mode {
  --bg-primary: #f5f8ff;
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --bg-highlight: rgba(37, 99, 235, 0.1);
  --bg-card: rgba(255, 255, 255, 0.96);
  --border-glow: rgba(82, 97, 255, 0.18);
  --accent-cyan: #0ea5e9;
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;
  --text-primary: #0b1626;
  --text-secondary: #41526c;
  --text-muted: rgba(15, 23, 42, 0.55);
  --shadow-glow: 0 22px 42px rgba(15, 23, 42, 0.1);
  color-scheme: light;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(37, 99, 235, 0.12),
      transparent 55%
    ),
    radial-gradient(circle at 80% 5%, rgba(14, 178, 210, 0.16), transparent 60%),
    var(--bg-primary);
  color: var(--text-primary);
}

body.light-mode .navbar,
body.light-mode .footer {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-primary);
}

body.light-mode .nav-link {
  color: var(--text-primary) !important;
}

body.light-mode .nav-link:hover {
  color: var(--accent-purple) !important;
}

body.light-mode .nsa-card {
  background: var(--bg-card);
  border-color: rgba(82, 97, 255, 0.14);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

body.light-mode .card-caption {
  color: rgba(37, 99, 235, 0.65);
}

body.light-mode .join-console {
  background: var(--bg-elevated);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
}

body.light-mode .join-form .form-floating > .form-control,
body.light-mode .join-form .form-floating > textarea {
  background: rgba(246, 249, 255, 0.95);
  color: #0b1626;
  border-color: rgba(37, 99, 235, 0.2);
}

body.light-mode .join-form .form-floating > label {
  color: rgba(15, 23, 42, 0.55);
}

/* === Particles Layer === */
#particles-js {
  position: fixed;
  inset: 0;
  z-index: -2;
}

/* === Navbar === */
.navbar {
  background: rgba(6, 10, 20, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 255, 224, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--accent-blue) !important;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.navbar-brand i {
  color: var(--accent-cyan);
}

.nav-link {
  color: var(--text-secondary) !important;
  margin: 0 0.55rem;
  position: relative;
  transition: color 0.25s ease, transform 0.25s ease;
}

/* hide placeholder nav items that link to `#` (inactive) */
.nav-link[href="#"] {
  display: none !important;
}

/* === Projects Page === */
.page-hero {
  padding: 6rem 0 3rem;
  background: radial-gradient(
    circle at top,
    rgba(0, 255, 214, 0.08),
    transparent 55%
  );
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 255, 214, 0.04) 0,
    rgba(0, 255, 214, 0.04) 1px,
    transparent 1px,
    transparent 18px
  );
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(12, 14, 21, 0.6);
  border: 1px solid rgba(0, 255, 214, 0.2);
  border-radius: 1.5rem;
  padding: 2.5rem clamp(1.5rem, 3vw, 3rem);
}

.page-hero__inner h1 {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  margin-bottom: 1.25rem;
}

.projects-section {
  padding: 2rem 0 5rem;
}

.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-chip {
  border: 1px solid rgba(0, 255, 214, 0.3);
  background: rgba(0, 255, 214, 0.08);
  color: var(--text-primary);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 1.4rem;
  border-radius: 999px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.filter-chip:hover,
.filter-chip:focus {
  background: rgba(0, 255, 214, 0.18);
  border-color: rgba(0, 255, 214, 0.55);
  transform: translateY(-2px);
}

.filter-chip.is-active {
  background: var(--accent-cyan);
  color: #001315;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 18px rgba(0, 255, 214, 0.35);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 2.5vw, 2.25rem);
  margin-top: 2rem;
}

.projects-empty {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.16);
  border-radius: 1.25rem;
  padding: clamp(1.5rem, 3vw, 1.9rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 100%;
  position: relative;
  box-shadow: var(--shadow-glow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 245, 224, 0.35);
  box-shadow: 0 22px 45px rgba(0, 232, 255, 0.18);
}

body.light-mode .project-card {
  background: var(--bg-card);
  border-color: rgba(82, 97, 255, 0.12);
  box-shadow: var(--shadow-glow);
}

.project-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-card__header h2 {
  font-size: 1.45rem;
  margin: 0;
  line-height: 1.3;
}

.project-status {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 214, 0.35);
  background: rgba(0, 255, 214, 0.12);
  color: var(--accent-cyan);
}

.project-summary {
  flex-grow: 1;
  margin: 0;
  color: var(--text-secondary);
}

.project-meta {
  display: grid;
  gap: 0.6rem;
  margin: 0;
}

.project-meta div {
  display: grid;
  gap: 0.2rem;
}

.project-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.project-meta dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--text-primary);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-blue);
  opacity: 0.9;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hero-grid,
.stats-grid,
.timeline-section .category-header,
.timeline-container,
.intel-deck .category-header,
.intel-deck .card-grid,
.impact-section .category-header,
.impact-grid,
.faq-section .category-header,
.faq-grid,
.projects-section .projects-toolbar,
.projects-section .project-grid,
.projects-section .projects-empty,
.team-structure-section .category-header,
.team-structure-section .section-subtitle,
.team-structure-section .portfolios-grid,
.join-section .join-console {
  width: min(var(--section-max-width), 100%);
  margin-left: auto;
  margin-right: auto;
}

.timeline-section .category-header,
.timeline-container,
.faq-section .category-header,
.team-structure-section .category-header {
  width: min(var(--section-tight-width), 100%);
}

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

.project-meta dd a:hover,
.project-meta dd a:focus-visible {
  text-decoration: underline;
}

.tag-pill {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 255, 214, 0.14);
  border: 1px solid rgba(0, 255, 214, 0.25);
  color: var(--accent-cyan);
}

.filter-chip .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.45rem;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(0, 255, 214, 0.2);
  color: currentColor;
  font-size: 0.75rem;
  font-weight: 600;
}

.filter-chip.is-active .filter-count {
  background: rgba(0, 0, 0, 0.14);
  color: inherit;
}

.team-search {
  position: relative;
  flex: 1 1 320px;
  max-width: 420px;
}

.team-search__input {
  width: 100%;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 214, 0.28);
  background: rgba(0, 20, 32, 0.75);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.team-search__input::placeholder {
  color: var(--text-muted);
}

.team-search__input:focus {
  outline: none;
  border-color: rgba(0, 255, 214, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 255, 214, 0.22);
  background: rgba(0, 30, 45, 0.85);
}

.team-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.team-structure {
  padding: 4rem 0 6rem;
  background: radial-gradient(
      circle at top,
      rgba(0, 255, 214, 0.05),
      transparent 55%
    )
    var(--bg-primary);
}

.team-structure__grid {
  width: min(var(--section-max-width), 100%);
  margin: 3rem auto 0;
  display: grid;
  gap: clamp(1.75rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.team-wing {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.16);
  border-radius: 1.5rem;
  padding: clamp(1.6rem, 3vw, 2.1rem);
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.team-wing__header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

.team-wing__lead {
  align-self: flex-start;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 214, 0.35);
  background: rgba(0, 255, 214, 0.12);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.team-subteams {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.team-subteam h4,
.team-wing__unassigned h4 {
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.team-member-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.team-member-list li {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.9rem;
  background: rgba(0, 0, 0, 0.15);
}

.member-name {
  font-weight: 600;
}

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

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.15s ease;
  z-index: 1100;
  pointer-events: none;
}

.back-to-top {
  position: fixed;
  bottom: 2.5rem;
  right: 2rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: #001315;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(0, 255, 214, 0.6);
  outline-offset: 3px;
}

@supports (scrollbar-color: #000 #000) {
  body {
    scrollbar-color: var(--accent-cyan) rgba(0, 0, 0, 0.3);
    scrollbar-width: thin;
  }
}

body::-webkit-scrollbar {
  width: 0.75rem;
}

body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.2);
}

body.light-mode::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.2);
}

body.light-mode::-webkit-scrollbar-thumb {
  border-color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 768px) {
  #team-directory .projects-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .team-filters {
    justify-content: flex-start;
  }

  .back-to-top {
    right: 1.25rem;
    bottom: 1.75rem;
  }
}

.light-mode .tag-pill {
  background: rgba(0, 73, 71, 0.15);
  border-color: rgba(0, 73, 71, 0.25);
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: rgba(0, 255, 214, 0.16);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 255, 214, 0.34);
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-link:hover,
.project-link:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 255, 214, 0.28);
}

.project-link.disabled {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.22);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .page-hero {
    padding-top: 5rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  .project-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-status {
    align-self: flex-start;
  }
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent-blue) !important;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

.btn-join {
  background: linear-gradient(
    120deg,
    rgba(0, 245, 160, 0.9),
    rgba(0, 217, 245, 0.9)
  );
  color: #020617 !important;
  border-radius: 999px;
  padding: 0.45rem 1.2rem !important;
  font-weight: 600;
  box-shadow: 0 0 25px rgba(0, 245, 160, 0.35);
  transition: box-shadow 0.3s ease;
  text-decoration: none !important;
}

.btn-join:hover {
  box-shadow: 0 0 45px rgba(0, 245, 200, 0.55);
}

body.light-mode .btn-join {
  color: #0b1626 !important;
}

.nav-link.btn-join::after {
  display: none;
}

.nav-link.btn-join:hover,
.nav-link.btn-join:focus {
  color: inherit !important;
}

/* Theme Toggle */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: 1rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 217, 245, 0.25);
  background: rgba(6, 12, 20, 0.6);
  color: var(--accent-cyan);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.theme-toggle:hover {
  transform: scale(1.07);
  border-color: rgba(0, 245, 200, 0.6);
  box-shadow: 0 0 20px rgba(0, 245, 224, 0.2);
}

body.light-mode .theme-toggle {
  background: rgba(255, 255, 255, 0.8);
  color: #0b1626;
  border-color: rgba(11, 22, 38, 0.2);
}

/* === Hero Section === */
.terminal-hero {
  padding: 140px 3vw 90px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero-copy {
  max-width: 520px;
}

.hero-kicker {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-blue);
  display: inline-block;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(
    120deg,
    var(--accent-cyan),
    var(--accent-blue),
    var(--accent-purple)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin: 1.5rem 0 2.2rem;
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 34ch;
}

.hero-link-strip {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: -0.5rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hero-link-strip .hero-link {
  color: var(--accent-cyan);
  text-decoration: none;
  position: relative;
  font-weight: 600;
}

.hero-link-strip .hero-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(120deg, var(--accent-cyan), var(--accent-blue));
  opacity: 0.5;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hero-link-strip .hero-link:hover::after,
.hero-link-strip .hero-link:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-btn {
  padding: 0.75rem 1.9rem;
  border-radius: var(--control-radius);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease,
    background 0.3s ease;
}

.hero-btn.mini {
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
}

.hero-btn.primary {
  background: linear-gradient(
    120deg,
    rgba(0, 245, 160, 0.8),
    rgba(0, 217, 245, 0.9)
  );
  color: #020617;
  box-shadow: 0 0 35px rgba(0, 255, 200, 0.35);
}

.hero-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 45px rgba(0, 255, 220, 0.55);
}

.hero-btn.ghost {
  border: 1px solid rgba(0, 217, 245, 0.32);
  color: var(--text-primary);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.hero-btn.ghost:hover {
  background: rgba(0, 217, 245, 0.12);
  transform: translateY(-3px);
}

.hero-hologram {
  position: relative;
  width: min(420px, 70vw);
  aspect-ratio: 1;
  justify-self: center;
}

.hero-hologram::before {
  content: "";
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 245, 200, 0.35), transparent 65%);
  filter: blur(6px);
  animation: pulseSoft 6s ease-in-out infinite;
}

.orbital,
.holo-grid,
.holo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.orbital {
  border: 1px solid rgba(0, 217, 245, 0.35);
  box-shadow: 0 0 22px rgba(0, 217, 245, 0.2);
  animation: rotateSlow 18s linear infinite;
}

.holo-grid {
  -webkit-mask-image: radial-gradient(
    circle at center,
    black 0%,
    transparent 72%
  );
  mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
  background-image: linear-gradient(
      rgba(0, 217, 245, 0.18) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(0, 217, 245, 0.18) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.6;
}

.holo-ring {
  border: 1px dashed rgba(124, 58, 237, 0.4);
  animation: rotateReverse 25s linear infinite;
}

/* === Intel Deck Sections === */
.intel-deck {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 5rem);
}

.category-header {
  text-align: center;
  margin-bottom: 2rem;
}

.badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(0, 217, 245, 0.15);
  border: 1px solid rgba(0, 217, 245, 0.3);
  color: var(--accent-blue);
  letter-spacing: 0.2em;
  font-size: 0.75rem;
}

.category-header h2 {
  margin-top: 1rem;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--text-primary);
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.4rem);
}

.nsa-card {
  position: relative;
  padding: var(--card-padding);
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.18);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-glow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: transform 0.35s ease, box-shadow 0.35s ease,
    border-color 0.35s ease;
  min-height: 0;
  overflow: hidden;
}

.nsa-card::before {
  content: "";
  position: absolute;
  inset: -35% 35% 65% -35%;
  background: linear-gradient(120deg, rgba(0, 217, 245, 0.35), transparent 70%);
  transform: rotate(-6deg);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.nsa-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 245, 224, 0.5);
  box-shadow: 0 28px 60px rgba(0, 232, 255, 0.22);
}

.nsa-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.card-index {
  font-size: 0.92rem;
  letter-spacing: 0.3em;
  color: rgba(148, 163, 184, 0.8);
}

.card-header h3 {
  font-size: 1.3rem;
  margin: 0;
  color: var(--accent-blue);
}

.card-info {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.4rem;
}

.card-caption {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 245, 224, 0.75);
}

/* === CTA === */
.cta-wrapper {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem 1rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 auto;
  padding: 1rem 3.2rem;
  border: none;
  border-radius: 14px;
  font-size: 1.2rem;
  font-weight: 650;
  background: linear-gradient(100deg, var(--accent-cyan), var(--accent-blue));
  color: #05070d;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(0, 255, 200, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 45px rgba(0, 255, 220, 0.6);
}

/* === Join Section === */
.join-section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 5rem) 6rem;
  display: flex;
  justify-content: center;
}

.join-console {
  width: min(680px, 100%);
  padding: clamp(2rem, 5vw, 3rem);
  background: rgba(6, 16, 28, 0.85);
  border: 1px solid rgba(0, 217, 245, 0.2);
  border-radius: 24px;
  box-shadow: 0 35px 80px rgba(0, 207, 255, 0.16);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.join-console h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.8rem;
  color: var(--accent-blue);
}

.join-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.join-form {
  display: grid;
  gap: 1.3rem;
}

.join-form .form-floating > .form-control,
.join-form .form-floating > textarea {
  background: rgba(3, 10, 20, 0.65);
  border: 1px solid rgba(0, 217, 245, 0.12);
  color: var(--text-primary);
}

.join-form .form-floating > label {
  color: rgba(148, 163, 184, 0.7);
}

.join-form .form-control:focus {
  border-color: rgba(0, 245, 224, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(0, 245, 224, 0.15);
}

.join-submit {
  margin-top: 0.5rem;
  padding: 0.9rem 2.2rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(
    120deg,
    rgba(0, 245, 160, 0.9),
    rgba(124, 58, 237, 0.85)
  );
  font-weight: 650;
  color: #020617;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
}

.join-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 45px rgba(124, 58, 237, 0.45);
}

/* === Footer === */
.footer {
  background: rgba(4, 7, 14, 0.9);
  padding: 2.5rem 0;
  color: rgba(148, 163, 184, 0.7);
  border-top: 1px solid rgba(0, 217, 245, 0.1);
}

.social-icons a {
  color: rgba(148, 163, 184, 0.7);
  font-size: 1.5rem;
  margin: 0 0.75rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
  color: var(--accent-blue);
  transform: translateY(-3px);
}

/* === Animation Helpers === */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].activated {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rotateSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateReverse {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

@keyframes pulseSoft {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.08);
  }
}

/* === Responsive === */
@media (max-width: 992px) {
  .hero-actions {
    justify-content: center;
  }

  .hero-hologram {
    width: min(360px, 65vw);
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
  }

  .theme-toggle {
    margin-top: 1rem;
  }

  .category-header h2 {
    font-size: 2rem;
  }

  .nsa-card {
    min-height: 0;
  }

  .join-console {
    padding: 2rem;
  }
}

@media (max-width: 576px) {
  .terminal-hero {
    padding-top: 120px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-btn {
    width: 100%;
  }

  .cta-button {
    width: 100%;
  }
}

/* === Uniform theme overrides === */
/* Keep these last so they naturally override earlier specifics */
:where(
    .nsa-card,
    .project-card,
    .portfolio-card,
    .directorate-card,
    .stat-card,
    .connect-card
  ) {
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  box-shadow: var(--shadow-glow);
}

h1,
h2,
h3,
h4 {
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-header h3,
.project-card__header h2,
.portfolio-card h4,
.directorate-card h3 {
  color: var(--accent-blue);
}

/* Make icon containers visually consistent */
.stat-icon,
.directorate-icon,
.connect-card__icon {
  width: var(--icon-size);
  height: var(--icon-size);
  display: grid;
  place-items: center;
}

/* Buttons: consistent radiuses and transitions */
.hero-btn,
.cta-button,
.chip-button,
.join-submit {
  border-radius: var(--control-radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

/* small utility tweak for readable paragraphs */
p {
  color: var(--text-secondary);
  line-height: 1.65;
}

/* === Countdown Timer === */
.countdown-banner {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(
    120deg,
    rgba(37, 99, 235, 0.06),
    rgba(0, 217, 245, 0.03)
  );
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: var(--card-radius);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 30px rgba(255, 0, 80, 0.2),
    inset 0 0 20px rgba(255, 100, 0, 0.1);
  animation: pulse-border 3s ease-in-out infinite;
}

@keyframes pulse-border {
  0%,
  100% {
    border-color: rgba(255, 50, 100, 0.4);
    box-shadow: 0 0 30px rgba(255, 0, 80, 0.2),
      inset 0 0 20px rgba(255, 100, 0, 0.1);
  }
  50% {
    border-color: rgba(255, 80, 120, 0.6);
    box-shadow: 0 0 45px rgba(255, 0, 80, 0.35),
      inset 0 0 25px rgba(255, 100, 0, 0.15);
  }
}

.countdown-label {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ff3366;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(255, 50, 100, 0.5);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.time-value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, #ff3366, #ff6b9d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(255, 50, 100, 0.3);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.time-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 150, 180, 0.85);
  margin-top: 0.25rem;
}

.countdown-message {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 200, 220, 0.9);
  font-weight: 500;
}

@media (max-width: 576px) {
  .countdown-timer {
    gap: 0.75rem;
  }

  .time-unit {
    min-width: 50px;
  }

  .time-value {
    font-size: 1.8rem;
  }
}

/* === FAQ Section === */
.faq-section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 5rem);
  background: radial-gradient(
    circle at 50% 0%,
    rgba(0, 217, 245, 0.05),
    transparent 70%
  );
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.faq-category {
  background: rgba(6, 16, 28, 0.7);
  border: 1px solid rgba(0, 217, 245, 0.15);
  border-radius: 18px;
  padding: 2rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 217, 245, 0.15);
}

.faq-category h3 {
  color: var(--accent-blue);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.faq-category h3 i {
  color: var(--accent-cyan);
}

.faq-item {
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 217, 245, 0.1);
  padding-bottom: 1rem;
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  text-align: left;
  padding: 0.75rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--accent-blue);
}

.faq-question i {
  transition: transform 0.3s ease;
  color: var(--accent-cyan);
  font-size: 1.2rem;
}

.faq-question.active i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-answer.open {
  max-height: 500px;
  padding: 1rem 0 0.5rem;
}

.faq-answer strong {
  color: var(--accent-cyan);
}

.faq-answer ul,
.faq-answer ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.faq-answer li {
  margin-bottom: 0.5rem;
}

body.light-mode .faq-category {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(37, 99, 235, 0.15);
}

body.light-mode .countdown-banner {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.1),
    rgba(234, 88, 12, 0.08)
  );
  border-color: rgba(220, 38, 38, 0.3);
}

/* === Stats Showcase Section === */
.stats-showcase {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 6vw, 5rem);
  background: linear-gradient(
    135deg,
    rgba(0, 217, 245, 0.03),
    rgba(124, 58, 237, 0.05)
  );
  border-top: 1px solid rgba(0, 217, 245, 0.1);
  border-bottom: 1px solid rgba(0, 217, 245, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 1200px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.16);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  text-align: center;
  box-shadow: var(--shadow-glow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 245, 224, 0.4);
  box-shadow: 0 20px 50px rgba(0, 232, 255, 0.25);
}

.stat-card:focus-visible {
  outline: 3px solid rgba(0, 255, 214, 0.5);
  outline-offset: 4px;
}

.stat-icon {
  width: var(--icon-size);
  height: var(--icon-size);
  margin: 0 auto 1.5rem;
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 18px rgba(0, 245, 160, 0.35));
  display: grid;
  place-items: center;
}

.stat-icon svg,
.stat-icon i {
  width: 100%;
  height: 100%;
}

.stat-icon i {
  font-size: 2.4rem;
  line-height: 1;
}

.stat-number {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
  background: linear-gradient(120deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.stat-description {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === Impact Section === */
.impact-section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 5rem);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 2rem;
}

.impact-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.15);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-glow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.impact-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 245, 224, 0.3);
  box-shadow: 0 15px 45px rgba(0, 232, 255, 0.2);
}

.impact-visual {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.impact-chart {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 0 20px rgba(0, 245, 160, 0.3));
}

.progress-ring {
  animation: fillProgress 2s ease-out forwards;
}

@keyframes fillProgress {
  from {
    stroke-dashoffset: 251.2;
  }
  to {
    stroke-dashoffset: 62.8;
  }
}

.impact-card h3 {
  color: var(--accent-blue);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.impact-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.impact-metric {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  display: block;
  margin-top: 1rem;
}

body.light-mode .stats-showcase {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.04),
    rgba(124, 58, 237, 0.06)
  );
}

body.light-mode .stat-card,
body.light-mode .impact-card {
  background: var(--bg-card);
  border-color: rgba(82, 97, 255, 0.12);
}

/* === Timeline Section === */
.timeline-section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 5rem);
  position: relative;
  z-index: 0;
  background: radial-gradient(
      circle at top,
      rgba(0, 199, 224, 0.1),
      transparent 65%
    )
    var(--bg-primary);
}

.timeline-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 199, 224, 0.08) 0%,
    transparent 45%,
    rgba(124, 58, 237, 0.06) 100%
  );
  pointer-events: none;
}

.timeline-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding: 2rem 0;
}

.timeline-container::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--accent-cyan) 10%,
    var(--accent-cyan) 90%,
    transparent
  );
  transform: translateX(-50%);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
  grid-column: 1;
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-marker {
  grid-column: 2;
}

.timeline-item:nth-child(odd) .timeline-content {
  grid-column: 3;
  text-align: left;
}

.timeline-item:nth-child(odd) .timeline-marker {
  grid-column: 2;
}

.timeline-marker {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 0.5rem;
}

.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(0, 245, 160, 0.2), 0 0 20px rgba(0, 245, 160, 0.4);
  position: relative;
  z-index: 2;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(0, 245, 160, 0.2),
      0 0 20px rgba(0, 245, 160, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 245, 160, 0.1),
      0 0 30px rgba(0, 245, 160, 0.6);
  }
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.15);
  border-radius: var(--card-radius);
  padding: calc(var(--card-padding) + 0.6rem) 2rem;
  box-shadow: var(--shadow-glow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 245, 224, 0.4);
  box-shadow: 0 12px 40px rgba(0, 232, 255, 0.2);
}

.timeline-date {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.timeline-content h3 {
  color: var(--accent-blue);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .timeline-container::before {
    left: 30px;
  }

  .timeline-item {
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
  }

  .timeline-item:nth-child(even) .timeline-content,
  .timeline-item:nth-child(odd) .timeline-content {
    grid-column: 2;
    text-align: left;
  }

  .timeline-item:nth-child(even) .timeline-marker,
  .timeline-item:nth-child(odd) .timeline-marker {
    grid-column: 1;
  }
}

/* === Directorates Section === */
.team-structure-section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 5rem);
}

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

.portfolio-category {
  margin-top: 3rem;
}

.portfolio-category-title {
  text-align: center;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  color: var(--accent-blue);
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.portfolio-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: linear-gradient(
    120deg,
    rgba(0, 245, 160, 0.15),
    rgba(0, 199, 224, 0.15)
  );
  border: 1px solid var(--accent-cyan);
  border-radius: 50px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 245, 160, 0.2);
}

.portfolio-badge.executive {
  background: linear-gradient(
    120deg,
    rgba(0, 199, 224, 0.15),
    rgba(124, 58, 237, 0.15)
  );
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 0 20px rgba(0, 199, 224, 0.2);
}

.directorates-section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 5rem);
}

.directorates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.4rem);
  margin-top: 2rem;
}

.directorate-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.18);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-glow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: transform 0.35s ease, box-shadow 0.35s ease,
    border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.directorate-card::before {
  content: "";
  position: absolute;
  inset: -35% 35% 65% -35%;
  background: linear-gradient(120deg, rgba(0, 217, 245, 0.25), transparent 70%);
  transform: rotate(-6deg);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.directorate-card:hover {
  transform: translateY(-10px);
  border-color: rgba(0, 245, 224, 0.5);
  box-shadow: 0 28px 60px rgba(0, 232, 255, 0.22);
}

.directorate-card:hover::before {
  opacity: 1;
}

.directorate-icon {
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(0, 245, 160, 0.25),
    rgba(37, 99, 235, 0.28)
  );
  border: 1px solid rgba(0, 255, 214, 0.35);
  display: grid;
  place-items: center;
  color: var(--accent-cyan);
  font-size: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 0 22px rgba(0, 245, 160, 0.3);
}

.directorate-card h3 {
  color: var(--accent-blue);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.directorate-card > p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.directorate-roles {
  list-style: none;
  padding: 0;
  margin: 0;
}

.directorate-roles li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 217, 245, 0.1);
  color: var(--text-primary);
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.5rem;
}

.directorate-roles li:last-child {
  border-bottom: none;
}

.directorate-roles li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: bold;
}

body.light-mode .timeline-content,
body.light-mode .directorate-card {
  background: var(--bg-card);
  border-color: rgba(82, 97, 255, 0.14);
  box-shadow: var(--shadow-glow);
}

body.light-mode .timeline-dot {
  background: var(--accent-blue);
  border-color: var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2), 0 0 20px rgba(37, 99, 235, 0.4);
}

/* === Executive Portfolios Grid === */
.portfolios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
  margin-top: 2rem;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-glow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.portfolio-card::before {
  content: "";
  position: absolute;
  inset: -40% 40% 70% -40%;
  background: linear-gradient(110deg, rgba(0, 199, 224, 0.2), transparent 65%);
  transform: rotate(-8deg);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 245, 224, 0.35);
  box-shadow: 0 18px 45px rgba(0, 232, 255, 0.18);
}

.portfolio-card:hover::before {
  opacity: 1;
}

.portfolio-icon {
  width: calc(var(--icon-size) * 0.8);
  height: calc(var(--icon-size) * 0.8);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(0, 245, 224, 0.18),
    rgba(37, 99, 235, 0.18)
  );
  border: 1px solid rgba(0, 245, 224, 0.3);
  display: grid;
  place-items: center;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  font-size: 1.8rem;
  box-shadow: inset 0 0 18px rgba(0, 245, 224, 0.25);
}

.portfolio-card h4 {
  color: var(--accent-blue);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.portfolio-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .portfolios-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .portfolio-card {
    padding: 1.25rem;
  }
}

body.light-mode .portfolio-card {
  background: var(--bg-card);
  border-color: rgba(82, 97, 255, 0.1);
}

body.light-mode .portfolio-badge {
  background: linear-gradient(
    120deg,
    rgba(37, 99, 235, 0.1),
    rgba(124, 58, 237, 0.1)
  );
  border-color: rgba(37, 99, 235, 0.3);
  color: rgba(37, 99, 235, 1);
}

body.light-mode .portfolio-badge.executive {
  border-color: rgba(124, 58, 237, 0.3);
  color: rgba(124, 58, 237, 1);
}

/* === Social Connect Section === */
.connect-section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 6vw, 5rem);
}

.connect-layout {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.connect-primary,
.connect-secondary {
  min-width: 0;
}

@media (min-width: 992px) {
  .connect-layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.2rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-content: start;
}

.connect-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.14);
  border-radius: 1.5rem;
  padding: clamp(1.4rem, 2.8vw, 2rem);
  box-shadow: var(--shadow-glow);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.connect-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 255, 214, 0.35);
  box-shadow: 0 20px 45px rgba(0, 232, 255, 0.22);
}

.connect-card__icon {
  width: calc(var(--icon-size) * 0.85);
  height: calc(var(--icon-size) * 0.85);
  border-radius: calc(var(--control-radius) * 1.2);
  background: linear-gradient(
    145deg,
    rgba(0, 245, 160, 0.25),
    rgba(37, 99, 235, 0.25)
  );
  border: 1px solid rgba(0, 255, 214, 0.35);
  display: grid;
  place-items: center;
  color: var(--accent-cyan);
  font-size: 1.8rem;
  box-shadow: inset 0 0 22px rgba(0, 245, 160, 0.28);
}

.connect-card--community .connect-card__icon {
  background: linear-gradient(
    140deg,
    rgba(37, 211, 102, 0.28),
    rgba(0, 217, 245, 0.24)
  );
  color: #1fa855;
}

.connect-card--social .connect-card__icon {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.28),
    rgba(0, 217, 245, 0.24)
  );
}

.connect-card__body {
  display: grid;
  gap: 0.85rem;
}

.connect-card__body h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--accent-blue);
}

.connect-card__body p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.98rem;
}

.connect-aside {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.4rem);
  align-content: start;
}

.connect-visual {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.12);
  border-radius: 1.5rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  box-shadow: var(--shadow-glow);
  display: flex;
  justify-content: center;
  align-items: center;
}

.connect-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 420px;
}

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

  .connect-card__icon {
    margin: 0 auto;
  }
}

.chip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  border-radius: var(--control-radius);
  border: 1px solid rgba(0, 255, 214, 0.35);
  background: rgba(0, 255, 214, 0.15);
  color: var(--text-primary);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.chip-button:hover,
.chip-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 214, 0.6);
  box-shadow: 0 10px 30px rgba(0, 255, 214, 0.18);
}

.chip-button.is-copied {
  background: rgba(0, 255, 214, 0.28);
  border-color: rgba(0, 255, 214, 0.6);
  box-shadow: 0 10px 28px rgba(0, 255, 214, 0.22);
}

.chip-button.primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: #001315;
  border-color: transparent;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-card {
  display: grid;
  gap: 0.75rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-card input,
.contact-card textarea {
  width: 100%;
  background: rgba(0, 20, 32, 0.7);
  border: 1px solid rgba(0, 255, 214, 0.2);
  border-radius: 0.9rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.contact-card input:focus,
.contact-card textarea:focus {
  outline: none;
  border-color: rgba(0, 255, 214, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 255, 214, 0.25);
}

.contact-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.social-strip {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.connect-secondary__card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 217, 245, 0.14);
  border-radius: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-glow);
  display: grid;
  gap: 1.25rem;
  height: 100%;
}

.connect-secondary__card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-blue);
}

.connect-secondary__copy {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .social-strip {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 auto;
  padding: 1rem 3.2rem;
  border: none;
  border-radius: var(--control-radius);
  color: var(--text-primary);
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.social-chip:hover,
.social-chip:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 214, 0.45);
  box-shadow: 0 16px 32px rgba(0, 232, 255, 0.2);
}

.social-chip i {
  color: var(--accent-cyan);
  font-size: 1.4rem;
}

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

body.light-mode .social-embed,
body.light-mode .social-chip {
  background: var(--bg-card);
  border-color: rgba(82, 97, 255, 0.12);
}

body.light-mode .qr-frame {
  border-color: rgba(82, 97, 255, 0.18);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

body.light-mode .connect-secondary__card {
  border-color: rgba(82, 97, 255, 0.12);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

body.light-mode .social-embed header i {
  color: var(--accent-blue);
}

body.light-mode .chip-button {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.25);
}

body.light-mode .chip-button.primary {
  color: #fff;
}

body.light-mode .contact-card input,
body.light-mode .contact-card textarea {
  background: rgba(246, 249, 255, 0.95);
  border-color: rgba(37, 99, 235, 0.24);
  color: var(--text-primary);
}

body.light-mode .chip-button.is-copied {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(37, 99, 235, 0.35);
}
