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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    color: #F0EBE3;
    background-color: #0B2418;
    overflow-x: hidden;
}

/* palette: #0B2418 #163B2A #1B4332 #2D3A2E #40916C #52796F #74C69D #7C9082 #95D5B2 #D4A574 #F0EBE3 */

/* === BOKEH BACKGROUND === */
.bokeh-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle 180px at 10% 20%, rgba(64, 145, 108, 0.08) 0%, transparent 70%),
        radial-gradient(circle 120px at 80% 15%, rgba(149, 213, 178, 0.06) 0%, transparent 70%),
        radial-gradient(circle 90px at 25% 60%, rgba(116, 198, 157, 0.1) 0%, transparent 70%),
        radial-gradient(circle 150px at 70% 50%, rgba(27, 67, 50, 0.12) 0%, transparent 70%),
        radial-gradient(circle 60px at 50% 80%, rgba(149, 213, 178, 0.07) 0%, transparent 70%),
        radial-gradient(circle 200px at 90% 85%, rgba(64, 145, 108, 0.05) 0%, transparent 70%),
        radial-gradient(circle 40px at 15% 90%, rgba(116, 198, 157, 0.09) 0%, transparent 70%),
        radial-gradient(circle 100px at 40% 30%, rgba(82, 121, 111, 0.07) 0%, transparent 70%),
        radial-gradient(circle 70px at 60% 70%, rgba(95, 213, 178, 0.06) 0%, transparent 70%),
        radial-gradient(circle 130px at 35% 45%, rgba(22, 59, 42, 0.1) 0%, transparent 70%),
        radial-gradient(circle 55px at 85% 40%, rgba(149, 213, 178, 0.08) 0%, transparent 70%),
        radial-gradient(circle 160px at 5% 50%, rgba(64, 145, 108, 0.04) 0%, transparent 70%);
}

/* === SECTIONS === */
.section {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.section--full {
    min-height: 100vh;
    scroll-snap-align: start;
}

/* === GLASS CARDS === */
.glass-card {
    width: clamp(640px, 65vw, 880px);
    max-width: 90vw;
    padding: clamp(2.5rem, 5vw, 4.5rem);
    background: rgba(45, 58, 46, 0.35); /* #2D3A2E */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(149, 213, 178, 0.15); /* #95D5B2 */
    border-radius: 2px;
    box-shadow:
        0 8px 32px rgba(22, 59, 42, 0.4), /* #163B2A */
        inset 0 1px 0 rgba(240, 235, 227, 0.05); /* #F0EBE3 */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.glass-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.glass-card--hero {
    text-align: center;
    padding: clamp(4rem, 8vw, 7rem) clamp(2.5rem, 5vw, 4.5rem);
}

.glass-card--coda {
    text-align: center;
}

/* === TYPOGRAPHY === */
.title-display {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    letter-spacing: 0.03em;
    line-height: 1.08;
    color: #f0ebe3;
    margin-bottom: 1rem;
}

.subtitle-mono {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: #52796F;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.chapter-number {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: #D4A574;
    opacity: 0.6;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.title-chapter {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: 0.03em;
    line-height: 1.12;
    color: #f0ebe3;
    margin-bottom: 1.8rem;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    color: rgba(240, 235, 227, 0.85);
    margin-bottom: 1.5rem;
    max-width: 60ch;
}

.body-text em {
    font-style: italic;
    color: #95d5b2;
}

.body-text--centered {
    text-align: center;
    max-width: 45ch;
    margin-left: auto;
    margin-right: auto;
}

/* === CODE BLOCKS === */
.code-block {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.8rem, 1vw, 0.92rem);
    line-height: 1.6;
    color: #95D5B2;
    background: #1B4332;
    border: 1px solid rgba(116, 198, 157, 0.2); /* #74C69D */
    border-radius: 2px;
    padding: 1.2rem 1.6rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.code-block--final {
    display: inline-block;
    margin-top: 1.5rem;
}

/* === LAMBDA ORNAMENT === */
.lambda-ornament {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 3rem;
    color: #7C9082;
    opacity: 0.3;
    margin-top: 2rem;
    user-select: none;
}

.lambda-ornament--large {
    font-size: 5rem;
    opacity: 0.2;
    margin-bottom: 2rem;
    margin-top: 0;
}

/* === ANIMATIONS === */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.glass-card--hero .lambda-ornament {
    animation: float 6s ease-in-out infinite;
}

/* === SCROLL PROGRESS === */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: var(--scroll-progress, 0%);
    height: 2px;
    background: linear-gradient(90deg, #40916C, #74C69D);
    z-index: 1000;
    opacity: 0.6;
}
