@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root {
  --bg-primary: #08081a;
  --bg-secondary: #0f0f2a;
  --bg-card: #14142e;
  --bg-card-hover: #1a1a3a;
  --border: #2a2a5a;
  --border-light: #3a3a6a;
  --text: #c8c8e0;
  --text-muted: #8888aa;
  --text-heading: #eeeef6;
  --accent-cyan: #00d4ff;
  --accent-orange: #ff7a2f;
  --accent-purple: #9b6dff;
  --accent-green: #3ddc84;
  --accent-pink: #ff4d8d;
  --gradient-main: linear-gradient(135deg, #00d4ff, #9b6dff);
  --gradient-warm: linear-gradient(135deg, #ff7a2f, #ff4d8d);
  --max-width: 920px;
  --nav-height: 64px;
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
}

/* ========== NAVIGATION ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(8, 8, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: 1100px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-heading);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: var(--gradient-main);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active {
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.08);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  cursor: pointer;
}

.nav-dropdown > a::after {
  content: ' ▾';
  font-size: 0.7em;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu a {
  display: block;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ========== MAIN CONTENT ========== */
.page-wrapper {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 80px;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== HERO SECTION (index page) ========== */
.hero {
  text-align: center;
  padding: 60px 0 50px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

/* ========== PAGE HEADER ========== */
.page-header {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.page-header .breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.page-header .breadcrumb a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.page-header .breadcrumb a:hover {
  text-decoration: underline;
}

.page-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.page-header .subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ========== TYPOGRAPHY ========== */
h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-top: 32px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
}

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

a:hover {
  color: #33e0ff;
  text-decoration: underline;
}

/* ========== CARDS ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  text-decoration: none;
}

.card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.card .card-icon.cyan { background: rgba(0, 212, 255, 0.12); }
.card .card-icon.orange { background: rgba(255, 122, 47, 0.12); }
.card .card-icon.purple { background: rgba(155, 109, 255, 0.12); }
.card .card-icon.green { background: rgba(61, 220, 132, 0.12); }
.card .card-icon.pink { background: rgba(255, 77, 141, 0.12); }

.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ========== INFO BOX ========== */
.info-box {
  background: var(--bg-card);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.info-box.warning {
  border-left-color: var(--accent-orange);
}

.info-box.tip {
  border-left-color: var(--accent-green);
}

.info-box strong {
  color: var(--text-heading);
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* ========== TABLES ========== */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

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

thead {
  background: var(--bg-card);
}

thead th {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-heading);
  padding: 14px 18px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

/* ========== TAGS ========== */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.tag.cyan { background: rgba(0, 212, 255, 0.15); color: var(--accent-cyan); }
.tag.orange { background: rgba(255, 122, 47, 0.15); color: var(--accent-orange); }
.tag.purple { background: rgba(155, 109, 255, 0.15); color: var(--accent-purple); }
.tag.green { background: rgba(61, 220, 132, 0.15); color: var(--accent-green); }
.tag.pink { background: rgba(255, 77, 141, 0.15); color: var(--accent-pink); }

/* ========== LIST STYLES ========== */
ul, ol {
  margin: 12px 0 20px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--accent-cyan);
}

/* ========== PAGE NAV (prev/next) ========== */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.page-nav a {
  display: block;
  padding: 16px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 48%;
}

.page-nav a:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  text-decoration: none;
}

.page-nav a .label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.page-nav a .title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.95rem;
}

.page-nav a.next {
  text-align: right;
  margin-left: auto;
}

/* ========== TECH SPEC BOX ========== */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.spec-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}

.spec-item .spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.spec-item .spec-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 1.05rem;
}

/* ========== SOURCES ========== */
.source-list {
  list-style: none;
  padding: 0;
}

.source-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.source-list li:last-child {
  border-bottom: none;
}

.source-list .source-num {
  display: inline-block;
  width: 28px;
  height: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  line-height: 28px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-right: 12px;
}

/* ========== TIMELINE ========== */
.timeline {
  position: relative;
  padding-left: 30px;
  margin: 24px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--accent-cyan);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

.timeline-item .timeline-year {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--accent-cyan);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.timeline-item p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: transparent;
    border: none;
    padding: 0 0 0 16px;
    display: none;
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .page-header h1 {
    font-size: 1.7rem;
  }

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

  .page-nav {
    flex-direction: column;
  }

  .page-nav a {
    max-width: 100%;
  }

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

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .container {
    padding: 0 16px;
  }
}
