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

:root {
    font-size: 100%;

    --size-h1: 1.25rem;
    --size-body: 1rem;
    --size-meta: 0.75rem;
    --size-small: 0.625rem;

    --ls-wide: 0.25em;
    --ls-normal: 0.1em;
    --ls-tight: -0.01em;

    --lh-tight: 1.2;
    --lh-normal: 1.6;

    --color-bg: #0d1013;
    --color-text: #f1f1f1;
    --color-point: #e63946;
    --color-point-sub: #a8dadc;
    
    --op-high: rgba(241, 241, 241, 0.85);
    --op-mid: rgba(241, 241, 241, 0.5);
    --op-low: rgba(241, 241, 241, 0.15);
    --op-ghost: rgba(241, 241, 241, 0.05);

    --color-border: rgba(255, 255, 255, 0.06);
    --color-nav-bg: rgba(13, 16, 19, 0.95);
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
}

.top-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border); 
    background: var(--color-nav-bg);
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: baseline;
    gap: 48px;
}

.logo {
    font-size: var(--size-h1);
    font-weight: 800;
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    opacity: 0.6;
    letter-spacing: var(--ls-wide);
}

.mode-switch {
    display: flex;
    gap: 8px;
}

button {
    background: transparent !important;
    border: 1px solid var(--op-low);
    color: var(--op-mid);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--size-meta);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: var(--ls-normal);
    transition: all 0.2s ease;
}

button:hover {
    background-color: var(--op-ghost);
    color: var(--color-text);
    border-color: var(--op-high);
}

body button.active {
    background-color: transparent !important;
    color: var(--color-point) !important;
    border-color: var(--color-point) !important;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.15);
    border-width: 1px;
}

#btn-about {
    border: none;
    color: var(--color-dim);
    font-size: var(--size-small);
    letter-spacing: var(--ls-normal);
}

button:hover {
    border-color: rgba(255, 255, 255, 0.8);
    color: var(--color-text)
}

main {
    padding-top: 80px;
}

.hidden {
    display: none !important;
}

#system-guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tunneling-out {
    animation: typographyTunnel 1.2s cubic-bezier(0.7, 0, 0.3, 1) forwards;
    pointer-events: none;
}

@keyframes typographyTunnel {
    0% {
        transform: scale(1);
        filter: blur(0px);
        opacity: 1;
    }
    100% {
        transform: scale(15);
        filter: blur(10px);
        opacity: 0;
    }
}

.guide-text {
    position: absolute;
    color: var(--color-text);
    font-size: var(--size-body);
    line-height: var(--lh-tight);
    font-weight: 300;
    text-align: center;
    opacity: 0;
    letter-spacing: 0.05em;
    transform: translateZ(-200px) translateY(0); 
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-text.show {
    opacity: 1;
    transform: translateZ(0) translateY(0);
}

.guide-text.fade-out {
    animation: fadeOutUp 0.8s forwards;
}

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

@keyframes fadeOutUp {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

#grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1px;
    background-color: #333;
    border-bottom: 1px solid #333;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #14181c;
    border: 1px solid var(--color-border);
    padding: 3rem;
    max-width: 600px;
    position: relative;
}

.modal-content p {
    font-size: var(--size-body);
    font-weight: 400;
    line-height: var(--lh-normal);
    color: var(--op-high);
    word-break: keep-all;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
}

.content-section {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: #000;
}

.content-section.hidden {
    display: none !important;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

button.active {
    background-color: var(--color-point);
    color: var(--color-text);
    border-color: var(--color-point);
}

#section-landing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
}

#landing-frame {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto; 
}

#section-trace {
    z-index: 50;
}

#section-archive {
    z-index: 10;
}