        html {
            overflow-x: hidden;
        }

        body {
            margin: 0;
            font-family: 'Orbitron', sans-serif;
            background: linear-gradient(145deg, #0f0f0f, #1a1a1a);
            color: #eee;
            overflow-x: hidden;
            box-sizing: border-box;
            cursor: url("/CustomCursor.png"), auto;
        }

        * {
            box-sizing: border-box;
            /* ensures padding/margin/border don't add extra width */
        }

        header {
            background: #000;
            color: white;
            padding: 20px;
            font-size: 1.2em;
            text-align: center;
            position: relative;
        }

        header::before {
            content: "";
            position: absolute;
            inset: 0;
            background: url('/Banner.png') center center / cover no-repeat;
            opacity: 0.5;
            z-index: 1;
        }

        header>* {
            position: relative;
            z-index: 1;
        }

        .header-wrapper {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            position: relative;
        }

        .logo {
            position: absolute;
            left: 0px;
            height: 120px;
        }

        .logo-secondary {
            position: absolute;
            right: 0px;
            left: auto;
            top: 0px;
            height: 194px;
        }

        .mobile-logo {
            display: none;
            height: 60px;
            margin-bottom: 10px;
        }

        .center-content {
            text-align: center;
            width: 100%;
        }

        .zoom-hover {
            transition: transform 0.4s ease;
            cursor: pointer;
        }

        .zoom-centerhover {
            transition: transform 0.4s ease;
            /* cursor: pointer; */
            position: relative;
            will-change: transform;
        }

        .hover-container {
            position: relative;
            display: inline-block;
        }

        .hover-container img {
            transition: filter 0.4s ease;
            display: block;
        }



        .hover-container.tapped .link-icon {
            display: flex;
        }

        .hover-container.tapped .multi-link-overlay {
            display: flex;
        }

        .hover-container.tapped .game-thumbnail {
            filter: blur(2px);
        }

        a:hover,
        button:hover {
            cursor: url("/CustomCursorHover.png"), pointer;
        }

        /* Sits low so the playing preview stays visible behind it. */
        .link-icon,
        .multi-link-overlay a {
            background: #222;
            border: 1px solid #e8e8e8;
            color: #e8e8e8;
            align-items: center;
            padding: 6px 14px;
            border-radius: 8px;
            font-size: 0.8em;
            font-weight: 600;
            text-decoration: none;
            white-space: nowrap;
        }

        .link-icon:hover,
        .multi-link-overlay a:hover {
            background: #e8e8e8;
            color: #1a1a1a;
        }

        .multi-link-overlay a {
            display: flex;
        }

        .link-icon {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            display: none;
            z-index: 10;
        }

        .hover-container:hover .link-icon {
            display: flex;
        }

        .nav-toggle {
            display: none;
            background: transparent;
            border: 1px solid #4FC3F7;
            color: #4FC3F7;
            font-family: 'Orbitron', sans-serif;
            font-size: 0.9em;
            padding: 6px 16px;
            border-radius: 6px;
            cursor: pointer;
            margin: 10px auto 0;
        }

        nav {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 30px;
            box-sizing: border-box;
        }

        .nav-item {
            position: relative;
        }

        .nav-item>a {
            text-decoration: none;
            color: #fff;
            font-weight: bold;
            display: inline-block;
            padding: 5px 0px;
        }

        .dropdown-content {
            display: none;
            position: absolute;
            top: 100%;
            left: -5%;
            background: white;
            border: 1px solid #ddd;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
            min-width: 150px;
            z-index: 100;
        }

        .dropdown-content a {
            display: block;
            padding: 10px;
            color: black;
            text-decoration: none;
        }

        .dropdown-content a:hover {
            background-color: #f0f0f0;
        }

        .dropdown:hover .dropdown-content {
            display: block;
        }

        .top-section {
            background: #1e1e1e;
            padding: 20px;
            text-align: center;
        }

        .top-description {
            margin-bottom: 15px;
            font-size: 1.1em;
        }

        .contact-info-top {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 20px;
        }

        .contact-info-top a {
            display: flex;
            align-items: center;
            text-decoration: none;
            color: inherit;
            font-size: 0.95em;
            min-width: 0;
            overflow-wrap: anywhere;
        }

        .contact-info-top img {
            width: 20px;
            height: 20px;
            margin-right: 8px;
            filter: invert(100%);
        }

        .contact-info-top a.resume-btn {
            background: #4FC3F7;
            color: #000;
            font-family: 'Orbitron', sans-serif;
            font-weight: bold;
            font-size: 0.9em;
            padding: 10px 20px;
            border-radius: 6px;
            gap: 8px;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .contact-info-top a.resume-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(79, 195, 247, 0.4);
        }

        .section {
            padding: 40px 20px;
            text-align: center;
        }

        .carousel {
            display: grid;
            /* capped max keeps cards identical whatever the item count */
            grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
            justify-content: center;
            gap: 20px;
            padding: 20px;
            max-width: 1200px;
            margin: 0 auto;
        }

        /* Flagship cards keep their original 320px width */
        #ultimatum .carousel {
            grid-template-columns: repeat(auto-fit, 320px);
            justify-content: center;
        }

        .carousel .item {
            min-width: 0;
            background: #2a2a2a;
            color: #fff;
            border-radius: 8px;
            padding: 20px;
            box-sizing: border-box;
        }

        .carousel .item h3 {
            overflow-wrap: anywhere;
        }

        /* Role / duration line above each project description */
        .project-meta {
            font-family: 'Merriweather', serif;
            font-size: 0.82em;
            color: #9a9a9a;
            letter-spacing: 0.03em;
            margin: 0 0 6px;
        }

        .item p {
            font-family: 'Merriweather', serif;
            font-size: 1.1em;
            line-height: 1.7;
            color: #ccc;
        }

        /* Technical breakdown devlog link */
        .tech-link {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            max-width: 300px;
            width: 100%;
            margin: 0 auto;
            box-sizing: border-box;
            padding: 8px 12px;
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            background: #222;
            color: #e8e8e8;
            font-size: 1em;
            font-weight: 600;
            letter-spacing: 0.02em;
            text-decoration: none;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.2s ease, color 0.2s ease;
        }

        .tech-link:hover,
        .tech-link:focus-visible {
            background: #e8e8e8;
            color: #1a1a1a;
            outline: none;
        }

        .tech-link::after {
            content: "";
            width: 7px;
            height: 7px;
            border-top: 2px solid currentColor;
            border-right: 2px solid currentColor;
            transform: rotate(45deg);
        }

        @media (prefers-reduced-motion: reduce) {
            .tech-link {
                transition: none;
            }
        }

        .carousel .item img:not(.platform-badge),
        .carousel .item video {
            width: 100%;
            height: auto;
            max-width: 700px;
            /* cap desktop size */
            border-radius: 16px;
            display: block;
            margin: 0 auto;
        }

        .item img {
            display: block;
            margin: 0 auto;
        }

        .download-links,
        .aboutme-section {
            text-align: center;
            padding: 20px;
        }

        /* Skills beside Work Experience / Education */
        .about-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            align-items: start;
            max-width: 1200px;
            margin: 0 auto;
            text-align: left;
        }

        /* Work Experience / Education text blocks */
        .about-block {
            padding: 0 20px;
        }

        .download-links a,
        .aboutme-section a {
            display: inline-block;
            margin: 10px;
            text-decoration: none;
            color: #4FC3F7;
            font-weight: bold;
        }

        .contact-section {
            text-align: center;
            padding: 40px 20px;
            box-sizing: border-box;
        }

        .contact-section form {
            display: flex;
            flex-direction: column;
            max-width: 400px;
            margin: 0 auto;
            gap: 10px;
        }

        .contact-section input,
        .contact-section textarea {
            padding: 10px;
            border: 1px solid #444;
            background: #222;
            color: #eee;
            border-radius: 5px;
        }

        .contact-section button {
            padding: 10px;
            border: none;
            background-color: #4FC3F7;
            color: #000;
            cursor: pointer;
            border-radius: 5px;
            font-weight: bold;
        }

        footer {
            background: #000;
            color: white;
            text-align: center;
            padding: 20px;
        }

        .social-icons {
            margin-top: 10px;
        }

        .social-icons a img {
            width: 24px;
            height: 24px;
            margin: 0 10px;
            filter: invert(100%);
        }

        .aboutme-subsection {
            background: #2a2a2a;
            margin: 15px auto;
            padding: 15px;
            border-radius: 10px;
            max-width: 800px;
            text-align: left;
        }

        .aboutme-subsection h3 {
            margin-top: 0;
            color: #e0e0e0;
        }

        .project-subsection {
            margin-bottom: 40px;
        }

        .project-subsection h3 {
            font-size: 1.1em;
            color: #e0e0e0;
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-bottom: 10px;
            text-align: center;
            padding-top: 4px;
            padding-bottom: 4px;
        }

        /* ── Skills table ── */
        .skills-row {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 12px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }

        .skills-category {
            min-width: 160px;
            font-size: 0.8em;
            font-family: 'Merriweather', serif;
            color: #e0e0e0;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            flex-shrink: 0;
        }

        .skills-items {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .skill-chip {
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            padding: 5px 10px;
            font-size: 0.85em;
            font-family: 'Merriweather', serif;
            color: #ddd;
        }

        .skill-chip img {
            width: 16px;
            height: 16px;
            filter: invert(100%);
            flex-shrink: 0;
        }

        /* ── Platform badge icons (bottom-left of thumbnail) ── */
        .thumb-wrap {
            position: relative;
            display: inline-block;
            line-height: 0;
            /* kill phantom gap under img */
        }

        .platform-badges {
            position: absolute;
            bottom: 6px;
            left: 6px;
            display: flex;
            gap: 3px;
            z-index: 5;
            pointer-events: none;
        }

        .platform-badge {
            width: 48px;
            height: 48px;
            background: rgba(0, 0, 0, 0);
            border-radius: 3px;
            padding: 2px;
            filter: invert(100%);
            display: block;
        }

        .multi-link-overlay {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            background: transparent;
            display: none;
            z-index: 10;
            padding: 0;
            flex-direction: column;
            justify-content: center;
            gap: 8px;
            align-items: center;
        }

        .hover-container:hover .multi-link-overlay {
            display: flex;
        }

        /* (MOBILE) Only works with Max width of 768px devices */
        @media (max-width: 768px) {

            .section#UI,
            .section#UI video {
                max-width: 100% !important;
                width: 100% !important;
            }

            .section#UI .item {
                min-width: 80vw;
                max-width: 86vw;
            }

            .section#UI img {
                width: 100%;
                max-width: 700px;
                height: auto;
            }

            .logo {
                display: none;
            }

            .mobile-logo {
                display: block;
                margin: 0 auto 10px;
                height: 60px;
            }

            .nav-toggle {
                display: inline-block;
            }

            nav {
                display: none;
                flex-direction: column;
                align-items: center;
                gap: 12px;
                margin-top: 12px;
            }

            nav.nav-open {
                display: flex;
            }

            .dropdown-content {
                display: block;
                position: static;
                background: transparent;
                border: none;
                box-shadow: none;
                min-width: 0;
                margin-top: 6px;
                padding-left: 0;
            }

            .dropdown-content a {
                color: #ccc;
                padding: 4px 0;
            }

            /* Pull the text blocks back to the left edge instead of stacking indents */
            .aboutme-section {
                padding: 20px 12px;
            }

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

            /* Two smaller cards per row instead of one tall column */
            .carousel,
            #ultimatum .carousel {
                grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
                gap: 12px;
                padding: 12px 0;
            }

            .carousel .item {
                padding: 12px;
            }

            .item p {
                font-size: 0.95em;
                line-height: 1.6;
            }

            .project-meta {
                font-size: 0.75em;
            }

            .carousel .item h3 {
                font-size: 0.95em;
            }

            /* Collapsible section headings */
            .project-subsection h3.is-toggle {
                cursor: pointer;
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 10px;
            }

            .project-subsection h3.is-toggle::after {
                content: "-";
                font-size: 1.1em;
                line-height: 1;
                padding-right: 4px;
            }

            .project-subsection.is-collapsed h3.is-toggle::after {
                content: "+";
            }

            .project-subsection.is-collapsed .carousel {
                display: none;
            }

            .about-block {
                padding: 0;
            }

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

            /* Stack the category label above its chips instead of beside them */
            .skills-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .skills-category {
                min-width: 0;
            }

            .contact-section {
                padding: 30px 20px;
            }

            .contact-section form {
                max-width: 100%;
            }
        }

        /* (PC) Only works with min width of 768px devices */
        @media (min-width: 768px) {
            .section#UI img {
                width: 700px;
                border-radius: 16px;
            }

            .zoom-hover:hover {
                transform: scale(1.1);
                z-index: 2;
                box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
            }

            .zoom-centerhover:hover {
                transform: scale(1.1) translate(var(--tx));
                z-index: 2;
                box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
            }

        }

