:root {
    --bg: #0e141b;
    --surface: #16202d;
    --surface2: #1f2c3a;
    --accent: #66c0f4;
    --secondary: #7cb4d4;
    --text: #dcdedf;
    --text-muted: #8f98a0;
    --glow: rgba(102, 192, 244, 0.22);
    --border: rgba(255, 255, 255, 0.08);
    --bpm-green: #75b022;
    --bpm-green-dark: #588a1b;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background-color 0.6s ease, color 0.6s ease;
}

body {
    padding-top: 66px;
}

html {
    scroll-behavior: smooth;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ===========================
   Header — Big Picture Top Bar
   =========================== */
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 12px 32px;
    background: rgba(14, 20, 27, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    font-family: 'Space Grotesk', sans-serif;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: start;
    position: relative;
}

.header-right {
    justify-self: end;
}

.logo-img {
    height: 34px;
    filter: invert(1) drop-shadow(0 0 4px var(--glow));
    transition: transform 0.3s, filter 0.6s;
}
.logo-img:hover {
    transform: scale(1.05);
}

.header-logo-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text);
}

.logo-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 4px 10px 4px 4px;
    cursor: pointer;
    color: var(--text);
    transition: all 0.15s ease;
}
.logo-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}
.logo-dropdown-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}
.logo-dropdown-toggle[aria-expanded="true"] .logo-dropdown-chevron {
    transform: rotate(180deg);
}
.logo-dropdown-chevron {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.logo-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 190px;
    background: rgba(22, 32, 45, 0.98);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 110;
}
.logo-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.logo-dropdown-item {
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    padding: 9px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.logo-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

.header-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.nav-pill {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    padding: 7px 18px;
    border-radius: 999px;
    transition: all 0.15s ease;
    text-transform: uppercase;
}
.nav-pill:hover {
    color: var(--text);
}
.nav-pill.active {
    background: rgba(255, 255, 255, 0.9);
    color: var(--bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}
.nav-icon:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.05);
}

#play-game-btn,
#mute-toggle,
#lang-toggle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-family: inherit;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}
#play-game-btn:hover,
#mute-toggle:hover,
#lang-toggle:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.05);
}
#mute-toggle.muted {
    opacity: 0.5;
}

.bpm-clock {
    min-width: 44px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

/* ===========================
   Hero Banner (Big Picture)
   =========================== */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 46vh;
    display: flex;
    align-items: center;
    padding: 48px 40px 64px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 120% at 70% 20%, rgba(102, 192, 244, 0.15) 0%, transparent 55%),
        linear-gradient(135deg, var(--surface) 0%, var(--bg) 60%);
    z-index: 0;
    transition: background 0.8s ease;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, var(--bg) 0%, transparent 35%, transparent 65%, var(--bg) 100%),
        linear-gradient(to top, var(--bg) 0%, transparent 40%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 36px;
}

.hero-avatar-wrap {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    padding: 3px;
    box-shadow: 0 0 40px var(--glow);
}

.hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg);
    padding: 4px;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-name {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.hero-role {
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-tagline {
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    color: var(--text-muted);
    font-weight: 500;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.hero-badge {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.hero-badge:first-child {
    color: var(--bpm-green);
    border-color: rgba(117, 176, 34, 0.35);
    background: rgba(117, 176, 34, 0.1);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.bpm-btn-primary,
.bpm-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    font-family: inherit;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

.bpm-btn-primary {
    background: linear-gradient(180deg, var(--bpm-green), var(--bpm-green-dark));
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(117, 176, 34, 0.25);
}
.bpm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(117, 176, 34, 0.4);
    filter: brightness(1.08);
}

.bpm-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border);
}
.bpm-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.bpm-btn-itch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.15s ease;
    background: linear-gradient(180deg, #fa5c5c, #d94848);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(250, 92, 92, 0.25);
}
.bpm-btn-itch:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(250, 92, 92, 0.4);
    filter: brightness(1.08);
}

/* ===========================
   Carousel Category Filter Tabs
   =========================== */
.carousel-filter-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 24px 10px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.filter-tab {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.18s ease;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-tab.active {
    background: var(--surface2);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--glow);
}

/* ===========================
   Canvas (3D Carousel)
   =========================== */
#canvas-wrapper {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 480px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    background:
        linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    transition: background 0.8s ease;
    touch-action: pan-y;
    overflow: hidden;
}

