/**
 * MUDlands Portfolio - Retro Terminal Theme
 * Developer project showcase with code highlights
 */

:root {
    --primary: #00ff00;
    --primary-glow: #00ff41;
    --primary-dark: #00cc00;
    --bg-dark: #000000;
    --bg-darker: #050505;
    --bg-panel: rgba(10, 10, 20, 0.95);
    --bg-card: rgba(0, 20, 0, 0.4);
    --accent-cyan: #00ffff;
    --accent-purple: #cc99ff;
    --accent-orange: #ffaa00;
    --accent-yellow: #ffff00;
    --error: #ff4444;
    --combat: #ff6600;
    --success: #00ff88;
    --text-dim: #668866;
    --text-muted: #446644;
    --border: #003300;
    --font-main: 'Courier Prime', 'Courier New', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.scanlines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 1px, transparent 1px, transparent 3px);
}

/* ---- Nav ---- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 40px;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}
.nav.scrolled {
    background: rgba(0,0,0,0.95);
    border-bottom-color: var(--primary);
    box-shadow: 0 2px 20px rgba(0,255,0,0.15);
}
.nav-brand { font-size: 20px; font-weight: bold; color: var(--primary-glow); text-shadow: 0 0 10px var(--primary-glow); }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); text-shadow: 0 0 5px var(--primary); }

/* ---- Hero ---- */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 100px 20px 60px;
    background: radial-gradient(ellipse at center, rgba(0,50,0,0.3) 0%, transparent 70%), var(--bg-dark);
    position: relative;
}
.hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 100px; background: linear-gradient(transparent, var(--bg-dark)); }
.hero-content { position: relative; z-index: 1; }
.hero-ascii { color: var(--primary-glow); font-size: clamp(8px, 2vw, 16px); line-height: 1.2; margin-bottom: 20px; text-shadow: 0 0 20px var(--primary-glow); animation: glow-pulse 3s infinite; }
.hero-label { font-size: 13px; color: var(--accent-orange); text-transform: uppercase; letter-spacing: 4px; margin-bottom: 10px; }
.hero-title { font-size: clamp(18px, 3vw, 30px); color: var(--accent-cyan); margin-bottom: 15px; text-shadow: 0 0 15px rgba(0,255,255,0.5); }
.hero-subtitle { font-size: clamp(12px, 1.3vw, 15px); color: var(--text-dim); max-width: 750px; margin: 0 auto 40px; line-height: 1.8; }
.hero-stats { display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; }
.stat-box { border: 1px solid var(--border); padding: 15px 25px; background: var(--bg-card); min-width: 120px; }
.stat-value { display: block; font-size: 22px; font-weight: bold; color: var(--primary-glow); text-shadow: 0 0 8px var(--primary); }
.stat-label { display: block; font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; margin-top: 5px; }

/* ---- Tech Banner ---- */
.tech-banner { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 15px 0; background: rgba(0,20,0,0.3); }
.tech-scroll { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; padding: 0 20px; font-size: 13px; color: var(--text-dim); letter-spacing: 1px; }
.tech-scroll .sep { color: var(--border); }

