/* ============================================================
   GO MASTERY — Complete Design System
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Outfit:wght@700;800;900&display=swap');

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
  /* Brand Colors */
  --go-blue: #00ACD7;
  --go-blue-dark: #0091B5;
  --go-blue-light: #33C1E3;
  --go-teal: #00D4AA;
  --go-purple: #8B5CF6;
  --go-orange: #F59E0B;
  --go-red: #EF4444;
  --go-green: #22C55E;
  --go-yellow: #EAB308;

  /* Light Mode */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --bg-code: #1E293B;
  --bg-sidebar: #F8FAFC;
  --bg-nav: rgba(255, 255, 255, 0.85);
  --bg-card: #FFFFFF;
  --bg-hover: #EFF6FF;
  --bg-quiz: #F0FDF4;
  --bg-quiz-wrong: #FFF1F2;
  --bg-exercise: #FEFCE8;
  --bg-info: #EFF6FF;
  --bg-tip: #F0FDF4;
  --bg-warning: #FFFBEB;
  --bg-danger: #FFF1F2;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --text-code: #E2E8F0;
  --text-link: #00ACD7;
  --text-nav: #0F172A;
  --text-sidebar: #374151;

  --border-color: #E2E8F0;
  --border-code: #334155;
  --border-hover: #00ACD7;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(0, 172, 215, 0.3);

  /* Spacing */
  --nav-h: 64px;
  --sidebar-w: 280px;
  --content-max: 860px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Animation */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Z-index layers */
  --z-sidebar: 100;
  --z-nav: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-tooltip: 500;
}

/* Dark Mode Tokens */
[data-theme="dark"] {
  --bg-primary: #0D1117;
  --bg-secondary: #161B22;
  --bg-tertiary: #21262D;
  --bg-code: #0D1117;
  --bg-sidebar: #161B22;
  --bg-nav: rgba(13, 17, 23, 0.92);
  --bg-card: #161B22;
  --bg-hover: #1C2333;
  --bg-quiz: #0D2818;
  --bg-quiz-wrong: #2D0A0A;
  --bg-exercise: #1A1600;
  --bg-info: #0A1628;
  --bg-tip: #0D2818;
  --bg-warning: #1A1200;
  --bg-danger: #2D0A0A;

  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-tertiary: #484F58;
  --text-code: #E2E8F0;
  --text-link: #33C1E3;
  --text-nav: #E6EDF3;
  --text-sidebar: #C9D1D9;

  --border-color: #30363D;
  --border-code: #21262D;
  --border-hover: #00ACD7;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px rgba(0, 172, 215, 0.4);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background var(--duration-base) var(--ease),
    color var(--duration-base) var(--ease);
  overflow-x: hidden;
}

/* ── Selection ── */
::selection {
  background: rgba(0, 172, 215, 0.25);
  color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--go-blue);
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  margin: 2rem 0 0.75rem;
}

h4 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

h5 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

a:hover {
  color: var(--go-blue-dark);
  text-decoration: underline;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

em {
  font-style: italic;
}

ul,
ol {
  margin: 0.75rem 0 1rem 1.5rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.35rem;
}

li::marker {
  color: var(--go-blue);
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

/* ── TOP NAVBAR ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1.25rem;
  z-index: var(--z-nav);
  transition: background var(--duration-base) var(--ease),
    border-color var(--duration-base) var(--ease);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--go-blue), var(--go-teal));
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  font-family: var(--font-display);
  box-shadow: var(--shadow-glow);
  line-height: 1;
  transition: transform var(--duration-fast) var(--ease-bounce);
}

.nav-logo:hover .nav-logo-icon {
  transform: scale(1.08) rotate(-3deg);
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-search {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.nav-search input {
  width: 100%;
  height: 38px;
  padding: 0 1rem 0 2.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  transition: all var(--duration-fast) var(--ease);
}

.nav-search input::placeholder {
  color: var(--text-tertiary);
}

.nav-search input:focus {
  border-color: var(--go-blue);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(0, 172, 215, 0.15);
}

.nav-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

/* Search dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: var(--z-tooltip);
}

.search-results.open {
  display: block;
}

.search-result-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--duration-fast) var(--ease);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.search-result-excerpt {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.search-result-chapter {
  font-size: 0.7rem;
  color: var(--go-blue);
  font-weight: 500;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
}

.btn-icon svg {
  display: block;
}

.btn-icon:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.hamburger {
  display: none;
}

/* Hide hamburger on pages without sidebar */
body:not(:has(.sidebar)) .hamburger,
.home-layout .hamburger {
  display: none !important;
}

/* ── LAYOUT ── */
.layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--nav-h));
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 0 2rem;
  transition: transform var(--duration-base) var(--ease),
    background var(--duration-base) var(--ease);
  z-index: var(--z-sidebar);
  scrollbar-width: thin;
}

