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

body {
    font-family: 'Playfair Display', serif;
    line-height: 1.4;
    color: #1A1A1A;
    background: #F5F5F0;
    overflow-x: visible;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    overflow: visible;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: #FFE5E8;
    border-top: 8px solid #000;
    border-bottom: 8px solid #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.hero-title {
    font-size: 4.5em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    min-height: 1.2em;
    transition: color 0.3s ease, opacity 0.8s ease;
    position: relative;
    z-index: 120;
}

.hero-subtitle {
    font-size: 1.5em;
    font-weight: 400;
    letter-spacing: 1px;
    min-height: 1.5em;
    transition: color 0.3s ease, opacity 0.8s ease;
    position: relative;
    z-index: 120;
}

/* Frosted Glass Layer — covers full hero, sits between snakes (z:100) and text (z:120) */
.hero-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 110;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

/* Intro phase: hide glass, text and scroll button until reveal */
.hero.intro-phase .hero-glass,
.hero.intro-phase .hero-title,
.hero.intro-phase .hero-subtitle {
    opacity: 0;
    transition: none;
}

.hero.intro-phase .scroll-button {
    opacity: 0;
    pointer-events: none;
    transition: none;
}

/* Intro snakes render above glass and text */
.snake-segment.intro {
    z-index: 130;
}

/* Hint circle — blinking hollow ring prompting user to click */
.hint-circle {
    position: absolute;
    width: 86px;
    height: 86px;
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    z-index: 140;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: hintBlink 1.5s ease-in-out infinite;
}

.hint-circle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(rgba(255, 255, 255, 0.9) var(--progress, 0deg), transparent var(--progress, 0deg));
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.hint-circle.holding {
    animation: none;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
}

.hint-circle.holding::before {
    opacity: 1;
}

.hint-circle::after {
    content: 'HOLD';
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65em;
    font-weight: 700;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 0 0 4px #000, 1px 1px 0 #000, -1px -1px 0 #000;
    white-space: nowrap;
    font-family: 'Playfair Display', serif;
}

.hint-circle.hidden {
    display: none;
}

@keyframes hintBlink {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 2px #000, 0 0 0 4px rgba(255, 255, 255, 0.35);
    }
    50% {
        opacity: 0.35;
        transform: translate(-50%, -50%) scale(0.88);
        box-shadow: 0 0 0 2px #000, 0 0 0 22px rgba(255, 255, 255, 0);
    }
}

.typewriter-cursor {
    display: inline-block;
    width: 3px;
    background-color: #1A1A1A;
    margin-left: 4px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.scroll-button {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border: 0px solid #000;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.3s ease, opacity 0.8s ease;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Progress ring that fills as you hold */
.scroll-button::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(#4CAF50 var(--progress, 0deg), transparent var(--progress, 0deg));
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: -1;
}

.scroll-button.holding::before {
    opacity: 1;
}

/* Subtle idle pulse to draw attention */
.scroll-button:not(.holding) {
    animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

/* Scale up when holding */
.scroll-button.holding {
    transform: translateX(-50%) scale(1.15);
    animation: none;
}

.scroll-button-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #1A1A1A;
    opacity: 0.7;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.scroll-button:hover .scroll-button-label {
    opacity: 1;
}

.arrow-icon {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 25px solid #999;
    transition: border-top-color 0.3s ease;
}

.scroll-button.escape-hint {
    border-width: 4px;
    animation: circlePulse 1.5s infinite;
}

@keyframes circlePulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.1);
    }
}

/* Snake Game Elements */
@keyframes snakePop {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

.snake-pop {
    animation: snakePop 0.4s ease-out forwards !important;
}

/* Shockwave Effects */
.shockwave-ring {
    position: absolute;
    width: 0;
    height: 0;
    border: 3px solid var(--ripple-color, #2D0057);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 200;
    animation: shockwaveExpand 0.6s ease-out forwards;
}

@keyframes shockwaveExpand {
    0% {
        width: 0;
        height: 0;
        border-width: 4px;
        opacity: 1;
    }
    100% {
        width: 480px;
        height: 480px;
        border-width: 1px;
        opacity: 0;
    }
}

.shockwave-ring.chain-ring {
    border-color: rgba(255, 200, 100, 0.8);
    animation: shockwaveExpandChain 0.5s ease-out forwards;
}

@keyframes shockwaveExpandChain {
    0% {
        width: 0;
        height: 0;
        border-width: 3px;
        opacity: 1;
    }
    100% {
        width: 260px;
        height: 260px;
        border-width: 1px;
        opacity: 0;
    }
}

.shockwave-flash {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--ripple-color, #2D0057) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 200;
    animation: shockwaveFlash 0.3s ease-out forwards;
}

@keyframes shockwaveFlash {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

.shockwave-particle {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 200;
    animation: shockwaveParticle 0.5s ease-out forwards;
}

@keyframes shockwaveParticle {
    0% {
        transform: translate(-50%, -50%) translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translate(var(--dx), var(--dy));
        opacity: 0;
    }
}

/* Hold-to-charge ring */
.charge-ring {
    position: absolute;
    width: 0;
    height: 0;
    border: 2px solid var(--ripple-color, #2D0057);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 200;
}

.charge-ring.max-charged {
    border-color: rgba(255, 215, 0, 0.95);
    animation: chargeMaxPulse 0.45s ease-in-out infinite alternate;
}

@keyframes chargeMaxPulse {
    from { box-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }
    to   { box-shadow: 0 0 24px rgba(255, 215, 0, 1), 0 0 48px rgba(255, 215, 0, 0.3); }
}

/* Max-charge sparkle particles */
.charge-twinkle {
    position: absolute;
    width: 7px;
    height: 7px;
    background: rgba(255, 215, 0, 0.95);
    border-radius: 50%;
    pointer-events: none;
    z-index: 201;
    animation: chargeTwinkle 0.55s ease-out forwards;
}

@keyframes chargeTwinkle {
    0%   { transform: translate(-50%, -50%) translate(0, 0) scale(1.4); opacity: 1; }
    100% { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

.screen-shake {
    animation: screenShake 0.3s ease-out;
}

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-4px, 2px); }
    20% { transform: translate(4px, -2px); }
    30% { transform: translate(-3px, -3px); }
    40% { transform: translate(3px, 3px); }
    50% { transform: translate(-2px, 1px); }
    60% { transform: translate(2px, -1px); }
    70% { transform: translate(-1px, 2px); }
    80% { transform: translate(1px, -1px); }
}

.tile-fall {
    animation: tileFall 1s ease-in forwards !important;
}

@keyframes tileFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    70% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(100vh) rotate(25deg);
        opacity: 0;
    }
}

.tile-fall-escape {
    animation: tileFallEscape 2s ease-in forwards !important;
    transition: opacity 0.5s ease-out 2s;
}

@keyframes tileFallEscape {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(var(--fall-distance)) rotate(var(--fall-rotation));
        opacity: 0.25;
    }
}

