*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --text: #d8dfe8;
  --text-secondary: #8a99b0;
  --text-tertiary: #546070;
  --bg: #0b0f18;
  --bg-alt: #111826;
  --bg-card: #131c2b;
  --bg-dark: #080c13;
  --border: #1e2a3a;
  --border-light: #253345;
  --accent: #4a8fd4;
  --accent-light: #6aaee8;
  --accent-dim: #2a5a8a;
  --link: #6aaee8;
  --tag-bg: #0d1a2e;
  --tag-text: #5a9fd4;
  --sans: "Helvetica Neue", "Segoe UI", "Arial", sans-serif;
  --serif: "Charter", "Bitstream Charter", "Georgia", "Cambria", serif;
  --mono: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   NAV
   ============================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 24, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
nav .nav-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}
nav .nav-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
}
nav .nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
}
nav .nav-links a {
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
nav .nav-links a:hover { color: var(--accent-light); }

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wide-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 3.5rem 0; }
section + section { border-top: 1px solid var(--border); }

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 0;
  border-bottom: none;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 50%, rgba(30, 60, 100, 0.18) 0%, transparent 65%);
}
.hero-layout {
  display: flex;
  align-items: center;
  min-height: 400px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 2rem;
}
.hero-text {
  flex: 1;
  padding: 3rem 0;
  z-index: 2;
}
.hero-canvas-wrap {
  width: 380px;
  height: 380px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
#satellite-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  transition: filter 0.6s ease;
}
#satellite-canvas:active { cursor: grabbing; }
.hero-canvas-wrap:hover #satellite-canvas {
  filter: brightness(1.12) drop-shadow(0 0 10px rgba(74, 143, 212, 0.2));
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: #e8eef5;
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}
.hero .subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
}
.hero .affiliation {
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--text-tertiary);
  line-height: 1.7;
}
.hero .affiliation span {
  display: inline-block;
  margin-right: 0.6rem;
}
.hero .affiliation span:not(:last-of-type)::after {
  content: "/";
  margin-left: 0.6rem;
  color: var(--border-light);
}
.hero .tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.hero .tags span {
  font-family: var(--mono);
  font-size: 0.62rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

/* ============================================
   HEADINGS & TEXT
   ============================================ */
h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}
h2 .section-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-right: 0.5rem;
  font-weight: 400;
}
h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
p { margin-bottom: 0.75rem; font-size: 0.92rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--link); }
a:hover { text-decoration: underline; }

.lead-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.6;
}

/* ============================================
   ARCHITECTURE
   ============================================ */
.arch-flow {
  margin: 2rem 0 1.5rem;
  padding: 2rem 1.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
}
.arch-flow-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 700px;
}
.arch-node { text-align: center; flex-shrink: 0; }
.arch-node-box {
  border: 1px solid rgba(74, 143, 212, 0.25);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  background: rgba(13, 26, 46, 0.6);
  min-width: 100px;
  transition: border-color 0.2s, background 0.2s;
}
.arch-node-box:hover {
  border-color: rgba(74, 143, 212, 0.5);
  background: rgba(20, 40, 70, 0.7);
}
.arch-node-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: #a8c0d8;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.arch-node-sub {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: rgba(120, 160, 200, 0.55);
  margin-top: 0.2rem;
  white-space: nowrap;
}
.arch-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.35rem;
  flex-shrink: 0;
}
.arch-arrow-line {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: rgba(74, 143, 212, 0.35);
  letter-spacing: 0.05em;
}
.arch-arrow-label {
  font-family: var(--mono);
  font-size: 0.52rem;
  color: rgba(120, 160, 200, 0.35);
  margin-top: 0.15rem;
  white-space: nowrap;
}
.arch-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}
.arch-group-label {
  font-family: var(--mono);
  font-size: 0.52rem;
  color: rgba(120, 160, 200, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
}
.arch-group-row { display: flex; gap: 0.3rem; }
.arch-node-box.small { padding: 0.45rem 0.55rem; min-width: auto; }
.arch-node-box.small .arch-node-label { font-size: 0.64rem; }
.arch-node-box.highlight {
  border-color: rgba(74, 143, 212, 0.45);
  background: rgba(20, 50, 90, 0.5);
}

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  margin-top: 1.5rem;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.feature-cell {
  background: var(--bg-card);
  padding: 1.2rem 1.3rem;
  transition: background 0.15s;
}
.feature-cell:hover { background: var(--bg-alt); }
.feature-cell h4 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.feature-cell p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.5;
}
.feature-tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

/* ============================================
   RESULTS TABLE
   ============================================ */
.results-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.85rem;
}
.results-table th {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 2px solid var(--border-light);
}
.results-table td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table .metric-val {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent-light);
  font-size: 0.82rem;
}

/* ============================================
   TEAM
   ============================================ */
.team-section-group { margin-bottom: 1.8rem; }
.team-section-group:last-child { margin-bottom: 0; }
.team-section-group h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.15s;
}
.team-card:hover { border-color: var(--border-light); }
.team-card .name {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.team-card .role {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 0.1rem;
}
.team-card .work {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}
.team-card .nmec {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--text-tertiary);
  margin-top: 0.15rem;
}
.team-card .email {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--link);
  text-decoration: none;
  margin-top: 0.15rem;
  display: inline-block;
}

/* ============================================
   RESOURCES
   ============================================ */
.resource-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.resource-link {
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--link);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: border-color 0.15s, background 0.15s;
}
.resource-link:hover {
  border-color: var(--accent-dim);
  background: var(--bg-alt);
  text-decoration: none;
}
.resource-link svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 1.8rem 0;
  margin-top: 0.5rem;
}
footer .footer-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  line-height: 1.7;
}
footer .footer-inner a { color: var(--text-tertiary); }
footer .footer-inner a:hover { color: var(--text-secondary); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-layout {
    flex-direction: column-reverse;
    align-items: center;
    min-height: auto;
  }
  .hero-text { padding: 1.5rem 0 2rem; }
  .hero-canvas-wrap {
    width: 300px;
    height: 300px;
    margin-top: 1.5rem;
  }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.3rem; }
  .features-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  nav .nav-links { gap: 0.7rem; }
  nav .nav-links a { font-size: 0.7rem; }
  .hero-canvas-wrap {
    width: 240px;
    height: 240px;
  }
  .resource-links { flex-direction: column; }
}

/* =========================
   LANGUAGE SWITCH
   ========================= */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1.5rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-tertiary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 16px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-light);
  transition: 0.25s;
  border-radius: 20px;
}

.slider:before {
  content: "";
  position: absolute;
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: var(--accent-light);
  transition: 0.25s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--accent-dim);
}

.switch input:checked + .slider:before {
  transform: translateX(18px);
}