.sidebar-section {
  margin-bottom: 0.25rem;
}

.sidebar-section-title {
  padding: 0.5rem 1.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: color var(--duration-fast) var(--ease);
}

.sidebar-section-title:hover {
  color: var(--text-secondary);
}

.sidebar-section-toggle {
  transition: transform var(--duration-fast) var(--ease);
  font-size: 0.6rem;
}

.sidebar-section.collapsed .sidebar-section-toggle {
  transform: rotate(-90deg);
}

.sidebar-section.collapsed .sidebar-items {
  display: none;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.25rem 0.45rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-sidebar);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--duration-fast) var(--ease);
  position: relative;
}

.sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--go-blue);
  text-decoration: none;
  border-left-color: rgba(0, 172, 215, 0.4);
}

.sidebar-item.active {
  background: linear-gradient(90deg, rgba(0, 172, 215, 0.12) 0%, transparent 100%);
  color: var(--go-blue);
  font-weight: 600;
  border-left-color: var(--go-blue);
}

.sidebar-item-num {
  width: 20px;
  height: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease);
}

.sidebar-item.active .sidebar-item-num,
.sidebar-item:hover .sidebar-item-num {
  background: var(--go-blue);
  color: #fff;
}

/* Progress dot in sidebar */
.sidebar-item-progress {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease);
}

.sidebar-item-progress.done {
  background: var(--go-green);
}

.sidebar-item-progress.reading {
  background: var(--go-orange);
}

/* ── MAIN CONTENT ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: calc(var(--content-max) + 6rem);
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-tertiary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--go-blue);
}

.breadcrumb span {
  color: var(--text-tertiary);
}

/* ── CHAPTER HEADER ── */
.chapter-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.chapter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: linear-gradient(135deg, rgba(0, 172, 215, 0.1), rgba(0, 212, 170, 0.1));
  border: 1px solid rgba(0, 172, 215, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--go-blue);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.chapter-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

.chapter-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ── CALLOUT BOXES ── */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.callout-title {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.callout p {
  margin-bottom: 0;
}

.callout-info {
  background: var(--bg-info);
  border-color: var(--go-blue);
}

.callout-tip {
  background: var(--bg-tip);
  border-color: var(--go-green);
}

.callout-warning {
  background: var(--bg-warning);
  border-color: var(--go-orange);
}

.callout-danger {
  background: var(--bg-danger);
  border-color: var(--go-red);
}

.callout-info .callout-title {
  color: var(--go-blue);
}

.callout-tip .callout-title {
  color: var(--go-green);
}

.callout-warning .callout-title {
  color: var(--go-orange);
}

.callout-danger .callout-title {
  color: var(--go-red);
}

/* ── CODE BLOCKS ── */
.code-block {
  position: relative;
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-code);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: #1A2332;
  border-bottom: 1px solid var(--border-code);
}

[data-theme="dark"] .code-header {
  background: #161B22;
}

.code-lang {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8B949E;
}

.code-filename {
  font-size: 0.75rem;
  color: #8B949E;
  font-family: var(--font-mono);
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: transparent;
  border: 1px solid #30363D;
  border-radius: var(--radius-sm);
  color: #8B949E;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
}

.copy-btn:hover {
  background: #21262D;
  color: var(--text-code);
  border-color: #484F58;
}

.copy-btn.copied {
  color: var(--go-green);
  border-color: var(--go-green);
}