/* ── Devlog pages ─────────────────────────────────────────── */

.devlog-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.devlog-wrap>h2 {
    font-size: 1.8em;
    margin: 0 0 30px;
}

.devlog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-items: start;
}

.devlog-card {
    display: block;
    background: #2a2a2a;
    border-radius: 8px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.devlog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.devlog-meta {
    font-family: 'Merriweather', serif;
    font-size: 1.05em;
    color: #999;
    margin-bottom: 8px;
}

.devlog-card h3 {
    margin: 0 0 10px;
    font-size: 1.15em;
}

.devlog-card p {
    font-family: 'Merriweather', serif;
    font-size: 1.05em;
    line-height: 1.7;
    color: #ccc;
    margin: 0 0 12px;
}

.devlog-more {
    font-size: 0.8em;
    color: #e8e8e8;
}

.devlog-topic {
    display: inline-block;
    font-family: 'Merriweather', serif;
    font-size: 1.05em;
    color: #ccc;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px 11px;
    margin-bottom: 12px;
}

.post-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.back-link {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85em;
    color: #e8e8e8;
    text-decoration: none;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 6px 16px;
    cursor: url("/CustomCursorHover.png"), pointer;
}

.back-link:hover {
    background: #e8e8e8;
    color: #1a1a1a;
}

.post-wrap h1 {
    font-size: 1.9em;
    line-height: 1.25;
    margin: 14px 0 12px;
}

.post-body {
    font-family: 'Merriweather', serif;
    font-size: 1.05em;
    line-height: 1.85;
    color: #ccc;
}

.post-body h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25em;
    color: #eee;
    margin: 46px 0 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.post-body h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.02em;
    color: #eee;
    margin: 32px 0 -6px;
}

