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

:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --text: #1a1a2e;
  --text-muted: #555e6e;
  --heading: #0f0f1a;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08);
  --nav-bg: rgba(255,255,255,0.85);
  --nav-border: rgba(0,0,0,0.08);
  --tag-bg: #e8edf3;
  --tag-text: #334155;
  --table-header-bg: #f1f5f9;
  --table-border: #e2e8f0;
  --table-stripe: #f8fafc;
  --timeline-line: #cbd5e1;
  --timeline-dot: #2563eb;
  --hero-bg: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --heading: #f1f5f9;
  --accent: #60a5fa;
  --accent-light: #1e3a5f;
  --card-bg: #1e293b;
  --card-border: #334155;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
  --nav-bg: rgba(15,23,42,0.9);
  --nav-border: rgba(255,255,255,0.08);
  --tag-bg: #334155;
  --tag-text: #cbd5e1;
  --table-header-bg: #1e293b;
  --table-border: #334155;
  --table-stripe: #162032;
  --timeline-line: #334155;
  --hero-bg: linear-gradient(135deg, #020617 0%, #0f2340 50%, #020617 100%);
  --footer-bg: #020617;
  --footer-text: #64748b;
}

/* Auto = system preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --heading: #f1f5f9;
    --accent: #60a5fa;
    --accent-light: #1e3a5f;
    --card-bg: #1e293b;
    --card-border: #334155;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
    --nav-bg: rgba(15,23,42,0.9);
    --nav-border: rgba(255,255,255,0.08);
    --tag-bg: #334155;
    --tag-text: #cbd5e1;
    --table-header-bg: #1e293b;
    --table-border: #334155;
    --table-stripe: #162032;
    --timeline-line: #334155;
    --hero-bg: linear-gradient(135deg, #020617 0%, #0f2340 50%, #020617 100%);
    --footer-bg: #020617;
    --footer-text: #64748b;
  }
}

/* === Layout === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: var(--nav-bg);
  border-bottom-color: var(--nav-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.nav.scrolled .nav-logo {
  color: var(--heading);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav.scrolled .nav-links a {
  color: var(--text-muted);
}

.nav-links a:hover,
.nav.scrolled .nav-links a:hover {
  color: var(--accent);
}

.theme-toggle {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.nav.scrolled .theme-toggle {
  background: var(--bg-alt);
  border-color: var(--card-border);
  color: var(--text);
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.25);
}

.nav.scrolled .theme-toggle:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s;
}

.nav.scrolled .nav-menu-btn {
  color: var(--heading);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 3.5rem;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  padding: 1rem 1.5rem;
  z-index: 99;
  flex-direction: column;
  gap: 0.75rem;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--card-border);
}

/* === Hero === */
.hero {
  background: var(--hero-bg);
  color: #fff;
  padding: 8rem 0 5rem;
  text-align: center;
}

.hero-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.75);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: #60a5fa;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

.hero-cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: rgba(96,165,250,0.15);
  border: 1px solid rgba(96,165,250,0.3);
  color: #60a5fa;
  text-decoration: none;
  border-radius: 2rem;
  font-weight: 600;
  transition: all 0.3s;
}

.hero-cta:hover {
  background: rgba(96,165,250,0.25);
  border-color: rgba(96,165,250,0.5);
}

/* === Sections === */
.section {
  padding: 5rem 0;
  background: var(--bg);
}

.section-alt {
  background: var(--bg-alt);
}

.section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

/* === Two Column === */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.two-col p {
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* === Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* === Tech Grid === */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.tech-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}

.tech-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.tech-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* === Table === */
.table-wrapper {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--table-border);
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--table-border);
}

th {
  background: var(--table-header-bg);
  font-weight: 700;
  color: var(--heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:nth-child(even) td {
  background: var(--table-stripe);
}

td {
  color: var(--text);
}

.table-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* === Timeline === */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--timeline-line);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: -2.05rem;
  top: 0.35rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--timeline-dot);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px var(--timeline-dot);
}

.section-alt .timeline-dot {
  border-color: var(--bg-alt);
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.35rem;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* === Members === */
.members-highlight {
  margin-bottom: 2rem;
}

.members-highlight h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.members-note {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* === Footer === */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 3rem 0;
  text-align: center;
}

.footer-disclaimer {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.footer-disclaimer strong {
  color: #cbd5e1;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--footer-text);
}

/* === Responsive === */
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .two-col {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-menu {
    display: flex;
  }

  .hero {
    padding: 6rem 0 3.5rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat {
    min-width: 40%;
  }

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

  .section {
    padding: 3.5rem 0;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.65rem 0.75rem;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline-dot {
    left: -1.55rem;
  }
}