/* Swoosh Animations */
.swoosh {
    position: absolute;
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

@keyframes swoosh1 {
    0% {
        transform: translateX(-200px) translateY(0) rotate(-15deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(calc(100vw + 200px)) translateY(-50px) rotate(-15deg);
        opacity: 0;
    }
}

@keyframes swoosh2 {
    0% {
        transform: translateX(-200px) translateY(0) rotate(15deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(calc(100vw + 200px)) translateY(50px) rotate(15deg);
        opacity: 0;
    }
}

.swoosh-1 {
    animation: swoosh1 8s ease-in-out infinite;
    top: 20%;
}

.swoosh-2 {
    animation: swoosh2 10s ease-in-out infinite;
    animation-delay: 2s;
    top: 40%;
}

.swoosh-3 {
    animation: swoosh1 12s ease-in-out infinite;
    animation-delay: 4s;
    top: 60%;
}

.swoosh-4 {
    animation: swoosh2 9s ease-in-out infinite;
    animation-delay: 6s;
    top: 80%;
}

/* Shooting Star Animations */
.shooting-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #FFF;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    box-shadow: 0 0 4px #FFF;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: -60px;
    left: -60px;
    width: 100px;
    height: 2px;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.8));
    transform: rotate(45deg);
}

@keyframes shootingStar {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(800px) translateY(800px) rotate(0deg);
        opacity: 0;
    }
}

.star-1 {
    animation: shootingStar 2s ease-in infinite;
    top: -5%;
    left: 5%;
}

.star-2 {
    animation: shootingStar 2.2s ease-in infinite;
    animation-delay: 1.2s;
    top: -5%;
    left: 40%;
}

.star-3 {
    animation: shootingStar 2.5s ease-in infinite;
    animation-delay: 2.4s;
    top: -5%;
    left: 70%;
}

.star-4 {
    animation: shootingStar 1.8s ease-in infinite;
    animation-delay: 3.6s;
    top: -5%;
    left: 25%;
}

.star-5 {
    animation: shootingStar 2.3s ease-in infinite;
    animation-delay: 4.8s;
    top: -5%;
    left: 55%;
}

.star-6 {
    animation: shootingStar 2.1s ease-in infinite;
    animation-delay: 1.8s;
    top: -5%;
    left: 15%;
}

.star-7 {
    animation: shootingStar 1.9s ease-in infinite;
    animation-delay: 3s;
    top: -5%;
    left: 80%;
}

.star-8 {
    animation: shootingStar 2.4s ease-in infinite;
    animation-delay: 0.6s;
    top: -5%;
    left: 35%;
}

.star-9 {
    animation: shootingStar 2.2s ease-in infinite;
    animation-delay: 4.2s;
    top: -5%;
    left: 65%;
}

.star-10 {
    animation: shootingStar 2s ease-in infinite;
    animation-delay: 5.4s;
    top: -5%;
    left: 50%;
}

/* Ultra Complex Background System with Pastel Colors */
.floating-shapes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Animated Wave Background Layers */
.wave-layer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
}

.wave-1 {
    background: linear-gradient(180deg,
        transparent 0%,
        transparent 60%,
        rgba(255, 218, 224, 0.4) 70%,
        rgba(255, 218, 224, 0.6) 100%);
    animation: waveMove 25s ease-in-out infinite;
}

.wave-2 {
    background: linear-gradient(180deg,
        transparent 0%,
        transparent 50%,
        rgba(218, 232, 252, 0.4) 65%,
        rgba(218, 232, 252, 0.6) 100%);
    animation: waveMove 30s ease-in-out infinite reverse;
}

.wave-3 {
    background: linear-gradient(180deg,
        transparent 0%,
        transparent 55%,
        rgba(230, 245, 220, 0.4) 70%,
        rgba(230, 245, 220, 0.6) 100%);
    animation: waveMove 35s ease-in-out infinite;
}

