/* jeongchi.boo - Haunted Political Theater */

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

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.8;
    color: #F0E8F8;
    background: #0E0818;
    overflow-x: hidden;
}

/* Navigation */
#top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    z-index: 100;
    background: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #F0E8F8;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #00FFD4;
    animation: link-glitch 0.2s ease;
}

@keyframes link-glitch {
    0% { transform: translateX(0); }
    25% { transform: translateX(2px); }
    50% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

/* Ghost Trail Navigation */
#ghost-trail {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 100;
}

.ghost-indicator {
    color: #9888B0;
    transition: color 0.3s;
    cursor: pointer;
}

.ghost-indicator.active {
    color: #FF4D9E;
    filter: drop-shadow(0 0 6px #FF4D9E);
}

/* Accent Text */
.accent-text {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #00FFD4;
    margin-bottom: 0.5rem;
}

/* =============================================
   SECTION 1: Ghost Stage Hero
   ============================================= */

#ghost-stage {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0E0818, #1A0E2E);
    position: relative;
}

#ghost-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    opacity: 0;
}

#ghost-face.visible {
    opacity: 1;
    animation: ghost-pulse 3s ease-in-out infinite;
}

@keyframes ghost-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

#ghost-face line, #ghost-face circle, #ghost-face ellipse, #ghost-face path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease;
}

#ghost-face.drawing line, #ghost-face.drawing circle, #ghost-face.drawing ellipse, #ghost-face.drawing path {
    stroke-dashoffset: 0;
}

/* Hero Title - Glitch Effect */
#hero-title {
    position: relative;
    z-index: 2;
    margin-bottom: 1rem;
    height: clamp(2.5rem, 6vw, 5rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.glitch-layer {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: absolute;
}

.glitch-layer.pink {
    color: #FF4D9E;
    transform: translateX(-2px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.3s ease;
}

.glitch-layer.cyan {
    color: #00FFD4;
    transform: translateX(2px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.3s ease;
}

.glitch-layer.white {
    color: #F0E8F8;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#hero-title.resolved .glitch-layer.pink,
#hero-title.resolved .glitch-layer.cyan {
    transform: translateX(0);
}

#hero-title.resolved .glitch-layer {
    opacity: 1;
}

#hero-title.resolved .glitch-layer.white {
    background: linear-gradient(135deg, #FF4D9E, #7B68EE, #00FFD4, #FF4D9E);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holo-shift 6s ease infinite;
}

#hero-title.resolved .glitch-layer.pink,
#hero-title.resolved .glitch-layer.cyan {
    opacity: 0;
}

@keyframes holo-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* =============================================
   CRT Static Bands
   ============================================= */

.crt-static {
    width: 100%;
    height: 40px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(240, 232, 248, 0.03) 1px,
        rgba(240, 232, 248, 0.03) 2px
    );
    opacity: 0.08;
    animation: static-shift 0.15s steps(4) infinite;
    position: relative;
}

@keyframes static-shift {
    0% { background-position: 0 0; }
    25% { background-position: 4px 0; }
    50% { background-position: -4px 0; }
    75% { background-position: 2px 0; }
    100% { background-position: 0 0; }
}

/* =============================================
   Broken Grid Sections
   ============================================= */

#discourse, #theater, #voices {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    padding: 6rem 3rem;
    position: relative;
    min-height: 100vh;
    align-content: center;
}

.ghost-bg-face {
    position: absolute;
    left: 5%;
    top: 20%;
    opacity: 0.15;
    pointer-events: none;
}

.ghost-bg-face.right {
    left: auto;
    right: 5%;
}

.broken-block {
    background: #1A0E2E;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.neon-border {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    animation: neon-cycle 3s ease infinite;
}

@keyframes neon-cycle {
    0%, 100% { background: #FF4D9E; }
    33% { background: #00FFD4; }
    66% { background: #7B68EE; }
}

.block-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #FF4D9E;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 0 #FF3838;
}

.broken-block p {
    color: #F0E8F8;
}

.broken-block .accent-text {
    color: #00FFD4;
}

/* Glitch entrance animation */
.glitch-enter {
    opacity: 0;
}

.glitch-enter.entering {
    opacity: 1;
    animation: block-glitch 0.3s steps(3);
}

.glitch-enter.entered {
    opacity: 1;
}

@keyframes block-glitch {
    0% { transform: translateX(-4px); }
    33% { transform: translateX(4px); }
    66% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

/* =============================================
   Footer
   ============================================= */

#site-footer {
    padding: 4rem 2rem;
    text-align: center;
    background: #0E0818;
}

.footer-text {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FF4D9E;
    margin-bottom: 0.5rem;
}

.footer-sub {
    font-size: 0.85rem;
    color: #9888B0;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 768px) {
    #discourse .broken-block,
    #theater .broken-block,
    #voices .broken-block {
        grid-column: 1 / -1 !important;
        transform: rotate(0) !important;
        margin-top: 1rem !important;
    }

    #ghost-trail {
        display: none;
    }
}