#canvas-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--active-artwork, none);
    background-size: cover;
    background-position: center 30%;
    filter: blur(60px) saturate(1.2);
    transform: scale(1.1);
    opacity: 0.35;
    z-index: 0;
    transition: background-image 0.6s ease;
    pointer-events: none;
}

#canvas-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(14, 20, 27, 0.35) 0%, rgba(14, 20, 27, 0.75) 60%, var(--bg) 100%),
        linear-gradient(to right, rgba(14, 20, 27, 0.55) 0%, transparent 25%, transparent 75%, rgba(14, 20, 27, 0.55) 100%);
    z-index: 0;
    pointer-events: none;
}

#canvas-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
    position: relative;
    z-index: 1;
}

.webgl-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 24px;
    text-align: center;
    color: var(--accent, #fff);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
}

.controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 28px;
    box-sizing: border-box;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.4s ease;
}
.controls.hidden {
    opacity: 0;
    pointer-events: none;
}

.controls button {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.controls button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.08);
}

/* Carousel indicator pills */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.35);
    padding: 8px 12px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.45);
}
.carousel-dot.active {
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    width: 22px;
}

/* ===========================
   Project Info Section
   =========================== */
#project-info {
    padding: 60px 40px 70px;
    background: radial-gradient(ellipse 800px 400px at 50% 0%, var(--surface) 0%, var(--bg) 80%);
    min-height: 40vh;
    transition: background 0.6s ease;
}

#content-container {
    max-width: 1100px;
    margin: 0 auto;
}

#project-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    transition: color 0.5s;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.tag {
    background: rgba(255, 255, 255, 0.04);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

#project-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 850px;
    margin-bottom: 32px;
}

.project-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.project-media-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s, border-color 0.3s, box-shadow 0.4s;
    cursor: zoom-in;
}
.project-media-img:hover {
    transform: scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 8px 30px var(--glow);
}

.project-media-video {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: #000;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox.active .lightbox-backdrop {
    opacity: 1;
}
.lightbox img {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.lightbox.active img {
    transform: scale(1);
    opacity: 1;
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 1;
}
.lightbox-close:hover {
    opacity: 1;
}

.project-download-btn {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    margin: 10px auto 0;
    padding: 15px 42px;
    background: linear-gradient(180deg, var(--bpm-green), var(--bpm-green-dark));
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 999px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.15s ease;
    box-shadow: 0 4px 18px rgba(117, 176, 34, 0.28);
}
.project-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(117, 176, 34, 0.42);
    filter: brightness(1.08);
}

.no-media-placeholder {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.placeholder-img {
    opacity: 0.85;
    filter: saturate(0.7) contrast(1.1);
}

/* Custom cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.25s, height 0.25s, border-color 0.3s, background 0.25s;
    mix-blend-mode: difference;
    opacity: 0;
}
.custom-cursor.active {
    opacity: 1;
}
.custom-cursor.hover {
    width: 48px;
    height: 48px;
    background: rgba(156, 213, 255, 0.08);
}

@media (max-width: 768px) {
    .custom-cursor {
        display: none;
    }
    .carousel-filter-tabs {
        flex-wrap: wrap;
        gap: 6px;
        padding: 12px 16px 8px;
    }
    .filter-tab {
        padding: 7px 14px;
        font-size: 0.72rem;
    }
}

.bottom-sheet-handle {
    display: none;
}

/* ===========================
   About Section
   =========================== */
.about-section {
    padding: 80px 40px 100px;
    background: var(--bg);
    min-height: 80vh;
    transition: background-color 0.6s ease;
}

.about-section .content-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 50px;
    text-align: left;
    color: #fff;
    letter-spacing: -0.02em;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 18px 0;
    padding-bottom: 10px;
    display: inline-block;
    letter-spacing: -0.01em;
    transition: color 0.6s;
    border: none;
}

