/* doublestandard.xyz - Zen garden submerged in dark water */
/* Colors: #000000, #c8d6e5, #ff6b8a, #5a6c7d, #0d1117, #00ffc8, #0a0a12 */
/* Fonts: Caveat (display), Inter (body), IBM Plex Mono (technical) */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #00ffc8 #0a0a12;
}

body {
    background-color: #0d1117;
    color: #c8d6e5;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===================== SIDEBAR ===================== */

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 72px;
    height: 100vh;
    background-color: #0a0a12;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#sidebar-accent-line {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        #00ffc8 20%,
        #00ffc8 80%,
        transparent 100%
    );
    opacity: 0.6;
}

#sidebar-kanji {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.kanji-char {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #5a6c7d;
    writing-mode: vertical-rl;
    letter-spacing: 0.15em;
    transition: color 0.8s ease, opacity 0.8s ease;
    opacity: 0.5;
    cursor: default;
}

.kanji-char.active {
    color: #00ffc8;
    opacity: 1;
}

/* ===================== BUBBLE CONTAINER ===================== */

#bubble-container {
    position: fixed;
    top: 0;
    left: 72px;
    width: calc(100vw - 72px);
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle at 35% 35%,
        rgba(0, 255, 200, 0.12) 0%,
        rgba(0, 255, 200, 0.04) 40%,
        transparent 70%
    );
    border: 1px solid rgba(0, 255, 200, 0.08);
    animation: bubbleRise linear forwards;
}

.bubble::after {
    content: '';
    position: absolute;
    top: 22%;
    left: 28%;
    width: 20%;
    height: 20%;
    border-radius: 50%;
    background: rgba(0, 255, 200, 0.2);
    filter: blur(1px);
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-110vh) translateX(var(--drift)) scale(var(--end-scale));
        opacity: 0;
    }
}

/* ===================== MAIN CONTENT ===================== */

#content {
    margin-left: 72px;
    position: relative;
    z-index: 10;
}

/* ===================== SURFACE / HERO ===================== */

.fullscreen-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

#surface {
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(0, 255, 200, 0.03) 0%,
        transparent 60%
    );
}

.surface-inner {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: surfaceFadeIn 2s ease 0.5s forwards;
}

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

#domain-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    color: #00ffc8;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
}

.title-dot {
    color: #ff6b8a;
}

#surface-line {
    width: 60px;
    height: 1px;
    background-color: #00ffc8;
    margin: 0 auto 1.5rem;
    opacity: 0.4;
    animation: lineExpand 1.5s ease 1.5s forwards;
    transform: scaleX(0);
}

@keyframes lineExpand {
    to {
        transform: scaleX(1);
    }
}

#surface-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    color: #5a6c7d;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    opacity: 0;
    animation: subtitleFadeIn 1.5s ease 2.5s forwards;
}

@keyframes subtitleFadeIn {
    to {
        opacity: 0.8;
    }
}

#scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: scrollIndicatorFade 1.5s ease 3.5s forwards;
}

@keyframes scrollIndicatorFade {
    to {
        opacity: 0.4;
    }
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 1px solid #00ffc8;
    border-bottom: 1px solid #00ffc8;
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: rotate(45deg) translate(0, 0);
    }
    50% {
        transform: rotate(45deg) translate(5px, 5px);
    }
}

/* ===================== VOID PASSAGES ===================== */

.void-passage {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
}

.void-kanji {
    font-size: clamp(3rem, 8vw, 6rem);
    color: #0a0a12;
    opacity: 0;
    transition: opacity 1.2s ease, color 1.2s ease;
    font-weight: 300;
    user-select: none;
}

.void-passage.in-view .void-kanji {
    opacity: 0.15;
    color: #5a6c7d;
}

.void-final {
    min-height: 40vh;
}

/* ===================== CONTRADICTION PAIRS ===================== */

.contradiction-pair {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.pair-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    max-width: 1000px;
    width: 100%;
    gap: 2rem;
}

.statement {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
}

.statement-left {
    text-align: right;
    transform: translateX(-30px);
}

