/* ===================================
   PUMPFILES — CLASSIFIED DOSSIER SYSTEM
   =================================== */

/* === ROOT VARIABLES === */
:root {
    /* Colors - Classified Archive Palette */
    --color-bg: #ffffff;
    /* Pure White */
    --color-bg-contrast: #ffffff;
    --color-bg-elevated: #ffffff;
    /* For cards/compatibility */
    --color-text: #111111;
    /* Carbon Black */
    --color-text-muted: #555555;
    --color-accent: #cc0000;
    /* Red Stamp / Alert */
    --color-redaction: #0d0d0d;

    --color-divider: #d1cdc0;
    --color-divider-subtle: #e0dcd0;
    --color-grid: #e0dcd0;

    /* Typography */
    --font-primary: 'Courier New', Courier, 'JetBrains Mono', monospace;
    --font-mono: 'Courier New', Courier, 'JetBrains Mono', monospace;
    --font-sans: 'Courier New', Courier, 'JetBrains Mono', monospace;
    /* Enforce typewriter style everywhere */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Layout */
    --max-width: 1400px;
    --nav-height: 80px;

    /* Modern Tweaks */
    --shadow-sharp: 4px 4px 0px var(--color-text);
    --shadow-sharp-hover: 6px 6px 0px var(--color-text);
    --border-width: 2px;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-kerning: none;
    /* Typewriter feel */
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98)),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E");
    min-height: 100vh;
}

::selection {
    background: var(--color-accent);
    color: var(--color-bg);
}

a {
    transition: all 0.2s ease-in-out;
}

/* === UTILITIES & DECORATION === */
.redacted {
    background-color: var(--color-redaction);
    color: var(--color-redaction);
    padding: 0 4px;
    user-select: none;
    cursor: help;
    transition: all 0.2s ease;
}

.redacted:hover {
    background-color: transparent;
    color: var(--color-text);
    text-decoration: line-through;
}

.stamp {
    display: inline-block;
    color: var(--color-accent);
    border: 3px solid var(--color-accent);
    padding: 0.5rem 1rem;
    font-weight: 900;
    font-size: 1.5rem;
    text-transform: uppercase;
    transform: rotate(-12deg);
    letter-spacing: 0.1em;
    opacity: 0.8;
    mix-blend-mode: multiply;
    mask-image: url("data:image/svg+xml,%3Csvg width='200' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='0.5' filter='url(%23noise)'/%3E%3C/svg%3E");
    mask-mode: alpha;
}

.top-secret-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 15vw;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
    font-family: Arial, sans-serif;
    /* Standard stencil feel */
    border: 10px solid rgba(0, 0, 0, 0.03);
    padding: 2rem;
}

/* === NAVIGATION === */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: rgba(255, 255, 255, 0.85);
    /* Semi-transparent */
    backdrop-filter: blur(12px);
    /* Modern glass effect */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--border-width) solid var(--color-text);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-text);
    text-decoration: none;
}

.nav-logo-text {
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0.2rem 0.5rem;
    font-family: var(--font-primary);
}

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

.nav-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    position: relative;
    padding: 0.2rem 0;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}



/* === LAYOUT UTILS === */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.text-column {
    border-left: 1px solid var(--color-text);
    padding-left: var(--spacing-md);
}

/* === HERO === */
.hero {
    margin-top: var(--nav-height);
    min-height: 90vh;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-text);
    padding: var(--spacing-lg);
}

.hero-visual {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    background-color: #e5e5e5;
    border: 2px solid var(--color-text);
    overflow: hidden;
    filter: contrast(1.2) brightness(1.1) grayscale(100%);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    opacity: 0.9;
}

/* Halftone overlay pattern */
.hero-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #000 2px, transparent 2.5px);
    background-size: 4px 4px;
    opacity: 0.1;
    pointer-events: none;
}

