/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

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

body {
    min-height: 100vh;
    background: #0d1117;
    color: #e6edf3;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    display: block;
    padding: 0 32px 32px;
}

.container {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    padding-top: 34px;
}



/* ---------------------------------------------------------
   Site navigation
   --------------------------------------------------------- */

.site-nav-shell {
    position: sticky;
    top: 0;
    z-index: 9000;

    width: 100%;

    background: rgba(9, 14, 20, 0.96);
    border-bottom: 1px solid #21262d;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-nav {
    width: min(1220px, calc(100% - 40px));
    min-height: 68px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 34px;
}

.nav-button,
.nav-link,
.nav-search {
    border: 0;
    outline: 0;
    font: inherit;
    cursor: default;
}

.site-brand {
    background: transparent;

    color: #e6edf3;

    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -1.2px;

    white-space: nowrap;
}

.brand-linux {
    color: #3fb950;
}

.site-nav-links {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 22px;
    min-width: 0;
}

.nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 68px;
    padding: 0 6px;

    color: #8b949e;
    background: transparent;

    font-size: 0.88rem;
    font-weight: 600;

    transition:
        color 0.16s ease,
        opacity 0.16s ease;
}

.nav-link:hover {
    color: #c9d1d9;
}

.nav-link.active {
    color: #3fb950;
}

.nav-link.active::after {
    content: "";

    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 0;

    height: 2px;

    background: #3fb950;
    border-radius: 2px 2px 0 0;

    box-shadow: 0 0 12px rgba(63, 185, 80, 0.36);
}

.nav-icon {
    min-width: 18px;

    display: inline-grid;
    place-items: center;

    color: #9fb1c3;

    font-size: 1rem;
    line-height: 1;
}

.nav-link.active .nav-icon {
    color: #3fb950;
}