.mt-top {
    margin-top: 40px;
}

.about-text {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-muted);
}

.edu-card {
    background: var(--surface);
    padding: 20px 24px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.6s, background 0.6s;
}

.edu-card h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.text-muted {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.mt-card {
    margin-top: 16px;
}

.contact-cta {
    margin-top: 32px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    font-family: inherit;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: all 0.15s ease;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--bpm-green), var(--bpm-green-dark));
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(117, 176, 34, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(117, 176, 34, 0.4);
    filter: brightness(1.08);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    height: calc(100% - 10px);
    width: 2px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.6s;
}

.timeline-item {
    position: relative;
    margin-bottom: 36px;
}

.timeline-dot {
    position: absolute;
    left: -34px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--glow);
    transition: background 0.6s, box-shadow 0.6s;
}

.timeline-date {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    border: 1px solid var(--border);
}

.timeline-content h4 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.text-accent {
    color: var(--secondary);
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.6s;
}

.timeline-content p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===========================
   Footer
   =========================== */
footer {
    text-align: center;
    padding: 24px;
    background: var(--bg);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    border-top: 1px solid var(--border);
    transition: background-color 0.6s, border-color 0.6s;
}

/* ===========================
   GSAP Reveal
   =========================== */
.gs-reveal {
    opacity: 0;
    visibility: hidden;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
    header {
        padding: 10px 16px;
    }
    .header-logo-text,
    .bpm-clock {
        display: none;
    }
    .header-pills {
        margin: 0 auto;
    }
    .nav-pill {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    .header-right {
        gap: 6px;
    }
    .nav-icon,
    #play-game-btn,
    #mute-toggle,
    #lang-toggle {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 32px 24px 40px;
    }
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    .hero-avatar-wrap {
        width: 90px;
        height: 90px;
    }
    .hero-actions {
        width: 100%;
    }
    .bpm-btn-primary,
    .bpm-btn-secondary,
    .bpm-btn-itch {
        flex: 1;
        min-width: 140px;
    }

    #canvas-wrapper {
        height: 56vh;
        min-height: 400px;
        touch-action: pan-y;
    }
    #canvas-wrapper::before {
        filter: blur(40px) saturate(1.1);
    }

    .controls button {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .controls {
        padding: 0 12px;
    }

    #project-info {
        padding: 32px 24px 40px;
        position: relative;
        border-radius: 20px 20px 0 0;
        margin-top: -20px;
        z-index: 5;
    }
    .bottom-sheet-handle {
        display: block;
        width: 40px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
        margin: 0 auto 16px;
    }
    #project-title {
        font-size: 1.8rem;
    }
    #project-desc {
        font-size: 0.95rem;
    }
    .project-media-grid {
        grid-template-columns: 1fr;
    }
    .project-media-img,
    .project-media-video {
        height: 220px;
    }
    .project-download-btn {
        width: 100%;
    }

    .about-section {
        padding: 50px 24px;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
}

/* ===========================
   Boot Screen — Game Engine Style
   =========================== */
#boot-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
}

.boot-content {
    width: 100%;
    max-width: 560px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 2;
}

.boot-logo {
    height: 56px;
    filter: invert(1);
    opacity: 0;
    transform: scale(0.8);
}

.boot-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #A8E063;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
}