@keyframes waveMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-50%); }
}

/* Rotating Geometric Mandalas */
.mandala {
    position: absolute;
    width: 400px;
    height: 400px;
    pointer-events: none;
    opacity: 0.15;
}

.mandala-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 3px solid;
    transform-origin: center;
}

.mandala-1 {
    top: 15%;
    left: 10%;
    animation: mandalaRotate1 40s linear infinite;
}

.mandala-1 .mandala-ring:nth-child(1) {
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border-color: #FFB4D6;
    animation: ringPulse1 8s ease-in-out infinite;
}

.mandala-1 .mandala-ring:nth-child(2) {
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border-color: #C4A1FF;
    border-style: dashed;
    animation: ringPulse2 10s ease-in-out infinite;
}

.mandala-1 .mandala-ring:nth-child(3) {
    width: 250px;
    height: 250px;
    margin: -125px 0 0 -125px;
    border-color: #A8E6CF;
    animation: ringPulse3 12s ease-in-out infinite;
}

.mandala-1 .mandala-ring:nth-child(4) {
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
    border-color: #FFE5B4;
    border-style: dotted;
    animation: ringPulse1 14s ease-in-out infinite reverse;
}

.mandala-2 {
    top: 50%;
    right: 8%;
    animation: mandalaRotate2 35s linear infinite reverse;
}

.mandala-2 .mandala-ring:nth-child(1) {
    width: 180px;
    height: 180px;
    margin: -90px 0 0 -90px;
    border-color: #B4E1FF;
    animation: ringPulse2 9s ease-in-out infinite;
}

.mandala-2 .mandala-ring:nth-child(2) {
    width: 230px;
    height: 230px;
    margin: -115px 0 0 -115px;
    border-color: #FFD4E5;
    border-style: dashed;
    animation: ringPulse3 11s ease-in-out infinite;
}

.mandala-2 .mandala-ring:nth-child(3) {
    width: 280px;
    height: 280px;
    margin: -140px 0 0 -140px;
    border-color: #D4F1F4;
    animation: ringPulse1 13s ease-in-out infinite;
}

.mandala-3 {
    bottom: 15%;
    left: 15%;
    animation: mandalaRotate3 45s linear infinite;
}

.mandala-3 .mandala-ring:nth-child(1) {
    width: 160px;
    height: 160px;
    margin: -80px 0 0 -80px;
    border-color: #E5D4FF;
    animation: ringPulse3 10s ease-in-out infinite;
}

.mandala-3 .mandala-ring:nth-child(2) {
    width: 210px;
    height: 210px;
    margin: -105px 0 0 -105px;
    border-color: #FFE1CC;
    border-style: dotted;
    animation: ringPulse1 12s ease-in-out infinite reverse;
}

.mandala-3 .mandala-ring:nth-child(3) {
    width: 260px;
    height: 260px;
    margin: -130px 0 0 -130px;
    border-color: #D4FFE8;
    animation: ringPulse2 14s ease-in-out infinite;
}

@keyframes mandalaRotate1 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes mandalaRotate2 {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes mandalaRotate3 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes ringPulse1 {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.15; }
    50% { transform: scale(1.15) rotate(180deg); opacity: 0.25; }
}

@keyframes ringPulse2 {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.12; }
    50% { transform: scale(0.9) rotate(-180deg); opacity: 0.22; }
}

@keyframes ringPulse3 {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.18; }
    50% { transform: scale(1.1) rotate(90deg); opacity: 0.28; }
}

/* Floating Geometric Shapes with Trails */
.complex-shape {
    position: absolute;
    pointer-events: none;
    filter: drop-shadow(0 0 20px currentColor);
}

.hex-shape {
    width: 60px;
    height: 70px;
    background: #FFD6E8;
    opacity: 0.2;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.star-shape {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 40px solid #C4D4FF;
    opacity: 0.2;
    position: relative;
}

.star-shape:after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 40px solid #C4D4FF;
    top: 15px;
    left: -25px;
}

.pentagon-shape {
    width: 54px;
    height: 50px;
    background: #D4EDDA;
    opacity: 0.2;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

/* Complex shape animations */
.shape-float-1 {
    top: 20%;
    left: 15%;
    animation: complexFloat1 20s ease-in-out infinite;
}

.shape-float-2 {
    top: 40%;
    right: 20%;
    animation: complexFloat2 25s ease-in-out infinite;
}

.shape-float-3 {
    top: 60%;
    left: 25%;
    animation: complexFloat3 22s ease-in-out infinite;
}

.shape-float-4 {
    top: 35%;
    right: 35%;
    animation: complexFloat4 28s ease-in-out infinite;
}

.shape-float-5 {
    top: 75%;
    left: 40%;
    animation: complexFloat1 24s ease-in-out infinite reverse;
}

.shape-float-6 {
    top: 25%;
    left: 60%;
    animation: complexFloat2 26s ease-in-out infinite reverse;
}

.shape-float-7 {
    top: 55%;
    right: 15%;
    animation: complexFloat3 23s ease-in-out infinite;
}

.shape-float-8 {
    top: 80%;
    right: 40%;
    animation: complexFloat4 27s ease-in-out infinite reverse;
}

@keyframes complexFloat1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(80px, -60px) rotate(90deg) scale(1.2);
    }
    50% {
        transform: translate(120px, 40px) rotate(180deg) scale(0.8);
    }
    75% {
        transform: translate(40px, 80px) rotate(270deg) scale(1.1);
    }
}