.terminal-nav-icon {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

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

.nav-search {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    color: #8fa5bd;
    background: transparent;

    border-left: 1px solid #30363d;

    font-size: 1.75rem;
    line-height: 1;
}

/* The menu is intentionally visual-only for now. */
.site-nav button {
    cursor: default;
}

@media (max-width: 920px) {
    .site-nav {
        width: min(100% - 28px, 950px);
        gap: 18px;
    }

    .site-nav-links {
        gap: 10px;
    }

    .nav-link {
        font-size: 0.78rem;
    }

    .nav-link .nav-icon {
        display: none;
    }
}

@media (max-width: 700px) {
    .site-nav-shell {
        position: relative;
    }

    .site-nav {
        min-height: 58px;

        grid-template-columns: 1fr auto;

        width: calc(100% - 28px);
    }

    .site-brand {
        font-size: 1.25rem;
        text-align: left;
    }

    .site-nav-links {
        display: none;
    }

    .nav-search {
        width: 36px;
        height: 36px;

        border-left: 0;

        font-size: 1.45rem;
    }
}


/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.terminal {
    color: #58a6ff;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.95rem;
    margin-bottom: 18px;
}

h1 {
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    line-height: 1;
    letter-spacing: -3px;
    margin-bottom: 20px;
}

h1 span {
    color: #3fb950;
}

.tagline {
    color: #8b949e;
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 700px;
    margin-bottom: 42px;
}




/* ---------------------------------------------------------
   Tux greeter - mockup-matched artwork
   --------------------------------------------------------- */

.hero-intro {
    position: relative;

    min-height: 300px;
    margin-bottom: 34px;
    padding-right: 330px;
    padding-top: 64px;
}

.hero-copy {
    position: relative;
    z-index: 3;
}

.hero-intro .terminal {
    margin-bottom: 22px;
}

.hero-intro h1 {
    margin-bottom: 24px;
}

.hero-intro .tagline {
    max-width: 690px;
    margin-bottom: 0;
}

.tux-greeter {
    position: absolute;
    right: -50px;
    bottom: -18px;

    width: 380px;

    opacity: 0;

    transform:
        translateY(10px)
        scale(0.985);

    transform-origin: 50% 100%;

    animation:
        tux-mockup-arrive 520ms ease 360ms forwards,
        tux-mockup-settle 560ms ease 3.6s forwards;

    pointer-events: none;
    user-select: none;
}

.tux-greeter-image {
    display: block;
    width: 100%;
    height: auto;

    object-fit: contain;

    filter:
        drop-shadow(0 15px 26px rgba(0, 0, 0, 0.28));

    -webkit-user-drag: none;
    user-select: none;
}

@keyframes tux-mockup-arrive {
    from {
        opacity: 0;

        transform:
            translateY(10px)
            scale(0.985);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes tux-mockup-settle {
    0% {
        transform:
            translateY(0)
            scale(1);
    }

    50% {
        transform:
            translateY(2px)
            scale(0.998);
    }

    100% {
        transform:
            translateY(0)
            scale(1);
    }
}

@media (max-width: 980px) {
    .hero-intro {
        min-height: 270px;
        padding-right: 270px;
    }

    .tux-greeter {
        right: -38px;
        width: 320px;
    }
}

@media (max-width: 760px) {
    .hero-intro {
        min-height: 0;
        margin-bottom: 38px;
        padding-right: 0;
        padding-top: 28px;
    }

    .hero-intro .tagline {
        max-width: calc(100% - 110px);
    }

    .tux-greeter {
        right: -42px;
        bottom: -20px;

        width: 180px;
    }
}

@media (max-width: 520px) {
    .hero-intro .tagline {
        max-width: calc(100% - 86px);
    }

    .tux-greeter {
        right: -38px;
        width: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tux-greeter {
        opacity: 1;
        transform: none;
        animation: none;
    }
}


/* ---------------------------------------------------------
   Primary cards
   --------------------------------------------------------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 22px;

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

.card:hover {
    transform: translateY(-2px);
    border-color: #58a6ff;
}

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.card-link:hover {
    background: #1b2027;
}

.card h2 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #f0f6fc;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card h2 .arrow {
    color: #58a6ff;
    font-size: 0.95rem;
    font-weight: 400;
}

.card p {
    color: #8b949e;
    font-size: 0.95rem;
    line-height: 1.5;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.service-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    font-size: 18px;
    line-height: 1;
}

.service-icon.hosting {
    background: rgba(88, 166, 255, 0.12);
}

.service-icon.radio {
    background: rgba(188, 140, 255, 0.12);
}

.service-icon.airtraffic {
    background: rgba(88, 166, 255, 0.12);
}

.service-icon.weather {
    background: rgba(255, 193, 7, 0.12);
}

.service-icon.pokemon {
    background: rgba(248, 81, 73, 0.12);
}

/* LEGO Collection */
.lego-card:hover {
    border-color: #f6c344;
}

.lego-icon {
    color: #f6c344;
    background: rgba(246, 195, 68, 0.12);
}

.service-icon.still-running {
    background: rgba(63, 185, 80, 0.12);
}

.service-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* ---------------------------------------------------------
   Things I'm building
   --------------------------------------------------------- */

.section-heading {
    margin-top: 42px;
    margin-bottom: 16px;
}

.section-prompt {
    display: block;
    margin-bottom: 6px;

    color: #58a6ff;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.78rem;
}

.section-heading h2 {
    color: #f0f6fc;
    font-size: 1.25rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.feature-card {
    position: relative;
    overflow: hidden;

    min-height: 190px;
    padding: 22px;

    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;

    color: inherit;
    text-decoration: none;

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

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 2px;
    opacity: 0.8;
}

.feature-card:hover {
    transform: translateY(-2px);
    background: #1b2027;
}

.feature-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.feature-title {
    display: flex;
    align-items: center;
    gap: 11px;

    color: #f0f6fc;
    font-size: 1rem;
    font-weight: 700;
}

.feature-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;
    font-size: 1.2rem;
}

.feature-card .arrow {
    color: #58a6ff;
    font-size: 0.95rem;
}

.feature-card p {
    color: #8b949e;
    font-size: 0.9rem;
    line-height: 1.5;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.feature-tags span {
    padding: 4px 8px;

    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 999px;

    color: #8b949e;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.66rem;
}


/* Projects */

.feature-projects::before {
    background: #58a6ff;
}

.feature-projects:hover {
    border-color: #58a6ff;
}

.feature-projects .feature-icon {
    color: #79c0ff;
    background: rgba(88, 166, 255, 0.12);
}


/* Print Lab */

.feature-printlab::before {
    background: #e3b341;
}

.feature-printlab:hover {
    border-color: #e3b341;
}

.feature-printlab .feature-icon {
    color: #e3b341;
    background: rgba(227, 179, 65, 0.12);
}

.feature-cube {
    font-size: 1.7rem;
}


/* Arcade */

.feature-arcade::before {
    background: #bc8cff;
}

.feature-arcade:hover {
    border-color: #bc8cff;
}

.feature-arcade .feature-icon {
    color: #bc8cff;
    background: rgba(188, 140, 255, 0.12);
}


/* Corvette */

.feature-corvette::before {
    background: #f85149;
}

.feature-corvette:hover {
    border-color: #f85149;
}

.feature-corvette .feature-icon {
    color: #f85149;
    background: rgba(248, 81, 73, 0.12);
}


/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

footer {
    margin-top: 42px;
    padding-top: 20px;

    border-top: 1px solid #21262d;

    color: #6e7681;
    font-size: 0.85rem;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
}

.status {
    color: #8b949e;
}

.status.online {
    color: #3fb950;
}

.status.degraded {
    color: #d29922;
}

.status.offline {
    color: #f85149;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 700px) {
    body {
        padding: 0 22px 22px;
    }

    h1 {
        letter-spacing: -2px;
    }

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

    .feature-card {
        min-height: auto;
    }

/* Terminal feature tile */
.feature-terminal::before {
    background: #58a6ff;
}

.feature-terminal:hover {
    border-color: #58a6ff;
}

.feature-terminal .feature-icon {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.12);
}

.terminal-icon {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 0.95rem;
    font-weight: 800;
}}

/* Data Explorer feature tile */
.feature-database::before {
    background: #39c5cf;
}

.feature-database:hover {
    border-color: #39c5cf;
}

.feature-database .feature-icon {
    color: #39c5cf;
    background: rgba(57, 197, 207, 0.12);
}

.database-icon {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-weight: 800;
}

/* Node REPL feature tile */
.feature-node::before {
    background: #6cc24a;
}

.feature-node:hover {
    border-color: #6cc24a;
}

.feature-node .feature-icon {
    color: #6cc24a;
    background: rgba(108, 194, 74, 0.12);
}

.node-icon {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 0.72rem;
    font-weight: 800;
}

/* Offroad & Overlanding feature tile */
.feature-offroad::before {
    background: #7dc448;
}

.feature-offroad:hover {
    border-color: #7dc448;
}

.feature-offroad .feature-icon {
    color: #7dc448;
    background: rgba(125, 196, 72, 0.12);
}

/* Console Pong feature tile */
.feature-pong::before {
    background: #bc8cff;
}

.feature-pong:hover {
    border-color: #bc8cff;
}

.feature-pong .feature-icon {
    color: #bc8cff;
    background: rgba(188, 140, 255, 0.12);
}

.pong-icon {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 0.72rem;
    font-weight: 800;
}

/* System Monitor feature tile */
.feature-monitor::before {
    background: #58a6ff;
}

.feature-monitor:hover {
    border-color: #58a6ff;
}

.feature-monitor .feature-icon {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.12);
}

.monitor-icon {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 0.86rem;
    font-weight: 800;
}

/* Kernel Kingdom feature tile */
.feature-platformer::before {
    background: #e3b341;
}

.feature-platformer:hover {
    border-color: #e3b341;
}

.feature-platformer .feature-icon {
    color: #e3b341;
    background: rgba(227, 179, 65, 0.12);
}

.platformer-icon {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 1rem;
    font-weight: 800;
}

/* Asteroids feature tile */
.feature-asteroids::before {
    background: #39c5cf;
}

.feature-asteroids:hover {
    border-color: #39c5cf;
}

.feature-asteroids .feature-icon {
    color: #39c5cf;
    background: rgba(57, 197, 207, 0.12);
}

.asteroids-icon {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 1rem;
    font-weight: 800;
}

/* ASCII Lab feature tile */
.feature-ascii::before {
    background: #bc8cff;
}

.feature-ascii:hover {
    border-color: #bc8cff;
}

.feature-ascii .feature-icon {
    color: #bc8cff;
    background: rgba(188, 140, 255, 0.12);
}

.ascii-icon {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
    font-weight: 800;
}

/* QA Lab feature tile */
.feature-qa-lab::before {
    background: #58a6ff;
}

.feature-qa-lab:hover {
    border-color: #58a6ff;
}

.feature-qa-lab .feature-icon {
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.12);
}

.qa-lab-icon {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 1rem;
    font-weight: 800;
}

/* Playwright Lab feature tile */
.feature-playwright::before {
    background: #3fb950;
}

.feature-playwright:hover {
    border-color: #3fb950;
}

.feature-playwright .feature-icon {
    color: #3fb950;
    background: rgba(63, 185, 80, 0.12);
}

.playwright-icon {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.68rem;
    font-weight: 800;
}

/* Tiki Terminal feature tile */
.feature-tiki::before {
    background: #3fd7c8;
}

.feature-tiki:hover {
    border-color: #3fd7c8;
}

.feature-tiki .feature-icon {
    color: #ffad5a;
    background: rgba(63, 215, 200, 0.12);
}

.tiki-icon {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 1rem;
    font-weight: 800;
}

/* Message Bus Lab feature tile */
.feature-message-bus::before {
    background: #39c5cf;
}

.feature-message-bus:hover {
    border-color: #39c5cf;
}

.feature-message-bus .feature-icon {
    color: #39c5cf;
    background: rgba(57, 197, 207, 0.12);
}

.message-bus-icon {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 1rem;
    font-weight: 800;
}

/* Minecraft map tile */
.minecraft-icon {
    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    border-radius: 8px;

    background: rgba(63, 185, 80, 0.12);
    color: #3fb950;

    font-size: 1rem;
}

/* =========================================================
   MATRIX MODE
   ========================================================= */

.effect-controls {
    position: fixed;
    right: 22px;
    bottom: 20px;

    z-index: 10002;

    display: flex;
    gap: 8px;
    align-items: center;
}

.effect-toggle {
    padding: 8px 13px;

    color: #58a6ff;
    background: rgba(13, 17, 23, 0.9);

    border: 1px solid #30363d;
    border-radius: 7px;

    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;

    font-size: 0.68rem;
    letter-spacing: 0.08em;

    cursor: pointer;

    backdrop-filter: blur(8px);

    transition:
        color 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.effect-toggle:hover {
    color: #3fb950;
    border-color: #3fb950;
}

.matrix-toggle.active {
    color: #7ee787;
    border-color: #3fb950;
    background: rgba(8, 25, 12, 0.92);
    box-shadow:
        0 0 10px rgba(63, 185, 80, 0.35),
        0 0 22px rgba(63, 185, 80, 0.15);
}

.gravity-toggle {
    color: #e3b341;
}

.gravity-toggle:hover {
    color: #ffdf7e;
    border-color: #e3b341;
}

.gravity-toggle.active {
    color: #fff3c4;
    border-color: #e3b341;
    background: rgba(57, 45, 8, 0.94);
    box-shadow:
        0 0 10px rgba(227, 179, 65, 0.35),
        0 0 22px rgba(227, 179, 65, 0.15);
}

.gravity-layer {
    position: fixed;
    inset: 0;
    z-index: 10001;
    pointer-events: none;
    overflow: hidden;
}

.gravity-piece {
    position: fixed !important;
    margin: 0 !important;
    transform-origin: center center;
    will-change: transform, opacity;
    pointer-events: none !important;
}

body.gravity-mode .container {
    visibility: hidden;
}

.matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    z-index: 10000;

    pointer-events: none;

    opacity: 0;

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

    transition: opacity 0.35s ease;
}

.matrix-canvas.active {
    opacity: 1;
}

body.matrix-mode .container {
    filter:
        brightness(0.52)
        contrast(1.08)
        saturate(0.75);
}


@media (max-width: 700px) {
    .effect-controls {
        right: 12px;
        bottom: 12px;
        gap: 6px;
    }

    .effect-toggle {
        padding: 7px 10px;
        font-size: 0.62rem;
    }
}


/* =========================================================
   SHOOTOUT MODE
   ========================================================= */

.shootout-toggle {
    color: #f85149;
}

.shootout-toggle:hover {
    color: #ff8b84;
    border-color: #f85149;
}

.shootout-toggle.active {
    color: #ffd6d3;
    border-color: #f85149;
    background: rgba(55, 12, 12, 0.95);
    box-shadow:
        0 0 10px rgba(248, 81, 73, 0.35),
        0 0 22px rgba(248, 81, 73, 0.15);
}

.shootout-layer {
    position: fixed;
    inset: 0;
    z-index: 10001;
    pointer-events: none;
    overflow: hidden;
}

body.shootout-mode {
    cursor: crosshair;
}

body.shootout-mode .effect-controls,
body.shootout-mode .effect-controls * {
    cursor: pointer;
}

.bullet-impact {
    position: absolute;
    width: 220px;
    height: 220px;
    transform: translate(-50%, -50%) scale(0.12) rotate(var(--impact-rotation));
    transform-origin: center;
    opacity: 0;
    animation: bulletImpactIn 180ms cubic-bezier(.2,.8,.2,1) forwards;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.bullet-impact svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.bullet-hole-core {
    fill: #040506;
    stroke: rgba(230, 237, 243, 0.92);
    stroke-width: 2.2;
}

.bullet-hole-ring {
    fill: none;
    stroke: rgba(230, 237, 243, 0.5);
    stroke-width: 1.4;
}

.bullet-crack {
    fill: none;
    stroke: rgba(235, 240, 245, 0.86);
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bullet-crack-faint {
    fill: none;
    stroke: rgba(180, 190, 200, 0.34);
    stroke-width: 0.8;
    stroke-linecap: round;
}

.bullet-glint {
    fill: rgba(255, 255, 255, 0.94);
}

.impact-flash {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    background:
        radial-gradient(
            circle at var(--flash-x) var(--flash-y),
            rgba(255,255,255,.16) 0,
            rgba(255,255,255,.07) 6%,
            rgba(255,255,255,0) 18%
        );
    opacity: 0;
    animation: impactFlash 160ms ease-out forwards;
}

body.screen-kick .container {
    animation: screenKick 110ms linear;
}

@keyframes bulletImpactIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.08) rotate(var(--impact-rotation));
    }

    55% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.12) rotate(var(--impact-rotation));
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(var(--impact-rotation));
    }
}

