/* ========================================
   simidiots.net - Vintage Computing Scrapbook
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --forest-terminal: #1a2e1f;
    --amber-crt: #d4a040;
    --leaf-sage: #5a7a58;
    --paper-cream: #f0e8d4;
    --rust-patina: #8a5a3a;
    --olive-depth: #3a4a30;
    --grain-white: #e8e0d0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Crimson Text', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
    color: var(--paper-cream);
    background-color: var(--forest-terminal);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: clamp(28px, 5vw, 56px);
}

h3 {
    font-size: clamp(18px, 2.5vw, 28px);
}

h4 {
    font-size: clamp(16px, 2vw, 22px);
}

p {
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

em {
    font-weight: 600;
    font-style: italic;
}

/* --- VT323 Monospace Label Style --- */
.vt323-label {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 14px;
    color: var(--amber-crt);
    letter-spacing: 1px;
    margin-bottom: 1.5em;
    opacity: 0.8;
}

/* ========================================
   HERO SECTION - CRT Monitor
   ======================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--forest-terminal);
    overflow: hidden;
    opacity: 0;
    animation: heroFadeIn 600ms ease-out forwards;
}

@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-bg-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(90, 122, 88, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(90, 122, 88, 0.06) 0%, transparent 50%);
    z-index: 1;
}

/* CRT Monitor Frame */
.crt-monitor {
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: crtAppear 900ms ease-out 600ms forwards;
}

@keyframes crtAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.crt-bezel {
    background: linear-gradient(145deg, #2a3a28, #1a2a18);
    border: 4px solid var(--olive-depth);
    border-radius: 24px;
    padding: 30px 36px 20px;
    box-shadow:
        0 0 0 2px rgba(212, 160, 64, 0.15),
        inset 0 2px 20px rgba(0, 0, 0, 0.5),
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(212, 160, 64, 0.05);
    max-width: 700px;
    width: 90vw;
}

.crt-screen {
    position: relative;
    background: #0a0f08;
    border-radius: 12px;
    padding: 40px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(26, 46, 31, 0.5);
}

.crt-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.05) 2px,
        rgba(0, 0, 0, 0.05) 4px
    );
    pointer-events: none;
    z-index: 10;
}

.crt-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
    z-index: 11;
}

.crt-content {
    position: relative;
    z-index: 5;
    text-align: center;
}

.typewriter {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: clamp(32px, 6vw, 64px);
    color: var(--amber-crt);
    text-shadow:
        0 0 10px rgba(212, 160, 64, 0.6),
        0 0 20px rgba(212, 160, 64, 0.3),
        0 0 40px rgba(212, 160, 64, 0.1);
    letter-spacing: 4px;
}