/* ---- Sections ---- */
.section { padding: 80px 40px; max-width: 1100px; margin: 0 auto; }
.section-dark { max-width: 100%; background: rgba(0,10,0,0.5); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-title { font-size: 18px; color: var(--accent-cyan); margin-bottom: 40px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.prompt-char { color: var(--primary-glow); text-shadow: 0 0 5px var(--primary); }

/* ---- Overview ---- */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 40px; }
.overview-card { border: 1px solid var(--border); padding: 25px; background: var(--bg-card); opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.overview-card.visible { opacity: 1; transform: translateY(0); }
.overview-card h3 { color: var(--primary-glow); font-size: 15px; margin-bottom: 10px; }
.overview-card p { color: var(--text-dim); font-size: 13px; line-height: 1.8; }

/* ---- Architecture ---- */
.arch-block { margin-bottom: 30px; border: 1px solid var(--border); background: var(--bg-card); padding: 25px; opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.arch-block.visible { opacity: 1; transform: translateY(0); }
.arch-block h3 { color: var(--accent-cyan); font-size: 14px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.arch-ascii { color: var(--accent-cyan); font-size: clamp(9px, 1.2vw, 13px); line-height: 1.3; text-align: center; overflow-x: auto; }
.file-tree { color: var(--text-dim); font-size: 12px; line-height: 1.7; overflow-x: auto; }
.file-tree .comment { color: var(--text-muted); }

/* ---- Code Showcases ---- */
.code-showcase { display: grid; grid-template-columns: 1fr 1.4fr; gap: 25px; margin-bottom: 40px; align-items: start; opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.code-showcase.visible { opacity: 1; transform: translateY(0); }
.code-context h3 { color: var(--primary-glow); font-size: 16px; margin-bottom: 12px; }
.code-context p { color: var(--text-dim); font-size: 12px; line-height: 1.8; margin-bottom: 15px; }
.code-context code { color: var(--accent-orange); background: rgba(255,170,0,0.1); padding: 1px 5px; font-size: 11px; }

.feature-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 10px; padding: 3px 8px; border: 1px solid var(--border); color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

.code-block { border: 1px solid var(--border); background: rgba(0,0,0,0.6); overflow: hidden; }
.code-header { padding: 8px 15px; background: rgba(30,30,30,0.8); border-bottom: 1px solid var(--border); }
.code-file { color: var(--text-muted); font-size: 11px; }
.code-block pre { padding: 15px; overflow-x: auto; font-size: 12px; line-height: 1.6; }
.code-block code { font-family: var(--font-main); }

/* Syntax highlighting */
.kw { color: var(--accent-cyan); }
.cls { color: var(--accent-orange); }
.fn { color: var(--primary-glow); }
.str { color: var(--success); }
.num { color: var(--accent-purple); }
.comment { color: var(--text-muted); font-style: italic; }

/* ---- Terminal Windows ---- */
.terminal-window { border: 1px solid var(--border); background: rgba(0,0,0,0.8); overflow: hidden; margin-bottom: 20px; }
.terminal-header { display: flex; align-items: center; gap: 8px; padding: 10px 15px; background: rgba(30,30,30,0.8); border-bottom: 1px solid var(--border); }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }
.terminal-title { color: var(--text-muted); font-size: 12px; margin-left: 10px; }
.terminal-body { padding: 20px; font-size: 13px; line-height: 1.8; }
.terminal-body.compact { padding: 15px; font-size: 12px; line-height: 1.7; }
.terminal-line { white-space: pre-wrap; }
.terminal-line.system { color: var(--accent-yellow); }
.terminal-line.npc .npc-name, .npc-name { color: var(--accent-purple); font-weight: bold; }
.terminal-line.npc-speech { color: var(--accent-purple); font-style: italic; padding-left: 20px; }
.terminal-line.story { color: var(--accent-orange); }
.terminal-line.room-name { color: var(--accent-cyan); font-weight: bold; font-size: 15px; }
.terminal-line.room-desc { color: var(--success); }
.terminal-line.exit-line { color: var(--text-dim); }
.terminal-line.prompt-line { color: var(--primary); }
.terminal-line.combat { color: var(--combat); }
.terminal-line.combat-hit { color: var(--accent-yellow); font-weight: bold; }
.terminal-line.combat-victory { color: var(--success); font-weight: bold; }
.terminal-line.loot { color: var(--accent-orange); }
.highlight { color: var(--primary-glow); }
.success { color: var(--success); }

/* ---- Security ---- */
.security-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.security-card { border: 1px solid var(--border); padding: 20px; background: var(--bg-card); opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.security-card.visible { opacity: 1; transform: translateY(0); }
.security-card h4 { color: var(--accent-cyan); font-size: 13px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.security-card ul { list-style: none; }
.security-card li { color: var(--text-dim); font-size: 12px; padding: 4px 0 4px 15px; position: relative; }
.security-card li::before { content: '>'; position: absolute; left: 0; color: var(--primary); }

/* ---- Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 25px; }
.gallery-item { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.gallery-item.visible { opacity: 1; transform: translateY(0); }
.gallery-item.wide { grid-column: 1 / -1; }
.gallery-caption { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 10px; text-transform: uppercase; letter-spacing: 1px; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding: 40px; text-align: center; background: var(--bg-darker); }
.footer-title { color: var(--primary-glow); font-size: 14px; margin-bottom: 8px; }
.footer-tech { color: var(--text-muted); font-size: 11px; }

/* ---- Animations ---- */
@keyframes glow-pulse {
    0% { text-shadow: 0 0 10px var(--primary-glow); }
    50% { text-shadow: 0 0 25px var(--primary-glow), 0 0 40px var(--primary); }
    100% { text-shadow: 0 0 10px var(--primary-glow); }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .code-showcase { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav { padding: 10px 20px; }
    .nav-links { gap: 12px; font-size: 12px; }
    .section { padding: 50px 20px; }
    .hero { padding: 80px 15px 40px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .code-block pre { font-size: 10px; }
}
@media (max-width: 480px) {
    .nav-links a:nth-child(n+4) { display: none; }
    .hero-ascii { font-size: 7px; }
    .hero-stats { gap: 10px; }
    .stat-box { padding: 10px 15px; min-width: 80px; }
}
