/* =============================================
   ROOT TREK - Main Stylesheet
   Personal site for Ryder
   ============================================= */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --accent: #00ff88;
    --accent-dim: #00cc6a;
    --accent-secondary: #00d4ff;
    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --text-dim: #555555;
    --border-color: #2a2a2a;
    --glow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* =============================================
   BASE STYLES
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--accent-dim);
}

/* =============================================
   MATRIX BACKGROUND
   ============================================= */

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--accent);
    writing-mode: vertical-rl;
    animation: matrix-fall linear infinite;
}

@keyframes matrix-fall {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200vh); }
}

/* =============================================
   SCANLINES EFFECT
   ============================================= */

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

/* =============================================
   NAVIGATION
   ============================================= */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.logo-bracket {
    color: var(--text-dim);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::before {
    content: '>';
    position: absolute;
    left: -1rem;
    opacity: 0;
    color: var(--accent);
    transition: opacity 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =============================================
   PAGE HEADER
   ============================================= */

.page-header {
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

.page-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* =============================================
   SECTIONS
   ============================================= */

section {
    padding: 5rem 2rem;
    position: relative;
    z-index: 1;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
    padding: 1rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: var(--glow);
}

.btn-primary:hover {
    background: var(--accent-dim);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =============================================
   CARDS
   ============================================= */

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

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px -10px rgba(0, 255, 136, 0.2);
}

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

/* =============================================
   TERMINAL WINDOW
   ============================================= */

.terminal-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--accent);
}

.command {
    color: var(--accent-secondary);
}

.output {
    color: var(--text-primary);
    padding-left: 1rem;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--accent);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-left: 2px;
}

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

/* =============================================
   FOOTER
   ============================================= */

footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

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

.footer-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

/* =============================================
   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);
}

/* =============================================
   EASTER EGG TERMINAL
   ============================================= */

.easter-terminal {
    position: fixed;
    bottom: -400px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.easter-terminal.active {
    bottom: 20px;
}

.easter-terminal .terminal-body {
    min-height: 200px;
}

.easter-input {
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    outline: none;
    width: calc(100% - 20px);
    caret-color: var(--accent);
}

.easter-output {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.easter-output.error {
    color: #ff5f56;
}

.easter-output.success {
    color: var(--accent);
}

.vault-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--accent-secondary);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
    50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.8); }
}

.close-terminal {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.close-terminal:hover {
    color: #ff5f56;
}

/* =============================================
   SECRET DOT (Easter Egg Clue)
   ============================================= */

.secret-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--text-dim);
    border-radius: 50%;
    margin-left: 2px;
    cursor: default;
    position: relative;
}

.secret-dot::after {
    content: 'only a hackerman can enter';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease 3s;
    border: 1px solid var(--accent);
}

.secret-dot:hover::after {
    opacity: 1;
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a::before {
        display: none;
    }

    section {
        padding: 3rem 1rem;
    }

    .page-header {
        padding: 6rem 1rem 3rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .section-header {
        margin-bottom: 2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.85rem;
    }

    .easter-terminal {
        width: 95%;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }

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