.boot-logs {
    width: 100%;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.boot-log {
    font-size: 0.75rem;
    color: #8b949e;
    opacity: 0;
    transform: translateX(-10px);
}

.boot-log::before {
    content: '> ';
    color: #A8E063;
    font-weight: 600;
}

.boot-log.ok::after {
    content: '  OK';
    color: #A8E063;
    margin-left: auto;
    float: right;
}

.boot-progress-wrap {
    width: 100%;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.boot-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.boot-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #A8E063 0%, #00D4C8 100%);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.boot-progress-text {
    font-size: 0.7rem;
    color: #8b949e;
    text-align: right;
    letter-spacing: 0.1em;
}

.boot-start {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0a0a0a;
    background: #A8E063;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    cursor: pointer;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 8px;
    opacity: 0;
    transform: scale(0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: bootPulse 1.8s ease-in-out infinite;
}

.boot-start:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(168, 224, 99, 0.4);
}

@keyframes bootPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(168, 224, 99, 0.3); }
    50% { opacity: 0.7; box-shadow: 0 0 24px rgba(168, 224, 99, 0.5); }
}

.boot-skip {
    position: absolute;
    bottom: 20px;
    right: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #8b949e;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.boot-skip:hover {
    opacity: 1;
    border-color: rgba(168, 224, 99, 0.4);
    color: #A8E063;
}

.boot-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
}

/* Glitch transition overlay */
.boot-glitch {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(168, 224, 99, 0.06) 40%,
        rgba(0, 212, 200, 0.06) 60%,
        transparent 100%
    );
    animation: glitchSweep 0.6s ease-out forwards;
}

@keyframes glitchSweep {
    0% { transform: translateY(-100%); opacity: 1; }
    50% { opacity: 0.8; }
    100% { transform: translateY(100%); opacity: 0; }
}

/* Easter egg menu effects */
.easter-egg-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: rgba(22, 32, 45, 0.96);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 200;
}
.easter-egg-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

body.party-mode .hero-backdrop {
    animation: partyPulse 0.5s ease-in-out infinite alternate;
}
@keyframes partyPulse {
    from { filter: hue-rotate(0deg) brightness(1); }
    to { filter: hue-rotate(45deg) brightness(1.2); }
}

body.scanlines-overlay::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.12) 2px,
        rgba(0, 0, 0, 0.12) 4px
    );
    opacity: 0.6;
}

/* Hide main content during boot */
body.booting #hero,
body.booting #canvas-wrapper,
body.booting #project-info,
body.booting header,
body.booting #about,
body.booting footer,
body.booting .custom-cursor {
    visibility: hidden;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .boot-logo,
    .boot-title,
    .boot-log,
    .boot-start {
        opacity: 1 !important;
        transform: none !important;
    }
    .boot-scanlines { display: none; }
    .boot-start { animation: none; }
    body.party-mode .hero-backdrop { animation: none; }
}

/* Mobile boot */
@media (max-width: 768px) {
    .boot-content {
        padding: 24px 20px;
        max-width: 100%;
    }
    .boot-logo { height: 44px; }
    .boot-title { font-size: 0.75rem; }
    .boot-log { font-size: 0.7rem; }
    .boot-start {
        font-size: 0.78rem;
        padding: 9px 22px;
    }
}

/* ===========================
   Game Screen — KROST DEFENDER
   =========================== */
#game-screen {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: #0a0a0a;
    display: none;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
}

#game-screen canvas {
    position: absolute;
    top: 0;
    left: 0;
}

#game-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 28px;
}

.game-hud-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#game-hud-score {
    font-size: 1.4rem;
    font-weight: 700;
    color: #A8E063;
    letter-spacing: 0.1em;
    text-shadow: 0 0 8px rgba(168, 224, 99, 0.3);
}

#game-hud-high {
    font-size: 0.75rem;
    color: #8b949e;
    letter-spacing: 0.08em;
}

#game-hud-lives {
    font-size: 1.3rem;
    color: #ff5f5f;
    text-shadow: 0 0 8px rgba(255, 95, 95, 0.3);
    letter-spacing: 0.15em;
}

