/* naru.day — Cosmic Graffiti on Deep-Ocean Canvas */

:root {
    --abyss: #0a0e1a;
    --trench: #0d1b2a;
    --seafloor: #1b2838;
    --silver: #b0bec5;
    --ice: #e0f7fa;
    --biolum: #4fc3f7;
    --phosphor: #00e5ff;
    --star-white: #f5f9ff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, var(--trench) 0%, var(--abyss) 15%, var(--abyss) 70%, var(--seafloor) 100%);
    color: var(--silver);
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Fixed wordmark */
.wordmark {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--biolum);
    opacity: 0.6;
    z-index: 100;
}

/* Fixed vertical margin line */
.margin-line {
    position: fixed;
    left: calc(100% / 16);
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(79, 195, 247, 0.15);
    z-index: 50;
    pointer-events: none;
}

/* Particle field */
.particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.particle-field::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    box-shadow:
        12vw 8vh 0 1px rgba(79,195,247,0.15),
        45vw 15vh 0 1px rgba(79,195,247,0.1),
        78vw 25vh 0 0.5px rgba(79,195,247,0.2),
        23vw 35vh 0 1px rgba(79,195,247,0.12),
        67vw 42vh 0 0.5px rgba(79,195,247,0.18),
        91vw 55vh 0 1px rgba(79,195,247,0.1),
        34vw 62vh 0 0.5px rgba(79,195,247,0.25),
        8vw 71vh 0 1px rgba(79,195,247,0.1),
        56vw 78vh 0 0.5px rgba(79,195,247,0.15),
        82vw 85vh 0 1px rgba(79,195,247,0.2),
        15vw 92vh 0 0.5px rgba(79,195,247,0.12),
        48vw 5vh 0 1px rgba(79,195,247,0.1),
        72vw 18vh 0 0.5px rgba(79,195,247,0.22),
        29vw 28vh 0 1px rgba(79,195,247,0.08),
        95vw 38vh 0 0.5px rgba(79,195,247,0.15),
        5vw 48vh 0 1px rgba(79,195,247,0.12),
        62vw 58vh 0 0.5px rgba(79,195,247,0.18),
        38vw 68vh 0 1px rgba(79,195,247,0.1),
        88vw 75vh 0 0.5px rgba(79,195,247,0.2),
        20vw 82vh 0 1px rgba(79,195,247,0.15),
        53vw 90vh 0 0.5px rgba(79,195,247,0.1),
        75vw 95vh 0 1px rgba(79,195,247,0.18),
        42vw 12vh 0 0.5px rgba(0,229,255,0.1),
        18vw 52vh 0 1px rgba(0,229,255,0.12),
        85vw 65vh 0 0.5px rgba(0,229,255,0.08),
        60vw 32vh 0 1px rgba(79,195,247,0.15),
        7vw 22vh 0 0.5px rgba(79,195,247,0.1),
        93vw 88vh 0 1px rgba(79,195,247,0.12),
        31vw 45vh 0 0.5px rgba(79,195,247,0.2),
        50vw 72vh 0 1px rgba(79,195,247,0.08);
    animation: particleDrift 30s linear infinite;
}

@keyframes particleDrift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Sections */
.section {
    position: relative;
    width: 100%;
}

/* Section 1 — Surface */
.section-surface {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--trench);
}

.surface-content {
    position: relative;
    text-align: center;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.surface-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ice);
    line-height: 1.15;
    text-shadow: 0 0 40px rgba(79, 195, 247, 0.15);
}

.surface-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: var(--silver);
    letter-spacing: 0.04em;
    margin-top: 1rem;
    opacity: 0.7;
}

/* Star points */
.star-point {
    position: absolute;
    will-change: opacity, transform;
}

.star-1 {
    top: -80px;
    right: -120px;
}

.star-2 {
    bottom: -60px;
    left: -160px;
}

.star-3 {
    bottom: -100px;
    right: 40px;
}

/* Drip lines */
.drip-line {
    position: absolute;
    width: 1px;
    background: linear-gradient(180deg, var(--biolum), transparent);
}

.drip-surface {
    bottom: -200px;
    right: 50px;
    height: 180px;
    opacity: 0.5;
}

/* Section 2 — Shallow */
.section-shallow {
    position: relative;
    min-height: 80vh;
    padding: clamp(6rem, 12vh, 14rem) 0;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 0;
    width: 100%;
    max-width: 100vw;
    padding: 0 2rem;
}

.content-island {
    padding: 2rem 0;
}

.content-island p {
    margin-bottom: 1.5em;
}

.content-island p:last-child {
    margin-bottom: 0;
}

.shallow-text {
    grid-column: 2 / 8;
}

.constellation-fragment {
    will-change: opacity, transform;
}

