:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #10b981;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* NAV */
nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 2rem;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

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

/* HERO */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0891b2 100%);
  color: white;
  padding: 5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-badges {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-white {
  background: white;
  color: var(--primary);
}

.btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* MAIN LAYOUT */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

section.topics {
  padding: 4rem 2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* TOPIC CARDS */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.topic-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border-color: var(--primary);
}

.topic-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.topic-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.topic-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
}

.topic-card .read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ARTICLE PAGE */
.article-layout {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-tag {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-intro {
  font-size: 1.15rem;
  color: var(--text-muted);
  border-left: 4px solid var(--primary);
  padding-left: 1.25rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* INFO BOXES */
.info-box {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.info-box.tip {
  background: #f0fdf4;
  border-left: 4px solid var(--accent);
}

.info-box.tip .info-label {
  color: var(--accent);
}

.info-box.warning {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
}

.info-box.warning .info-label {
  color: #d97706;
}

.info-box.key {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
}

.info-box.key .info-label {
  color: var(--primary);
}

.info-label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

/* VIDEO SECTION */
.video-section {
  background: #1e293b;
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2.5rem 0;
  color: white;
}

.video-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.video-section p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.video-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.video-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: white;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.video-link:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}

.video-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.video-link-label {
  flex: 1;
}

.video-link-source {
  color: #64748b;
  font-size: 0.8rem;
}

/* KEY TERMS */
.key-terms {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.key-terms h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.term-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.term {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  align-items: start;
}

.term-name {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.term-def {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* BACK LINK */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary);
}

/* NAV BETWEEN ARTICLES */
.article-nav {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  margin-top: 3rem;
  gap: 1rem;
}

.article-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex: 1;
  transition: all 0.2s;
}

.article-nav a:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.article-nav .nav-dir {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.article-nav .nav-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.article-nav .next {
  text-align: right;
}

/* FOOTER */
footer {
  background: #1e293b;
  color: #94a3b8;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  font-size: 0.9rem;
}

footer a {
  color: #60a5fa;
  text-decoration: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }

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

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 3rem 1.5rem;
  }

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