:root {
    --bg-color: #0a0a14;
    --text-color: #e0e0e0;
    --accent-color: #00f3ff;
    --accent-secondary: #bc13fe;
    --secondary-color: #8892b0;
    --card-bg: rgba(255, 255, 255, 0.03);
    --nav-bg: rgba(10, 10, 20, 0.9);
    --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --term-bg: #0d0d1a;
    --term-header: #151525;
    --green: #9ece6a;
    --cyan: #7dcfff;
    --magenta: #bb9af7;
    --pink: #ff0055;

    /* Retro Theme Variables Override */
    --retro-bg: #051005;
    --retro-text: #0f0;
    --retro-dim: #008f11;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Selection Color */
::selection {
    background: rgba(0, 243, 255, 0.3);
    color: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s, color 0.5s;
}

/* Background grid pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* --- RETRO THEME STYLES --- */
body.retro-mode {
    --bg-color: var(--retro-bg);
    --text-color: var(--retro-text);
    --accent-color: var(--retro-text);
    --secondary-color: var(--retro-dim);
    --card-bg: rgba(0, 255, 0, 0.05);
    --nav-bg: rgba(0, 20, 0, 0.9);
    --term-bg: #000;
    --term-header: #003300;
    --green: #0f0;
    --cyan: #0f0;
    --magenta: #0f0;

    font-family: 'Courier New', Courier, monospace;
    text-shadow: 0 0 5px var(--retro-text);
}

/* --- DRACULA THEME --- */
body.dracula-mode {
    --bg-color: #282a36;
    --text-color: #f8f8f2;
    --accent-color: #bd93f9;
    --accent-secondary: #ff79c6;
    --secondary-color: #6272a4;
    --card-bg: rgba(68, 71, 90, 0.5);
    --nav-bg: rgba(40, 42, 54, 0.95);
    --term-bg: #1e1f29;
    --term-header: #282a36;
    --green: #50fa7b;
    --cyan: #8be9fd;
    --magenta: #ff79c6;
    --pink: #ff5555;
}

body.dracula-mode::before {
    background-image:
        linear-gradient(rgba(189, 147, 249, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(189, 147, 249, 0.03) 1px, transparent 1px);
}

/* --- NORD THEME --- */
body.nord-mode {
    --bg-color: #2e3440;
    --text-color: #eceff4;
    --accent-color: #88c0d0;
    --accent-secondary: #81a1c1;
    --secondary-color: #4c566a;
    --card-bg: rgba(59, 66, 82, 0.5);
    --nav-bg: rgba(46, 52, 64, 0.95);
    --term-bg: #242933;
    --term-header: #2e3440;
    --green: #a3be8c;
    --cyan: #8fbcbb;
    --magenta: #b48ead;
    --pink: #bf616a;
}

body.nord-mode::before {
    background-image:
        linear-gradient(rgba(136, 192, 208, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(136, 192, 208, 0.03) 1px, transparent 1px);
}

/* --- LIGHT THEME --- */
body.light-mode {
    --bg-color: #fafafa;
    --text-color: #383a42;
    --accent-color: #0184bc;
    --accent-secondary: #a626a4;
    --secondary-color: #696c77;
    --card-bg: rgba(0, 0, 0, 0.03);
    --nav-bg: rgba(250, 250, 250, 0.95);
    --term-bg: #ffffff;
    --term-header: #f0f0f0;
    --green: #50a14f;
    --cyan: #0184bc;
    --magenta: #a626a4;
    --pink: #e45649;
}

body.light-mode::before {
    background-image:
        linear-gradient(rgba(1, 132, 188, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(1, 132, 188, 0.05) 1px, transparent 1px);
}

body.light-mode .terminal-window {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .prompt {
    color: var(--green);
    text-shadow: none;
}

body.light-mode .typed-text,
body.light-mode .cmd-echo {
    color: #383a42;
}

body.light-mode .terminal-cursor {
    background: var(--accent-color);
    box-shadow: none;
}

body.retro-mode::before {
    background-image:
        linear-gradient(rgba(0, 255, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.05) 1px, transparent 1px);
}

body.retro-mode .timeline-dot {
    box-shadow: 0 0 10px var(--retro-text);
    background: #000;
}

body.retro-mode .timeline-content:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

/* Scanline Effect */
body.retro-mode::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 9999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}
/* -------------------------- */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-color), var(--accent-secondary));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.game-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

body.game-active .navbar,
body.game-active .hero-content,
body.game-active .scroll-indicator,
body.game-active .section,
body.game-active footer {
    opacity: 0.05;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.5;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 0 20px var(--accent-color);
    letter-spacing: 2px;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--pink);
}

@keyframes blink { 50% { opacity: 0; } }

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
}

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

