/* ===================================================
   SMIGGY.CO.UK — Styles
   Rainhill Dashboard + Bento Grid + Retro Terminal
   =================================================== */

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

:root {
    --bg: #0a0a0f;
    --bg-card: #141420;
    --bg-card-hover: #1c1c30;
    --text: #e8e8f0;
    --text-muted: #8888a0;
    --accent: #6c63ff;
    --accent-glow: rgba(108, 99, 255, 0.3);
    --green: #00ff88;
    --green-dim: #00cc6a;
    --orange: #ff8c42;
    --red: #ff4757;
    --pink: #ff6b9d;
    --yellow: #ffd93d;
    --cyan: #00d2ff;
    --border: rgba(255, 255, 255, 0.06);
    --radius: 16px;
    --radius-sm: 10px;
    --font-main: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;
    --font-terminal: 'VT323', 'Courier New', monospace;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--cyan);
}

.hidden {
    display: none !important;
}

/* --- Rocket Scroll Progress --- */
#rocket-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.03);
}

#rocket-track {
    position: relative;
    height: 100%;
    width: 100%;
}

#rocket-trail {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--cyan), var(--green));
    transition: width 0.1s ease-out;
    box-shadow: 0 0 12px var(--accent-glow);
}

#rocket-engine {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    z-index: 10;
    transition: left 0.1s ease-out;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* --- Terminal Mode Toggle --- */
#terminal-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--green);
    background: var(--bg);
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
}

#terminal-toggle:hover {
    background: var(--green);
    color: var(--bg);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.35);
    transform: scale(1.1);
}

/* --- HERO --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.hero-bg-text {
    position: absolute;
    font-size: clamp(15rem, 35vw, 40rem);
    font-weight: 700;
    color: rgba(108, 99, 255, 0.04);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    line-height: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2rem;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.02);
}

.hero-greeting {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.hero-name {
    display: block;
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent), var(--cyan), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.hero-scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
    opacity: 0.6;
    animation: fadeInUp 2s ease infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

@keyframes fadeInUp {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(8px); }
}

/* --- Sections --- */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 3rem;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: rgba(108, 99, 255, 0.2);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--green);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 1.5rem;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-2px);
    border-color: rgba(108, 99, 255, 0.15);
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-medium {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-small {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bento-love .bento-header { color: var(--green); }
.bento-love { border-left: 3px solid var(--green); }

.bento-hate .bento-header { color: var(--red); }
.bento-hate { border-left: 3px solid var(--red); }

.bento-fact .bento-header { color: var(--yellow); }
.bento-fact { border-left: 3px solid var(--yellow); }

.bento-interests .bento-header { color: var(--cyan); }
.bento-interests { border-left: 3px solid var(--cyan); }

/* --- Fact Carousel --- */
.fact-carousel {
    position: relative;
    min-height: 80px;
}

.fact-slides {
    position: relative;
    overflow: hidden;
    min-height: 70px;
}

.fact-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    pointer-events: none;
}

.fact-slide.active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.fact-slide.exit-left {
    opacity: 0;
    transform: translateX(-30px);
}

.fact-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.fact-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fact-btn:hover {
    background: rgba(255, 217, 61, 0.1);
    border-color: var(--yellow);
    color: var(--yellow);
}

.fact-counter {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.6;
    margin-left: 8px;
}

.bento-roots .bento-header { color: var(--orange); }
.bento-roots { border-left: 3px solid var(--orange); }

.bento-quote .bento-header { color: var(--pink); }
.bento-quote { border-left: 3px solid var(--pink); }

.bento-list {
    list-style: none;
    padding: 0;
}

.bento-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.bento-list li:last-child {
    border-bottom: none;
}

.bento-list li:hover {
    color: var(--text);
}

.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent);
    transition: all 0.2s ease;
}

.tag:hover {
    background: rgba(108, 99, 255, 0.2);
    border-color: var(--accent);
}

.tag a {
    color: inherit;
    text-decoration: none;
}

