:root {
    --background: #08090d;
    --background-light: #101218;
    --card: rgba(17, 19, 27, 0.85);
    --border: rgba(255, 255, 255, 0.09);

    --text: #eeeeee;
    --muted: #9295a1;

    --accent: #b58cff;
    --accent-light: #d2bcff;

    --green: #61e294;
    --yellow: #f2c94c;
    --red: #ff647c;

    --max-width: 1150px;
}


/* =========================
   RESET
========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.6;
    overflow-x: hidden;
}

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

button,
input {
    font: inherit;
}


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

.background-grid {
    position: fixed;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );

    background-size: 50px 50px;

    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 85%
    );

    pointer-events: none;
    z-index: -2;
}

.background-grid::after {
    content: "";

    position: absolute;

    width: 700px;
    height: 700px;

    top: -250px;
    left: 50%;

    transform: translateX(-50%);

    background: radial-gradient(
        circle,
        rgba(181, 140, 255, 0.12),
        transparent 65%
    );

    filter: blur(20px);
}

.scanlines {
    position: fixed;
    inset: 0;

    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 3px,
        rgba(255, 255, 255, 0.012) 4px
    );

    pointer-events: none;
    z-index: 1000;
}


/* =========================
   NAVBAR
========================= */

.navbar {
    position: sticky;
    top: 0;

    width: 100%;

    background: rgba(8, 9, 13, 0.75);
    backdrop-filter: blur(16px);

    border-bottom: 1px solid var(--border);

    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: auto;

    height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 25px;
}

.logo {
    font-weight: 900;
    font-size: 1.2rem;

    letter-spacing: -1px;
}

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

nav {
    display: flex;
    gap: 30px;
}

nav a {
    color: var(--muted);

    font-size: 0.9rem;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

nav a:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 1px;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow: 0 0 10px var(--green);

    animation: pulse 2s infinite;
}


/* =========================
   GENERAL
========================= */

.section {
    max-width: var(--max-width);
    margin: auto;

    padding: 120px 25px 40px;
}

.section-heading {
    display: flex;
    align-items: baseline;
    gap: 15px;

    margin-bottom: 35px;
}

.section-number {
    color: var(--accent);

    font-family: monospace;
    font-size: 0.9rem;
}

.section-heading h2 {
    font-size: clamp(2rem, 5vw, 3rem);

    letter-spacing: -2px;
}

.section-intro {
    color: var(--muted);

    margin-top: -20px;
    margin-bottom: 35px;

    max-width: 600px;
}

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

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.75rem;
    color: var(--muted);
}

.small-label {
    display: block;

    color: var(--accent);

    font-family: monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
}


/* =========================
   HERO
========================= */

.hero {
    min-height: calc(100vh - 70px);

    display: grid;
    grid-template-columns: 1fr 1fr;

    align-items: center;

    gap: 70px;

    padding-top: 80px;
}

.terminal-label {
    color: var(--muted);

    font-family: monospace;
    font-size: 0.9rem;

    margin-bottom: 20px;
}

.terminal-label span {
    color: var(--green);
}

.hero h1 {
    font-size: clamp(3.5rem, 7vw, 6.5rem);

    line-height: 0.95;

    letter-spacing: -6px;

    margin-bottom: 30px;
}

.hero-subtitle {
    color: var(--muted);

    font-size: 1.15rem;

    margin-bottom: 35px;
}

.glitch {
    position: relative;
    color: var(--accent);
}


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

.hero-buttons {
    display: flex;
    gap: 12px;

    flex-wrap: wrap;
}

.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 45px;

    padding: 0 20px;

    border-radius: 8px;

    border: 1px solid var(--border);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button.primary {
    background: var(--accent);
    color: #09080c;

    border-color: var(--accent);

    font-weight: 700;
}

.button.primary:hover {
    background: var(--accent-light);
}

.button.secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.button.secondary:hover {
    border-color: rgba(181, 140, 255, 0.5);
    background: rgba(181, 140, 255, 0.06);
}


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

.terminal-window,
.big-terminal {
    border: 1px solid var(--border);

    border-radius: 12px;

    overflow: hidden;

    background: #0b0c11;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(181, 140, 255, 0.04);
}

.terminal-header {
    height: 40px;

    display: flex;
    align-items: center;

    gap: 15px;

    padding: 0 15px;

    border-bottom: 1px solid var(--border);

    background: rgba(255, 255, 255, 0.025);

    color: var(--muted);

    font-family: monospace;
    font-size: 0.75rem;
}

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

.terminal-buttons span {
    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: #333640;
}

.terminal-body {
    padding: 25px;

    min-height: 310px;

    font-family: monospace;
    font-size: 0.8rem;

    line-height: 1.9;
}

.terminal-user {
    color: var(--green);
}

.terminal-output {
    color: #b8bac4;
}

.success {
    color: var(--green);
}

.error {
    color: var(--red);
}

.cursor {
    display: inline-block;

    width: 8px;
    height: 15px;

    background: var(--accent);

    vertical-align: middle;

    animation: blink 1s steps(1) infinite;
}


/* =========================
   ABOUT
========================= */

.about-grid {
    display: grid;

    grid-template-columns:
        1.5fr
        1fr
        1fr;

    gap: 18px;
}

.about-card {
    padding: 30px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: var(--card);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.about-card:hover {
    transform: translateY(-4px);

    border-color: rgba(181, 140, 255, 0.25);
}

.large-card {
    grid-row: span 2;
}

.card-icon {
    font-size: 1.7rem;

    margin-bottom: 20px;
}

.about-card h3 {
    margin-bottom: 15px;

    font-size: 1.2rem;
}

.about-card p {
    color: var(--muted);

    margin-bottom: 15px;
}

.status-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    font-family: monospace;
    font-size: 0.8rem;
}