.social-links {
    display: flex;
    gap: 15px;
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.social-links a {
    color: var(--secondary-color);
    font-size: 1.1rem;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
    text-shadow: 0 0 15px var(--accent-color);
}

.lang-switch {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-opt {
    cursor: pointer;
    transition: all 0.3s;
}

.lang-opt:hover, .lang-opt.active {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-color);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 20px;
}

/* Terminal Window - Enhanced */
.terminal-window {
    background: var(--term-bg);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    box-shadow:
        0 0 0 1px rgba(0, 243, 255, 0.1),
        0 30px 60px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(0, 243, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: terminalAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.terminal-window::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(0, 243, 255, 0.1),
        transparent,
        rgba(188, 19, 254, 0.1),
        transparent
    );
    animation: terminalGlow 6s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes terminalGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes terminalAppear {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.retro-mode .terminal-window {
    border: 2px solid #0f0;
    box-shadow: 0 0 30px rgba(0,255,0,0.3), inset 0 0 50px rgba(0,255,0,0.1);
}

.terminal-header {
    background: var(--term-header);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.terminal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.3), transparent);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s;
    cursor: pointer;
}

.terminal-buttons span:hover {
    transform: scale(1.2);
}

.close {
    background: #ff5f56;
    box-shadow: 0 0 8px rgba(255, 95, 86, 0.5);
}
.minimize {
    background: #ffbd2e;
    box-shadow: 0 0 8px rgba(255, 189, 46, 0.5);
}
.maximize {
    background: #27c93f;
    box-shadow: 0 0 8px rgba(39, 201, 63, 0.5);
}

.terminal-title {
    flex-grow: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #9ba1c0;
    font-weight: 500;
    letter-spacing: 0.5px;
}

body.retro-mode .terminal-title { color: #0f0; font-family: 'Courier New', monospace; }

.terminal-body {
    padding: 25px 30px;
    font-family: var(--font-mono);
    font-size: 1rem;
    min-height: 420px;
    max-height: 600px;
    overflow-y: auto;
    color: #a9b1d6;
    position: relative;
    line-height: 1.8;
}

/* Terminal text glow effect */
.terminal-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 243, 255, 0.02) 0%, transparent 70%);
    pointer-events: none;
}