@keyframes impactFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes screenKick {
    0%   { transform: translate3d(0, 0, 0); }
    25%  { transform: translate3d(-2px, 1px, 0); }
    50%  { transform: translate3d(2px, -1px, 0); }
    75%  { transform: translate3d(-1px, 1px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}


/* =========================================================
   KERNEL PANIC MODE
   ========================================================= */

.panic-toggle {
    color: #bc8cff;
}

.panic-toggle:hover {
    color: #dcb8ff;
    border-color: #bc8cff;
}

.panic-toggle.active {
    color: #f2e4ff;
    border-color: #bc8cff;
    background: rgba(37, 16, 50, 0.95);
    box-shadow:
        0 0 10px rgba(188, 140, 255, 0.4),
        0 0 22px rgba(188, 140, 255, 0.18);
}

.panic-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    overflow: hidden;
    background: #000;
    color: #d7ffd9;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
}

.panic-overlay.active {
    display: block;
}

.panic-glitch {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
}

.panic-overlay.glitching .panic-glitch {
    opacity: 1;
}

.panic-glitch::before,
.panic-glitch::after {
    content: "";
    position: absolute;
    inset: -8%;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(63, 185, 80, 0.08) 0 1px,
            transparent 1px 4px
        ),
        linear-gradient(
            90deg,
            transparent 0 18%,
            rgba(88, 166, 255, 0.08) 18% 21%,
            transparent 21% 47%,
            rgba(248, 81, 73, 0.07) 47% 50%,
            transparent 50%
        );
    animation: panicGlitch 90ms steps(2, end) infinite;
}

