/* --------- Base Reset / Layout --------- */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg: #050509;
    --bg-alt: #0b0b11;
    --accent: #e3122f;
    --accent-soft: rgba(227, 18, 47, 0.3);
    --text-main: #e4e4e4;
    --text-muted: #9b9ba1;
    --border-subtle: #1a1a22;
    --card-bg: #101018;
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.7);
    --radius-lg: 18px;
    --transition-fast: 0.18s ease-out;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
    scroll-behavior: smooth;
}

body {
    line-height: 1.5;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, 100% - 3rem);
    margin-inline: auto;
}

section {
    padding: 4rem 0;
    scroll-margin-top: 80px; /* tweak to match header height */
}

@media (min-width: 992px) {
    section {
        padding: 5rem 0;
    }
}

/* --------- Top Navigation --------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(
            to bottom,
            rgba(5, 5, 9, 0.6),
            rgba(5, 5, 9, 0.3)
    );
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Hamburger button (hidden by default, shown via media query) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Base hamburger button */
.nav-toggle {
    display: none; /* shown in mobile media query below */
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.65);
    cursor: pointer;

    display: none;
    align-items: center;
    justify-content: center;
}

.nav-toggle i {
    font-size: 1.1rem;
    color: #ffffff;
    line-height: 1;
    transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}

/* Optional little flair when menu is open */
.site-header.nav-open .nav-toggle i {
    transform: rotate(90deg);
    opacity: 0.9;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    overflow: visible;  /* let the glow extend outside */
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(227, 18, 47, 0.75), transparent 65%),
    #000;
    box-shadow: 0 0 18px rgba(227, 18, 47, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image stays fixed on top of everything */
.logo-og-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 50%;
    position: relative;
    z-index: 1;   /* sits above the animated glow */
}

/* Optional: a subtle static frame on the image itself */
.logo-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: none;
    pointer-events: none;
}

/* Orbital glow layer behind the logo – ALWAYS animating */
.logo-mark::before {
    content: "";
    position: absolute;
    inset: -6px;                 /* bigger than the logo circle */
    border-radius: inherit;
    background: radial-gradient(
            circle,
            rgba(227, 18, 47, 0.0) 40%,   /* transparent center */
            rgba(227, 18, 47, 0.9) 70%,   /* strong deep red ring */
            rgba(227, 18, 47, 0.0) 100%   /* fade back out */
    );
    opacity: 1;                              /* always visible */
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;                              /* behind the image */
    animation: logo-orbit 3s linear infinite;  /* always running */
}

/* Planetary counterclockwise spin + outward pulse */
@keyframes logo-orbit {
    0% {
        transform: rotate(0deg) scale(1);
        box-shadow:
                0 0 14px rgba(227, 18, 47, 0.8),
                0 0 0 0 rgba(227, 18, 47, 0.0);
    }
    50% {
        transform: rotate(-180deg) scale(1.05);
        box-shadow:
                0 0 22px rgba(227, 18, 47, 1),
                0 0 0 6px rgba(227, 18, 47, 0.45);
    }
    100% {
        transform: rotate(-360deg) scale(1);
        box-shadow:
                0 0 14px rgba(227, 18, 47, 0.8),
                0 0 0 0 rgba(227, 18, 47, 0.0);
    }
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    /* prevent text selection */
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* old Firefox */
}

.brand-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    /* prevent text selection */
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* old Firefox */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    /* prevent text selection */
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* old Firefox */
}

.nav-links a {
    position: relative;
    padding-block: 0.25rem;
    color: var(--text-muted);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), #ff557e);
    transition: width var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    display: none;
}

@media (min-width: 768px) {
    .nav-cta {
        display: inline-flex;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: none;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.14em;

    background: #ffffff;
    color: #000000;
    cursor: pointer;

    /* stable soft depth */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.75);

    /* ONE subtle text shadow, never changes */
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);

    /* only animate movement */
    transition: transform 0.12s ease-out;
}

/* hover: only move the button a bit, nothing else changes */
.btn:hover {
    transform: translateY(-1px);
}

/* active: back to rest position */
.btn:active {
    transform: translateY(0);
}


/* --------- Hero: Red Mist Origin --------- */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 6rem 0 4rem;

    /* base color behind everything */
    background-color: var(--bg);

    /* image + 4 gradients */
    background-image:
            url('../img/origin_background3.png'),
            radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.09), transparent 55%),
            radial-gradient(circle at 80% 0%, rgba(255, 45, 85, 0.35), transparent 55%),
            radial-gradient(circle at 0% 100%, rgba(227, 18, 47, 0.4), transparent 50%),
            radial-gradient(circle at 100% 100%, rgba(141, 0, 36, 0.55), transparent 50%);

    /* 5 backgrounds → 5 sizes/positions/repeats */
    background-size: cover, auto, auto, auto, auto;
    background-position: center, center, center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;

    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
    /* prevent text selection */
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* old Firefox */
}

