:root {
    --obsidian-night: #0d0b07;
    --deep-black: #050403;
    --antique-gold: #c9a356;
    --patina-copper: #8b6b3a;
    --aged-bronze: #8b7030;
    --deep-bronze: #6b5f4a;
    --warm-stone: #b8a88a;
    --bright-gold: #e8c46a;
    --panel-bg: #1a1610;
    --display-weight: 300;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--obsidian-night);
    color: var(--warm-stone);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 800ms ease;
}

.grain-overlay.visible {
    opacity: 0.04;
}

/* Vignette */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(5,4,3,0.4) 100%);
    opacity: 0;
    transition: opacity 600ms ease;
}

.vignette.visible {
    opacity: 1;
}

/* Scroll Progress */
.scroll-progress-container {
    position: fixed;
    right: 2vw;
    top: 0;
    width: 4px;
    height: 100vh;
    z-index: 998;
}

.scroll-progress {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    opacity: 0.6;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-line {
    width: 60%;
    max-width: 600px;
    height: 2px;
    margin-bottom: 2rem;
    opacity: 0;
    transition: opacity 400ms ease;
}

.hero-line.visible {
    opacity: 1;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: var(--display-weight);
    font-size: clamp(3rem, 7vw, 5.5rem);
    color: var(--antique-gold);
    letter-spacing: 0.15em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 800ms ease 200ms, transform 800ms ease 200ms;
}

.hero-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle {
    font-family: 'DM Mono', monospace;
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
    color: var(--deep-bronze);
    letter-spacing: 0.05em;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 800ms ease 600ms;
}

.hero-subtitle.visible {
    opacity: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: var(--deep-bronze);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: pulse-scroll 2s ease-in-out infinite;
    opacity: 0;
    transition: opacity 600ms ease 1.5s;
}

.scroll-indicator.visible {
    opacity: 1;
}

@keyframes pulse-scroll {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* Chapters */
.chapter {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

.divider {
    width: 50%;
    max-width: 400px;
    height: 40px;
    margin-bottom: 3rem;
    opacity: 0.8;
}

/* Panels - Neomorphism */
.panel {
    background: var(--panel-bg);
    border-radius: 20px;
    padding: 3rem;
    max-width: 700px;
    width: 100%;
    box-shadow:
        8px 8px 20px rgba(5, 4, 3, 0.7),
        -4px -4px 12px rgba(201, 163, 86, 0.05);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease, transform 600ms ease, box-shadow 300ms ease;
}

.panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel:hover {
    box-shadow:
        8px 8px 20px rgba(5, 4, 3, 0.7),
        -4px -4px 12px rgba(201, 163, 86, 0.12);
}

.panel--inset {
    box-shadow:
        inset 6px 6px 16px rgba(5, 4, 3, 0.6),
        inset -3px -3px 10px rgba(201, 163, 86, 0.04);
}

.panel--inset.visible {
    box-shadow:
        inset 6px 6px 16px rgba(5, 4, 3, 0.6),
        inset -3px -3px 10px rgba(201, 163, 86, 0.04);
}

.panel--inset:hover {
    box-shadow:
        inset 6px 6px 16px rgba(5, 4, 3, 0.6),
        inset -3px -3px 10px rgba(201, 163, 86, 0.1);
}

.chapter-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--antique-gold);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.chapter-text {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    color: var(--warm-stone);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.mono-text {
    font-family: 'DM Mono', monospace;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    color: var(--deep-bronze);
    letter-spacing: 0.03em;
}

/* Dojang */
.dojang-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.dojang {
    width: 120px;
    height: 120px;
}

/* Works Grid */
.works-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.work-item {
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow:
        inset 6px 6px 16px rgba(5, 4, 3, 0.6),
        inset -3px -3px 10px rgba(201, 163, 86, 0.04);
    transition: box-shadow 300ms ease;
}

.work-item:hover {
    box-shadow:
        inset 6px 6px 16px rgba(5, 4, 3, 0.6),
        inset -3px -3px 10px rgba(201, 163, 86, 0.1);
}

.work-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    color: var(--patina-copper);
}

.work-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--warm-stone);
}

/* Footer */
.footer {
    padding: 4rem 2rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .panel {
        border-radius: 12px;
        padding: 2rem;
    }

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

    .scroll-progress-container {
        right: auto;
        left: 2vw;
    }

    .divider {
        width: 70%;
    }
}