@keyframes complexFloat2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(-70px, 90px) rotate(120deg) scale(1.3);
    }
    66% {
        transform: translate(-110px, -50px) rotate(240deg) scale(0.9);
    }
}

@keyframes complexFloat3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    20% {
        transform: translate(60px, 70px) rotate(72deg) scale(1.15);
    }
    40% {
        transform: translate(100px, -40px) rotate(144deg) scale(0.85);
    }
    60% {
        transform: translate(-50px, -80px) rotate(216deg) scale(1.25);
    }
    80% {
        transform: translate(-90px, 30px) rotate(288deg) scale(0.95);
    }
}

@keyframes complexFloat4 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(-85px, -70px) rotate(-90deg) scale(1.2);
    }
    50% {
        transform: translate(95px, -100px) rotate(-180deg) scale(0.8);
    }
    75% {
        transform: translate(50px, 60px) rotate(-270deg) scale(1.1);
    }
}

/* Orbiting Particles with Pastel Trails */
.orbit-system {
    position: absolute;
    width: 300px;
    height: 300px;
    pointer-events: none;
}

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #FFB4D6, #C4A1FF);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    box-shadow: 0 0 30px #FFB4D6;
}

.orbit-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform-origin: 0 0;
    opacity: 0.4;
}

.orbit-1 {
    top: 25%;
    right: 15%;
    animation: orbitRotate1 30s linear infinite;
}

.orbit-2 {
    bottom: 20%;
    left: 20%;
    animation: orbitRotate2 35s linear infinite reverse;
}

.orbit-1 .orbit-particle:nth-child(2) {
    background: #A8E6CF;
    animation: orbit1 15s linear infinite;
    box-shadow: 0 0 15px #A8E6CF, 0 0 30px #A8E6CF;
}

.orbit-1 .orbit-particle:nth-child(3) {
    background: #FFD4B4;
    animation: orbit2 18s linear infinite;
    box-shadow: 0 0 15px #FFD4B4, 0 0 30px #FFD4B4;
}

.orbit-1 .orbit-particle:nth-child(4) {
    background: #D4E5FF;
    animation: orbit3 21s linear infinite;
    box-shadow: 0 0 15px #D4E5FF, 0 0 30px #D4E5FF;
}

.orbit-2 .orbit-particle:nth-child(2) {
    background: #FFE5D4;
    animation: orbit1 16s linear infinite reverse;
    box-shadow: 0 0 15px #FFE5D4, 0 0 30px #FFE5D4;
}

.orbit-2 .orbit-particle:nth-child(3) {
    background: #E5D4FF;
    animation: orbit2 19s linear infinite reverse;
    box-shadow: 0 0 15px #E5D4FF, 0 0 30px #E5D4FF;
}

.orbit-2 .orbit-particle:nth-child(4) {
    background: #D4FFE8;
    animation: orbit3 22s linear infinite reverse;
    box-shadow: 0 0 15px #D4FFE8, 0 0 30px #D4FFE8;
}

