:root {
    --bg-color: #0D1117;
    --text-color: #00FF41;
    /* Classic Terminal Green */
    --dim-text: #008F11;
    --alert-color: #FF3333;
    --font-stack: 'Courier New', Courier, monospace;
    --scanline-color: rgba(18, 16, 16, 0.5);
    --glow-spread: 3px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    height: 100vh;
    overflow: hidden;
    /* Prevent scrollbars from CRT overlay */
    font-size: 16px;
    line-height: 1.5;
    text-shadow: 0 0 var(--glow-spread) var(--text-color);
}

/* CRT Scanline Effect */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    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));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 999;
}

.terminal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header & Nav */
header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--dim-text);
    padding-bottom: 1rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0;
}

/* Language Switcher */
.lang-container {
    position: relative;
    display: flex;
    align-items: center;
}

#mobile-lang-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    line-height: 1;
    align-items: center;
    justify-content: center;
}

#mobile-lang-toggle svg {
    width: 1.5rem;
    height: 1.5rem;
}

#mobile-lang-toggle:hover {
    color: var(--text-color);
    text-shadow: 0 0 5px var(--text-color);
}

.lang-switcher {
    font-size: 0.9rem;
    color: var(--dim-text);
    display: flex;
    /* Visible on desktop */
}

.lang-switcher a {
    color: var(--dim-text);
    text-decoration: none;
    margin: 0 5px;
}

.lang-switcher a:hover,
.lang-switcher a.active-lang {
    color: var(--text-color);
    text-shadow: 0 0 5px var(--text-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--dim-text);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s, text-shadow 0.2s;
}

nav a:hover,
nav a.active {
    color: var(--text-color);
    text-shadow: 0 0 8px var(--text-color);
}

/* Main Content */
main {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 1rem;
    /* Space for scrollbar */
}

/* Custom Scrollbar */
main::-webkit-scrollbar {
    width: 10px;
}

main::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-left: 1px solid var(--dim-text);
}

main::-webkit-scrollbar-thumb {
    background: var(--dim-text);
}

main::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

p {
    margin-bottom: 1rem;
}

.success {
    color: var(--text-color);
}

/* Content Lists */
.content-block ul {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.content-block li {
    margin-bottom: 0.25rem;
}

.content-block li::before {
    content: "> ";
    color: var(--dim-text);
    margin-right: 0.5rem;
}

.content-block strong {
    color: var(--text-color);
    font-weight: bold;
    text-transform: uppercase;
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    margin-top: 2rem;
    border-top: 1px solid var(--dim-text);
    padding-top: 1rem;
    font-size: 0.8rem;
    color: var(--dim-text);
    text-align: right;
}

/* Animations */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.cursor {
    animation: blink 1s step-end infinite;
}

/* Section Visibility */
.hidden-section {
    display: none;
}

.active-section {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Links */
.contact-form a {
    color: var(--text-color);
}

/* Mobile Media Query */
@media (max-width: 600px) {
    .header-top {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1rem;
        width: auto;
        margin-bottom: 0;
    }

    #mobile-lang-toggle {
        display: block;
        /* Show globe on mobile */
    }

    .lang-switcher {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--bg-color);
        border: 1px solid var(--dim-text);
        padding: 0.5rem;
        flex-direction: column;
        gap: 0.5rem;
        z-index: 100;
        min-width: 60px;
        text-align: center;
    }

    .lang-switcher.show-mobile {
        display: flex;
        /* Show when toggled */
    }

    .desktop-only {
        display: none;
        /* Hide brackets and pipes on mobile */
    }

    .lang-switcher a {
        display: block;
        margin: 5px 0;
    }

    nav ul {
        gap: 0.8rem;
        font-size: 0.9rem;
        justify-content: center;
    }
}

/* Links in Nav */
.links-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    /* Push to the right */
}

#links-toggle {
    background: none;
    border: none;
    color: var(--dim-text);
    font-family: var(--font-stack);
    font-size: 1rem;
    /* Match nav font size */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    text-transform: uppercase;
    /* Match nav style */
    transition: color 0.2s, text-shadow 0.2s;
}

#links-toggle svg {
    width: 1rem;
    height: 1rem;
}

/* Hover effect for toggle */
.links-nav-item:hover #links-toggle,
#links-toggle:hover {
    color: var(--text-color);
    text-shadow: 0 0 8px var(--text-color);
    /* Match nav glow */
}

.links-dropdown {
    display: none;
    position: absolute;
    right: 0;
    /* Align to right edge of parent li */
    top: 100%;
    background-color: var(--bg-color);
    border: 1px solid var(--dim-text);
    padding: 0.5rem;
    min-width: 120px;
    z-index: 100;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

/* Bridge the gap for hover */
.links-dropdown::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    width: 100%;
    height: 0.5rem;
}

/* Show on hover */
.links-nav-item:hover .links-dropdown {
    display: flex;
}

.links-dropdown a {
    color: var(--dim-text);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s, background 0.2s;
    text-transform: none;
    /* Reset text transform for links inside dropdown */
    position: relative;
    /* Ensure links are above the bridge */
    z-index: 1;
}

.links-dropdown a:hover {
    color: var(--text-color);
    background: rgba(0, 255, 65, 0.1);
    text-shadow: none;
    /* Reset text shadow inside dropdown */
}

@media (max-width: 600px) {
    .links-nav-item {
        width: auto;
        margin-left: 0;
        /* Reset margin on mobile */
    }

    .links-dropdown {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        text-align: center;
    }
}