pre {
  margin: 0;
  background: var(--bg-code);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  tab-size: 4;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* Inline code */
p code,
li code,
td code,
h3 code,
h4 code {
  background: var(--bg-tertiary);
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  color: var(--go-blue);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] p code,
[data-theme="dark"] li code,
[data-theme="dark"] td code,
[data-theme="dark"] h3 code,
[data-theme="dark"] h4 code {
  background: #21262D;
  color: #79C0FF;
  border-color: #30363D;
}

/* ── SYNTAX HIGHLIGHTING (Custom Token Colors) ── */
.token-keyword {
  color: #FF7B72;
}

.token-string {
  color: #A5D6FF;
}

.token-comment {
  color: #6E7681;
  font-style: italic;
}

.token-number {
  color: #79C0FF;
}

.token-func {
  color: #D2A8FF;
}

.token-type {
  color: #FFA657;
}

.token-builtin {
  color: #79C0FF;
}

.token-operator {
  color: #FF7B72;
}

.token-punct {
  color: #E6EDF3;
}

.token-var {
  color: #E6EDF3;
}

.token-package {
  color: #FFA657;
}

/* ── OUTPUT BOX ── */
.output-block {
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: #0D1117;
  border: 1px solid #21262D;
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.output-header {
  font-size: 0.7rem;
  color: #6E7681;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.output-content {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: #3FB950;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ── TABLES ── */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
}

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

th {
  background: var(--bg-tertiary);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
}

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

tr:hover td {
  background: var(--bg-hover);
}

/* ── QUIZ ── */
.quiz-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.quiz-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--go-purple), #6366F1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.quiz-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.quiz-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.quiz-question {
  margin-bottom: 1.75rem;
}

.quiz-question-text {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg-primary);
  user-select: none;
}

.quiz-option:hover {
  border-color: var(--go-blue);
  color: var(--text-primary);
  background: var(--bg-hover);
}

.quiz-option input[type="radio"],
.quiz-option input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--go-blue);
  flex-shrink: 0;
}

.quiz-option.correct {
  border-color: var(--go-green);
  background: rgba(34, 197, 94, 0.08);
  color: var(--text-primary);
}

.quiz-option.wrong {
  border-color: var(--go-red);
  background: rgba(239, 68, 68, 0.08);
  color: var(--text-primary);
}

.quiz-feedback {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  display: none;
}

.quiz-feedback.correct-feedback {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--go-green);
  display: block;
}

.quiz-feedback.wrong-feedback {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--go-red);
  display: block;
}

.quiz-btn {
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  margin-top: 1rem;
}

.quiz-btn-submit {
  background: linear-gradient(135deg, var(--go-blue), var(--go-teal));
  color: #fff;
}

.quiz-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 172, 215, 0.4);
}

.quiz-btn-reset {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

.quiz-btn-reset:hover {
  background: var(--border-color);
}

.quiz-score {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
  display: none;
}

.quiz-score.visible {
  display: block;
}

.quiz-score-num {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--go-blue), var(--go-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── INTERVIEW Q&A ── */
.interview-section {
  margin: 2rem 0;
}

.interview-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow var(--duration-fast) var(--ease);
}

.interview-item:hover {
  box-shadow: var(--shadow-sm);
}

.interview-question {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  background: var(--bg-card);
  transition: background var(--duration-fast) var(--ease);
  user-select: none;
}

.interview-question:hover {
  background: var(--bg-hover);
}

.interview-q-num {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--go-blue), var(--go-teal));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  margin-top: 1px;
}

.interview-q-text {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.interview-q-arrow {
  color: var(--text-tertiary);
  transition: transform var(--duration-fast) var(--ease);
  font-size: 0.75rem;
  margin-top: 4px;
}

.interview-item.open .interview-q-arrow {
  transform: rotate(90deg);
}

.interview-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease),
    padding var(--duration-base) var(--ease);
  background: var(--bg-secondary);
}

.interview-item.open .interview-answer {
  max-height: 2000px;
  padding: 1.25rem;
}

.interview-answer-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--go-blue);
  margin-bottom: 0.5rem;
}

