/* 계엄령.quest - Neon Museum Exhibition */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --exhibit-dark: #0C0C18;
    --tile-surface: #1A1A28;
    --neon-green: #40E8A0;
    --neon-blue: #4080F0;
    --neon-red: #F04060;
    --mixed-media: #282840;
    --text-light: #F0F0F8;
    --text-body: #A8A8C0;
}

body {
    background: var(--exhibit-dark);
    color: var(--text-light);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    overflow-x: hidden;
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.aurora-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}
.aurora-1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(64, 232, 160, 0.04), transparent); top: -10%; left: 10%; animation: auroraDrift1 30s ease-in-out infinite alternate; }
.aurora-2 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(64, 128, 240, 0.035), transparent); top: 30%; right: 5%; animation: auroraDrift2 35s ease-in-out infinite alternate; }
.aurora-3 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(240, 64, 96, 0.03), transparent); bottom: 5%; left: 25%; animation: auroraDrift3 40s ease-in-out infinite alternate; }
@keyframes auroraDrift1 { from { transform: translate(0, 0); } to { transform: translate(40px, 30px); } }
@keyframes auroraDrift2 { from { transform: translate(0, 0); } to { transform: translate(-30px, -40px); } }
@keyframes auroraDrift3 { from { transform: translate(0, 0); } to { transform: translate(20px, -25px); } }

/* Exhibit Header */
.exhibit-header {
    text-align: center;
    padding: 5rem 2rem 3rem;
    position: relative;
    z-index: 2;
}
.exhibit-title {
    font-family: 'Do Hyeon', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    opacity: 0;
    animation: titleFade 0.5s ease forwards 0.3s;
}
.exhibit-sub {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--neon-green);
    display: block;
    opacity: 0;
    animation: titleFade 0.5s ease forwards 0.6s;
}
@keyframes titleFade { to { opacity: 1; } }

/* Masonry Grid */
.masonry-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    display: flex;
    gap: 16px;
    position: relative;
    z-index: 2;
}
.masonry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Masonry Tiles */
.masonry-tile {
    background: var(--tile-surface);
    padding: 24px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: border-color 0.2s ease;
    border-bottom: 1px solid transparent;
}
.masonry-tile.visible {
    animation: springEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes springEnter {
    0% { opacity: 0; transform: translateY(30px); }
    70% { opacity: 1; transform: translateY(-4px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Tile Heights */
.tile-tall { min-height: 400px; }
.tile-medium { min-height: 280px; }
.tile-short { min-height: 160px; }

/* Neon Border Colors */
.neon-green { border-bottom-color: rgba(64, 232, 160, 0.4); }
.neon-blue { border-bottom-color: rgba(64, 128, 240, 0.4); }
.neon-red { border-bottom-color: rgba(240, 64, 96, 0.4); }
.masonry-tile:hover.neon-green { border-bottom-color: var(--neon-green); }
.masonry-tile:hover.neon-blue { border-bottom-color: var(--neon-blue); }
.masonry-tile:hover.neon-red { border-bottom-color: var(--neon-red); }

/* Neon Border Pulse (active row) */
.masonry-tile.active-row {
    animation: neonPulse 2s ease-in-out infinite;
}
@keyframes neonPulse {
    0%, 100% { border-bottom-width: 1px; }
    50% { border-bottom-width: 2px; }
}

/* Document Fragments */
.doc-fragment {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, var(--mixed-media), var(--tile-surface));
    transform: rotate(2deg);
    z-index: -1;
    transition: transform 0.2s ease;
}
.masonry-tile:hover .doc-fragment {
    transform: rotate(2deg) translate(4px, -4px);
}

/* Typography */
.tile-title {
    font-family: 'Do Hyeon', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.tile-body {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}
.tile-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--neon-green);
    display: block;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    z-index: 2;
}
.footer-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--neon-green);
}

@media (max-width: 768px) {
    .masonry-grid { flex-direction: column; }
    .masonry-col { flex: none; }
    .tile-tall { min-height: 250px; }
    .tile-medium { min-height: 200px; }
}
