:root {
    /* Color Palette */
    --bg-main: #030407;
    --bg-secondary: #0d1117;
    --primary: #2f81f7;
    --primary-glow: rgba(47, 129, 247, 0.3);
    --accent: #d2a8ff;
    /* Purple accent */
    --accent-glow: rgba(210, 168, 255, 0.2);
    --text-main: #ffffff;
    --text-muted: #8b949e;
    --border-glass: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(22, 27, 34, 0.6);
    --success: #3fb950;
    --error: #f85149;

    /* Spacing & Layout */
    --nav-height: 70px;
    --container-width: 1200px;

    /* Animations */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    height: 100vh;
    overflow-y: scroll;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, rgba(47, 129, 247, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(210, 168, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin: 0;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Navigation */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--nav-height);
    background: rgba(3, 4, 7, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    /* Changed from sticky to fixed to stay on top of slides */
    width: 90%;
    /* Account for padding */
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-glass);
}

/* ... logo and nav styles ... */

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Slide Presentation Layout */
.hero-section,
section {
    min-height: 100vh;
    /* Full viewport height */
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--nav-height) 20px 20px;
    /* Account for fixed nav */
    box-sizing: border-box;
    position: relative;
}

/* Adjust margins since we are using flex center */
main {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0;
    /* Remove padding as sections handle it */
}

/* Override existing section margin */
section {
    margin-bottom: 0;
}

/* Hero Section */
.hero-section {
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.sub-headline {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: block;
}

.hero-section h1 {
    font-size: 4.5rem;
    margin-bottom: 25px;
    background: linear-gradient(to right, #fff, #a5d8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(47, 129, 247, 0.2);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 16px 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
    filter: brightness(1.1);
}

/* Slide Navigation Dots */
.slide-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.nav-dot.active {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Keyboard Hint */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    right: 30px;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.5;
    pointer-events: none;
    z-index: 100;
}

.section-header {
    margin-bottom: 50px;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.divider {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* Cards & Grid */
.glass-card,
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    padding: 30px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.card-container,
.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(47, 129, 247, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.glass-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.glass-card p {
    color: var(--text-muted);
}

.glass-card ul {
    list-style: none;
    padding: 0;
    color: var(--text-muted);
}

.glass-card li {
    margin-bottom: 10px;
    padding-left: 15px;
    border-left: 2px solid var(--primary);
}

/* Scenarios */
.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 20px;
}

.badge {
    background: rgba(47, 129, 247, 0.1);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(47, 129, 247, 0.2);
}

.prompt-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.prompt-box.highlight {
    border-color: rgba(63, 185, 80, 0.3);
    background: rgba(63, 185, 80, 0.05);
}

.prompt-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.05rem;
    color: #e6edf3;
    margin: 10px 0;
}

.label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.response {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-glass);
    font-size: 0.95rem;
}

.response.bad .icon {
    color: var(--error);
}

.response.good .icon {
    color: var(--success);
}

/* Quiz Section */
#quiz-container {
    max-width: 600px;
    margin: 0 auto;
}

.question {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 30px;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

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

.btn.primary:hover {
    background: #0060df;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

#quiz-feedback {
    min-height: 24px;
    font-weight: 500;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 50px 0;
    text-align: center;
    background: #020305;
}

.author {
    color: var(--text-muted);
    margin-top: 10px;
}

.highlight-name {
    color: var(--accent);
    font-weight: 600;
}

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

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

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 3rem;
    }

    .glass-nav {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    /* Simplified for this exercise */
    .button-group {
        flex-direction: column;
    }
}

/* Image Styling */
.content-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}

.content-image:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Comparison Table/Grid for Part 2 */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.comparison-header {
    background: rgba(47, 129, 247, 0.1);
    color: var(--primary);
    font-weight: 700;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.comparison-cell {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    padding: 20px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.comparison-col-header {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 10px;
    text-align: center;
}

/* Quiz Updates */
.quiz-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.quiz-answer {
    margin-top: 15px;
    padding: 15px;
    background: rgba(63, 185, 80, 0.1);
    border-left: 3px solid var(--success);
    border-radius: 4px;
    display: none;
    /* Hidden by default */
}

.quiz-answer.visible {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

@media (max-width: 900px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

/* Detailed Example Boxes */
.example-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-glass);
}

.bad-example {
    border-left: 4px solid var(--error);
}

.good-example {
    border-left: 4px solid var(--success);
}

.example-box h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--text-main);
}

.prompt-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.description-text {
    margin-bottom: 30px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.highlight-red {
    color: var(--error);
    font-weight: bold;
}

.highlight-green {
    color: var(--success);
    font-weight: bold;
}

.analysis {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-glass);
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Download Button Specifics */
.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-left: 20px;
    white-space: nowrap;
}