.panic-glitch::after {
    transform: translateX(14px);
    opacity: 0.55;
    animation-direction: reverse;
}

.panic-terminal {
    position: absolute;
    inset: 0;
    padding: 26px 30px 34px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(63, 185, 80, 0.035),
            transparent 40%
        ),
        #000;
}

.panic-output {
    margin: 0;
    white-space: pre-wrap;
    color: #d7ffd9;
    font-size: clamp(11px, 1.15vw, 15px);
    line-height: 1.38;
    text-shadow: 0 0 8px rgba(63, 185, 80, 0.2);
}

.panic-cursor {
    display: inline-block;
    width: 0.62em;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: -0.15em;
    background: #d7ffd9;
    animation: panicBlink 0.8s steps(1, end) infinite;
}

.panic-hint {
    position: absolute;
    right: 22px;
    bottom: 18px;
    color: #6e7681;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.panic-overlay.rebooting .panic-terminal {
    animation: panicRebootFade 550ms ease forwards;
}

body.panic-shock .container {
    animation: panicShock 420ms cubic-bezier(.18,.89,.32,1.28);
}

@keyframes panicGlitch {
    0% {
        transform: translate3d(-5px, 1px, 0) skewX(-1deg);
        filter: hue-rotate(0deg);
    }
    25% {
        transform: translate3d(7px, -2px, 0) skewX(2deg);
        filter: hue-rotate(20deg);
    }
    50% {
        transform: translate3d(-8px, 3px, 0) skewX(-2deg);
        filter: hue-rotate(-20deg);
    }
    75% {
        transform: translate3d(4px, -1px, 0) skewX(1deg);
        filter: hue-rotate(10deg);
    }
    100% {
        transform: translate3d(0, 0, 0);
        filter: hue-rotate(0deg);
    }
}