#game-exit-btn {
    pointer-events: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    color: #8b949e;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}
#game-exit-btn:hover {
    border-color: rgba(168, 224, 99, 0.4);
    color: #A8E063;
}

/* Prominent exit button after first minigame */
#game-exit-btn.exit-prominent {
    font-size: 0.95rem;
    padding: 10px 22px;
    color: #0a0a0a;
    background: #FF7A59;
    border-color: #FF7A59;
    font-weight: 700;
    animation: exitPulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 0 rgba(255, 122, 89, 0);
}
#game-exit-btn.exit-prominent:hover {
    background: #ff9478;
    border-color: #ff9478;
    color: #0a0a0a;
}

@keyframes exitPulse {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255, 122, 89, 0.5); }
    50%  { transform: scale(1.06); box-shadow: 0 0 18px 6px rgba(255, 122, 89, 0.25); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255, 122, 89, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
    #game-exit-btn.exit-prominent {
        animation: none;
    }
}

#game-pause,
#game-over {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(4px);
}

.game-panel {
    background: rgba(13, 17, 23, 0.95);
    border: 1px solid rgba(168, 224, 99, 0.2);
    border-radius: 10px;
    padding: 36px 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 260px;
    box-shadow: 0 0 40px rgba(168, 224, 99, 0.08);
}

.game-panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #A8E063;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.game-panel-score {
    font-size: 1rem;
    color: #F7F8F0;
    font-weight: 600;
}

.game-panel-high {
    font-size: 0.8rem;
    color: #8b949e;
    margin-bottom: 8px;
}

.game-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0a0a0a;
    background: #A8E063;
    border: none;
    border-radius: 6px;
    padding: 9px 28px;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.game-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 0 16px rgba(168, 224, 99, 0.35);
}

.game-btn-secondary {
    background: transparent;
    color: #A8E063;
    border: 1px solid rgba(168, 224, 99, 0.35);
}
.game-btn-secondary:hover {
    background: rgba(168, 224, 99, 0.08);
}

.boot-play {
    background: transparent;
    color: #A8E063;
    border: 1px solid rgba(168, 224, 99, 0.4);
}
.boot-play:hover {
    background: rgba(168, 224, 99, 0.1);
    transform: scale(1.05);
}

.game-hud-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.game-hud-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

#game-mode-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #A8E063;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(168,224,99,0.25);
    transition: color 0.3s ease;
}

#game-mode-timer {
    width: 80px;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}

#game-mode-bar {
    width: 100%;
    height: 100%;
    background: #A8E063;
    transform-origin: left;
    border-radius: 2px;
}

#game-mode-hint {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 0.65rem;
    color: rgba(168,224,99,0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#game-countdown {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10,10,10,0.5);
    backdrop-filter: blur(2px);
}

#game-countdown-text {
    font-size: 4rem;
    font-weight: 800;
    color: #A8E063;
    letter-spacing: 0.15em;
    text-shadow: 0 0 40px rgba(168,224,99,0.3), 0 0 80px rgba(168,224,99,0.1);
}

#game-transition {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    background: #0a0a0a;
    pointer-events: none;
}

/* Header "Play minigame" button */
#play-game-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #0a0a0a;
    background: #A8E063;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#play-game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(168, 224, 99, 0.4);
}

body.game-active header,
body.game-active #canvas-wrapper,
body.game-active #project-info,
body.game-active #about,
body.game-active footer,
body.game-active .custom-cursor {
    display: none !important;
}

/* Mobile game */
@media (max-width: 768px) {
    #game-hud {
        padding: 14px 16px;
    }
    #game-hud-score { font-size: 1.1rem; }
    .game-panel {
        padding: 28px 32px;
        min-width: 220px;
    }
    .game-panel-title { font-size: 1.1rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .game-btn { transition: none; }
    #game-hud-score { text-shadow: none; }
}