@keyframes orbitRotate1 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes orbitRotate2 {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes orbit1 {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(80px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(80px) rotate(-360deg); }
}

@keyframes orbit2 {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(120px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(120px) rotate(-360deg); }
}

@keyframes orbit3 {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(150px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(150px) rotate(-360deg); }
}

.snake-segment {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #000;
    border-radius: 4px;
    transition: all 0.15s linear;
    z-index: 100;
}

.snake-head {
    z-index: 101;
    box-shadow: 3px 3px 0 #000;
}

.snake-segment-pop {
    animation: segmentPop 0.3s ease-out;
}

@keyframes segmentPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.spawn-ripple {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99;
}

.spawn-ripple::before,
.spawn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid var(--ripple-color, #2D0057);
    opacity: 0;
}

.spawn-ripple::before {
    width: 100%;
    height: 100%;
    animation: ripple 0.6s ease-out;
}

.spawn-ripple::after {
    width: 100%;
    height: 100%;
    animation: ripple 0.6s ease-out 0.15s;
}

@keyframes ripple {
    0% {
        width: 20px;
        height: 20px;
        opacity: 0.8;
    }
    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}

/* About Section */
.about-section {
    margin: 80px auto;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 60px;
    align-items: start;
    min-height: 400px;
    position: relative;
}

/* Playing Cards Decoration */
.playing-card {
    position: absolute;
    width: 60px;
    height: 85px;
    background: #FFF;
    border: 3px solid #000;
    border-radius: 6px;
    box-shadow: 4px 4px 0 #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    opacity: 0;
    transform: translateY(30px) rotate(0deg);
}

.playing-card.left {
    left: -100px;
}

.playing-card.right {
    right: -100px;
}

@media (min-width: 1600px) {
    .playing-card.left {
        left: -130px;
    }

    .playing-card.right {
        right: -130px;
    }
}

.playing-card.animate {
    animation: cardPopUp 0.6s ease-out forwards;
    opacity: 1 !important;
}

@keyframes cardPopUp {
    0% {
        opacity: 0;
        transform: translateY(30px) rotate(-10deg) scale(0.8);
    }
    60% {
        transform: translateY(-5px) rotate(5deg) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

.playing-card.float {
    animation: cardFloat 3s ease-in-out infinite;
    opacity: 1 !important;
}

@keyframes cardFloat {
    0%, 100% {
        opacity: 1;
        transform: translateY(0px) rotate(-2deg);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) rotate(2deg);
    }
}

/* Flip Card Container */
.profile-card {
    perspective: 1000px;
    width: 320px;
    height: 320px;
    transform: translateX(800px);
    opacity: 0;
    transition: transform 1s ease-out, opacity 1s ease-out;
}

.profile-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease-out 0.15s;
    transform-style: preserve-3d;
    transform: rotateY(180deg);
}

.about-section.animated .profile-card {
    transform: translateX(0);
    opacity: 1;
}

.about-section.animated .profile-card-inner {
    transform: rotateY(0deg);
}

.about-section.quick-twirl .profile-card-inner {
    animation: spin360 1s ease-in-out;
}

@keyframes spin360 {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

.about-section:has(.about-content:hover) .profile-card-inner {
    transform: rotateY(180deg);
    transition: transform 0.6s;
}

.profile-card-front,
.profile-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 6px solid #000;
    box-shadow: 8px 8px 0 #000;
}

.profile-card-front {
    background: #FFE5D9;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.profile-card-back {
    background: #1A1A1A;
    color: #FFF;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.profile-quote {
    font-size: 0.95em;
    line-height: 1.5;
    font-style: italic;
    text-align: center;
}

/* About Content Card */
.about-content {
    background: #FFE5D9;
    border: 6px solid #000;
    box-shadow: 10px 10px 0 #000;
    padding: 50px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out 0.8s, transform 1s ease-out 0.8s;
}

.about-section.animated .about-content {
    opacity: 1;
    transform: translateY(0);
}

.about-content h1 {
    font-size: 2.5em;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.about-content p {
    font-size: 1.1em;
    line-height: 1.6;
}

/* Work Intro Section */
.work-intro {
    background: #1A1A1A;
    border-top: 8px solid #000;
    border-bottom: 8px solid #000;
    padding: 80px 40px;
    margin: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.work-intro::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 4px solid #FFF;
    pointer-events: none;
}

.work-intro-content {
    position: relative;
    z-index: 1;
}

.work-intro h2 {
    font-size: 4em;
    font-weight: 900;
    text-transform: uppercase;
    color: #FFF;
    letter-spacing: 4px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.work-intro p {
    font-size: 1.4em;
    color: #FFF;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin: 100px 0 60px;
}

.section-header h2 {
    font-size: 3.5em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.section-divider {
    height: 8px;
    background: #000;
    width: 200px;
    margin: 0 auto;
}

/* Game Cards Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    padding: 0 40px 100px;
    perspective: 1000px;
    position: relative;
    background: linear-gradient(180deg, rgba(245, 245, 240, 0.5) 0%, rgba(235, 235, 230, 0.8) 50%, rgba(245, 245, 240, 0.5) 100%);
    background-image:
        linear-gradient(180deg, rgba(245, 245, 240, 0.5) 0%, rgba(235, 235, 230, 0.8) 50%, rgba(245, 245, 240, 0.5) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(0, 0, 0, 0.02) 35px, rgba(0, 0, 0, 0.02) 70px);
    max-width: 1000px;
    margin: 0 auto;
}

.game-card {
    background: #E6E6FA;
    border: 6px solid #000;
    box-shadow: 8px 8px 0 #000;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.game-card.prototype {
    background: #D4F4DD;
    box-shadow: 8px 8px 0 #1A4D2E;
}

.game-card:hover {
    box-shadow: 12px 12px 0 #000;
}

.game-card.prototype:hover {
    box-shadow: 12px 12px 0 #1A4D2E;
}

.game-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-bottom: 6px solid #000;
}

.game-card-content {
    padding: 25px;
}

.game-card-title {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border: 3px solid #000;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.status-in-dev {
    background: #FFF4B3;
}

.status-completed {
    background: #C5E1FF;
}

.montage-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 3px solid #000;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    margin-left: 5px;
    background: #E0F0E0;
}

.montage-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    border-radius: 50%;
}

.montage-badge-icon svg {
    width: 8px;
    height: 8px;
    margin-left: 1px;
}

/* Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.game-modal.active {
    display: block;
}

.game-modal.active .modal-container {
    animation: modalSlideIn 0.3s ease-out forwards;
}

.game-modal.active .modal-backdrop {
    animation: fadeIn 0.3s ease-out forwards;
}

.game-modal.closing .modal-container {
    animation: modalSlideOut 0.3s ease-out forwards;
}

.game-modal.closing .modal-backdrop {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes modalSlideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-30px);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #FEFEFE;
    border: 8px solid #000;
    box-shadow: 20px 20px 0 #000;
    overflow-y: auto;
}

.modal-header {
    background: #F5F5F0;
    border-bottom: 6px solid #000;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-close {
    background: #000;
    color: #FFF;
    border: none;
    font-size: 2em;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.modal-close:hover {
    background: #333;
}

.modal-body {
    padding: 50px;
}

.modal-game-header {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.modal-cover-image {
    width: 100%;
    border: 6px solid #000;
    box-shadow: 8px 8px 0 #000;
}

.modal-game-info h2 {
    font-size: 2.5em;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.modal-game-date {
    font-size: 1.1em;
    font-style: italic;
    margin-bottom: 10px;
    color: #666;
}

.modal-game-description {
    font-size: 1.1em;
    line-height: 1.6;
    margin-top: 20px;
}

.modal-section {
    margin-bottom: 40px;
}

.modal-section h3 {
    font-size: 1.8em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 4px solid #000;
}

.modal-section ul {
    list-style: none;
    padding-left: 0;
}

.modal-section ul li {
    font-size: 1.05em;
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.modal-section ul li::before {
    content: '■';
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

.modal-section p {
    font-size: 1.05em;
    line-height: 1.7;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.modal-gallery-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border: 4px solid #000;
    cursor: pointer;
}

.modal-gallery-thumb:hover {
    box-shadow: 6px 6px 0 #000;
    transform: translate(-2px, -2px);
}

.modal-gallery-video {
    grid-column: 1 / -1;
}

.modal-gallery-video video {
    width: 100%;
    border: 4px solid #000;
    background: #000;
}

/* Image Modal / Carousel */
.image-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
}

.image-modal.active {
    display: flex;
}

.image-modal.closing {
    animation: fadeOut 0.2s ease-out forwards;
}

.image-carousel-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border: 8px solid #FFF;
}

.carousel-arrow {
    position: absolute;
    background: #000;
    color: #FFF;
    border: 4px solid #FFF;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    font-family: 'Playfair Display', serif;
}

.carousel-arrow:hover {
    background: #333;
}

.carousel-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-arrow.disabled:hover {
    background: #000;
}

.carousel-arrow-left {
    left: -80px;
}

.carousel-arrow-right {
    right: -80px;
}

.image-modal-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    background: #000;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #FFF;
}

.image-modal-close:hover {
    background: #333;
}

.profile-overlay {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
}

.profile-overlay.active {
    display: flex;
}

.profile-overlay.closing {
    animation: fadeOut 0.2s ease-out forwards;
}

.carousel-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #FFF;
    padding: 10px 20px;
    border: 4px solid #FFF;
    font-size: 1.2em;
    font-weight: 700;
}