@keyframes panicBlink {
    0%, 48% { opacity: 1; }
    49%, 100% { opacity: 0; }
}

@keyframes panicShock {
    0%   { transform: translate3d(0,0,0) skewX(0deg); filter: none; }
    12%  { transform: translate3d(-6px,2px,0) skewX(-2deg); filter: hue-rotate(18deg) contrast(1.3); }
    24%  { transform: translate3d(8px,-3px,0) skewX(2deg); filter: hue-rotate(-16deg) contrast(1.5); }
    36%  { transform: translate3d(-4px,1px,0) skewX(-1deg); }
    60%  { transform: translate3d(3px,-1px,0) skewX(1deg); }
    100% { transform: translate3d(0,0,0) skewX(0deg); filter: none; }
}

@keyframes panicRebootFade {
    0%   { opacity: 1; transform: scale(1); }
    35%  { opacity: 1; transform: scale(1.002); }
    100% { opacity: 0; transform: scale(0.998); }
}


/* ---------------------------------------------------------
   Animated Tux frame swapping
   --------------------------------------------------------- */

.tux-greeter-image {
    aspect-ratio: 545 / 420;
    will-change: contents;
}



/* ---------------------------------------------------------
   Functional navigation links
   --------------------------------------------------------- */

.site-brand,
.nav-link {
    text-decoration: none;
}

.site-brand {
    display: inline-flex;
    align-items: center;
}