.bento-card blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--pink);
    line-height: 1.6;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- Spotify Now Playing Widget --- */
.bento-spotify { border-left: 3px solid #1DB954; }
.bento-spotify .bento-header { color: #1DB954; }

.spotify-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 80px;
}

.spotify-idle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.spotify-icon-idle {
    font-size: 1.5rem;
    opacity: 0.5;
}

.spotify-album-art {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.spotify-track-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.spotify-track-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-track-name a {
    color: var(--text);
    text-decoration: none;
}

.spotify-track-name a:hover {
    color: #1DB954;
}

.spotify-artist-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.spotify-album-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.spotify-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.spotify-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1DB954;
    flex-shrink: 0;
}

.spotify-status-dot.playing {
    animation: spotifyPulse 1.5s ease-in-out infinite;
}

.spotify-status-dot.paused {
    background: var(--text-muted);
}

.spotify-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.spotify-progress-fill {
    height: 100%;
    background: #1DB954;
    border-radius: 2px;
    transition: width 1s linear;
}

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

.spotify-disclaimer {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.6;
    margin-top: 10px;
}

/* --- Magic 8-Ball --- */
.bento-8ball .bento-header { color: #b44dff; }
.bento-8ball { border-left: 3px solid #b44dff; }

.magic-8ball {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.ball-outer {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #333, #0a0a0a);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 -2px 6px rgba(255, 255, 255, 0.05);
    position: relative;
}

.ball-outer:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(180, 77, 255, 0.3), inset 0 -2px 6px rgba(255, 255, 255, 0.05);
}

.ball-outer:active {
    transform: scale(0.95);
}

.ball-inner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1a1a6e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.ball-number {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.ball-answer {
    font-size: 0.85rem;
    color: #b44dff;
    font-weight: 600;
    text-align: center;
    min-height: 1.5em;
    transition: opacity 0.3s ease;
}

.ball-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.ball-shake {
    animation: ballShake 0.5s ease;
}

@keyframes ballShake {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-12deg); }
    40% { transform: rotate(10deg); }
    60% { transform: rotate(-6deg); }
    80% { transform: rotate(4deg); }
}

/* --- Retro Visitor Counter --- */
.visitor-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.counter-label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.counter-display {
    display: flex;
    gap: 4px;
}

.counter-digit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 38px;
    background: #0c0c1a;
    border: 1px solid #333;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--green);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.counter-since {
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* --- Konami Code CRT Easter Egg --- */
.konami-active {
    animation: crtFlicker 0.15s ease;
}

.konami-active body,
body.konami-active {
    background: #001a00 !important;
}

body.konami-active .hero-name {
    background: none !important;
    -webkit-text-fill-color: #00ff41 !important;
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41;
}

body.konami-active .section-title {
    background: none !important;
    -webkit-text-fill-color: #00ff41 !important;
}

body.konami-active .stat-number {
    color: #00ff41 !important;
    text-shadow: 0 0 8px #00ff41;
}

body.konami-active .bento-card,
body.konami-active .eco-card,
body.konami-active .stat-card {
    background: #001a00 !important;
    border-color: #00ff41 !important;
}

body.konami-active .bento-header,
body.konami-active .eco-name {
    color: #00ff41 !important;
}

body.konami-active .bento-list li,
body.konami-active .eco-desc,
body.konami-active .stat-label,
body.konami-active p,
body.konami-active li {
    color: #00cc33 !important;
}

body.konami-active #footer {
    border-color: #00ff41 !important;
}

body.konami-active .counter-digit {
    background: #001a00 !important;
    border-color: #00ff41 !important;
    color: #00ff41 !important;
}

body.konami-active::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99997;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 3px
    );
}

@keyframes crtFlicker {
    0% { opacity: 0.8; }
    50% { opacity: 0.95; }
    100% { opacity: 1; }
}