/* Footer */
.footer {
    background: #1A1A1A;
    border-top: 8px solid #000;
    padding: 60px 40px;
    margin-top: 120px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer h2 {
    font-size: 2.5em;
    font-weight: 900;
    text-transform: uppercase;
    color: #FFF;
    letter-spacing: 3px;
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-link {
    background: #FFF;
    color: #1A1A1A;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 700;
    padding: 15px 30px;
    border: 4px solid #000;
    box-shadow: 6px 6px 0 #000;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #000;
}

.footer-credit {
    color: #FFF;
    font-size: 0.9em;
    margin-top: 40px;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .carousel-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }

    .carousel-arrow-left {
        left: 10px;
    }

    .carousel-arrow-right {
        right: 10px;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 40px;
    }

    .modal-game-header {
        grid-template-columns: 1fr;
    }

    .modal-cover-image {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 500px;
        padding: 0 20px;
    }

    .hero-title {
        font-size: 2.5em;
    }

    .hero-subtitle {
        font-size: 1.1em;
    }

    .hero-glass {
        padding: 60px 30px;
    }

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

    .profile-card {
        margin: 0 auto;
        transform: translateY(50px);
    }

    .about-section.animated .profile-card {
        transform: translateY(0);
    }

    .about-content {
        padding: 40px;
    }

    .playing-card {
        display: none;
    }

    .work-intro {
        padding: 60px 30px;
        margin: 60px 0;
    }

    .work-intro h2 {
        font-size: 2.2em;
        letter-spacing: 2px;
    }

    .work-intro p {
        font-size: 1.1em;
    }

    .work-intro::before {
        top: 15px;
        left: 15px;
        right: 15px;
        bottom: 15px;
    }

    .section-header h2 {
        font-size: 2.2em;
    }

    .games-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 60px;
    }

    .game-card,
    .about-section,
    .modal-container {
        border-width: 4px;
        box-shadow: 6px 6px 0 #000;
    }

    .modal-body {
        padding: 30px 20px;
    }

    .modal-game-header {
        gap: 30px;
    }

    .footer {
        padding: 40px 20px;
        margin-top: 80px;
    }

    .footer h2 {
        font-size: 1.8em;
    }

    .footer-links {
        gap: 20px;
    }

    .footer-link {
        padding: 12px 20px;
        font-size: 0.95em;
    }
}

