/* ========================================
   mujun.study — Styles
   Blobitecture / Dashboard / Coastal-Blend
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --abyssal-ink: #0d1b2a;
    --tidal-slate: #1b2838;
    --kelp-current: #2d5a7b;
    --amber: #d4a574;
    --sea-glass: #7fb4b8;
    --fog-veil: #e8edf2;
    --chalk-foam: #f0f4f8;
    --depth-charcoal: #1a2332;
    --paradox-violet: #8b6cc7;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    color: var(--chalk-foam);
    background: var(--abyssal-ink);
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: -0.02em;
}

/* --- Fog Particle Layer --- */
#fog-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.fog-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--fog-veil);
    filter: blur(40px);
    opacity: 0.04;
    animation: drift linear infinite;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(80px, -40px); }
    50% { transform: translate(-30px, 60px); }
    75% { transform: translate(50px, 30px); }
    100% { transform: translate(0, 0); }
}

/* --- Hero: The Paradox Gate --- */
#paradox-gate {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: var(--abyssal-ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blob {
    position: absolute;
    width: 65vw;
    height: 65vw;
    max-width: 700px;
    max-height: 700px;
}

.blob-dark {
    left: -8%;
    top: 10%;
    fill: var(--tidal-slate);
    animation: blobPulseDark 10s ease-in-out infinite;
}

.blob-light {
    right: -8%;
    top: 8%;
    fill: var(--fog-veil);
    opacity: 0.9;
    animation: blobPulseLight 12s ease-in-out infinite;
}

@keyframes blobPulseDark {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.06) rotate(3deg); }
}

@keyframes blobPulseLight {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.04) rotate(-4deg); }
}

.hero-text {
    position: relative;
    z-index: 10;
    text-align: center;
    mix-blend-mode: difference;
}

.hero-text h1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(3.5rem, 8vw, 7rem);
    color: var(--chalk-foam);
    letter-spacing: -0.02em;
}

.hero-text .kanji {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 6.4vw, 5.6rem);
    opacity: 0.6;
    margin-top: 0.2em;
    color: var(--chalk-foam);
}

.bg-blob {
    position: absolute;
    z-index: 1;
    opacity: 0.08;
}

.bg-blob-1 {
    width: 300px;
    height: 300px;
    top: 15%;
    left: 20%;
    fill: var(--kelp-current);
    animation: floatBlob 8s ease-in-out infinite;
}

.bg-blob-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: 25%;
    fill: var(--paradox-violet);
    animation: floatBlob 11s ease-in-out infinite reverse;
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, -10px) scale(1.03); }
    66% { transform: translate(-10px, 15px) scale(0.97); }
}

/* --- Dashboard: The Observation Deck --- */
#observation-deck {
    position: relative;
    z-index: 2;
    padding: 6rem 3rem;
    background: var(--abyssal-ink);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.panel {
    background: var(--tidal-slate);
    padding: 2rem;
    position: relative;
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.5s ease;
}

.panel.revealed {
    transform: scale(1);
    opacity: 1;
}

.panel-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    display: block;
}

.panel-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sea-glass);
    display: block;
    margin-bottom: 0.5rem;
}

.panel h2 {
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    margin-bottom: 0.75rem;
    color: var(--chalk-foam);
}

.panel p {
    color: var(--fog-veil);
    opacity: 0.85;
    font-weight: 300;
}

/* Panel blob shapes & grid positions */
.panel-1 {
    grid-column: 1 / 6;
    grid-row: 1 / 3;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.panel-2 {
    grid-column: 6 / 10;
    grid-row: 1 / 2;
    border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%;
}

.panel-3 {
    grid-column: 10 / 13;
    grid-row: 1 / 2;
    border-radius: 50% 50% 30% 70% / 40% 60% 40% 60%;
}

.panel-4 {
    grid-column: 6 / 10;
    grid-row: 2 / 4;
    border-radius: 40% 60% 50% 50% / 50% 50% 40% 60%;
}

.panel-5 {
    grid-column: 10 / 13;
    grid-row: 2 / 3;
    border-radius: 60% 40% 60% 40% / 30% 70% 30% 70%;
}

.panel-6 {
    grid-column: 1 / 4;
    grid-row: 3 / 4;
    border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%;
}

.panel-7 {
    grid-column: 4 / 6;
    grid-row: 3 / 4;
    border-radius: 35% 65% 55% 45% / 65% 35% 45% 55%;
}

/* Eye blink animation */
.eye-icon .eye-top,
.eye-icon .eye-bottom {
    animation: eyeBlink 4s ease-in-out infinite;
}

@keyframes eyeBlink {
    0%, 42%, 58%, 100% { opacity: 1; }
    50% { opacity: 0.1; }
}

.eye-icon .eye-pupil {
    animation: pupilPulse 4s ease-in-out infinite;
}

@keyframes pupilPulse {
    0%, 42%, 58%, 100% { r: 6; }
    50% { r: 1; }
}

/* --- Dissolution Zone --- */
#dissolution-zone {
    position: relative;
    min-height: 80vh;
    background: radial-gradient(ellipse at center, var(--fog-veil) 0%, var(--kelp-current) 50%, var(--abyssal-ink) 100%);
    padding: 8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dissolution-content {
    max-width: 900px;
    width: 100%;
    position: relative;
}

.float-text {
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-bottom: 3rem;
}

.float-text.dissolved {
    opacity: 1;
    transform: translateY(0);
}

.float-1 { margin-left: 10%; }
.float-2 { margin-left: 30%; }
.float-3 { margin-left: 15%; }
.float-4 { margin-left: 50%; }
.float-5 { margin-left: 25%; }

.float-text h2 {
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    color: var(--depth-charcoal);
}

.float-text p {
    color: var(--depth-charcoal);
    max-width: 500px;
}

.mono-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.08em;
    color: var(--kelp-current);
    opacity: 0.7;
}

/* --- Reconciliation (Footer) --- */
#reconciliation {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: var(--abyssal-ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blob-reconcile-light {
    position: absolute;
    width: 65vw;
    height: 65vw;
    max-width: 700px;
    max-height: 700px;
    left: -8%;
    top: 10%;
    fill: var(--fog-veil);
    opacity: 0.9;
    animation: blobPulseDark 11s ease-in-out infinite;
}

.blob-reconcile-dark {
    position: absolute;
    width: 65vw;
    height: 65vw;
    max-width: 700px;
    max-height: 700px;
    right: -8%;
    top: 8%;
    fill: var(--tidal-slate);
    animation: blobPulseLight 9s ease-in-out infinite;
}

.reconciliation-text {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 700px;
    padding: 0 2rem;
}

.gradient-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.5;
    background: linear-gradient(90deg, var(--amber) 0%, var(--paradox-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .panel-1, .panel-2, .panel-3,
    .panel-4, .panel-5, .panel-6, .panel-7 {
        grid-column: auto;
        grid-row: auto;
    }

    .panel-1, .panel-4 {
        grid-column: 1 / -1;
    }

    #observation-deck {
        padding: 3rem 1.5rem;
    }

    .float-1, .float-2, .float-3, .float-4, .float-5 {
        margin-left: 5%;
    }
}

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

    .blob, .blob-reconcile-light, .blob-reconcile-dark {
        width: 90vw;
        height: 90vw;
    }
}