.nav-link {
    cursor: pointer;
}

.site-nav button {
    cursor: pointer;
}

/* ---------------------------------------------------------
   Section landing pages
   --------------------------------------------------------- */

.section-page {
    padding-top: 52px;
}

.section-page-hero {
    position: relative;
    margin-bottom: 34px;
    padding: 34px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 82% 18%,
            rgba(63, 185, 80, 0.12),
            transparent 34%
        ),
        #111820;

    border: 1px solid #30363d;
    border-radius: 16px;
}

.section-page-prompt {
    display: block;
    margin-bottom: 11px;

    color: #58a6ff;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.8rem;
}

.section-page-hero h1 {
    margin-bottom: 16px;

    font-size: clamp(2.2rem, 6vw, 4.3rem);
    letter-spacing: -2px;
}

.section-page-hero h1 span {
    color: #3fb950;
}

.section-page-hero p {
    max-width: 720px;

    color: #8b949e;

    font-size: 1.05rem;
    line-height: 1.65;
}

.section-page-note {
    margin-top: 15px;

    color: #6e7681;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.72rem;
}

.section-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.section-card {
    position: relative;

    min-height: 174px;
    padding: 22px;

    overflow: hidden;

    color: inherit;
    text-decoration: none;

    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;

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

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

    position: absolute;
    inset: 0 0 auto 0;

    height: 2px;

    background: var(--section-accent, #58a6ff);

    opacity: 0.88;
}

.section-card:hover {
    transform: translateY(-2px);

    background: #1b2027;
    border-color: var(--section-accent, #58a6ff);
}

.section-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 12px;
}

.section-card-title {
    display: flex;
    align-items: center;
    gap: 11px;

    color: #f0f6fc;

    font-size: 1rem;
    font-weight: 700;
}

.section-card-icon {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    border-radius: 9px;

    color: var(--section-accent, #58a6ff);
    background: color-mix(in srgb, var(--section-accent, #58a6ff) 13%, transparent);

    font-size: 1.12rem;
    line-height: 1;
}

.section-card-arrow {
    color: var(--section-accent, #58a6ff);
}

.section-card p {
    color: #8b949e;

    font-size: 0.91rem;
    line-height: 1.55;
}

.section-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 15px;
}

.section-card-tags span {
    padding: 4px 8px;

    color: #8b949e;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 999px;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.64rem;
}

.section-card.disabled {
    cursor: default;
    opacity: 0.68;
}

.section-card.disabled:hover {
    transform: none;
    border-color: #30363d;
    background: #161b22;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
}

.about-panel {
    padding: 24px;

    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
}

.about-panel h2 {
    margin-bottom: 12px;

    color: #f0f6fc;

    font-size: 1.05rem;
}

.about-panel p,
.about-panel li {
    color: #8b949e;

    font-size: 0.93rem;
    line-height: 1.65;
}

.about-panel ul {
    padding-left: 20px;
}

.about-terminal {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
}

.about-terminal .line {
    margin-bottom: 8px;
}

.about-terminal .prompt {
    color: #58a6ff;
}

.about-terminal .value {
    color: #3fb950;
}

@media (max-width: 760px) {
    .section-page {
        padding-top: 30px;
    }

    .section-page-hero {
        padding: 24px;
    }

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

/* =========================================================
   HOMEPAGE THEME - LINUX SERVER ROOM
   Scoped to the homepage only via body.theme-linux-room.
   This keeps section pages and effect themes isolated.
   ========================================================= */

body.theme-linux-room {
    min-height: 100vh;
    background-color: #060b10;
    background-image:
        linear-gradient(
            90deg,
            rgba(4, 8, 12, 0.04) 0%,
            rgba(4, 8, 12, 0.05) 30%,
            rgba(4, 8, 12, 0.30) 48%,
            rgba(4, 8, 12, 0.58) 72%,
            rgba(4, 8, 12, 0.72) 100%
        ),
        linear-gradient(
            180deg,
            rgba(4, 8, 12, 0.04) 0%,
            rgba(4, 8, 12, 0.10) 62%,
            rgba(4, 8, 12, 0.72) 100%
        ),
        url("/assets/home-linux-room.webp");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
}

body.theme-linux-room .site-nav-shell {
    background: rgba(6, 11, 16, 0.80);
    border-bottom-color: rgba(88, 166, 255, 0.16);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.20);
}

body.theme-linux-room .site-nav {
    background: rgba(7, 13, 19, 0.16);
}

body.theme-linux-room .container {
    max-width: 960px;
    padding-top: 42px;
}

body.theme-linux-room .hero-intro {
    min-height: 260px;
    margin-bottom: 24px;
    padding-top: 88px;
    padding-right: 0;
}

body.theme-linux-room .hero-copy {
    padding: 24px 26px 26px;
    background: linear-gradient(
        135deg,
        rgba(7, 13, 19, 0.78),
        rgba(7, 13, 19, 0.50)
    );
    border: 1px solid rgba(88, 166, 255, 0.18);
    border-radius: 16px;
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(8px) saturate(1.08);
    -webkit-backdrop-filter: blur(8px) saturate(1.08);
}

body.theme-linux-room .hero-intro .terminal {
    margin-bottom: 14px;
    color: #79c0ff;
    text-shadow: 0 0 16px rgba(88, 166, 255, 0.35);
}

body.theme-linux-room .hero-intro h1 {
    margin-bottom: 18px;
    text-shadow: 0 3px 22px rgba(0, 0, 0, 0.65);
}

body.theme-linux-room .hero-intro .tagline {
    color: #c3ccd6;
    max-width: 760px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
}

body.theme-linux-room .card,
body.theme-linux-room .feature-card {
    background:
        linear-gradient(
            145deg,
            rgba(11, 18, 26, 0.91),
            rgba(11, 18, 26, 0.78)
        );
    border-color: rgba(120, 145, 170, 0.28);
    box-shadow:
        0 13px 34px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(9px) saturate(1.08);
    -webkit-backdrop-filter: blur(9px) saturate(1.08);
}

body.theme-linux-room .card:hover,
body.theme-linux-room .feature-card:hover {
    background:
        linear-gradient(
            145deg,
            rgba(16, 26, 37, 0.95),
            rgba(12, 20, 29, 0.88)
        );
    box-shadow:
        0 15px 38px rgba(0, 0, 0, 0.31),
        0 0 24px rgba(88, 166, 255, 0.08);
}

body.theme-linux-room .card p,
body.theme-linux-room .feature-card p {
    color: #aeb8c3;
}

body.theme-linux-room .section-heading {
    padding: 14px 18px;
    background: rgba(7, 13, 19, 0.68);
    border: 1px solid rgba(88, 166, 255, 0.14);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.theme-linux-room footer {
    margin-bottom: 18px;
    padding: 16px 18px;
    background: rgba(7, 13, 19, 0.68);
    border: 1px solid rgba(88, 166, 255, 0.14);
    border-radius: 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Preserve the left side of the server-room artwork on wide displays. */
@media (min-width: 1180px) {
    body.theme-linux-room .container {
        width: min(960px, calc(100vw - 660px));
        margin-left: clamp(565px, 36vw, 690px);
        margin-right: auto;
    }
}

@media (max-width: 1179px) {
    body.theme-linux-room {
        background-position: 42% top;
    }

    body.theme-linux-room .container {
        width: min(950px, calc(100% - 34px));
        margin-left: auto;
        margin-right: auto;
    }

    body.theme-linux-room .hero-intro {
        padding-top: 64px;
    }
}

@media (max-width: 760px) {
    body.theme-linux-room {
        background-image:
            linear-gradient(
                rgba(4, 8, 12, 0.52),
                rgba(4, 8, 12, 0.78)
            ),
            url("/assets/home-linux-room.webp");
        background-position: 34% top;
        background-attachment: scroll;
    }

    body.theme-linux-room .container {
        width: 100%;
        padding-top: 20px;
    }

    body.theme-linux-room .hero-intro {
        padding-top: 24px;
    }

    body.theme-linux-room .hero-copy {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.theme-linux-room {
        background-attachment: scroll;
    }
}

/* =========================================================
   HOMEPAGE HERO - TUX TREADMILL v2.1
   Transparent Tux+treadmill asset only. Keep motion restrained:
   the treadmill stays planted while the runner gets a subtle stride.
   ========================================================= */

body.theme-linux-room .hero-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: stretch;
    gap: 18px;
}

body.theme-linux-room .hero-copy {
    min-width: 0;
}

body.theme-linux-room .hero-treadmill {
    position: relative;
    min-width: 0;
    min-height: 100%;
    border: 1px solid rgba(88, 166, 255, 0.18);
    border-radius: 16px;
    overflow: hidden;
    background:
        radial-gradient(circle at 68% 42%, rgba(63, 185, 80, 0.08), transparent 34%),
        rgba(5, 11, 17, 0.48);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(8px) saturate(1.08);
    -webkit-backdrop-filter: blur(8px) saturate(1.08);
}

body.theme-linux-room .hero-treadmill::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 32%);
}

body.theme-linux-room .hero-treadmill-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body.theme-linux-room .hero-treadmill-image {
    display: block;
    width: 96%;
    height: 96%;
    max-width: none;
    object-fit: contain;
    object-position: center bottom;
    filter:
        saturate(1.02)
        contrast(1.02)
        drop-shadow(0 16px 22px rgba(0, 0, 0, 0.34));
    transform-origin: 52% 82%;
    will-change: transform;
    animation: tuxTreadmillStrideV21 480ms ease-in-out infinite;
}

@keyframes tuxTreadmillStrideV21 {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50%      { transform: translate3d(0, -1.25px, 0) rotate(.12deg); }
}

@media (max-width: 980px) {
    body.theme-linux-room .hero-intro {
        grid-template-columns: 1fr;
    }

    body.theme-linux-room .hero-treadmill {
        min-height: 300px;
    }

    body.theme-linux-room .hero-treadmill-image {
        width: 88%;
        height: 88%;
    }
}

@media (max-width: 620px) {
    body.theme-linux-room .hero-treadmill {
        min-height: 235px;
    }

    body.theme-linux-room .hero-treadmill-image {
        width: 96%;
        height: 96%;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.theme-linux-room .hero-treadmill-image {
        animation: none;
    }
}

/* =========================================================
   HOMEPAGE HERO v2.2 - OPEN / BORDERLESS HERO
   Keep the server-room artwork visible behind the intro and Tux.
   ========================================================= */
body.theme-linux-room .hero-copy,
body.theme-linux-room .hero-treadmill {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.theme-linux-room .hero-treadmill::after {
    display: none;
}

/* =========================================================
   HOMEPAGE HERO v2.3 - LARGER TUX TREADMILL
   Scale the existing transparent Tux+treadmill asset only.
   No image/asset changes.
   ========================================================= */
body.theme-linux-room .hero-treadmill-image {
    width: 190%;
    height: 190%;
}

@media (max-width: 980px) {
    body.theme-linux-room .hero-treadmill-image {
        width: 165%;
        height: 165%;
    }
}

@media (max-width: 620px) {
    body.theme-linux-room .hero-treadmill-image {
        width: 145%;
        height: 145%;
    }
}

/* =========================================================
   HOMEPAGE HERO v2.4 - RAISE TUX TREADMILL
   Position-only adjustment. Keep the v2.3 image and scale.
   ========================================================= */
body.theme-linux-room .hero-treadmill-scene {
    transform: translateY(-62px);
}

@media (max-width: 980px) {
    body.theme-linux-room .hero-treadmill-scene {
        transform: translateY(-38px);
    }
}

@media (max-width: 620px) {
    body.theme-linux-room .hero-treadmill-scene {
        transform: translateY(-20px);
    }
}

/* =========================================================
   HOMEPAGE HERO v2.5 - REMOVE TUX CLIPPING
   Allow the oversized/raised transparent Tux+treadmill asset
   to extend outside its layout cell without being cropped.
   ========================================================= */
body.theme-linux-room .hero-treadmill,
body.theme-linux-room .hero-treadmill-scene {
    overflow: visible;
}

/* =========================================================
   HOMEPAGE HERO v2.6 - NUDGE TUX UP AND LEFT
   Position-only adjustment. Keep v2.5 size and unclipped asset.
   ========================================================= */
body.theme-linux-room .hero-treadmill-scene {
    transform: translate(-42px, -82px);
}

@media (max-width: 980px) {
    body.theme-linux-room .hero-treadmill-scene {
        transform: translate(-24px, -50px);
    }
}

@media (max-width: 620px) {
    body.theme-linux-room .hero-treadmill-scene {
        transform: translate(-10px, -26px);
    }
}

/* =========================================================
   HOMEPAGE HERO v2.7 - RAISE TUX A LITTLE MORE
   Position-only adjustment. Keep v2.6 size and horizontal position.
   ========================================================= */
body.theme-linux-room .hero-treadmill-scene {
    transform: translate(-42px, -112px);
}

@media (max-width: 980px) {
    body.theme-linux-room .hero-treadmill-scene {
        transform: translate(-24px, -68px);
    }
}

@media (max-width: 620px) {
    body.theme-linux-room .hero-treadmill-scene {
        transform: translate(-10px, -36px);
    }
}

/* =========================================================
   HOMEPAGE v2.8 - OPEN SECTION HEADING + TRANSPARENT TILES
   Keep navigation unchanged. Let the server-room artwork show
   through the homepage section heading and content tiles.
   ========================================================= */
body.theme-linux-room .section-heading {
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.theme-linux-room .card,
body.theme-linux-room .feature-card {
    background: rgba(7, 13, 19, 0.34);
    border-color: rgba(120, 145, 170, 0.20);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(3px) saturate(1.03);
    -webkit-backdrop-filter: blur(3px) saturate(1.03);
}

body.theme-linux-room .card:hover,
body.theme-linux-room .feature-card:hover {
    background: rgba(10, 18, 26, 0.48);
    border-color: rgba(88, 166, 255, 0.42);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.20),
        0 0 22px rgba(88, 166, 255, 0.08);
}