/* ── 768px gap-fills ──────────────────────────────────────── */
@media (max-width: 768px) {
    .container { padding: 0 24px; }

    .profile-card {
        width: 100%;
        max-width: 320px;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .profile-card-back { padding: 20px; }
    .profile-quote { font-size: 0.85em; }
    .about-content { padding: 30px; }
    .about-content h1 { font-size: 2em; }

    .games-grid { gap: 30px; }
    .section-header { margin: 60px 0 40px; }

    .scroll-button { bottom: 30px; }
    .hint-circle { width: 72px; height: 72px; }
    .hint-circle::after { font-size: 0.55em; bottom: -22px; }

    .modal-header { padding: 16px 20px; }
    .modal-container {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .modal-game-info h2 { font-size: 2em; }
    .modal-section h3 { font-size: 1.4em; }

    .image-modal-close { top: 16px; right: 16px; width: 56px; height: 56px; font-size: 36px; }
    .carousel-counter { bottom: 16px; font-size: 1em; }

    /* Background: reduce animations on tablet */
    .mandala-2, .mandala-3 { display: none; }
    .shape-float-5, .shape-float-6, .shape-float-7, .shape-float-8 { display: none; }
    .orbit-2 { display: none; }
    .wave-3 { display: none; }
}

/* ── 480px — mobile ───────────────────────────────────────── */
@media (max-width: 480px) {
    .container { padding: 0 16px; }

    /* Hero */
    .hero { min-height: 480px; padding: 0 16px; }
    .hero-title { font-size: 1.9em; letter-spacing: 1px; }
    .hero-subtitle { font-size: 0.95em; letter-spacing: 0.5px; }
    .scroll-button { width: 60px; height: 60px; bottom: 24px; }
    .scroll-button-label { font-size: 0.6em; bottom: -20px; letter-spacing: 1px; }
    .arrow-icon {
        border-left-width: 14px;
        border-right-width: 14px;
        border-top-width: 18px;
    }
    .hint-circle { width: 60px; height: 60px; }
    .hint-circle::after { font-size: 0.5em; bottom: -18px; letter-spacing: 2px; }

    /* About */
    .about-section { margin: 40px auto; gap: 24px; }
    .profile-card { max-width: 100%; }
    .about-content { padding: 20px; box-shadow: 4px 4px 0 #000; }
    .about-content h1 { font-size: 1.7em; letter-spacing: 1px; margin-bottom: 12px; }
    .about-content p { font-size: 1em; line-height: 1.55; }

    /* Work intro */
    .work-intro { padding: 40px 20px; margin: 40px 0; }
    .work-intro h2 { font-size: 1.8em; letter-spacing: 1px; }
    .work-intro p { font-size: 1em; }
    .work-intro::before { top: 10px; left: 10px; right: 10px; bottom: 10px; border-width: 3px; }
    .star-6, .star-7, .star-8, .star-9, .star-10 { display: none; }

    /* Games grid */
    .games-grid { gap: 24px; padding: 0 16px 40px; }
    .game-card-image { height: 200px; }
    .game-card-content { padding: 16px; }
    .game-card-title { font-size: 1.2em; }
    .status-badge, .montage-badge { font-size: 0.6em; padding: 4px 10px; }
    .section-header { margin: 40px 0 24px; }
    .section-header h2 { font-size: 1.8em; letter-spacing: 1px; }
    .section-divider { width: 120px; height: 6px; }

    /* Modal */
    .modal-container {
        width: 96%;
        margin: 2vh auto;
        max-height: 96vh;
        border-width: 3px;
        box-shadow: 4px 4px 0 #000;
    }
    .modal-body { padding: 20px 16px; }
    .modal-game-info h2 { font-size: 1.6em; letter-spacing: 1px; }
    .modal-game-date { font-size: 1em; }
    .modal-game-description { font-size: 1em; }
    .modal-section h3 { font-size: 1.2em; letter-spacing: 1px; margin-bottom: 12px; }
    .modal-section ul li { font-size: 1em; padding-left: 24px; margin-bottom: 8px; }
    .modal-section p { font-size: 1em; }
    .modal-cover-image { max-width: 100%; border-width: 4px; box-shadow: 4px 4px 0 #000; }
    .modal-game-header { gap: 20px; margin-bottom: 24px; }
    .modal-gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
    .modal-gallery-thumb { height: 90px; }
    .modal-header span { display: none; }

    /* Image carousel */
    .image-carousel-container { max-width: 100%; max-height: 75vh; }
    .carousel-arrow { width: 40px; height: 40px; font-size: 1.2em; border-width: 3px; }
    .carousel-arrow-left { left: 4px; }
    .carousel-arrow-right { right: 4px; }
    .image-modal-content { border-width: 4px; }
    .image-modal-close { top: 12px; right: 12px; width: 48px; height: 48px; font-size: 28px; }

    /* Footer */
    .footer { padding: 32px 16px; margin-top: 60px; }
    .footer h2 { font-size: 1.5em; letter-spacing: 1px; margin-bottom: 20px; }
    .footer-links { gap: 12px; flex-direction: column; align-items: center; }
    .footer-link {
        padding: 10px 24px;
        font-size: 0.9em;
        box-shadow: 4px 4px 0 #000;
        border-width: 3px;
        width: 100%;
        max-width: 220px;
        text-align: center;
    }
    .footer-credit { font-size: 0.8em; word-break: break-word; margin-top: 24px; }

    /* Background: strip down to minimum on mobile */
    .mandala-1 { display: none; }
    .orbit-1 { display: none; }
    .shape-float-3, .shape-float-4 { display: none; }
    .wave-2 { display: none; }
}

.profile-card-inner.touch-flipped {
    transform: rotateY(180deg) !important;
    transition: transform 0.6s ease-out !important;
}

/* ── Touch devices — neutralise sticky hover states ──────── */
@media (hover: none) and (pointer: coarse) {
    .snake-segment {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }
}

/* ── Skills Intro Banner ─────────────────────────────────── */
.skills-intro {
    background: #1E1A2E;
    border-top: 8px solid #000;
    border-bottom: 8px solid #000;
    padding: 80px 40px;
    margin: 100px 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.skills-intro::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.skills-intro-content {
    position: relative;
    z-index: 1;
}

.skills-intro h2 {
    font-size: 4em;
    font-weight: 900;
    text-transform: uppercase;
    color: #FFF;
    letter-spacing: 4px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.skills-intro p {
    font-size: 1.4em;
    color: #FFF;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.85;
}

/* Floating Pip Animation */
.skills-pip-float {
    position: absolute;
    border: 3px solid rgba(255, 255, 255, 0.4);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatPip {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.85; }
    90% { opacity: 0.4; }
    100% { transform: translateY(-110%) rotate(160deg); opacity: 0; }
}

.pip-float-1  { background: #FFE5E8; width: 16px; height: 16px; left: 8%;  bottom: -20px; animation: floatPip 10s ease-in infinite; }
.pip-float-2  { background: #E6E6FA; width: 14px; height: 14px; left: 20%; bottom: -20px; animation: floatPip 14s ease-in infinite; animation-delay: 2s; }
.pip-float-3  { background: #D4F4DD; width: 20px; height: 20px; left: 33%; bottom: -20px; animation: floatPip 11s ease-in infinite; animation-delay: 4s; }
.pip-float-4  { background: #FFF3D4; width: 12px; height: 12px; left: 47%; bottom: -20px; animation: floatPip 13s ease-in infinite; animation-delay: 1s; }
.pip-float-5  { background: #FFE5D9; width: 18px; height: 18px; left: 62%; bottom: -20px; animation: floatPip 9s  ease-in infinite; animation-delay: 3s; }
.pip-float-6  { background: #E8D5FF; width: 14px; height: 14px; left: 76%; bottom: -20px; animation: floatPip 15s ease-in infinite; animation-delay: 5s; }
.pip-float-7  { background: #FFE5E8; width: 10px; height: 10px; left: 89%; bottom: -20px; animation: floatPip 12s ease-in infinite; animation-delay: 6s; }
.pip-float-8  { background: #D4F4DD; width: 10px; height: 10px; left: 14%; bottom: -20px; animation: floatPip 16s ease-in infinite; animation-delay: 0.5s; }
.pip-float-9  { background: #E6E6FA; width: 22px; height: 22px; left: 55%; bottom: -20px; animation: floatPip 8s  ease-in infinite; animation-delay: 7s; }
.pip-float-10 { background: #FFF3D4; width: 12px; height: 12px; left: 40%; bottom: -20px; animation: floatPip 17s ease-in infinite; animation-delay: 8s; }
.pip-float-11 { background: #FFE5D9; width: 8px;  height: 8px;  left: 70%; bottom: -20px; animation: floatPip 11s ease-in infinite; animation-delay: 9s; }
.pip-float-12 { background: #E8D5FF; width: 18px; height: 18px; left: 25%; bottom: -20px; animation: floatPip 13s ease-in infinite; animation-delay: 10s; }

/* ── Skills Section ───────────────────────────────────────── */
.skills-section {
    padding: 80px 0;
    background: #F5F5F0;
}

.skills-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
}

.skill-filter-btn {
    border: 4px solid #000;
    box-shadow: 4px 4px 0 #000;
    padding: 10px 20px;
    font-family: Playfair Display, serif;
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #F5F5F0;
    color: #1A1A1A;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-filter-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

.skill-filter-btn.active {
    background: #000;
    color: #fff;
    box-shadow: 2px 2px 0 #555;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--skill-color);
    border: 4px solid #000;
    box-shadow: 6px 6px 0 #000;
    padding: 20px;
    cursor: default;
    opacity: 1;
    transform: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.skill-card.animated {
    opacity: 1;
    transform: none;
}

.skill-card.filtered-out {
    opacity: 0.15;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.skill-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0 #000;
}

.skill-name {
    font-family: Playfair Display, serif;
    font-weight: 700;
    font-size: 1em;
    margin-bottom: 12px;
    color: #1A1A1A;
}

.skill-pips {
    display: flex;
    gap: 4px;
}

.pip {
    width: 14px;
    height: 14px;
    border: 2px solid #000;
    background: transparent;
}

.pip.filled {
    background: #000;
}

/* ── Mobile Skills Section ───────────────────────────────────────── */
@media (max-width: 600px) {
    .skills-intro { padding: 40px 20px; margin: 40px 0 0; }
    .skills-intro h2 { font-size: 1.8em; letter-spacing: 1px; }
    .skills-intro p { font-size: 1em; }
    .skills-intro::before { top: 10px; left: 10px; right: 10px; bottom: 10px; border-width: 3px; }
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-card {
        padding: 16px;
    }

    .skill-name {
        font-size: 0.9em;
        margin-bottom: 8px;
    }

    .pip {
        width: 12px;
        height: 12px;
        border: 2px solid #000;
    }

    .skill-filter-btn {
        padding: 8px 16px;
        font-size: 0.85em;
    }
}

@media (hover: none) {
    .game-card:hover { box-shadow: 8px 8px 0 #000; transform: none; }
    .game-card.prototype:hover { box-shadow: 8px 8px 0 #1A4D2E; transform: none; }
    .footer-link:hover { transform: none; box-shadow: 6px 6px 0 #000; }
    .modal-gallery-thumb:hover { box-shadow: none; transform: none; }
    /* Disable CSS-only card flip — JS tap handler takes over */
    .about-section:has(.about-content:hover) .profile-card-inner { transform: none; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .wave-layer, .mandala, .mandala-ring,
    .complex-shape, .orbit-system, .orbit-particle,
    .shooting-star, .swoosh { animation: none !important; }
    .hint-circle { animation: none !important; opacity: 1; }
    .scroll-button:not(.holding) { animation: none; }
}