.hero::before {
    /* soft red mist overlay that moves */
    content: "";
    position: absolute;
    inset: -20%;
    background:
            radial-gradient(circle at 15% 20%, rgba(255, 68, 120, 0.25), transparent 60%),
            radial-gradient(circle at 80% 10%, rgba(255, 20, 60, 0.35), transparent 65%),
            radial-gradient(circle at 40% 80%, rgba(227, 18, 47, 0.45), transparent 65%);
    mix-blend-mode: screen;
    opacity: 0.7;
    filter: blur(8px);
    animation: drift 28s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes drift {
    0% {
        transform: translate3d(0, 0, 0) scale(1.03);
    }
    50% {
        transform: translate3d(-8px, 12px, 0) scale(1.08);
    }
    100% {
        transform: translate3d(10px, -14px, 0) scale(1.05);
    }
}

/* Particles layer */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;      /* explicit height */
    z-index: 1;        /* between ::before (0) and .hero-inner (2) */
    pointer-events: none;
}

/* Force the canvas to fill the container */
.hero-particles canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.hero-particles {
    background: transparent;
}


.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding-inline: 1rem;
    /* prevent text selection */
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* old Firefox */
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.45);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #ff8ea6, #ff002f);
    box-shadow: 0 0 12px rgba(255, 0, 47, 0.75);
}

/* Container for planet + overlay – now also does the clipping */
.hero-logo-orbit {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    overflow: hidden;          /* <-- circle mask lives here now */
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;

    /* keep blend effects local so header changes don't affect it */
    isolation: isolate;
}

/* Planet – your circular logo PNG */
.hero-og-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 50%;
}

.hero-title {
    font-size: clamp(2.1rem, 3.4vw, 3rem);
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.hero-title span {
    color: #ffffff;
    display: inline-block;
    position: relative;

    /* 3D-style stacked shadow + soft glow */
    text-shadow:
            0 1px 0 #b10f25,      /* thin edge */
            0 2px 0 #880b1c,
            0 3px 0 #600815,
            0 4px 0 #3a050d,
            0 6px 8px rgba(0, 0, 0, 0.85),  /* main drop shadow */
            0 0 18px rgba(227, 18, 47, 0.65); /* subtle red glow */
}

.hero-subtitle {
    margin: 0 0 2rem;
    font-size: 0.95rem;
    max-width: 32rem;
    margin-inline: auto;

    color: #f2f2f2; /* softer light grey instead of pure white/black */

    /* gentle, soft shadow so it doesn't look harsh */
    text-shadow:
            0 1px 3px rgba(0, 0, 0, 0.75);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.hero-meta {
    margin-top: 1rem;
    font-size: 0.74rem;
    color:
            #800b0b
;

    text-shadow:
            0 1px 2px rgba(255, 255, 255, 0.25); /* soft white/grey lift */
    text-transform: uppercase;
    letter-spacing: 0.18em;

    font-weight: 700; /* make it bold */
}

/* --------- Section Headings --------- */
.section-header {
    text-align: left;
    margin-bottom: 2.5rem;
}

.section-kicker {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
}

.section-desc {
    margin: 0;
    max-width: 34rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .section-header {
        text-align: left;
    }
}

/* --------- About / Origin Story --------- */
.about-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        align-items: center;
    }
}

.about-text p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-list {
    margin: 1.25rem 0 0;
    padding-left: 1rem;
    list-style: none;
}

.about-list li {
    position: relative;
    margin-bottom: 0.35rem;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.about-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(227, 18, 47, 0.8);
}

.origin-timeline {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: radial-gradient(circle at 10% 0%, rgba(227, 18, 47, 0.16), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(227, 18, 47, 0.18), transparent 60%),
    var(--bg-alt);
    padding: 1.5rem 1.25rem;
    box-shadow: var(--shadow-soft);
}

.origin-timeline-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
}

.timeline-line {
    position: relative;
    padding-left: 1.4rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.7rem;
    top: 0.3rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #ff5d7b, var(--accent));
    box-shadow: 0 0 14px rgba(227, 18, 47, 0.9);
    border: 2px solid #050509;
}

.timeline-dot-here {
    background: radial-gradient(circle, green, lawngreen);
}

.timeline-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 0.1rem;
}

