/* Tigramite Tutorial - Clean Sidebar Design */

/* ================================
   CSS VARIABLES & THEME
   ================================ */
:root {
    /* Primary Colors - Tigramite Orange */
    --primary-50: #fff7ed;
    --primary-100: #ffedd5;
    --primary-200: #fed7aa;
    --primary-300: #fdba74;
    --primary-400: #fb923c;
    --primary-500: #f97316;
    --primary-600: #ea580c;
    --primary-700: #c2410c;
    --primary-800: #9a3412;
    --primary-900: #7c2d12;

    /* Accent Colors - Deep Orange/Red */
    --accent-400: #f87171;
    --accent-500: #ef4444;
    --accent-600: #dc2626;

    /* Neutral Colors - Warm Gray */
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-400: #a8a29e;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;

    /* Semantic Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #0ea5e9;

    /* Background & Surface */
    --bg-primary: #ffffff;
    --bg-secondary: #fafaf9;
    --surface-card: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e7e5e4;

    /* Text Colors */
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-tertiary: #78716c;
    --text-inverse: #ffffff;

    /* Code Block - Softer dark theme */
    --code-bg: #282c34;
    --code-text: #abb2bf;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 60px;
    --content-max-width: 800px;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Typography */
    --font-sans: 'Lora', 'Georgia', 'Times New Roman', serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

/* ================================
   RESET & BASE STYLES
   ================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ================================
   LAYOUT STRUCTURE
   ================================ */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ================================
   SIDEBAR NAVIGATION
   ================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-header {
    position: relative;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-700);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-logo span {
    font-weight: 400;
    color: var(--text-tertiary);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

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

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

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

.sidebar-section-title .chevron {
    font-size: 0.6rem;
    transition: transform var(--transition-fast);
}

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

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

.sidebar-links {
    list-style: none;
}

.sidebar-link {
    display: block;
    padding: 0.5rem 1.5rem 0.5rem 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.sidebar-link.active {
    color: var(--primary-700);
    background: var(--primary-50);
    border-left-color: var(--primary-500);
    font-weight: 500;
}

.sidebar-link .link-number {
    display: inline-block;
    width: 2rem;
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sidebar-border);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.sidebar-footer a {
    color: var(--primary-600);
    text-decoration: none;
}

.sidebar-footer a:hover {
    text-decoration: underline;
}

/* Sidebar collapse toggle button */
.sidebar-collapse-btn {
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--bg-primary);
    border: 1px solid var(--neutral-200);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.sidebar-collapse-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
}

.sidebar-collapse-btn svg {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}

/* Collapsed sidebar state */
.sidebar.collapsed-sidebar {
    width: 60px;
}

.sidebar.collapsed-sidebar .sidebar-logo,
.sidebar.collapsed-sidebar .sidebar-section-title span:first-child,
.sidebar.collapsed-sidebar .sidebar-link,
.sidebar.collapsed-sidebar .sidebar-footer,
.sidebar.collapsed-sidebar .chevron {
    display: none;
}

.sidebar.collapsed-sidebar .sidebar-header {
    padding: 1.25rem 0.75rem;
    text-align: center;
}

.sidebar.collapsed-sidebar .sidebar-collapse-btn {
    position: static;
    transform: none;
    margin: 0 auto;
}

.sidebar.collapsed-sidebar .sidebar-section-title {
    padding: 0.6rem 0.75rem;
    justify-content: center;
}

.sidebar.collapsed-sidebar .sidebar-collapse-btn svg {
    transform: rotate(180deg);
}

.sidebar.collapsed-sidebar + .sidebar-toggle {
    left: 70px;
}

.layout:has(.sidebar.collapsed-sidebar) .main-content {
    margin-left: 60px;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--bg-primary);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.sidebar-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 90;
}

/* ================================
   MAIN CONTENT
   ================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

main {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

/* ================================
   TOP NAVIGATION (for pages without sidebar)
   ================================ */
nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--sidebar-border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

nav .logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-700);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav .logo span {
    font-weight: 400;
    color: var(--text-tertiary);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

nav ul li a:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

/* ================================
   HERO SECTION (Home Page)
   ================================ */
.hero {
    text-align: center;
    padding: 3rem 2rem 4rem;
    margin: -2.5rem -2rem 3rem -2rem;
    border-bottom: 1px solid var(--neutral-200);
}

.hero-badge {
    display: inline-block;
    background: var(--primary-100);
    color: var(--primary-700);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-700);
    text-decoration: none;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--neutral-300);
}