.interview-answer p {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.interview-answer ul {
  font-size: 0.875rem;
}

/* ── EXERCISE BOX ── */
.exercise {
  background: var(--bg-exercise);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin: 1.5rem 0;
}

.exercise-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.exercise-badge {
  padding: 0.25rem 0.6rem;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--go-yellow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exercise-title {
  font-weight: 700;
  font-size: 1rem;
}

.exercise-difficulty {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── SHOW ANSWER ── */
.show-answer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  margin-top: 1rem;
}

.show-answer-btn:hover {
  border-color: var(--go-blue);
  color: var(--go-blue);
  background: var(--bg-hover);
}

.answer-content {
  display: none;
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.answer-content.visible {
  display: block;
}

/* ── LEARNING OBJECTIVES ── */
.objectives {
  background: linear-gradient(135deg, rgba(0, 172, 215, 0.06), rgba(0, 212, 170, 0.06));
  border: 1px solid rgba(0, 172, 215, 0.2);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin: 1.5rem 0;
}

.objectives-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.objectives ul {
  margin: 0;
  list-style: none;
  padding: 0;
}

.objectives li {
  padding: 0.35rem 0 0.35rem 1.5rem;
  position: relative;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.objectives li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--go-green);
  font-weight: 700;
}

/* ── MEMORY DIAGRAM ── */
.memory-diagram {
  background: #0D1117;
  border: 1px solid #21262D;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.memory-diagram-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: #6E7681;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mem-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.35rem;
}

.mem-addr {
  width: 100px;
  color: #6E7681;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.mem-cell {
  padding: 0.3rem 0.75rem;
  background: #161B22;
  border: 1px solid #30363D;
  border-radius: 4px;
  color: #79C0FF;
  min-width: 80px;
  text-align: center;
  margin-right: 0.5rem;
}

.mem-cell.highlight {
  background: rgba(0, 172, 215, 0.15);
  border-color: var(--go-blue);
  color: var(--go-blue);
}

.mem-cell.stack {
  border-color: rgba(139, 92, 246, 0.5);
  color: #D2A8FF;
  background: rgba(139, 92, 246, 0.08);
}

.mem-cell.heap {
  border-color: rgba(0, 212, 170, 0.5);
  color: #3FB950;
  background: rgba(0, 212, 170, 0.08);
}

.mem-arrow {
  color: #FF7B72;
  margin: 0 0.5rem;
  font-size: 1rem;
}

.mem-label {
  color: #8B949E;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

/* ── CHEAT SHEET ── */
.cheatsheet {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: 1.5rem 0;
}

.cheatsheet-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--go-blue), var(--go-teal));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
}

.cheatsheet-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.cheatsheet-item:nth-child(even) {
  border-right: none;
}

.cheatsheet-item-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--go-blue);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── PROGRESS TRACKER ── */
.progress-bar-container {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  height: 6px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--go-blue), var(--go-teal));
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease);
}

/* ── PREV/NEXT NAVIGATION ── */
.chapter-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.chapter-nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--duration-base) var(--ease);
  color: inherit;
}

.chapter-nav-item:hover {
  border-color: var(--go-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.chapter-nav-item.prev {
  text-align: left;
}

.chapter-nav-item.next {
  text-align: right;
  flex-direction: row-reverse;
}

.chapter-nav-arrow {
  font-size: 1.5rem;
  color: var(--go-blue);
  flex-shrink: 0;
}

.chapter-nav-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  font-weight: 600;
}

.chapter-nav-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--go-blue);
  border: none;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-base) var(--ease-bounce);
  opacity: 0;
  transform: translateY(16px) scale(0.8);
  pointer-events: none;
  z-index: var(--z-overlay);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--go-blue-dark);
  transform: translateY(-2px) scale(1.08);
  box-shadow: var(--shadow-glow);
}

/* ── ON-PAGE TOC (right rail) ── */
.on-page-toc {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: 220px;
  height: calc(100vh - var(--nav-h));
  padding: 2rem 1rem 2rem 1.5rem;
  overflow-y: auto;
  border-left: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  font-size: 0.78rem;
  display: none;
}

@media (min-width: 1400px) {
  .on-page-toc {
    display: block;
  }
}

.on-page-toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

.on-page-toc a {
  display: block;
  padding: 0.3rem 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all var(--duration-fast) var(--ease);
  line-height: 1.4;
  margin-bottom: 0.1rem;
}

.on-page-toc a:hover {
  color: var(--go-blue);
  border-left-color: rgba(0, 172, 215, 0.4);
}

.on-page-toc a.active {
  color: var(--go-blue);
  font-weight: 600;
  border-left-color: var(--go-blue);
}

.on-page-toc .toc-h3 {
  padding-left: 1.25rem;
  font-size: 0.72rem;
}