.timeline-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* --------- Games Grid --------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.card::before {
    content: "";
    position: absolute;
    inset: -30%;
    background:
            radial-gradient(circle at 30% 0%, rgba(227, 18, 47, 0.4), transparent 60%),
            radial-gradient(circle at 90% 100%, rgba(227, 18, 47, 0.3), transparent 60%);
    opacity: 0;
    mix-blend-mode: screen;
    transition: opacity 0.22s ease-out;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9);
    border-color: rgba(227, 18, 47, 0.4);
}

.card:hover::before {
    opacity: 0.9;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.16rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(227, 18, 47, 0.9);
}

.card-title {
    margin: 0 0 0.3rem;
    font-size: 1rem;
}

.card-sub {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
}

.card-body {
    font-size: 0.87rem;
    color: var(--text-muted);
}

.card-tags {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-size: 0.7rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

/* --------- Rank Progression --------- */
.rank-track {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: radial-gradient(circle at 50% 0%, rgba(227, 18, 47, 0.22), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(227, 18, 47, 0.18), transparent 55%),
    var(--bg-alt);
    padding: 1.5rem 1.3rem;
    box-shadow: var(--shadow-soft);
}

.rank-bar {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.rank-bar::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 6%;
    right: 6%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(227, 18, 47, 0.7));
    opacity: 0.65;
    transform: translateY(-50%);
}

.rank-node {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    z-index: 1;
}

.rank-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), var(--accent));
    box-shadow: 0 0 16px rgba(227, 18, 47, 0.9);
    border: 2px solid #050509;
}

.rank-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    text-align: center;
    color: var(--text-muted);
}

.rank-node.rank-key .rank-label {
    color: #fff;
}

.rank-node.rank-key .rank-dot {
    background: radial-gradient(circle, green, lawngreen);
    box-shadow: 0 0 20px rgba(255, 79, 130, 1);
}

.rank-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.rank-details h4 {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-main);
}

/* --------- Highlights --------- */
.highlights-grid {
    display: grid;
    gap: 1.6rem;
}

@media (min-width: 900px) {
    .highlights-grid {
        grid-template-columns: 1.3fr 1fr;
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    font-size: 0.75rem;
}

.gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(227, 18, 47, 0.5), transparent 70%),
    #050509;
    border: 1px solid rgba(255, 255, 255, 0.08);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: flex-end;
    padding: 0.45rem 0.5rem;
    color: #f7f7f7;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9);
}

.gallery-caption {
    position: relative;
    z-index: 1;
}

.gallery-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.gallery-meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), transparent 65%);
    z-index: 0;
}

.quotes-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: var(--bg-alt);
    padding: 1.3rem 1.1rem;
    box-shadow: var(--shadow-soft);
    font-size: 0.86rem;
    color: var(--text-muted);
}

.quotes-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.quote-item {
    margin-bottom: 0.8rem;
    border-left: 2px solid rgba(227, 18, 47, 0.5);
    padding-left: 0.7rem;
}

.quote-text {
    margin-bottom: 0.25rem;
}

.quote-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

/* --------- Footer --------- */
.site-footer {
    padding: 2.5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: radial-gradient(circle at 100% 0%, rgba(227, 18, 47, 0.2), transparent 60%),
    #050509;
}

.footer-grid {
    display: grid;
    gap: 1.75rem;
    font-size: 0.82rem;
}

@media (min-width: 900px) {
    .footer-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    }
}

.footer-brand {
    color: var(--text-muted);
}

.footer-links,
.footer-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-heading {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    margin-top: 1.8rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    text-align: center;
}

/* --------- Responsive tweaks --------- */
@media (max-width: 767px) {
    .nav-inner {
        padding: 0.5rem 0;
    }

    /* Show hamburger on mobile */
    .nav-toggle {
        display: inline-flex;
    }

    .nav-right {
        position: relative;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 0.5rem;

        display: none; /* hidden until nav-open */
        flex-direction: column;
        align-items: flex-end;
        gap: 0.75rem;

        padding: 0.75rem 1.25rem 0.9rem;

        background: rgba(5, 5, 9, 0.97);
        border-radius: 0 0 0 var(--radius-lg);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9);
        z-index: 30;
    }

    .site-header.nav-open .nav-links {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        text-align: right;
        padding-block: 0.2rem;
    }
}


/* Hide the little corner logo without disturbing the original styles */
.site-header .logo-mark {
    display: none !important;
}

/* --------- Scroll Reveal Utility --------- */
.js-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
            opacity 0.6s ease-out,
            transform 0.6s ease-out;
    will-change: opacity, transform;
}

.js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}