.badge {
    padding: 3px 8px;

    border-radius: 4px;

    font-size: 0.6rem;
    font-weight: 800;
}

.badge.success {
    color: var(--green);

    background: rgba(97, 226, 148, 0.1);
}

.badge.warning {
    color: var(--yellow);

    background: rgba(242, 201, 76, 0.1);
}

.badge.danger {
    color: var(--red);

    background: rgba(255, 100, 124, 0.1);
}

.clock {
    font-family: monospace;

    color: var(--accent);

    font-size: 1.8rem;

    margin-top: 15px;
}


/* =========================
   PROJECTS
========================= */

.project-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;
}

.project-card {
    padding: 30px;

    min-height: 280px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: var(--card);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.project-card:hover {
    transform: translateY(-5px);

    border-color: rgba(181, 140, 255, 0.35);
}

.project-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;
}

.project-icon {
    font-size: 2rem;
}

.project-status {
    color: var(--green);

    font-family: monospace;

    font-size: 0.6rem;

    letter-spacing: 1px;
}

.project-card h3 {
    font-size: 1.25rem;

    margin-bottom: 12px;
}

.project-card p {
    color: var(--muted);

    font-size: 0.9rem;
}

.tags {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 25px;
}

.tags span {
    padding: 4px 9px;

    border: 1px solid var(--border);

    border-radius: 5px;

    color: var(--muted);

    font-family: monospace;

    font-size: 0.65rem;
}


/* =========================
   GAMING
========================= */

.gaming-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;
}

.game-card {
    position: relative;

    min-height: 340px;

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 12px;

    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(181, 140, 255, 0.15),
            transparent 55%
        ),
        #11131a;
}

.game-card::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(8, 9, 13, 0.98),
            rgba(8, 9, 13, 0.1)
        );
}

.game-card:hover {
    border-color: rgba(181, 140, 255, 0.4);
}

.game-overlay {
    position: absolute;

    inset: auto 0 0 0;

    padding: 28px;
}

.game-category {
    color: var(--accent);

    font-family: monospace;

    font-size: 0.6rem;

    letter-spacing: 2px;
}

.game-overlay h3 {
    font-size: 1.6rem;

    margin: 7px 0;
}

.game-overlay p {
    color: var(--muted);

    font-size: 0.85rem;
}


/* =========================
   RANDOM
========================= */

.random-card {
    display: flex;

    align-items: center;

    gap: 25px;

    padding: 25px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: var(--card);
}

.random-icon {
    font-size: 2rem;
}

.random-card p {
    margin-top: 5px;

    color: var(--text);
}

.random-card > div:nth-child(2) {
    flex: 1;
}


/* =========================
   BIG TERMINAL
========================= */

.terminal-section {
    padding-bottom: 100px;
}

.big-terminal-body {
    padding: 25px;

    min-height: 300px;

    font-family: monospace;

    font-size: 0.8rem;

    line-height: 1.8;
}

#terminalOutput {
    white-space: pre-wrap;
}

.terminal-input-line {
    display: flex;

    align-items: center;

    margin-top: 15px;
}

.terminal-input-line input {
    flex: 1;

    margin-left: 8px;

    border: none;
    outline: none;

    background: transparent;

    color: var(--text);

    font-family: monospace;

    font-size: 0.8rem;
}


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

footer {
    border-top: 1px solid var(--border);

    padding: 30px 25px;

    color: var(--muted);

    font-size: 0.7rem;
}

.footer-content {
    max-width: var(--max-width);

    margin: auto;

    display: flex;

    justify-content: space-between;

    gap: 20px;

    flex-wrap: wrap;
}

.footer-content strong {
    color: var(--text);
}


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

.easter-egg {
    position: fixed;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.85);

    backdrop-filter: blur(12px);

    z-index: 2000;
}

.easter-egg.visible {
    display: flex;
}

.easter-content {
    width: min(500px, 100%);

    padding: 50px;

    text-align: center;

    border: 1px solid rgba(181, 140, 255, 0.4);

    border-radius: 16px;

    background: #11131a;

    box-shadow: 0 0 100px rgba(181, 140, 255, 0.15);
}

.easter-big {
    font-size: 4rem;

    margin-bottom: 20px;
}

.easter-content h2 {
    font-size: 2rem;

    margin-bottom: 15px;
}

.easter-content p {
    color: var(--muted);

    margin-bottom: 25px;
}


/* =========================
   ANIMATIONS
========================= */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}


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

@media (max-width: 900px) {

    .hero {
        grid-template-columns: 1fr;

        padding-top: 80px;
    }

    .hero-terminal {
        max-width: 700px;
    }

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

    .large-card {
        grid-row: auto;
    }

    .project-grid,
    .gaming-grid {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 650px) {

    nav {
        display: none;
    }

    .nav-container {
        padding: 0 18px;
    }

    .section {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero h1 {
        font-size: 3.5rem;

        letter-spacing: -3px;
    }

    .about-grid,
    .project-grid,
    .gaming-grid {
        grid-template-columns: 1fr;
    }

    .random-card {
        align-items: flex-start;

        flex-direction: column;
    }

    .random-card .button {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
    }

    .terminal-body,
    .big-terminal-body {
        padding: 18px;

        font-size: 0.7rem;
    }

}