.statement-right {
    text-align: left;
    transform: translateX(30px);
}

.contradiction-pair.in-view .statement-left {
    opacity: 1;
    transform: translateX(0);
}

.contradiction-pair.in-view .statement-right {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.6s;
}

.statement-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #5a6c7d;
    margin-bottom: 1rem;
    display: block;
}

.statement-left .statement-label {
    color: #00ffc8;
    opacity: 0.6;
}

.statement-right .statement-label {
    color: #ff6b8a;
    opacity: 0.6;
}

.statement-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.7;
    color: #c8d6e5;
}

.statement-left .statement-text {
    color: rgba(200, 214, 229, 0.9);
}

.statement-right .statement-text {
    color: rgba(200, 214, 229, 0.6);
}

.pair-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 60px;
    opacity: 0;
    transition: opacity 1.2s ease 0.3s;
}

.contradiction-pair.in-view .pair-divider {
    opacity: 1;
}

.balance-scale,
.mirror-line {
    display: block;
}

/* ===================== CLOSING SECTION ===================== */

#closing {
    background: radial-gradient(
        ellipse at 50% 100%,
        rgba(0, 255, 200, 0.02) 0%,
        transparent 60%
    );
}

.closing-inner {
    text-align: center;
}

.closing-text {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
    color: #c8d6e5;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.2s ease, transform 1.2s ease;
    margin-bottom: 0.75rem;
}

.closing-text-delayed {
    color: #00ffc8;
    transition-delay: 0.8s;
}

#closing.in-view .closing-text {
    opacity: 1;
    transform: translateY(0);
}

#closing-line {
    width: 40px;
    height: 1px;
    background-color: #ff6b8a;
    margin: 2rem auto;
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 1s ease 1.6s, transform 1s ease 1.6s;
}

#closing.in-view #closing-line {
    opacity: 0.5;
    transform: scaleX(1);
}

.closing-domain {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    color: #5a6c7d;
    letter-spacing: 0.15em;
    opacity: 0;
    transition: opacity 1s ease 2s;
    display: block;
}

#closing.in-view .closing-domain {
    opacity: 0.5;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 768px) {
    #sidebar {
        width: 48px;
    }

    #content {
        margin-left: 48px;
    }

    #bubble-container {
        left: 48px;
        width: calc(100vw - 48px);
    }

    .pair-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .statement-left,
    .statement-right {
        text-align: center;
    }

    .statement-left {
        transform: translateY(-20px);
    }

    .statement-right {
        transform: translateY(20px);
    }

    .contradiction-pair.in-view .statement-left {
        transform: translateY(0);
    }

    .contradiction-pair.in-view .statement-right {
        transform: translateY(0);
    }

    .pair-divider {
        width: 100%;
        height: 60px;
    }

    .kanji-char {
        font-size: 0.6rem;
    }

    #sidebar-kanji {
        gap: 24px;
    }

    .contradiction-pair {
        min-height: auto;
        padding: 3rem 1.5rem;
    }

    .void-passage {
        min-height: 40vh;
    }
}

@media (max-width: 480px) {
    #sidebar {
        width: 36px;
    }

    #content {
        margin-left: 36px;
    }

    #bubble-container {
        left: 36px;
        width: calc(100vw - 36px);
    }

    .statement {
        padding: 1rem;
    }
}

/* ===================== WATER RIPPLE OVERLAY ===================== */

#content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 72px;
    width: calc(100vw - 72px);
    height: 100vh;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(0, 255, 200, 0.015) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(255, 107, 138, 0.01) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===================== SELECTION STYLING ===================== */

::selection {
    background: rgba(0, 255, 200, 0.2);
    color: #c8d6e5;
}

::-moz-selection {
    background: rgba(0, 255, 200, 0.2);
    color: #c8d6e5;
}

/* ===================== SCROLLBAR ===================== */

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #0a0a12;
}

::-webkit-scrollbar-thumb {
    background: #00ffc8;
    opacity: 0.3;
    border-radius: 2px;
}
