/* mosoon.org - Contradiction / 矛盾 / 모순 */
/* Abstract glitch art meets academic deconstructionism */

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

:root {
    --white: #f5f2ed;
    --off-white: #e8e4de;
    --black: #0a0a0e;
    --near-black: #1a1a1e;
    --gray: #6a6a6a;
    --red: #c43030;
    --magenta: #d400aa;
    --cyan: #00d4aa;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.6vw, 1.05rem);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ========== HERO - THE COLLISION ========== */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-right {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-text-left {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--near-black);
    letter-spacing: -0.03em;
    position: absolute;
    right: calc(50% - 0.5em);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    animation: slideFromLeft 0.8s ease-out 0.3s forwards;
}

.hero-text-right {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--off-white);
    letter-spacing: -0.03em;
    position: absolute;
    left: calc(50% + 0.1em);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    animation: slideFromRight 0.8s ease-out 0.3s forwards;
}

@keyframes slideFromLeft {
    from { opacity: 0; transform: translate(-30px, -50%); }
    to { opacity: 1; transform: translate(0, -50%); }
}

@keyframes slideFromRight {
    from { opacity: 0; transform: translate(30px, -50%); }
    to { opacity: 1; transform: translate(0, -50%); }
}

.diagonal-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(
        to bottom right,
        transparent calc(50% - 1px),
        var(--red) calc(50% - 1px),
        var(--red) calc(50% + 1px),
        transparent calc(50% + 1px)
    );
    opacity: 0;
    animation: fadeIn 0.5s ease 1s forwards;
}

.hero-subtitle {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeIn 0.6s ease 1.5s forwards;
}

.subtitle-kr {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--red);
}

.subtitle-divider {
    color: var(--gray);
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
}

.subtitle-en {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.65rem, 1.2vw, 0.8rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
}

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

/* ========== GLITCH TRANSITION ZONES ========== */

.glitch-zone {
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--near-black);
}

.glitch-text {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--white);
    position: relative;
    opacity: 0.15;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    color: var(--cyan);
    left: 2px;
    top: -1px;
    mix-blend-mode: screen;
    clip-path: inset(0 0 50% 0);
    animation: glitchTop 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    color: var(--magenta);
    left: -2px;
    top: 1px;
    mix-blend-mode: screen;
    clip-path: inset(50% 0 0 0);
    animation: glitchBottom 2.5s infinite linear alternate-reverse;
}

@keyframes glitchTop {
    0% { clip-path: inset(0 0 85% 0); transform: translate(2px, -1px); }
    20% { clip-path: inset(15% 0 60% 0); transform: translate(-2px, 1px); }
    40% { clip-path: inset(40% 0 30% 0); transform: translate(1px, 0px); }
    60% { clip-path: inset(60% 0 10% 0); transform: translate(-1px, 1px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(2px, -1px); }
    100% { clip-path: inset(0 0 85% 0); transform: translate(-1px, 0px); }
}

@keyframes glitchBottom {
    0% { clip-path: inset(85% 0 0 0); transform: translate(-2px, 1px); }
    25% { clip-path: inset(50% 0 20% 0); transform: translate(2px, 0px); }
    50% { clip-path: inset(20% 0 50% 0); transform: translate(0px, -1px); }
    75% { clip-path: inset(70% 0 5% 0); transform: translate(-1px, 1px); }
    100% { clip-path: inset(85% 0 0 0); transform: translate(1px, -1px); }
}

/* ========== THESIS SECTIONS ========== */

.thesis-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.thesis-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.thesis-light {
    background: var(--white);
    color: var(--near-black);
}

.thesis-dark {
    background: var(--black);
    color: var(--off-white);
}

.thesis-content {
    max-width: 640px;
    margin: 0 auto;
}

.thesis-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.thesis-number {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--red);
    opacity: 0.4;
    line-height: 1;
}

.thesis-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.thesis-light .thesis-title {
    color: var(--near-black);
}

.thesis-dark .thesis-title {
    color: var(--off-white);
}

.thesis-quote {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--red);
    border-left: 3px solid var(--red);
    padding-left: 1.2rem;
    margin-bottom: 2rem;
    font-style: normal;
    line-height: 1.6;
}

.thesis-body {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.thesis-light .thesis-body {
    color: var(--near-black);
}

.thesis-dark .thesis-body {
    color: var(--off-white);
    opacity: 0.9;
}

.counter-marker {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.08;
}

.counter-symbol {
    font-family: 'Anton', sans-serif;
    font-size: clamp(6rem, 15vw, 12rem);
    color: var(--red);
    line-height: 1;
}

/* ========== FOOTER ========== */

.site-footer {
    position: relative;
    padding: 4rem 2rem;
    background: var(--near-black);
    text-align: center;
}

.footer-split {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-left .footer-text {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--off-white);
}

.footer-right .footer-text {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--red);
}

.footer-tagline {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
}

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

@media (max-width: 600px) {
    .hero-text-left {
        right: calc(50% + 0.2em);
    }

    .hero-text-right {
        left: calc(50% - 0.3em);
    }

    .thesis-section {
        padding: 4rem 1.5rem;
    }

    .thesis-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .counter-marker {
        display: none;
    }

    .glitch-zone {
        height: 80px;
    }
}