.post-body p {
    margin: 20px 0;
}

.post-body ul,
.post-body ol {
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 12px;
}

.post-body strong {
    color: #eee;
}

.post-body a {
    color: #4FC3F7;
}

.post-body code {
    font-family: Consolas, Menlo, monospace;
    font-size: 0.86em;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    padding: 2px 6px;
    color: #e6e6e6;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    vertical-align: middle;
}

.post-body p:has(img) {
    text-align: center;
}

.post-body pre {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px 16px;
    overflow-x: auto;
}

.post-body pre code {
    background: none;
    padding: 0;
    font-size: 0.82em;
}

.post-footer {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-family: 'Merriweather', serif;
    font-size: 0.88em;
    color: #999;
}

.post-footer a {
    color: #4FC3F7;
}

@media (max-width: 768px) {
    .devlog-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Homepage strip stays a swipeable row */
    #devlogs .devlog-list {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: thin;
        scrollbar-color: #4FC3F7 #2a2a2a;
    }

    #devlogs .devlog-card {
        flex: 0 0 78vw;
        scroll-snap-align: start;
    }

    .devlog-card {
        padding: 16px;
    }

    .devlog-card h3 {
        font-size: 1em;
    }

    .devlog-card p {
        font-size: 0.9em;
        line-height: 1.6;
    }

    .devlog-meta,
    .devlog-topic {
        font-size: 0.85em;
    }

    .devlog-wrap,
    .post-wrap {
        padding: 24px 16px;
    }
}