/* ── HOME PAGE ── */
.home-main {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.hero {
  background: linear-gradient(135deg, #0D1117 0%, #161B22 50%, #0D2818 100%);
  padding: 3.5rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 30% 40%, rgba(0, 172, 215, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 70% 60%, rgba(0, 212, 170, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 172, 215, 0.12);
  border: 1px solid rgba(0, 172, 215, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: #33C1E3;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: #E6EDF3;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero h1 span {
  background: linear-gradient(135deg, #00ACD7, #00D4AA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #8B949E;
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--go-blue), var(--go-teal));
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-bounce);
  box-shadow: 0 4px 20px rgba(0, 172, 215, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 172, 215, 0.5);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: #E6EDF3;
  border: 2px solid #30363D;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-base) var(--ease);
}

.btn-secondary:hover {
  border-color: var(--go-blue);
  color: var(--go-blue);
  text-decoration: none;
  background: rgba(0, 172, 215, 0.06);
}

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

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--go-blue), var(--go-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: #6E7681;
  margin-top: 0.25rem;
}

/* ── COURSE OVERVIEW SECTION ── */
.section {
  padding: 4rem 2rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--go-blue);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: all var(--duration-base) var(--ease);
}

.feature-card:hover {
  border-color: var(--go-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Chapter Grid */
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.chapter-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--duration-base) var(--ease);
  position: relative;
  overflow: hidden;
}

.chapter-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--go-blue), var(--go-teal));
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}

.chapter-card:hover {
  border-color: var(--go-blue);
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
  text-decoration: none;
  color: inherit;
}

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

.chapter-card-num {
  width: 44px;
  height: 44px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--go-blue);
  flex-shrink: 0;
  font-family: var(--font-display);
}

.chapter-card-content {
  flex: 1;
  min-width: 0;
}

.chapter-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.chapter-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.chapter-card-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.tag {
  padding: 0.15rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Roadmap */
.roadmap {
  position: relative;
  padding-left: 2.5rem;
}

.roadmap::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--go-blue), var(--go-teal), transparent);
}

.roadmap-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.roadmap-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.25rem;
  width: 28px;
  height: 28px;
  background: var(--bg-primary);
  border: 3px solid var(--go-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--go-blue);
  z-index: 1;
}

.roadmap-phase {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--go-blue);
  margin-bottom: 0.35rem;
}

.roadmap-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.roadmap-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.roadmap-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.roadmap-ch {
  padding: 0.2rem 0.6rem;
  background: rgba(0, 172, 215, 0.08);
  border: 1px solid rgba(0, 172, 215, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--go-blue);
  font-weight: 500;
}

/* ── MOBILE OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-sidebar) - 1);
  backdrop-filter: blur(2px);
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .on-page-toc {
    display: none !important;
  }

  .content-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-w: 280px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .hamburger {
    display: inline-flex;
  }

  .navbar {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .nav-logo {
    font-size: 1.15rem;
    gap: 0.5rem;
  }

  .nav-logo-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .nav-actions {
    margin-left: auto;
    gap: 0.35rem;
  }

  .nav-search {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .content-wrapper {
    padding: 1.5rem 1.25rem;
  }

  .chapter-nav {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.25rem 1rem 2.5rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

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

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

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

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

  .nav-logo {
    font-size: 1.05rem;
  }
}

/* ── UTILS ── */
.text-gradient {
  background: linear-gradient(135deg, var(--go-blue), var(--go-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-blue {
  background: rgba(0, 172, 215, 0.12);
  color: var(--go-blue);
  border: 1px solid rgba(0, 172, 215, 0.25);
}

.badge-green {
  background: rgba(34, 197, 94, 0.12);
  color: var(--go-green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-orange {
  background: rgba(245, 158, 11, 0.12);
  color: var(--go-orange);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--go-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--go-red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

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

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-fade-up {
  animation: fadeInUp 0.5s var(--ease) both;
}

.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

/* Section divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 0 2rem;
}

/* Highlight box */
.highlight-box {
  background: linear-gradient(135deg, rgba(0, 172, 215, 0.08), rgba(0, 212, 170, 0.08));
  border: 1px solid rgba(0, 172, 215, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

/* Step list */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.steps li {
  counter-increment: step;
  padding: 0.75rem 0 0.75rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 28px;
  height: 28px;
  background: var(--go-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.footer a {
  color: var(--go-blue);
}