#konami-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99998;
    background: #001a00;
    border: 2px solid #00ff41;
    border-radius: 8px;
    padding: 12px 24px;
    font-family: var(--font-terminal);
    font-size: 1.1rem;
    color: #00ff41;
    text-shadow: 0 0 8px #00ff41;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

#konami-banner.show {
    opacity: 1;
}

/* --- Ecosystem Grid --- */
.eco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.eco-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.eco-card::after {
    content: '→';
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-8px);
}

.eco-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(108, 99, 255, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    color: var(--text);
}

.eco-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.eco-main {
    border: 1px solid rgba(108, 99, 255, 0.3);
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.08), rgba(0, 210, 255, 0.05));
}

.eco-donations {
    border: 1px solid rgba(0, 255, 136, 0.3);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.08), rgba(0, 210, 255, 0.05));
}

.eco-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.eco-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.eco-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.eco-badge {
    display: inline-block;
    margin-top: 1rem;
    padding: 4px 12px;
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 100px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
}

/* --- Footer --- */
#footer {
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 24px;
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.badge-icon {
    font-size: 1.2rem;
}

.footer-about {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-about a {
    color: var(--accent);
}

.footer-links {
    margin-bottom: 2rem;
}

.footer-links h3 {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

.footer-links li a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-links li a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.6;
}

.footer-crt {
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

/* --- TERMINAL MODE --- */
#terminal-mode {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: #0c0c0c;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.terminal-window {
    width: 100%;
    max-width: 800px;
    height: 80vh;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #888;
}

.terminal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    font-family: var(--font-terminal);
    font-size: 1.2rem;
    color: var(--green);
    display: flex;
    flex-direction: column;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.ascii-art {
    font-size: 0.55rem;
    line-height: 1.2;
    color: var(--green);
    margin-bottom: 1.5rem;
    white-space: pre;
    overflow-x: auto;
}

.terminal-welcome {
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.terminal-help {
    color: #888;
    margin-bottom: 1rem;
}

.cmd {
    color: var(--yellow);
    font-weight: bold;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 0.5rem;
    border-top: 1px solid #222;
}

.terminal-prompt {
    color: var(--green);
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--green);
    font-family: var(--font-terminal);
    font-size: 1.2rem;
    caret-color: var(--green);
}

.terminal-response {
    margin: 0.75rem 0;
    padding-left: 0;
}

.terminal-response .prompt-echo {
    color: var(--green);
    opacity: 0.6;
}

.terminal-response .response-text {
    color: var(--text);
    white-space: pre-wrap;
    line-height: 1.4;
}

.terminal-response .response-text a {
    color: var(--cyan);
    text-decoration: underline;
}

.terminal-response .response-text a:hover {
    color: var(--yellow);
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bento-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 4rem 1.25rem;
    }

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

    .bento-large,
    .bento-medium,
    .bento-small {
        grid-column: span 1;
        grid-row: span 1;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #terminal-toggle {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 0.85rem;
    }

    .ascii-art {
        font-size: 0.35rem;
    }

    .terminal-body {
        font-size: 1rem;
    }

    .terminal-input {
        font-size: 1rem;
    }

    .hero-name {
        font-size: clamp(3rem, 15vw, 6rem);
    }
}

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

/* --- Accessibility: Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Accessibility: Skip to Content --- */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--accent);
    color: #fff;
    padding: 12px 24px;
    z-index: 99999;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    transition: top 0.2s;
}

.skip-to-content:focus {
    top: 0;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }

    #rocket-progress {
        display: none;
    }
}

/* --- Print Styles --- */
@media print {
    body {
        background: #fff;
        color: #000;
    }

    #rocket-progress,
    #terminal-toggle,
    #terminal-mode,
    .hero-bg-text,
    .hero-scroll-hint,
    .scroll-arrow {
        display: none !important;
    }

    .section {
        page-break-inside: avoid;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #555;
    }

    .eco-card,
    .stat-card,
    .bento-card {
        border: 1px solid #ccc;
        background: #f9f9f9;
    }
}
