:root {
    color-scheme: light;
    --bg-main: #f5f3f0;
    --bg-accent: #faf8f5;
    --text-primary: #2c2c2c;
    --text-secondary: #666;
    --border-color: #333;
    --accent-brown: #8b7355;
    --accent-rust: #a0522d;
    --accent-olive: #6b7e54;
    --accent-purple: #5a4a6f;
    --accent-light: #d4a574;
}

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-primary);
    background: var(--bg-main);
    line-height: 1.65;
    font-size: 16px;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: none;
    opacity: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: none;
    opacity: 0;
}

.container {
    position: relative;
    z-index: 1;
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    margin: 0 0 32px 0;
    max-width: 100%;
    border-bottom: 3px solid var(--text-primary);
    padding-bottom: 14px;
}

.nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    background: transparent;
    border: 3px solid var(--text-primary);
    border-radius: 0;
    padding: 6px 12px;
    font-size: 0.75rem;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    box-shadow: none;
    font-family: Georgia, serif;
    margin-right: 4px;
    margin-bottom: 4px;
    transform: rotate(-1deg);
}

.nav-chip:nth-child(2) { transform: rotate(0.5deg); }
.nav-chip:nth-child(3) { transform: rotate(-1.5deg); }
.nav-chip:nth-child(4) { transform: rotate(1deg); }

.nav-chip:hover {
    transform: rotate(0deg) translateY(-2px);
    border-color: var(--accent-rust);
    color: var(--text-primary);
    box-shadow: none;
}

.nav-chip.current {
    color: #f5f3f0;
    border-color: var(--accent-brown);
    background: var(--accent-brown);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
}

.cyber-card {
    position: relative;
    overflow: visible;
    transition: all 0.2s ease;
    border: 2px solid var(--text-primary);
    border-radius: 0;
    background: var(--bg-accent);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.12);
    transform: none;
    padding: 20px;
    margin: 16px 0;
}

.cyber-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: none;
    opacity: 0;
    pointer-events: none;
}

.cyber-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: none;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: normal;
}

.cyber-card:hover {
    transform: translateY(-3px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.15);
}

.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 0;
    pointer-events: none;
    background: none;
    filter: none;
    z-index: 0;
    opacity: 0;
    display: none;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 18px;
    padding: 8px 12px;
    border-radius: 0;
    border: 2px solid var(--text-primary);
    background: var(--bg-accent);
    color: var(--text-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    box-shadow: none;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 0;
    background: var(--text-primary);
    box-shadow: none;
    animation: none;
}

h1, h2, h3, strong {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    margin: 24px 0 16px 0;
}

h1 {
    font-size: 2.8rem;
    line-height: 1.15;
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: 3px 3px 0 rgba(139, 115, 85, 0.15);
    text-align: left;
    margin: 32px 0 24px 0;
    font-family: "Times New Roman", serif;
    font-style: italic;
    transform: rotate(-0.5deg);
}

h2 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 4px solid var(--text-primary);
    padding-bottom: 8px;
    margin-top: 28px;
    font-family: "Times New Roman", serif;
    position: relative;
}

h2::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -8px;
    width: 8px;
    height: 20px;
    background: var(--accent-brown);
}

h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-rust);
    font-family: Georgia, serif;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    background: none;
    mix-blend-mode: normal;
    animation: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1); opacity: 1; }
}

@keyframes glitch-burst {
    0%, 100% { transform: translate(0, 0); opacity: 0; }
    20% { transform: translate(0, 0); opacity: 0; }
}

@keyframes panel-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(0); }
}

@keyframes scanline-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 1; }
}

@keyframes terminal-pulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: none; }
}

@keyframes archive-drift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(0); }
}

@keyframes archive-shift {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes static-flicker {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(0, 0); }
}

body.terminal-active .cyber-card::after {
    animation: none;
}

body.terminal-active .nav-chip {
    animation: none;
}

body.terminal-active .glitch-text {
    animation: none;
}

@media (max-width: 600px) {
    .top-nav {
        justify-content: flex-start;
    }

    .nav-chip {
        font-size: 0.7rem;
    }
}

/* Additional refinements for coherent design */
a {
    color: var(--accent-rust);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-rust);
}

ul, ol {
    padding-left: 28px;
}

li {
    margin-bottom: 10px;
    line-height: 1.7;
}
    line-height: 1.7;
}