.constellation-1 {
    grid-column: 10 / 15;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slowRotate 120s linear infinite;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.highlight {
    color: var(--biolum);
}

/* Tag text */
.tag-text {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.tag-1 {
    bottom: 15%;
    right: 8%;
    color: var(--biolum);
    opacity: 0.4;
}

.tag-2 {
    top: 20%;
    right: 18%;
    color: var(--phosphor);
    opacity: 0.3;
}

.tag-3 {
    top: 30%;
    left: 6%;
    color: var(--ice);
    opacity: 0.2;
}

.tag-4 {
    top: 15%;
    right: 5%;
    color: var(--biolum);
    opacity: 0.35;
}

.tag-5 {
    bottom: 20%;
    left: 4%;
    color: var(--phosphor);
    opacity: 0.3;
}

.tag-6 {
    bottom: 35%;
    right: 12%;
    color: var(--ice);
    opacity: 0.25;
}

/* Tag scratches */
.tag-scratch {
    position: absolute;
    height: 1px;
    background: var(--biolum);
    opacity: 0.15;
}

.scratch-1 {
    width: 80px;
    top: 40%;
    left: 70%;
}

.scratch-2 {
    width: 60px;
    bottom: 25%;
    left: 15%;
}

.scratch-3 {
    width: 100px;
    top: 50%;
    right: 20%;
}

.scratch-4 {
    width: 70px;
    top: 25%;
    left: 8%;
}

.scratch-5 {
    width: 120px;
    bottom: 15%;
    right: 25%;
}

/* Section 3 — Breath zone */
.section-breath {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breath-zone {
    position: relative;
}

.orbit-ring {
    animation: orbitSpin 90s linear infinite;
}

@keyframes orbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Section 3b — Mid depth */
.section-mid {
    position: relative;
    min-height: 80vh;
    padding: clamp(6rem, 12vh, 14rem) 0;
}

.ghost-numeral {
    grid-column: 9 / 16;
    grid-row: 1;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(4rem, 8vw, 8rem);
    -webkit-text-stroke: 1px var(--biolum);
    color: transparent;
    opacity: 0.05;
    line-height: 1;
    letter-spacing: 0.04em;
    pointer-events: none;
    position: relative;
    z-index: 0;
}

.mid-text {
    grid-column: 9 / 15;
    grid-row: 1;
    position: relative;
    z-index: 1;
    padding-top: 3rem;
}

.star-mid-1 {
    position: absolute;
    top: 20%;
    left: 5%;
}

.star-mid-2 {
    position: absolute;
    bottom: 30%;
    left: 12%;
}

/* Section 4 — Deep water */
.section-deep {
    position: relative;
    min-height: 100vh;
    padding: clamp(6rem, 12vh, 14rem) 0;
    box-shadow: inset 0 0 200px rgba(79, 195, 247, 0.03);
}

.deep-text {
    grid-column: 3 / 14;
}

.deep-heading {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2.4rem, 5.5vw, 5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ice);
    line-height: 1.15;
    margin-bottom: 2rem;
    text-shadow: 0 0 40px rgba(79, 195, 247, 0.15);
}

.accent-word {
    color: var(--biolum);
}

/* Deep star positions */
.deep-star-1 { position: absolute; top: 8%; left: 3%; }
.deep-star-2 { position: absolute; top: 15%; right: 8%; }
.deep-star-3 { position: absolute; top: 30%; left: 12%; }
.deep-star-4 { position: absolute; top: 45%; right: 3%; }
.deep-star-5 { position: absolute; bottom: 35%; left: 6%; }
.deep-star-6 { position: absolute; bottom: 25%; right: 15%; }
.deep-star-7 { position: absolute; bottom: 15%; left: 20%; }
.deep-star-8 { position: absolute; bottom: 8%; right: 5%; }

.constellation-deep-left {
    position: absolute;
    top: 10%;
    left: 2%;
}

.constellation-deep-right {
    position: absolute;
    bottom: 15%;
    right: 3%;
}

.drip-deep-1 {
    left: 5%;
    top: 12%;
    height: 200px;
    opacity: 0.4;
}

.drip-deep-2 {
    right: 10%;
    top: 35%;
    height: 150px;
    opacity: 0.3;
}

.drip-deep-3 {
    left: 22%;
    bottom: 10%;
    height: 250px;
    opacity: 0.35;
}

/* Section 5 — Abyss */
.section-abyss {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--abyss);
}

.mandala-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80vw;
    height: 80vw;
    max-width: 80vh;
    max-height: 80vh;
}

.ghost-mandala {
    width: 100%;
    height: 100%;
    opacity: 0.06;
    transition: opacity 4s ease;
    mix-blend-mode: screen;
}

.ghost-mandala.glow {
    opacity: 0.15;
}

.mandala-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.mandala-naru {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2.4rem, 5.5vw, 5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ice);
    text-shadow: 0 0 60px rgba(79, 195, 247, 0.25);
}

.mandala-day {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--biolum);
}

/* Section 6 — Ascent */
.section-ascent {
    min-height: 60vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 4rem;
    background: linear-gradient(180deg, var(--abyss) 0%, var(--trench) 50%, var(--seafloor) 100%);
}

.constellation-ascent {
    position: absolute;
    top: 15%;
    left: 40%;
}

.ascent-footer {
    text-align: center;
}

.ascent-rule {
    border: none;
    height: 1px;
    background: var(--biolum);
    opacity: 0.3;
    width: 120px;
    margin: 0 auto 1.5rem;
}

.ascent-wordmark {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--biolum);
    opacity: 0.6;
}

/* Fade reveal */
.fade-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.fade-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-grid {
        display: block;
        padding: 0 1.5rem;
    }

    .shallow-text,
    .mid-text,
    .deep-text {
        max-width: 90%;
    }

    .constellation-1 {
        display: none;
    }

    .ghost-numeral {
        position: absolute;
        top: 0;
        right: 1rem;
        font-size: clamp(3rem, 12vw, 5rem);
    }

    .constellation-deep-left,
    .constellation-deep-right {
        display: none;
    }

    .mandala-container {
        width: 90vw;
        height: 90vw;
    }

    .wordmark {
        left: 1rem;
        top: 1rem;
    }

    .margin-line {
        left: 1rem;
    }
}