/* 3D Tilt Effect Utilities */
/* refined interaction effects */
.hover-effect {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    will-change: transform, box-shadow;
}

.hover-effect:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(47, 129, 247, 0.2);
    /* Primary glow */
    border-color: rgba(47, 129, 247, 0.5);
}

/* refined interaction effects */
/* ... (existing hover-effect styles) ... */

/* PDF Generation Override Class
   (Applied by JS during PDF creation to force exact colors) */
/* PDF Generation Override Class */
body.generating-pdf {
    background-color: #030407 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

/* Aggressively disable all animations and force visibility during capture */
body.generating-pdf * {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
}

body.generating-pdf .glass-card,
body.generating-pdf .glass-panel,
body.generating-pdf .example-box {
    background: #161b22 !important;
    /* Solid dark background, no opacity for clarity */
    border: 2px solid #ffffff !important;
    /* Stronger border */
    color: #ffffff !important;
    box-shadow: none !important;
}

/* Force ALL text to be white */
body.generating-pdf h1,
body.generating-pdf h2,
body.generating-pdf h3,
body.generating-pdf h4,
body.generating-pdf p,
body.generating-pdf li,
body.generating-pdf span,
body.generating-pdf strong,
body.generating-pdf em,
body.generating-pdf div,
body.generating-pdf .prompt-text,
body.generating-pdf .response {
    color: #ffffff !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #ffffff !important;
    background: transparent !important;
    opacity: 1 !important;
}

/* Enhancements & Print Styles */
@media print {

    /* ... (keep existing media print as fallback) ... */
    body {
        background-color: #030407 !important;
        /* Force dark background */
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        /* Crucial for Chrome/Safari */
        print-color-adjust: exact;
    }

    /* Hide interactive elements, handled by JS primarily but good as backup */
    .glass-nav,
    .slide-nav,
    .keyboard-hint,
    .cursor-dot,
    .cursor-outline,
    .btn {
        display: none !important;
    }

    .background-globes {
        display: block !important;
        /* Keep background if possible, or use body bg */
        position: absolute;
        z-index: -1;
    }

    /* Ensure slides take full page */
    section,
    .hero-section {
        height: 100vh !important;
        min-height: 100vh !important;
        page-break-after: always !important;
        page-break-inside: avoid !important;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0 !important;
        padding: 40px !important;
    }

    /* Force glass look in PDF */
    .glass-card,
    .glass-panel,
    .example-box {
        background: rgba(22, 27, 34, 0.8) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: #fff !important;
        box-shadow: none !important;
    }

    h1,
    h2,
    h3,
    h4,
    p,
    li,
    span,
    strong {
        color: #fff !important;
        text-shadow: none !important;
    }

    /* Fix gradients */
    .logo,
    h1 {
        -webkit-background-clip: unset !important;
        background-clip: unset !important;
        -webkit-text-fill-color: #fff !important;
        color: #fff !important;
    }
}

/* Spotlight Effect */
.glass-card,
.glass-panel,
.example-box {
    position: relative;
    overflow: hidden;
}

.glass-card::before,
.glass-panel::before,
.example-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 1px;
    /* Border width */
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0),
            rgba(255, 255, 255, 0.4),
            transparent 40%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 2;
    opacity: 0;
    /* Hidden by default, shown on hover via JS */
    transition: opacity 0.5s;
    pointer-events: none;
}

.glass-card:hover::before,
.glass-panel:hover::before,
.example-box:hover::before {
    opacity: 1;
}

/* Hero Typing Effect */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
    color: var(--primary);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Floating Background Animation */
.background-globes {
    animation: pulse-globes 10s ease-in-out infinite alternate;
}

@keyframes pulse-globes {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Staggered Entry for Lists */
li {
    opacity: 0;
    animation: slideInRight 0.5s ease-out forwards;
}

li:nth-child(1) {
    animation-delay: 0.2s;
}

li:nth-child(2) {
    animation-delay: 0.4s;
}

li:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Text Selection */
::selection {
    background: var(--primary);
    color: #fff;
}

/* Reading Progress Bar */
.progress-bar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1002;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    display: none;
    /* Hidden on touch devices via media query usually, or default */
}

@media (pointer: fine) {

    .cursor-dot,
    .cursor-outline {
        display: block;
    }
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-main);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body.hovering-link .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

body.hovering-link .cursor-dot {
    background-color: var(--primary);
}

/* Button Shimmer Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: 0.5s;
}

.btn:hover::after {
    left: 100%;
    transition: 0.5s;
}