.typewriter-cursor {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: clamp(32px, 6vw, 64px);
    color: var(--amber-crt);
    text-shadow: 0 0 10px rgba(212, 160, 64, 0.6);
    animation: cursorBlink 800ms step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.crt-label {
    text-align: center;
    margin-top: 12px;
}

.crt-label-text {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 12px;
    color: var(--rust-patina);
    letter-spacing: 3px;
    opacity: 0.7;
}

/* Scroll Hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 3;
    opacity: 0;
    animation: scrollHintAppear 800ms ease-out 3200ms forwards;
}

@keyframes scrollHintAppear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 0.7;
        transform: translateX(-50%) translateY(0);
    }
}

.scroll-text {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 13px;
    color: var(--amber-crt);
    letter-spacing: 3px;
    display: block;
    margin-bottom: 8px;
}

.scroll-arrow {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ========================================
   COLLAGE SECTIONS
   ======================================== */
.collage-section {
    position: relative;
    min-height: 100vh;
    padding: 80px 5vw;
    overflow: hidden;
}

.collage-section.section-alt {
    background-color: var(--olive-depth);
}

/* Background texture layers */
.section-bg-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.collage-section:nth-child(odd) .section-bg-texture {
    background:
        radial-gradient(circle at 30% 20%, rgba(90, 122, 88, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(138, 90, 58, 0.04) 0%, transparent 40%);
}

.collage-section:nth-child(even) .section-bg-texture {
    background:
        radial-gradient(circle at 60% 40%, rgba(212, 160, 64, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 20% 70%, rgba(90, 122, 88, 0.05) 0%, transparent 40%);
}

/* Collage Layers */
.collage-layer {
    position: relative;
}

.collage-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.06;
    pointer-events: none;
}

.collage-mid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.collage-fg {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

/* Circuit Pattern Background */
.circuit-pattern {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(90deg, var(--leaf-sage) 1px, transparent 1px),
        linear-gradient(var(--leaf-sage) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

/* Nature Texture Background */
.nature-texture {
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25% 25%, var(--leaf-sage) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, var(--leaf-sage) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, var(--leaf-sage) 0.5px, transparent 0.5px);
    background-size: 40px 40px, 40px 40px, 20px 20px;
    opacity: 0.5;
}

/* Vintage Photo Fragments */
.vintage-photo-fragment {
    position: absolute;
    pointer-events: auto;
    transition: transform 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
    filter: sepia(0.2) contrast(0.9);
}

.photo-inner {
    border: 3px solid var(--grain-white);
    box-shadow:
        2px 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(138, 90, 58, 0.2);
    transform: rotate(var(--rotation, 0deg));
    overflow: hidden;
}

.retro-illustration {
    display: block;
    width: 100%;
    height: auto;
}

.fragment-1 {
    --rotation: -4deg;
    top: 15%;
    right: 5%;
    width: clamp(120px, 20vw, 200px);
    opacity: 0.4;
    mix-blend-mode: multiply;
}

.fragment-2 {
    --rotation: 6deg;
    bottom: 20%;
    left: 3%;
    width: clamp(100px, 16vw, 160px);
    opacity: 0.35;
    mix-blend-mode: multiply;
}

.fragment-3 {
    --rotation: -3deg;
    top: 10%;
    left: 5%;
    width: clamp(110px, 18vw, 180px);
    opacity: 0.4;
    mix-blend-mode: multiply;
}

.fragment-4 {
    --rotation: 2deg;
    top: 8%;
    right: 3%;
    width: clamp(130px, 22vw, 220px);
    opacity: 0.45;
    mix-blend-mode: multiply;
}

.fragment-5 {
    --rotation: -5deg;
    top: 12%;
    right: 8%;
    width: clamp(90px, 14vw, 140px);
    opacity: 0.4;
    mix-blend-mode: multiply;
}

.fragment-6 {
    --rotation: 3deg;
    bottom: 15%;
    left: 5%;
    width: clamp(100px, 16vw, 160px);
    opacity: 0.35;
    mix-blend-mode: multiply;
}

/* ========================================
   BADGES - Vintage Navigation
   ======================================== */
.badge-nav {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 300ms ease, transform 300ms ease;
}

.badge-nav:hover {
    opacity: 1;
    transform: scale(1.05);
}

.badge-svg {
    width: 100%;
    height: 100%;
}

.badge-shield {
    height: auto;
}

.badge-ribbon {
    height: auto;
}

/* ========================================
   SECTION CONTENT
   ======================================== */
.section-heading {
    color: var(--amber-crt);
    margin-bottom: 0.5em;
    text-align: center;
    text-shadow: 0 0 20px rgba(212, 160, 64, 0.15);
}

.section-content {
    width: 100%;
    transition: transform 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.content-card {
    background: rgba(26, 46, 31, 0.6);
    border: 1px solid rgba(212, 160, 64, 0.15);
    border-radius: 8px;
    padding: clamp(24px, 4vw, 48px);
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.section-alt .content-card {
    background: rgba(26, 46, 31, 0.7);
}

/* ========================================
   TEAM GRID
   ======================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.team-member {
    background: rgba(58, 74, 48, 0.3);
    border: 1px solid rgba(212, 160, 64, 0.1);
    border-radius: 6px;
    padding: 24px;
    transition: border-color 300ms ease;
}

.team-member:hover {
    border-color: rgba(212, 160, 64, 0.3);
}

.member-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--amber-crt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--amber-crt);
    margin-bottom: 12px;
}

.team-member h3 {
    color: var(--paper-cream);
    margin-bottom: 4px;
    font-size: clamp(16px, 2vw, 20px);
}

.member-role {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 13px;
    color: var(--amber-crt);
    opacity: 0.7;
    margin-bottom: 12px;
}

/* ========================================
   EXPERIMENT LOG
   ======================================== */
.experiment-log {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 16px;
}

.log-entry {
    background: rgba(10, 26, 15, 0.5);
    border-left: 3px solid var(--amber-crt);
    padding: 20px 24px;
    border-radius: 0 6px 6px 0;
    transition: border-color 300ms ease, background 300ms ease;
}

.log-entry:hover {
    background: rgba(10, 26, 15, 0.7);
    border-left-color: var(--paper-cream);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.log-id {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 14px;
    color: var(--amber-crt);
    letter-spacing: 2px;
}

.log-date {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 13px;
    color: var(--rust-patina);
}

.log-entry h3 {
    color: var(--paper-cream);
    margin-bottom: 8px;
    font-size: clamp(16px, 2.2vw, 22px);
}

.log-status {
    display: inline-block;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 3px;
    margin-top: 8px;
}

.status-success {
    color: var(--leaf-sage);
    background: rgba(90, 122, 88, 0.15);
    border: 1px solid rgba(90, 122, 88, 0.3);
}

.status-warning {
    color: var(--amber-crt);
    background: rgba(212, 160, 64, 0.1);
    border: 1px solid rgba(212, 160, 64, 0.25);
}

.status-info {
    color: var(--rust-patina);
    background: rgba(138, 90, 58, 0.15);
    border: 1px solid rgba(138, 90, 58, 0.3);
}

/* ========================================
   ARTIFACT GRID
   ======================================== */
.artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.artifact-item {
    background: rgba(58, 74, 48, 0.25);
    border: 1px solid rgba(212, 160, 64, 0.1);
    border-radius: 6px;
    padding: 20px;
    transition: transform 300ms cubic-bezier(0.25, 0.1, 0.25, 1), border-color 300ms ease;
}

.artifact-item:hover {
    border-color: rgba(212, 160, 64, 0.3);
}

.artifact-icon {
    margin-bottom: 12px;
    opacity: 0.8;
}

.artifact-item h4 {
    color: var(--paper-cream);
    margin-bottom: 8px;
    font-size: clamp(15px, 1.8vw, 19px);
}

.artifact-desc {
    font-size: clamp(13px, 1.3vw, 15px);
    color: var(--grain-white);
    opacity: 0.85;
    line-height: 1.6;
}

.artifact-date {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 12px;
    color: var(--rust-patina);
    opacity: 0.7;
    display: block;
    margin-top: 8px;
}

/* ========================================
   LEGACY SECTION TERMINAL
   ======================================== */
.legacy-section {
    min-height: auto;
    padding-bottom: 40px;
}

.crt-terminal {
    position: relative;
    background: #0a0f08;
    border: 2px solid var(--olive-depth);
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
    overflow: hidden;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 4px 20px rgba(0, 0, 0, 0.3);
}

.terminal-content {
    position: relative;
    z-index: 5;
}

.terminal-line {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 16px;
    color: var(--amber-crt);
    text-shadow: 0 0 6px rgba(212, 160, 64, 0.4);
    margin-bottom: 4px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(4px);
    animation: terminalLineAppear 400ms ease-out forwards;
}

.terminal-line:nth-child(1) { animation-delay: 0ms; }
.terminal-line:nth-child(2) { animation-delay: 200ms; }
.terminal-line:nth-child(3) { animation-delay: 400ms; }
.terminal-line:nth-child(4) { animation-delay: 600ms; }
.terminal-line:nth-child(5) { animation-delay: 800ms; }
.terminal-line:nth-child(6) { animation-delay: 1000ms; }
.terminal-line:nth-child(7) { animation-delay: 1200ms; }

@keyframes terminalLineAppear {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blink-line {
    animation: terminalLineAppear 400ms ease-out 1200ms forwards, cursorBlink 800ms step-end 1600ms infinite;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    position: relative;
    z-index: 5;
    background: var(--forest-terminal);
    border-top: 1px solid rgba(212, 160, 64, 0.1);
    padding: 40px 5vw;
    text-align: center;
}

.footer-text {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 14px;
    color: var(--amber-crt);
    opacity: 0.6;
    letter-spacing: 1px;
}

.footer-sub {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 12px;
    color: var(--rust-patina);
    opacity: 0.5;
    margin-top: 4px;
    letter-spacing: 2px;
}

/* ========================================
   SCROLL-TRIGGERED ANIMATIONS
   ======================================== */
.collage-section .collage-fg {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.collage-section.in-view .collage-fg {
    opacity: 1;
    transform: translateY(0);
}

.collage-section .collage-mid .vintage-photo-fragment {
    opacity: 0;
    transition: opacity 1000ms ease-out 200ms;
}

.collage-section.in-view .collage-mid .vintage-photo-fragment {
    opacity: 1;
}

/* Restore individual fragment opacities once in view */
.collage-section.in-view .fragment-1 { opacity: 0.4; }
.collage-section.in-view .fragment-2 { opacity: 0.35; }
.collage-section.in-view .fragment-3 { opacity: 0.4; }
.collage-section.in-view .fragment-4 { opacity: 0.45; }
.collage-section.in-view .fragment-5 { opacity: 0.4; }
.collage-section.in-view .fragment-6 { opacity: 0.35; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .crt-bezel {
        padding: 20px 24px 16px;
        border-radius: 16px;
    }

    .crt-screen {
        padding: 24px;
        min-height: 140px;
    }

    .collage-section {
        padding: 60px 4vw;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .artifact-grid {
        grid-template-columns: 1fr;
    }

    .badge-nav {
        width: 60px;
        height: 60px;
    }

    .vintage-photo-fragment {
        display: none;
    }

    .log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .crt-bezel {
        padding: 16px 16px 12px;
        border-radius: 12px;
    }

    .crt-screen {
        padding: 16px;
        min-height: 100px;
        border-radius: 8px;
    }

    .content-card {
        padding: 20px;
    }

    .log-entry {
        padding: 16px;
    }

    .artifact-item {
        padding: 16px;
    }
}