.btn-secondary:hover {
    border-color: var(--neutral-400);
    background: var(--neutral-50);
    text-decoration: none;
}

/* ================================
   MODULE HEADER
   ================================ */
.module-header {
    padding: 2rem 2rem;
    margin: -2.5rem -2rem 2rem -2rem;
    border-bottom: 1px solid var(--neutral-200);
}

.module-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.module-header .meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ================================
   BREADCRUMBS
   ================================ */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

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

.breadcrumbs a:hover {
    color: var(--primary-600);
}

.breadcrumbs .separator {
    color: var(--neutral-300);
    font-size: 0.7rem;
}

.breadcrumbs .current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ================================
   TYPOGRAPHY
   ================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 600;
}

h2 {
    font-size: 1.35rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-500);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

h3 {
    font-size: 1.1rem;
    color: var(--primary-700);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

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

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

/* ================================
   LINKS
   ================================ */
a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* ================================
   LISTS
   ================================ */
ul, ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

li::marker {
    color: var(--primary-400);
}

/* ================================
   CODE BLOCKS
   ================================ */
code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--primary-50);
    color: var(--primary-700);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    line-height: 1.7;
    border: 1px solid var(--neutral-700);
}

pre::before {
    content: 'python';
    position: absolute;
    top: 0;
    right: 0;
    background: var(--neutral-700);
    color: var(--neutral-400);
    font-size: 0.65rem;
    padding: 0.3rem 0.8rem;
    border-radius: 0 var(--radius-lg) 0 var(--radius-sm);
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

pre {
    position: relative;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    font-weight: 400;
}

/* Syntax Highlighting - Softer colors */
.keyword { color: #c678dd; }
.string { color: #98c379; }
.comment { color: #5c6370; font-style: italic; }
.function { color: #61afef; }
.number { color: #d19a66; }

/* ================================
   TABLES
   ================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--neutral-200);
}

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
}

th {
    background: var(--neutral-50);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--neutral-200);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

td {
    border-bottom: 1px solid var(--neutral-100);
    color: var(--text-secondary);
}

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

tbody tr:hover {
    background: var(--neutral-50);
}

/* ================================
   CARDS
   ================================ */
.card {
    background: var(--surface-card);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all var(--transition-base);
    text-decoration: none;
    display: block;
    position: relative;
}

.card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.card-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: var(--primary-50);
    color: var(--primary-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.card:hover .card-number {
    background: var(--primary-500);
    color: white;
}

.card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    padding-right: 2.5rem;
}

.card:hover h3 {
    color: var(--primary-700);
}

.card p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.card.featured {
    border-color: var(--primary-200);
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--bg-primary) 100%);
}

/* ================================
   BADGES
   ================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge.time {
    background: var(--neutral-100);
    color: var(--text-secondary);
}

.badge.prereq {
    background: var(--neutral-100);
    color: var(--text-tertiary);
}

.badge.level {
    font-weight: 600;
}

.badge.level.beginner {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.badge.level.intermediate {
    background: rgba(249, 115, 22, 0.1);
    color: #ea580c;
}

.badge.level.advanced {
    background: rgba(194, 65, 12, 0.1);
    color: #c2410c;
}

.badge.level.project {
    background: rgba(249, 115, 22, 0.15);
    color: #c2410c;
}

/* ================================
   INFO BOXES
   ================================ */
.info-box {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.info-box.tip {
    background: var(--primary-50);
    border-color: var(--primary-500);
}

.info-box.warning {
    background: #fffbeb;
    border-color: var(--warning);
}

.info-box.note {
    background: #f0f9ff;
    border-color: var(--info);
}

.info-box h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-box.tip h4 { color: var(--primary-700); }
.info-box.warning h4 { color: #b45309; }
.info-box.note h4 { color: #0369a1; }

/* ================================
   DETAILS/SPOILER (Quiz)
   ================================ */
details {
    background: var(--surface-card);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
}

details:hover {
    border-color: var(--primary-200);
}

summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-600);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

summary::-webkit-details-marker {
    display: none;
}

summary::before {
    content: '▸';
    transition: transform var(--transition-fast);
    font-size: 0.75em;
    color: var(--primary-400);
}

details[open] summary::before {
    transform: rotate(90deg);
}

details[open] summary {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--neutral-200);
}

/* ================================
   NAVIGATION CARDS
   ================================ */
.nav-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--neutral-200);
}

.nav-card {
    background: var(--surface-card);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.nav-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.nav-card.prev { text-align: left; }
.nav-card.next { text-align: right; }

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

.nav-card .title {
    font-size: 0.9rem;
    color: var(--primary-600);
    font-weight: 600;
    margin-top: 0.25rem;
}

.nav-card:hover .title {
    color: var(--primary-700);
}

/* ================================
   DIAGRAM/ASCII ART
   ================================ */
.diagram {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
    margin: 1.5rem 0;
    color: var(--text-secondary);
}

/* ================================
   LEARNING PATH
   ================================ */
.learning-path {
    margin: 2.5rem 0;
    text-align: center;
}

.learning-path h2 {
    border-bottom: none;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.learning-path h2::before {
    display: none;
}

.section-intro {
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.path-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 1.5rem;
}

.path-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step-number {
    width: 44px;
    height: 44px;
    background: var(--primary-500);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.step-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.step-content p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin: 0;
    max-width: 130px;
}

.step-time {
    display: inline-block;
    background: var(--primary-50);
    color: var(--primary-600);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 0.4rem;
}

.path-connector {
    width: 40px;
    height: 2px;
    background: var(--primary-200);
    margin: 0 0.5rem;
    margin-bottom: 4rem;
}

/* ================================
   SECTION HEADERS
   ================================ */
.section-header {
    margin-bottom: 1rem;
}

.section-badge {
    display: inline-block;
    background: var(--primary-100);
    color: var(--primary-700);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}

.section-header h2 {
    border-bottom: none;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.section-header h2::before {
    display: none;
}

/* ================================
   DECISION GUIDES
   ================================ */
.decision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.decision-card {
    background: var(--surface-card);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.decision-card h3 {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.decision-card .diagram {
    margin: 0;
    font-size: 0.8rem;
}

/* ================================
   RESOURCE CARDS
   ================================ */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.resource-card {
    background: var(--surface-card);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.resource-card:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.resource-icon {
    font-size: 1.75rem;
    margin-bottom: 0.6rem;
}

.resource-card h4 {
    margin: 0 0 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.resource-card p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* ================================
   FOOTER
   ================================ */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--neutral-200);
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--neutral-100);
}

.footer-brand .logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-700);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-brand .logo span {
    font-weight: 400;
    color: var(--text-tertiary);
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 0;
    max-width: 250px;
}

.footer-links {
    display: flex;
    gap: 2.5rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-column h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 0 0 0.4rem 0;
}

.footer-column a {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-decoration: none;
}

.footer-column a:hover {
    color: var(--primary-600);
}

.footer-bottom {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding-top: 1.25rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* Simple footer for module pages */
footer p {
    color: var(--text-tertiary);
    text-align: center;
    font-size: 0.85rem;
    margin: 0;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 900px) {
    :root {
        --sidebar-width: 260px;
    }

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

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

    .sidebar-toggle {
        display: flex;
    }

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

    .main-content {
        margin-left: 0;
    }

    main {
        padding: 1.5rem 1rem 3rem;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 2rem 1.5rem 2.5rem;
        margin: -1.5rem -1rem 2rem -1rem;
    }

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

    .hero p {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 240px;
    }

    .module-header {
        padding: 1.5rem 1rem;
        margin: -1.5rem -1rem 1.5rem -1rem;
    }

    .module-header h1 {
        font-size: 1.4rem;
    }

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

    h2 {
        font-size: 1.2rem;
    }

    .path-timeline {
        flex-direction: column;
        gap: 0;
    }

    .path-connector {
        width: 2px;
        height: 25px;
        margin: 0;
    }

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

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

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-brand p {
        max-width: none;
    }

    .footer-links {
        justify-content: center;
    }
}

/* ================================
   PRINT STYLES
   ================================ */
@media print {
    .sidebar, nav, footer, .nav-cards, .sidebar-toggle {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    main {
        max-width: none;
        padding: 0;
    }

    .module-header, .hero {
        background: none !important;
        margin: 0;
        padding: 1rem 0;
        border-bottom: 2px solid #000;
    }

    pre {
        background: #f5f5f5;
        border: 1px solid #ccc;
    }

    .card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}

/* ================================
   SCROLLBAR STYLING
   ================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--neutral-200);
}

pre::-webkit-scrollbar-track {
    background: var(--neutral-700);
}

pre::-webkit-scrollbar-thumb {
    background: var(--neutral-500);
}

/* ================================
   SELECTION STYLING
   ================================ */
::selection {
    background: var(--primary-100);
    color: var(--primary-900);
}

/* ================================
   FOCUS STYLES (Accessibility)
   ================================ */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card {
    animation: fadeIn 0.3s ease;
}