.hero-content h1 {
    font-size: 5rem;
    line-height: 0.9;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

.hero-stamp {
    position: absolute;
    top: 20%;
    right: -10%;
    font-size: 2rem;
    color: var(--color-accent);
    border: 4px solid var(--color-accent);
    padding: 0.5rem 1rem;
    transform: rotate(-15deg);
    font-weight: 900;
    opacity: 0.9;
    mix-blend-mode: multiply;
    z-index: 10;
}

.report-text {
    font-size: 0.85rem;
    text-align: justify;
    margin-bottom: var(--spacing-sm);
    white-space: pre-line;
}

.hero-actions {
    margin-top: var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: var(--border-width) solid var(--color-text);
    font-family: 'JetBrains Mono', monospace;
    /* Tech font */
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text);
    background: var(--color-bg);
    box-shadow: var(--shadow-sharp);
    /* Hard shadow */
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-sharp-hover);
    background: var(--color-text);
    color: var(--color-bg-contrast);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--color-text);
}

/* === FILE GRID === */
.files-section {
    background-color: var(--color-bg-contrast);
    border-top: 1px solid var(--color-text);
}

.file-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    border-bottom: 1px solid var(--color-divider);
    padding: 1.5rem var(--spacing-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    border-left: 0px solid transparent;
    /* Prepare for hover */
}

.file-row:hover {
    background-color: #f4f4f4;
    /* Slightly darker shift */
    border-left: 6px solid var(--color-accent);
    /* Left accent bar */
    padding-left: calc(var(--spacing-sm) + 6px);
    /* Compensate text shift? Or let it shift for effect */
    padding-left: var(--spacing-sm);
    /* Keep text stable, border grows outwards? No, border-left takes space. */
    /* Let's try transform instead for a modern "pop" */
    transform: translateX(4px);
    border-left: 4px solid var(--color-accent);
    box-shadow: -4px 4px 10px rgba(0, 0, 0, 0.05);
}

.file-id {
    font-weight: 700;
    color: var(--color-text-muted);
}

.file-name {
    font-weight: 600;
    text-transform: uppercase;
}

.file-status {
    text-align: right;
    font-size: 0.7rem;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 2px 6px;
    align-self: flex-start;
    justify-self: end;
}

/* === TIMELINE === */
.timeline-entry {
    border-left: 2px solid var(--color-text);
    padding-left: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    position: relative;
    opacity: 1;
    /* Override old fade-in for now */
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--color-text);
}

.timeline-date {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.section-header {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: var(--spacing-lg);
    border-bottom: 4px solid var(--color-text);
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* === FOOTER === */
footer {
    border-top: 4px solid var(--color-text);
    padding: var(--spacing-lg) 0;
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Screen visibility hook */
.screen-transition-overlay {
    pointer-events: none;
    opacity: 0;
}

@media (max-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .top-secret-watermark {
        font-size: 20vw;
    }

    .file-row {
        grid-template-columns: 60px 1fr;
    }

    .file-status {
        display: none;
    }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(50px, 0, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out forwards;
}

.file-row {
    opacity: 0;
    animation: slideInRight 0.5s ease-out forwards;
}

.file-row:nth-child(1) {
    animation-delay: 0.1s;
}

.file-row:nth-child(2) {
    animation-delay: 0.15s;
}

.file-row:nth-child(3) {
    animation-delay: 0.2s;
}

.file-row:nth-child(4) {
    animation-delay: 0.25s;
}

.file-row:nth-child(5) {
    animation-delay: 0.3s;
}

.file-row:nth-child(6) {
    animation-delay: 0.35s;
}

.file-row:nth-child(7) {
    animation-delay: 0.4s;
}

.file-row:nth-child(8) {
    animation-delay: 0.45s;
}

.file-row:nth-child(9) {
    animation-delay: 0.5s;
}

.file-row:nth-child(10) {
    animation-delay: 0.55s;
}

.file-row:nth-child(11) {
    animation-delay: 0.6s;
}

.timeline-entry {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.timeline-entry:nth-child(1) {
    animation-delay: 0.2s;
}

.timeline-entry:nth-child(2) {
    animation-delay: 0.4s;
}

.timeline-entry:nth-child(3) {
    animation-delay: 0.6s;
}

.timeline-entry:nth-child(4) {
    animation-delay: 0.8s;
}

.timeline-entry:nth-child(5) {
    animation-delay: 1.0s;
}

/* === TYPEWRITER EFFECT === */
.typing-active::after {
    content: '_';
    display: inline-block;
    color: var(--color-accent);
    animation: blink 0.8s infinite;
    margin-left: 2px;
}

.typewriter-text {
    visibility: hidden;
    /* Prevent FOUC, JS will reveal */
}