body.retro-mode .terminal-body { color: #0f0; }

.input-line, .welcome-msg {
    margin-bottom: 15px;
}

.prompt {
    color: var(--green);
    font-weight: 600;
    margin-right: 10px;
    text-shadow: 0 0 10px rgba(158, 206, 106, 0.5);
}

.cmd-echo {
    color: #c0caf5;
    font-weight: 500;
}

body.retro-mode .cmd-echo { color: #0f0; }

.response-text {
    color: #a9b1d6;
    margin-top: 8px;
    padding-left: 2px;
}

body.retro-mode .response-text { color: #0f0; opacity: 0.8; }

.response-text.highlight {
    color: var(--cyan);
    font-weight: 700;
    font-size: 1.4rem;
    margin: 12px 0;
    text-shadow: 0 0 20px rgba(125, 207, 255, 0.5);
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.response-text.info {
    color: #565f89;
    font-size: 0.85rem;
    margin-top: 25px;
    opacity: 0.8;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #c0caf5;
    font-family: var(--font-mono);
    font-size: 1rem;
    flex-grow: 1;
    outline: none;
    width: 60%;
    padding: 0;
    margin: 0;
    caret-color: var(--accent-color);
}

body.retro-mode #terminal-input { color: #0f0; caret-color: #0f0; }

#terminal-output {
    margin-bottom: 15px;
}

.terminal-response {
    color: #a9b1d6;
    margin-bottom: 20px;
    margin-left: 0;
    white-space: pre-wrap;
    line-height: 1.7;
}

body.retro-mode .terminal-response { color: #0f0; opacity: 0.9; }

.command-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 30px;
    margin-top: 15px;
}

.cmd-item {
    color: var(--magenta);
    font-weight: bold;
    text-shadow: 0 0 8px rgba(187, 154, 247, 0.4);
}
.cmd-desc { color: #565f89; }

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-color);
    animation: bounce 2s infinite;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.scroll-indicator:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

.hidden-section {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.show-section {
    opacity: 1;
    transform: translateY(0);
}

.section {
    padding: 120px 0;
    position: relative;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.hash {
    color: var(--accent-color);
    text-shadow: 0 0 15px var(--accent-color);
    font-size: 2.5rem;
}

.about-grid {
    display: grid;
    gap: 30px;
}

.about-text p {
    font-size: 1.15rem;
    color: #c0caf5;
    line-height: 1.9;
}

body.retro-mode .about-text p { color: #0f0; }

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 35px;
}

.tech-stack span {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-color);
    border: 1px solid rgba(0, 243, 255, 0.3);
    background: rgba(0, 243, 255, 0.05);
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.tech-stack span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tech-stack span:hover::before {
    left: 100%;
}

.tech-stack span:hover {
    border-color: var(--accent-color);
    background: rgba(0, 243, 255, 0.15);
    transform: translateY(-4px);
    box-shadow:
        0 10px 30px rgba(0, 243, 255, 0.15),
        0 0 20px rgba(0, 243, 255, 0.1);
    text-shadow: 0 0 10px var(--accent-color);
}

.timeline {
    border-left: 2px solid rgba(0, 243, 255, 0.2);
    margin-left: 20px;
    padding-left: 45px;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-color), var(--accent-secondary), var(--pink));
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-dot {
    position: absolute;
    left: -52px;
    top: 28px;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    box-shadow:
        0 0 20px var(--accent-color),
        0 0 40px rgba(0, 243, 255, 0.3);
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:hover .timeline-dot {
    background: var(--accent-color);
    transform: scale(1.3);
    box-shadow:
        0 0 30px var(--accent-color),
        0 0 60px rgba(0, 243, 255, 0.5);
}

.timeline-content {
    background: var(--card-bg);
    padding: 28px 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.timeline-content:hover::before {
    opacity: 1;
}

.timeline-content:hover {
    transform: translateX(12px) translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 243, 255, 0.2);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 243, 255, 0.1);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 12px;
    display: inline-block;
    background: rgba(0, 243, 255, 0.1);
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

body.retro-mode .timeline-content h3 { color: #0f0; text-shadow: 0 0 5px #0f0; }

.company {
    color: #a9b1d6;
    font-size: 1.1rem;
    font-weight: 500;
}

.location {
    font-size: 0.9rem;
    color: #565f89;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

footer {
    padding: 50px 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--secondary-color);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
}

/* Glow text utility */
.glow-text {
    text-shadow: 0 0 20px var(--accent-color);
}

/* ========== TERMINAL FULLSCREEN DESIGN ========== */
.terminal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10;
}

.terminal-window.fullscreen {
    width: 100%;
    max-width: 1000px;
    height: calc(100vh - 100px);
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.terminal-window.fullscreen .terminal-body {
    flex: 1;
    max-height: none;
    min-height: auto;
    overflow-y: auto;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
}

.terminal-actions {
    display: flex;
    gap: 15px;
}

.terminal-actions a {
    color: #565f89;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    position: relative;
    z-index: 100;
}

.terminal-actions a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
    transform: scale(1.1);
}

.ascii-art {
    color: var(--accent-color);
    font-size: 0.65rem;
    line-height: 1.2;
    margin: 0 0 20px 0;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    font-family: var(--font-mono);
}

.boot-line {
    color: #9ece6a;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    white-space: pre-wrap;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(158, 206, 106, 0.5);
}

.response-text.location {
    color: #7dcfff;
    font-size: 1rem;
    margin-top: 5px;
}

.cmd-highlight {
    color: var(--accent-color);
    background: rgba(0, 243, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.cmd-hint {
    color: var(--magenta);
    cursor: pointer;
    transition: all 0.2s;
}

.cmd-hint:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-color);
}

.response-text.hint {
    color: #565f89;
    font-size: 0.85rem;
    margin-top: 8px;
}

.input-line {
    display: flex;
    align-items: center;
    position: relative;
}

.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

#terminal-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 2;
    cursor: text;
}

.typed-text {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #c0caf5;
    white-space: pre;
    min-height: 1.5em;
}

body.retro-mode .typed-text {
    color: #0f0;
}

.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--accent-color);
    animation: terminalBlink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 1px;
    box-shadow: 0 0 10px var(--accent-color);
}

body.retro-mode .terminal-cursor {
    background: #0f0;
    box-shadow: 0 0 10px #0f0;
}

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

.terminal-footer {
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #565f89;
    display: flex;
    gap: 10px;
    align-items: center;
}

.terminal-footer .separator {
    opacity: 0.3;
}

/* Game active state for fullscreen terminal */
body.game-active .terminal-fullscreen {
    opacity: 0.05;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Hide navbar and old sections for terminal-only */
.navbar,
.hero,
.section,
footer:not(.terminal-footer) {
    display: none;
}

/* Responsive for fullscreen terminal */
@media (max-width: 768px) {
    .terminal-fullscreen {
        padding: 0;
    }

    .terminal-window.fullscreen {
        border-radius: 0;
        height: 100vh;
        max-height: none;
        border: none;
        box-shadow: none;
    }

    .terminal-window.fullscreen::before {
        display: none;
    }

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

    .terminal-footer {
        display: none;
    }

    .terminal-actions {
        gap: 12px;
    }

    .terminal-actions a {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .ascii-art {
        font-size: 0.35rem;
    }

    .response-text.highlight {
        font-size: 1rem;
    }
}

/* Typing animation for terminal */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { padding: 0; }
    .terminal-window {
        border-radius: 0;
        height: 100vh;
        border: none;
        max-width: 100%;
        box-shadow: none;
    }
    .terminal-window::before { display: none; }
    .section-title { font-size: 1.6rem; }
    .hash { font-size: 2rem; }
    .timeline { padding-left: 25px; }
    .timeline-dot { left: -32px; }
    .section { padding: 80px 0; }
    .timeline-content { padding: 20px; }
    .tech-stack span { padding: 8px 14px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .terminal-body {
        padding: 20px;
        font-size: 0.9rem;
    }
    .response-text.highlight {
        font-size: 1.2rem;
    }
}

/* ========== PARTICLE BACKGROUND ========== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

body.light-mode #particles {
    opacity: 0.3;
}

/* ========== ACHIEVEMENT TOAST ========== */
.achievement-toast {
    position: fixed;
    top: 20px;
    right: -400px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.95), rgba(40, 40, 80, 0.95));
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    box-shadow:
        0 0 30px rgba(0, 243, 255, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 243, 255, 0.05);
    z-index: 99999;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 350px;
}

.achievement-toast.show {
    right: 20px;
}

.achievement-icon {
    font-size: 2.5em;
    animation: achievementBounce 0.5s ease-out;
}

@keyframes achievementBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.achievement-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.achievement-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--accent-color);
}