/* ── Long card descriptions collapse behind a toggle ─────────────────── */
.carousel .item p.desc-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.desc-toggle {
    font-family: 'Orbitron', sans-serif;
    cursor: url("/CustomCursorHover.png"), pointer;
    margin-bottom: 10px;
}

.desc-toggle::after {
    content: none;
}

/* ── Devlog cards slide sideways on phones ───────────────────────────── */
@media (max-width: 768px) {
    .devlog-card p {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ── Devlogs index: paged grid ───────────────────────────────────────── */
.devlog-list--grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.devlog-wrap:has(.devlog-list--grid) {
    max-width: 1200px;
}

.devlog-list--grid .devlog-card p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.devlog-card {
    min-width: 0;
}

.devlog-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin-bottom: 4px;
}

.devlog-card.is-hidden {
    display: none;
}

.devlog-pager {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.devlog-pager button {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8em;
    min-width: 38px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    background: #222;
    color: #e8e8e8;
    cursor: url("/CustomCursorHover.png"), pointer;
}

.devlog-pager button:hover:not(:disabled) {
    background: #e8e8e8;
    color: #1a1a1a;
}

.devlog-pager button[aria-current="true"] {
    background: #e8e8e8;
    border-color: #e8e8e8;
    color: #1a1a1a;
}

.devlog-pager button:disabled {
    opacity: 0.4;
    cursor: default;
}

@media (max-width: 520px) {
    .devlog-list--grid {
        grid-template-columns: 1fr;
    }
}