.achievement-name {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Theme-specific achievement styles */
body.retro-mode .achievement-toast {
    background: linear-gradient(135deg, rgba(0, 20, 0, 0.95), rgba(0, 40, 0, 0.95));
    border-color: #0f0;
    box-shadow:
        0 0 30px rgba(0, 255, 0, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5);
}

body.retro-mode .achievement-title {
    color: #0f0;
    text-shadow: 0 0 10px #0f0;
}

body.dracula-mode .achievement-toast {
    background: linear-gradient(135deg, rgba(40, 42, 54, 0.95), rgba(68, 71, 90, 0.95));
    border-color: #bd93f9;
    box-shadow:
        0 0 30px rgba(189, 147, 249, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dracula-mode .achievement-title {
    color: #bd93f9;
    text-shadow: 0 0 10px #bd93f9;
}

body.nord-mode .achievement-toast {
    background: linear-gradient(135deg, rgba(46, 52, 64, 0.95), rgba(59, 66, 82, 0.95));
    border-color: #88c0d0;
    box-shadow:
        0 0 30px rgba(136, 192, 208, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.5);
}

body.nord-mode .achievement-title {
    color: #88c0d0;
    text-shadow: 0 0 10px #88c0d0;
}

body.light-mode .achievement-toast {
    background: linear-gradient(135deg, rgba(250, 250, 250, 0.98), rgba(230, 230, 230, 0.98));
    border-color: #0184bc;
    box-shadow:
        0 0 20px rgba(1, 132, 188, 0.2),
        0 10px 40px rgba(0, 0, 0, 0.15);
}

body.light-mode .achievement-title {
    color: #0184bc;
}

body.light-mode .achievement-name {
    color: #383a42;
}

/* Responsive */
@media (max-width: 480px) {
    .achievement-toast {
        top: auto;
        bottom: -150px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .achievement-toast.show {
        bottom: 20px;
        right: 10px;
    }

    .achievement-icon {
        font-size: 2em;
    }

    .achievement-name {
        font-size: 1rem;
    }
}
