/* Custom Root & Theme Colors (Hatsune Miku Theme) */
:root {
    --bg-main: #070b12;
    --bg-card: rgba(13, 22, 36, 0.8);
    --border-card: rgba(0, 229, 204, 0.25);
    --text-primary: #f0fdf4;
    --text-secondary: #94a3b8;
    --nav-bg: rgba(7, 11, 18, 0.85);
    --miku-glow: rgba(0, 229, 204, 0.35);
    --apple-glass-bg: rgba(255, 255, 255, 0.05);
    --apple-glass-border: rgba(255, 255, 255, 0.15);
}

/* Megurine Luka (巡音ルカ) Aesthetic (Light Mode) */
body.light-mode {
    --bg-main: #fff5f8;
    --bg-card: rgba(255, 255, 255, 0.88);
    --border-card: rgba(234, 114, 153, 0.28);
    --text-primary: #261720;
    --text-secondary: #5e4554;
    --nav-bg: rgba(255, 245, 248, 0.92);
    --miku-glow: rgba(234, 114, 153, 0.35);
    --luka-pink: #ea7299;
    --luka-gold: #d4af37;
    --apple-glass-bg: rgba(234, 114, 153, 0.08);
    --apple-glass-border: rgba(234, 114, 153, 0.25);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

:root {
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

h1, h2, h3, h4, .font-syne, .font-display {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.03em;
}

/* Hero Headline Typography - Minimalist, Bold & Clean */
.hero-headline {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.035em;
    line-height: 1.08;
    color: #ffffff;
}

.hero-title-main {
    color: #ffffff;
}

.hero-headline-accent {
    color: #00e5cc;
    text-shadow: 0 0 28px rgba(0, 229, 204, 0.4);
}

.hero-amp {
    color: #00e5cc;
    font-weight: 700;
}

/* ===================================================
   Editorial / cinematic landing composition
   =================================================== */
.miu-hero {
    position: relative;
    display: flex;
    min-height: 100svh;
    align-items: center;
    overflow: hidden;
    padding: 118px 24px 48px;
    border-bottom: 1px solid rgba(0, 229, 204, 0.14);
}

.miu-hero::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 229, 204, 0.045) 1px, transparent 1px),
        linear-gradient(rgba(0, 229, 204, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    content: '';
    mask-image: linear-gradient(to bottom, black, transparent 88%);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 88%);
    pointer-events: none;
}

.miu-hero-noise {
    position: absolute;
    inset: 0;
    opacity: 0.32;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.miu-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 1360px);
    margin: 0 auto;
    grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.94fr);
    align-items: center;
    gap: clamp(2.5rem, 7vw, 8rem);
}

.miu-hero-copy {
    padding-block: clamp(1rem, 4vh, 3rem);
}

.miu-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: clamp(1.5rem, 4vh, 3.5rem);
    color: #00e5cc;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.miu-live-dot {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 9999px;
    background: #00e5cc;
    box-shadow: 0 0 0 0 rgba(0, 229, 204, 0.7);
    animation: miuLivePulse 2.2s ease-out infinite;
}

.miu-display {
    display: flex;
    flex-direction: column;
    margin: 0;
    color: #f0fdf4;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(4.2rem, 8.7vw, 9.4rem);
    font-weight: 900;
    letter-spacing: -0.085em;
    line-height: 0.78;
}

.miu-display > span {
    display: block;
}

.miu-display-outline {
    padding-left: clamp(1rem, 5vw, 5.5rem);
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 229, 204, 0.78);
    text-stroke: 1px rgba(0, 229, 204, 0.78);
    text-shadow: 0 0 42px rgba(0, 229, 204, 0.15);
}

.miu-display.miu-tagline-heading {
    display: block;
    max-width: 11ch;
    color: #00e5cc;
    font-size: clamp(3.1rem, 5.9vw, 5.8rem);
    letter-spacing: -0.065em;
    line-height: 0.98;
}

.miu-hero-intro {
    max-width: 34rem;
    margin: 0.85rem 0 0;
    color: #94a3b8;
    font-size: clamp(0.9rem, 1.2vw, 1.08rem);
    font-weight: 400;
    line-height: 1.75;
}

.miu-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-top: 2rem;
}

.miu-primary-action,
.miu-text-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 3.2rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.miu-primary-action {
    padding: 0 1.25rem;
    border: 1px solid rgba(0, 229, 204, 0.65);
    background: #00e5cc;
    color: #070b12;
}

.miu-primary-action:hover {
    transform: translateY(-3px);
    background: #f0fdf4;
}

.miu-text-action {
    padding: 0;
    border: 0;
    background: transparent;
    color: #f0fdf4;
    cursor: pointer;
}

.miu-text-action:hover {
    color: #00e5cc;
    transform: translateX(4px);
}

.miu-hero-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.25rem;
    margin-top: clamp(2.5rem, 7vh, 5.25rem);
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.miu-hero-notes span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.miu-hero-notes span::before {
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 50%;
    background: #00e5cc;
    content: '';
}

.miu-hero-stage {
    position: relative;
    min-height: min(65vw, 650px);
    overflow: hidden;
    border: 1px solid rgba(0, 229, 204, 0.28);
    background: linear-gradient(145deg, rgba(13, 22, 36, 0.94), rgba(7, 11, 18, 0.5));
    box-shadow: inset 0 1px 0 rgba(240, 253, 244, 0.07), 0 28px 100px rgba(0, 229, 204, 0.12);
    isolation: isolate;
    transition: transform 0.2s ease-out;
}

.miu-stage-grid {
    position: absolute;
    inset: 0;
    z-index: -3;
    opacity: 0.48;
    background:
        linear-gradient(90deg, rgba(0, 229, 204, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(0, 229, 204, 0.1) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 52% 48%, black, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 52% 48%, black, transparent 72%);
}

.miu-stage-glow {
    position: absolute;
    z-index: -2;
    top: 13%;
    left: 21%;
    width: 63%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 204, 0.3), rgba(0, 229, 204, 0.06) 42%, transparent 70%);
    filter: blur(8px);
    animation: miuGlowBreathe 6s ease-in-out infinite;
}

.miu-stage-ring {
    position: absolute;
    border: 1px solid rgba(0, 229, 204, 0.42);
    border-radius: 9999px;
    pointer-events: none;
}

.miu-stage-ring-one {
    top: 9%;
    right: -22%;
    width: 92%;
    aspect-ratio: 1;
    animation: miuSlowSpin 20s linear infinite;
}

.miu-stage-ring-two {
    bottom: -28%;
    left: -26%;
    width: 76%;
    aspect-ratio: 1;
    border-style: dashed;
    opacity: 0.62;
    animation: miuSlowSpin 27s linear infinite reverse;
}

.miu-stage-corner {
    position: absolute;
    width: 58px;
    height: 58px;
    border-color: #00e5cc;
    border-style: solid;
    opacity: 0.86;
}

.miu-stage-corner-a {
    top: 20px;
    left: 20px;
    border-width: 1px 0 0 1px;
}

.miu-stage-corner-b {
    right: 20px;
    bottom: 20px;
    border-width: 0 1px 1px 0;
}

.miu-stage-panel {
    position: absolute;
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(240, 253, 244, 0.2);
    background: linear-gradient(145deg, rgba(13, 22, 36, 0.9), rgba(7, 11, 18, 0.72));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.miu-stage-panel-main {
    top: 17%;
    left: 14%;
    width: 56%;
    aspect-ratio: 4 / 5;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.2rem;
    transform: rotate(-7deg);
    animation: miuPanelFloat 5.4s ease-in-out infinite;
}

.miu-stage-panel-main::before {
    position: absolute;
    inset: 17% -30% -20% 22%;
    border: 1px solid rgba(0, 229, 204, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 80px rgba(0, 229, 204, 0.22);
    content: '';
}

.miu-panel-index,
.miu-panel-meta {
    position: relative;
    z-index: 1;
    color: #00e5cc;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.miu-panel-meta {
    color: #94a3b8;
}

.miu-panel-word {
    position: relative;
    z-index: 1;
    color: #f0fdf4;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(4rem, 9vw, 7.8rem);
    font-weight: 900;
    letter-spacing: -0.11em;
    line-height: 0.8;
}

.miu-stage-panel-side {
    right: 9%;
    bottom: 15%;
    width: 30%;
    aspect-ratio: 9 / 16;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    color: #f0fdf4;
    transform: rotate(8deg);
    animation: miuPanelFloatSide 6.6s ease-in-out infinite;
}

.miu-stage-panel-side span {
    color: #00e5cc;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.75rem, 4vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.08em;
}

.miu-stage-panel-side i {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border: 1px solid rgba(0, 229, 204, 0.7);
    border-radius: 50%;
    color: #00e5cc;
    font-size: 0.7rem;
}

.miu-stage-panel-side small {
    color: #94a3b8;
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.miu-stage-stamp {
    position: absolute;
    right: 5.2%;
    top: 9%;
    color: #f0fdf4;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.5;
    text-align: right;
}

.miu-stage-explore {
    position: absolute;
    bottom: 7%;
    left: 7%;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #f0fdf4;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.miu-stage-explore i {
    color: #00e5cc;
    animation: miuArrowNudge 1.8s ease-in-out infinite;
}

@keyframes miuLivePulse {
    70% { box-shadow: 0 0 0 8px rgba(0, 229, 204, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 229, 204, 0); }
}

@keyframes miuLivePulsePink {
    70% { box-shadow: 0 0 0 8px rgba(234, 114, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 114, 153, 0); }
}

@keyframes miuGlowBreathe {
    0%, 100% { transform: scale(0.9); opacity: 0.58; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes miuSlowSpin {
    to { transform: rotate(360deg); }
}

@keyframes miuPanelFloat {
    0%, 100% { transform: translateY(0) rotate(-7deg); }
    50% { transform: translateY(-13px) rotate(-5deg); }
}

@keyframes miuPanelFloatSide {
    0%, 100% { transform: translateY(0) rotate(8deg); }
    50% { transform: translateY(11px) rotate(6deg); }
}

@keyframes miuArrowNudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@media (max-width: 1023px) {
    .miu-hero {
        padding-top: 104px;
    }

    .miu-hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .miu-hero-stage {
        width: min(100%, 620px);
        min-height: min(115vw, 600px);
        margin-inline: auto;
    }
}

@media (max-width: 639px) {
    .miu-hero {
        padding: 100px 18px 34px;
    }

    .miu-display {
        font-size: clamp(3.65rem, 18vw, 5.4rem);
    }

    .miu-hero-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.95rem;
    }

    .miu-hero-notes {
        margin-top: 2.4rem;
    }

    .miu-hero-stage {
        min-height: 96vw;
    }

    .miu-stage-panel-main {
        left: 12%;
        width: 59%;
        padding: 0.9rem;
    }

    .miu-stage-panel-side {
        right: 7%;
    }

    .miu-stage-stamp {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .miu-live-dot,
    .miu-stage-glow,
    .miu-stage-ring,
    .miu-stage-panel,
    .miu-stage-explore i {
        animation: none !important;
    }
}

body.light-mode .miu-hero {
    border-bottom-color: rgba(234, 114, 153, 0.18);
}

body.light-mode .miu-hero::before {
    background:
        linear-gradient(90deg, rgba(234, 114, 153, 0.06) 1px, transparent 1px),
        linear-gradient(rgba(234, 114, 153, 0.05) 1px, transparent 1px);
    background-size: 72px 72px;
}

body.light-mode .miu-kicker,
body.light-mode .miu-text-action:hover,
body.light-mode .miu-panel-index,
body.light-mode .miu-stage-panel-side span,
body.light-mode .miu-stage-panel-side i,
body.light-mode .miu-stage-explore i {
    color: #d82662;
}

body.light-mode .miu-live-dot,
body.light-mode .miu-hero-notes span::before {
    background: #ea7299;
}

body.light-mode .miu-live-dot {
    box-shadow: 0 0 0 0 rgba(234, 114, 153, 0.65);
    animation-name: miuLivePulsePink;
}

body.light-mode .miu-display,
body.light-mode .miu-text-action,
body.light-mode .miu-stage-stamp,
body.light-mode .miu-stage-explore,
body.light-mode .miu-panel-word {
    color: #150d14;
}

body.light-mode .miu-display-outline {
    color: transparent !important;
    -webkit-text-stroke-color: rgba(216, 38, 98, 0.75);
    text-stroke-color: rgba(216, 38, 98, 0.75);
    text-shadow: none;
}

body.light-mode .miu-primary-action {
    border-color: rgba(216, 38, 98, 0.55);
    background: #ea7299;
    color: #ffffff;
}

body.light-mode .miu-primary-action:hover {
    background: #ffffff;
    color: #d82662;
}

body.light-mode .miu-hero-intro,
body.light-mode .miu-panel-meta,
body.light-mode .miu-stage-panel-side small {
    color: #5e4554;
}

body.light-mode .miu-hero-notes {
    color: #8f6678;
}

body.light-mode .miu-hero-stage,
body.light-mode .miu-stage-panel {
    border-color: rgba(234, 114, 153, 0.3);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 239, 245, 0.76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 28px 100px rgba(234, 114, 153, 0.14);
}

body.light-mode .miu-stage-grid {
    background:
        linear-gradient(90deg, rgba(234, 114, 153, 0.13) 1px, transparent 1px),
        linear-gradient(rgba(234, 114, 153, 0.13) 1px, transparent 1px);
    background-size: 44px 44px;
}

body.light-mode .miu-stage-glow {
    background: radial-gradient(circle, rgba(234, 114, 153, 0.28), rgba(234, 114, 153, 0.04) 42%, transparent 70%);
}

body.light-mode .miu-stage-ring,
body.light-mode .miu-stage-panel-main::before,
body.light-mode .miu-stage-panel-side i {
    border-color: rgba(216, 38, 98, 0.48);
}

body.light-mode .miu-stage-corner {
    border-color: #ea7299;
}

/* Apple Glass Pill Effect for Navigation Links */
nav ul li a {
    position: relative;
    padding: 8px 16px;
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

nav ul li a:hover {
    background: var(--apple-glass-bg);
    border: 1px solid var(--apple-glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    color: #00e5cc !important;
    transform: translateY(-2px);
}

body.light-mode nav ul li a:hover {
    color: #ea7299 !important;
}

/* White Glassier Curved Card */
.futuristic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 28px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.futuristic-card:hover {
    border-color: rgba(0, 229, 204, 0.8);
    box-shadow: 0 10px 30px var(--miku-glow);
    transform: translateY(-6px);
}

body.light-mode .futuristic-card:hover {
    border-color: rgba(234, 114, 153, 0.8);
    box-shadow: 0 10px 30px rgba(234, 114, 153, 0.35);
}

/* Clear Contrast Rules for Light Mode (Megurine Luka) */
body.light-mode,
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode .hero-headline,
body.light-mode .hero-title-main,
body.light-mode .text-white {
    color: #150d14 !important;
}

body.light-mode p,
body.light-mode .text-gray-300,
body.light-mode .text-gray-400 {
    color: #483342 !important;
}

/* Prevent any white-fading gradient text in light mode */
body.light-mode .hero-headline-accent,
body.light-mode .hero-amp {
    color: #d82662 !important;
    text-shadow: none !important;
}

body.light-mode .text-transparent.bg-clip-text {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #150d14 !important;
    color: #150d14 !important;
}

body.light-mode .maroon-glow-text {
    text-shadow: none !important;
    color: #d82662 !important;
}

/* Card & Container Overrides for Light Mode */
body.light-mode .bg-cardBg,
body.light-mode .bg-darkBg,
body.light-mode .bg-cardBg\/80,
body.light-mode .bg-cardBg\/60,
body.light-mode .bg-cardBg\/40,
body.light-mode .bg-cardBg\/30,
body.light-mode .bg-darkBg\/90,
body.light-mode .bg-maroon-dark\/50,
body.light-mode .bg-maroon-dark\/60 {
    background-color: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(234, 114, 153, 0.22) !important;
}

/* Gradient Banners Fix for Light Mode */
body.light-mode .bg-gradient-to-r.from-maroon-dark\/60,
body.light-mode .bg-gradient-to-r.from-cardBg {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 240, 245, 0.92) 100%) !important;
    border-color: rgba(234, 114, 153, 0.25) !important;
}

/* Navigation Bar Fix */
body.light-mode nav {
    background-color: var(--nav-bg) !important;
    border-bottom-color: rgba(234, 114, 153, 0.2) !important;
}

/* Form Inputs & Select Boxes Fix */
body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background-color: #ffffff !important;
    color: #261720 !important;
    border-color: rgba(234, 114, 153, 0.28) !important;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
    color: #a8949f !important;
}

/* Hero Badge & Buttons Fix (Luka Pink & Gold Accent) */
body.light-mode .inline-flex.bg-maroon-dark\/50 {
    background-color: rgba(234, 114, 153, 0.12) !important;
    color: #d04b77 !important;
    border-color: rgba(234, 114, 153, 0.3) !important;
}

/* Luka Theme Buttons & Accents in Light Mode */
body.light-mode .bg-gradient-to-r.from-maroon.to-maroon-light,
body.light-mode .bg-maroon-light {
    background: linear-gradient(135deg, #ea7299 0%, #f48fb1 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(234, 114, 153, 0.35) !important;
}

body.light-mode .text-maroon-light {
    color: #ea7299 !important;
}

body.light-mode .border-maroon-light,
body.light-mode .border-maroon-dark\/40,
body.light-mode .border-maroon-dark\/50 {
    border-color: rgba(234, 114, 153, 0.35) !important;
}

body.light-mode .cursor-dot {
    background-color: #ea7299 !important;
}
body.light-mode .cursor-outline {
    border-color: rgba(234, 114, 153, 0.6) !important;
}
body.light-mode .cursor-outline.cursor-hover {
    background-color: rgba(234, 114, 153, 0.15) !important;
    border-color: rgba(234, 114, 153, 0.9) !important;
}

body.light-mode ::-webkit-scrollbar-track {
    background: #fff5f8;
}
body.light-mode ::-webkit-scrollbar-thumb {
    background: #ea7299;
    border-color: rgba(234, 114, 153, 0.3);
}
body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: #d04b77;
}

/* Profile Card Fix */
body.light-mode .rounded-\[36px\] {
    background: linear-gradient(135deg, #ffffff 0%, #fff0f5 100%) !important;
}

/* Profile Feathered Image Mask */
.profile-feather-img {
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #083338;
    border-radius: 4px;
    border: 1px solid rgba(0, 229, 204, 0.2);
}
::-webkit-scrollbar-thumb:hover {
    background: #39c5bb;
}

/* Custom Cursor Animation */
.cursor-dot {
    pointer-events: none;
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    transition: transform 0.1s ease-out, opacity 0.2s ease;
    width: 8px; height: 8px;
    background-color: #00e5cc;
}
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9998;
    width: 38px; height: 38px;
    border: 1px solid rgba(0, 229, 204, 0.6);
    transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease-out;
}
.cursor-outline.cursor-hover {
    width: 54px;
    height: 54px;
    background-color: rgba(0, 229, 204, 0.12);
    border-color: rgba(0, 229, 204, 0.9);
}
.cursor-hidden {
    opacity: 0 !important;
}

/* Cinema Lightbox Modal */
#cinema-modal {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#cinema-modal.active {
    opacity: 1;
    pointer-events: auto;
}
#cinema-modal-box {
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#cinema-modal.active #cinema-modal-box {
    transform: scale(1);
}

/* Aspect Ratio 16:9 for Video Containers */
.aspect-16-9 {
    aspect-ratio: 16 / 9;
}

/* ===================================================
   Compact, aspect-aware portfolio mosaic
   =================================================== */
.portfolio-grid {
    --portfolio-row: 8px;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    grid-auto-rows: var(--portfolio-row);
    grid-auto-flow: dense;
    align-items: start;
    gap: 16px;
}

.gallery-item {
    min-width: 0;
    align-self: start;
    overflow: hidden;
    transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.gallery-media {
    position: relative;
    width: 100%;
    aspect-ratio: var(--media-aspect, 16 / 9);
    overflow: hidden;
    background: #070b12;
}

.gallery-media video,
.gallery-media img,
.gallery-media iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item[data-aspect="9:16"] .gallery-media,
.gallery-item[data-aspect="4:5"] .gallery-media {
    background: #05080d;
}

.gallery-card-content {
    padding: 14px 15px 0;
}

.gallery-card-title {
    font-size: 0.95rem;
    line-height: 1.25;
}

.gallery-card-description {
    display: -webkit-box;
    margin-top: 0.35rem;
    overflow: hidden;
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.gallery-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 10px 15px 13px;
    border-top: 1px solid rgba(0, 229, 204, 0.15);
}

.gallery-card-footer > .social-actions { margin-left: auto; }
.gallery-card-footer i { flex-shrink: 0; }

.gallery-play-button {
    width: 42px;
    height: 42px;
    border-radius: 9999px;
}

.gallery-empty-state {
    display: flex;
    grid-column: 1 / -1;
    grid-row: span 6;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.gallery-empty-state.hidden { display: none; }

@media (min-width: 640px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .portfolio-grid {
        gap: 18px;
    }
}

body.light-mode .gallery-card-description {
    color: #5e4554;
}

body.light-mode .gallery-card-footer {
    border-top-color: rgba(234, 114, 153, 0.18);
}

body.light-mode .gallery-sort-select {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(234, 114, 153, 0.3) !important;
    color: #261720 !important;
}

/* A vertical Reel stays vertical in the player, without making the modal overly wide. */
#cinema-modal-media-container[data-aspect="9:16"] {
    width: min(100%, 420px);
    margin-inline: auto;
}

#cinema-modal-media-container[data-aspect="4:5"] {
    width: min(100%, 560px);
    margin-inline: auto;
}

#cinema-modal-media-container[data-aspect="1:1"] {
    width: min(100%, 680px);
    margin-inline: auto;
}

@media (max-width: 639px) {
    #cinema-modal-media-container[data-aspect="9:16"] {
        width: min(100%, 340px);
    }
}

/* Mobile Menu Drawer */
#mobile-menu {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    width: min(340px, calc(100vw - 24px));
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    gap: 24px;
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
}
#mobile-menu > div { flex-shrink: 0; }
.mobile-social-heading { margin: 16px 0 10px; color: #94a3b8; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.mobile-social-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mobile-social-grid a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border: 1px solid rgba(0, 212, 190, .22); border-radius: 12px; background: rgba(0, 212, 190, .04); color: #e2e8f0; font-size: 12px; font-weight: 600; }
.mobile-social-grid a:last-child { grid-column: 1 / -1; }
.mobile-social-grid i { width: 18px; text-align: center; font-size: 18px; }
.mobile-social-grid a:hover { background: rgba(0, 212, 190, .12); }
.mobile-social-grid a:focus-visible { outline: 2px solid #00d4be; outline-offset: 2px; }
body.light-mode .mobile-social-heading { color: #475569; }
body.light-mode #mobile-menu ul { color: #334155; }
body.light-mode .mobile-social-grid a { color: #1e293b; background: rgba(0, 184, 163, .06); }
#mobile-menu.open {
    transform: translateX(0);
}
#mobile-backdrop {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#mobile-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Back to Top Floating Button */
#back-to-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Light Mode Overrides for Modal & Mobile Menu */
body.light-mode #mobile-menu {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-left-color: rgba(0, 184, 163, 0.2) !important;
}
body.light-mode #cinema-modal-box {
    background-color: #ffffff !important;
}

/* Star Rating Animation */
.star-opt {
    transition: transform 0.15s ease, color 0.15s ease;
}
.star-opt:hover {
    transform: scale(1.3);
}

/* Comment Avatar Initial */
.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    flex-shrink: 0;
}

/* Modal Scrollbar */
#cinema-modal-box div::-webkit-scrollbar {
    width: 6px;
}
#cinema-modal-box div::-webkit-scrollbar-track {
    background: #070b12;
}
#cinema-modal-box div::-webkit-scrollbar-thumb {
    background: #083338;
    border-radius: 3px;
    border: 1px solid rgba(0, 229, 204, 0.2);
}
#cinema-modal-box div::-webkit-scrollbar-thumb:hover {
    background: #39c5bb;
}

body.light-mode #cinema-modal-box div::-webkit-scrollbar-track {
    background: #fff5f8;
}
body.light-mode #cinema-modal-box div::-webkit-scrollbar-thumb {
    background: #ea7299;
    border: 1px solid rgba(234, 114, 153, 0.3);
}
body.light-mode #cinema-modal-box div::-webkit-scrollbar-thumb:hover {
    background: #d04b77;
}

/* ===================================================
   Futuristic Gaussian Blur Floating Orbs
   =================================================== */
.gaussian-orb-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.gaussian-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform;
    transition: background 1.5s ease;
}

@media (max-width: 767px) {
    .gaussian-orb { filter: blur(64px); animation: none !important; }
    .orb-3 { display: none; }
}

/* Orb 1: Primary Cyber Glow */
.orb-1 {
    width: 480px;
    height: 480px;
    top: -100px;
    left: 15%;
    background: radial-gradient(circle, #39c5bb 0%, #00e5cc 40%, rgba(8, 51, 56, 0.4) 80%);
    opacity: 0.32;
    animation: orbFloat1 20s ease-in-out infinite alternate;
}

/* Orb 2: Secondary Deep Contrast Glow */
.orb-2 {
    width: 520px;
    height: 520px;
    bottom: -120px;
    right: 10%;
    background: radial-gradient(circle, #00f0ff 0%, #083338 50%, rgba(0, 229, 204, 0.2) 90%);
    opacity: 0.28;
    animation: orbFloat2 26s ease-in-out infinite alternate;
}

/* Orb 3: Midfield Ambient Accent Glow */
.orb-3 {
    width: 380px;
    height: 380px;
    top: 45%;
    left: 60%;
    background: radial-gradient(circle, #00e5cc 0%, #064048 60%, rgba(0, 240, 255, 0.15) 100%);
    opacity: 0.25;
    animation: orbFloat3 22s ease-in-out infinite alternate;
}

/* Light Mode: Megurine Luka (巡音ルカ) Palette */
body.light-mode .orb-1 {
    background: radial-gradient(circle, #ea7299 0%, #ff8da1 45%, rgba(212, 175, 55, 0.3) 85%);
    opacity: 0.38;
}

body.light-mode .orb-2 {
    background: radial-gradient(circle, #e5b869 0%, #ea7299 50%, rgba(255, 141, 161, 0.25) 90%);
    opacity: 0.34;
}

body.light-mode .orb-3 {
    background: radial-gradient(circle, #ff7597 0%, #d4af37 60%, rgba(234, 114, 153, 0.2) 100%);
    opacity: 0.30;
}

@keyframes orbFloat1 {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    33% {
        transform: translate3d(80px, 90px, 0) scale(1.15);
    }
    66% {
        transform: translate3d(-60px, 140px, 0) scale(0.92);
    }
    100% {
        transform: translate3d(40px, 60px, 0) scale(1.08);
    }
}

@keyframes orbFloat2 {
    0% {
        transform: translate3d(0, 0, 0) scale(1.05);
    }
    33% {
        transform: translate3d(-90px, -110px, 0) scale(0.9);
    }
    66% {
        transform: translate3d(70px, -70px, 0) scale(1.18);
    }
    100% {
        transform: translate3d(-40px, -40px, 0) scale(1);
    }
}

@keyframes orbFloat3 {
    0% {
        transform: translate3d(0, 0, 0) scale(0.95);
    }
    50% {
        transform: translate3d(90px, -80px, 0) scale(1.2);
    }
    100% {
        transform: translate3d(-70px, 70px, 0) scale(0.9);
    }
}

/* ===================================================
   Sticky Floating Social Media Dock
   =================================================== */
#sticky-social-dock {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-dock-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-dock-btn:hover {
    transform: scale(1.18) translateX(3px);
}

/* Tooltip Badge */
.social-dock-tooltip {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.social-dock-btn:hover .social-dock-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Dark Mode Social Dock Colors */
.social-dock-btn {
    background: rgba(13, 22, 36, 0.7);
    border: 1px solid rgba(0, 229, 204, 0.25);
    color: #94a3b8;
}

.social-dock-btn:hover {
    background: rgba(0, 229, 204, 0.15);
    border-color: rgba(0, 229, 204, 0.8);
    color: #00e5cc;
    box-shadow: 0 0 20px rgba(0, 229, 204, 0.4);
}

.social-dock-tooltip {
    background: #0d1624;
    border: 1px solid rgba(0, 229, 204, 0.4);
    color: #00e5cc;
}

/* Light Mode: Megurine Luka Social Dock */
body.light-mode #sticky-social-dock {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(234, 114, 153, 0.3) !important;
    box-shadow: 0 10px 35px rgba(234, 114, 153, 0.2) !important;
}

body.light-mode .social-dock-btn {
    background: rgba(255, 245, 248, 0.85);
    border-color: rgba(234, 114, 153, 0.25);
    color: #5e4554;
}

body.light-mode .social-dock-btn:hover {
    background: rgba(234, 114, 153, 0.15);
    border-color: rgba(234, 114, 153, 0.9);
    color: #ea7299;
    box-shadow: 0 0 20px rgba(234, 114, 153, 0.35);
}

body.light-mode .social-dock-tooltip {
    background: #ffffff;
    border-color: rgba(234, 114, 153, 0.4);
    color: #ea7299;
}

/* ===================================================
   Fast-Pace Video Preview Badge
   =================================================== */
.fast-preview-badge {
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.group\/player:hover .fast-preview-badge {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ===================================================
   Interactive Before / After Comparison Slider
   =================================================== */
.before-after-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-card);
}

.before-after-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.before-after-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    overflow: hidden;
    will-change: width;
    border-right: 2px solid #00e5cc;
    box-shadow: 2px 0 15px rgba(0, 229, 204, 0.4);
}

body.light-mode .before-after-overlay {
    border-right: 2px solid #ea7299;
    box-shadow: 2px 0 15px rgba(234, 114, 153, 0.4);
}

.before-after-overlay .before-after-img {
    width: 100%;
    height: 100%;
    max-width: none;
}

.before-after-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #070b12;
    border: 2px solid #00e5cc;
    box-shadow: 0 0 20px rgba(0, 229, 204, 0.6), inset 0 0 10px rgba(0, 229, 204, 0.3);
    color: #00e5cc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
    z-index: 30;
    font-size: 13px;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.before-after-handle:hover, .before-after-handle:active {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 30px rgba(0, 229, 204, 0.9);
}

body.light-mode .before-after-handle {
    background: #ffffff;
    border-color: #ea7299;
    color: #ea7299;
    box-shadow: 0 0 20px rgba(234, 114, 153, 0.5);
}

/* ===================================================
   Creative Pipeline Infinite Marquee
   =================================================== */
.marquee-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.marquee-content {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: marqueeScroll 28s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.marquee-badge {
    padding: 10px 20px;
    border-radius: 9999px;
    background: rgba(13, 22, 36, 0.7);
    border: 1px solid rgba(0, 229, 204, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #f0fdf4;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.marquee-badge:hover {
    border-color: #00e5cc;
    background: rgba(0, 229, 204, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 229, 204, 0.25);
}

body.light-mode .marquee-badge {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(234, 114, 153, 0.25);
    color: #261720;
}

body.light-mode .marquee-badge:hover {
    border-color: #ea7299;
    background: rgba(234, 114, 153, 0.1);
    box-shadow: 0 8px 20px rgba(234, 114, 153, 0.25);
}

/* ===================================================
   WebGL 3D Interactive Product Viewer
   =================================================== */
model-viewer {
    width: 100%;
    height: 480px;
    background-color: transparent;
    --poster-color: transparent;
    border-radius: 24px;
    outline: none;
}

/* ===================================================
   Budget Estimator Interactive Cards
   =================================================== */
.estimator-option-btn {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.estimator-option-btn.active {
    border-color: #00e5cc !important;
    background-color: rgba(0, 229, 204, 0.15) !important;
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(0, 229, 204, 0.25);
}

body.light-mode .estimator-option-btn.active {
    border-color: #ea7299 !important;
    background-color: rgba(234, 114, 153, 0.15) !important;
    color: #261720 !important;
    box-shadow: 0 0 20px rgba(234, 114, 153, 0.25);
}

/* ===================================================
   Cinema Keyboard Shortcut HUD
   =================================================== */
.cinema-hud {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background: rgba(7, 11, 18, 0.9);
    color: #00e5cc;
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 16px;
    border: 1px solid rgba(0, 229, 204, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.cinema-hud.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

body.light-mode .cinema-hud {
    background: rgba(255, 245, 248, 0.92);
    color: #ea7299;
    border-color: rgba(234, 114, 153, 0.35);
}

/* ===================================================
   Toast Notification System
   =================================================== */
.miu-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(13, 22, 36, 0.95);
    color: #00e5cc;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid rgba(0, 229, 204, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 229, 204, 0.2);
}

.miu-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.light-mode .miu-toast {
    background: rgba(255, 245, 248, 0.95);
    color: #ea7299;
    border-color: rgba(234, 114, 153, 0.3);
    box-shadow: 0 8px 24px rgba(234, 114, 153, 0.2);
}

/* ===================================================
   Scroll-Reveal Animation System
   =================================================== */
.scroll-reveal {
    /* Content stays readable even if a reveal callback is delayed. */
    opacity: 1;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   Gallery Search Input Light Mode
   =================================================== */
body.light-mode #gallery-search {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(234, 114, 153, 0.3) !important;
    color: #261720 !important;
}

body.light-mode #gallery-search::placeholder {
    color: #9e7a8e !important;
}

body.light-mode #gallery-search:focus {
    border-color: #ea7299 !important;
}

/* ===================================================
   Caffe-design-inspired Card 3D Tilt Polish
   =================================================== */
.futuristic-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.gallery-item.futuristic-card:hover {
    transform: translateY(-6px) rotateX(1.5deg) rotateY(-1deg);
}

/* ===================================================
   Sound Toggle Button — Light Mode
   =================================================== */
/* ===================================================
   Estimator Range Slider Custom Styling
   =================================================== */
#est-asset-slider {
    -webkit-appearance: none;
    height: 4px;
    background: linear-gradient(to right, #00e5cc, #39c5bb);
    border-radius: 4px;
    outline: none;
    transition: opacity 0.2s;
}

#est-asset-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00e5cc;
    border: 3px solid #070b12;
    box-shadow: 0 0 12px rgba(0, 229, 204, 0.6);
    cursor: pointer;
    transition: transform 0.15s ease;
}

#est-asset-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

body.light-mode #est-asset-slider {
    background: linear-gradient(to right, #ea7299, #d04b77);
}

body.light-mode #est-asset-slider::-webkit-slider-thumb {
    background: #ea7299;
    border-color: #fff5f8;
    box-shadow: 0 0 12px rgba(234, 114, 153, 0.5);
}

/* ===================================================
   WhatsApp Guided Intake Modal Pills
   =================================================== */
.wai-pill {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.wai-pill.active {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

body.light-mode .wai-pill {
    background: #ffffff !important;
    color: #483342 !important;
    border-color: rgba(234, 114, 153, 0.3) !important;
}

body.light-mode .wai-pill:hover {
    border-color: #ea7299 !important;
    color: #d82662 !important;
}

body.light-mode .wai-pill.active {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: #059669 !important;
    color: #065f46 !important;
    font-weight: 700 !important;
}

#est-service-btns .estimator-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
    line-height: 1.5;
}

#est-service-btns .estimator-option-btn > i {
    flex-shrink: 0;
    margin-bottom: 0;
}

/* ===================================================
   Portfolio navigation and selected-work treatment
   =================================================== */
.miu-nav {
    border-bottom: 1px solid rgba(0, 229, 204, 0.14);
    background: linear-gradient(to bottom, rgba(7, 11, 18, 0.92), rgba(7, 11, 18, 0.66));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.miu-nav-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.7rem;
}

.miu-nav-brand-sub {
    padding-left: 0.7rem;
    border-left: 1px solid rgba(0, 229, 204, 0.3);
    color: #94a3b8;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: none;
}

.miu-nav-links {
    align-items: center;
    gap: 0.2rem;
}

nav.miu-nav .miu-nav-links li a {
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 0;
}

nav.miu-nav .miu-nav-links li a:hover {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #00e5cc !important;
    transform: none;
}

.miu-nav-contact {
    align-items: center;
    gap: 0.5rem;
    color: #f0fdf4;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s ease, transform 0.2s ease;
}

.miu-nav-contact:hover {
    color: #00e5cc;
    transform: translateY(-2px);
}

.miu-nav-contact i {
    color: #00e5cc;
    font-size: 0.58rem;
}

.miu-nav-icon {
    border: 1px solid rgba(0, 229, 204, 0.28);
    background: rgba(13, 22, 36, 0.48);
    border-radius: 0;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.miu-nav-icon:hover {
    border-color: #00e5cc;
    background: rgba(0, 229, 204, 0.12);
    color: #00e5cc;
    transform: translateY(-2px);
}

.miu-nav a:focus-visible,
.miu-nav button:focus-visible,
.miu-work-section button:focus-visible,
.miu-work-section input:focus-visible,
.miu-work-section select:focus-visible,
.miu-work-section .gallery-item:focus-visible {
    outline: 2px solid #00e5cc;
    outline-offset: 3px;
}

.miu-work-section {
    position: relative;
    overflow: hidden;
}

.miu-work-section::before {
    position: absolute;
    top: 0;
    right: max(24px, calc((100vw - 1280px) / 2));
    width: 30vw;
    max-width: 440px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 229, 204, 0.52));
    content: '';
}

.miu-work-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
    align-items: end;
    gap: 2rem;
    margin-bottom: clamp(3rem, 8vw, 7rem);
}

.miu-section-index {
    display: inline-block;
    margin-bottom: 1rem;
    color: #00e5cc;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.miu-work-title {
    margin: 0;
    color: #f0fdf4;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(3rem, 7vw, 7.4rem);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 0.82;
}

.miu-work-title em {
    display: block;
    padding-left: clamp(1rem, 8vw, 9rem);
    color: transparent;
    font-style: normal;
    -webkit-text-stroke: 1px rgba(0, 229, 204, 0.72);
    text-stroke: 1px rgba(0, 229, 204, 0.72);
}

.miu-work-summary {
    max-width: 27rem;
    margin: 0 0 0.25rem auto;
    color: #94a3b8;
    font-size: 0.84rem;
    line-height: 1.75;
}

.miu-work-count {
    margin: 0;
}

.miu-work-section .gallery-btn,
.miu-work-section .gallery-sort-select {
    border-radius: 0;
}

.miu-work-section .gallery-btn {
    padding: 0.62rem 0.75rem;
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.miu-work-section .portfolio-grid {
    --portfolio-row: 7px;
    gap: 14px;
}

.miu-work-section .gallery-item {
    border-color: rgba(0, 229, 204, 0.22);
    border-radius: 0;
    background: rgba(13, 22, 36, 0.34);
    cursor: pointer;
    transform: none;
}

.miu-work-section .gallery-item.futuristic-card:hover {
    border-color: rgba(0, 229, 204, 0.8);
    box-shadow: none;
    transform: none;
}

.miu-work-section .gallery-media {
    background: #070b12;
}

.miu-work-section .gallery-media::before {
    position: absolute;
    inset: 0;
    z-index: 30;
    background: linear-gradient(135deg, rgba(0, 229, 204, 0.16), transparent 38%, rgba(7, 11, 18, 0.42));
    content: '';
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.miu-work-section .gallery-item:hover .gallery-media::before {
    opacity: 1;
}

.gallery-project-number {
    position: absolute;
    z-index: 35;
    right: 0;
    bottom: 0;
    padding: 0.55rem 0.68rem;
    background: #00e5cc;
    color: #070b12;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
}

.miu-work-section .gallery-card-content {
    padding: 0.95rem 1rem 0;
}

.miu-work-section .gallery-card-title {
    max-width: 90%;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.miu-work-section .gallery-card-description {
    color: #7f91a7;
    font-size: 0.67rem;
    line-height: 1.55;
}

.miu-work-section .gallery-card-footer {
    margin-top: 0.85rem;
    padding: 0.65rem 1rem 0.8rem;
    border-top-color: rgba(0, 229, 204, 0.15);
}

.miu-work-section .gallery-card-footer button {
    font-size: 0.63rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.miu-work-section [data-action="share"] {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.miu-work-section [data-action="share"]:hover {
    background: rgba(0, 229, 204, 0.12);
}

@media (min-width: 640px) {
    .miu-work-section .gallery-item.gallery-item-featured {
        grid-column: span 2;
    }

    .miu-work-section .gallery-item.gallery-item-featured .gallery-card-title {
        font-size: 1.15rem;
    }

    .miu-work-section .gallery-item.gallery-item-featured .gallery-card-content {
        padding-top: 1.15rem;
    }
}

@media (max-width: 767px) {
    .miu-nav-brand-sub {
        display: none;
    }

    .miu-work-heading {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .miu-work-summary {
        margin-left: 0;
    }

    .miu-work-title {
        font-size: clamp(3rem, 15vw, 5rem);
    }
}

body.light-mode .miu-nav {
    border-bottom-color: rgba(234, 114, 153, 0.2) !important;
    background: linear-gradient(to bottom, rgba(255, 245, 248, 0.94), rgba(255, 245, 248, 0.72)) !important;
}

body.light-mode .miu-nav-brand-sub,
body.light-mode .miu-work-summary,
body.light-mode .miu-work-section .gallery-card-description {
    color: #765666;
}

body.light-mode nav.miu-nav .miu-nav-links li a:hover,
body.light-mode .miu-nav-contact:hover {
    color: #d82662 !important;
}

body.light-mode .miu-nav-contact i,
body.light-mode .miu-section-index {
    color: #d82662;
}

body.light-mode .miu-nav-icon {
    border-color: rgba(234, 114, 153, 0.35);
    background: rgba(255, 255, 255, 0.62);
}

body.light-mode .miu-nav-icon:hover {
    border-color: #ea7299;
    background: rgba(234, 114, 153, 0.12);
    color: #d82662;
}

body.light-mode .miu-work-section::before {
    background: linear-gradient(to right, transparent, rgba(234, 114, 153, 0.55));
}

body.light-mode .miu-work-title {
    color: #150d14;
}

body.light-mode .miu-work-title em {
    color: transparent !important;
    -webkit-text-stroke-color: rgba(216, 38, 98, 0.72);
    text-stroke-color: rgba(216, 38, 98, 0.72);
}

body.light-mode .miu-work-section .gallery-item {
    border-color: rgba(234, 114, 153, 0.24);
    background: rgba(255, 255, 255, 0.7);
}

body.light-mode .miu-work-section .gallery-item.futuristic-card:hover {
    border-color: rgba(234, 114, 153, 0.8);
    box-shadow: none;
}

body.light-mode .miu-work-section .gallery-media::before {
    background: linear-gradient(135deg, rgba(234, 114, 153, 0.15), transparent 38%, rgba(255, 255, 255, 0.22));
}

body.light-mode .gallery-project-number {
    background: #ea7299;
    color: #ffffff;
}

body.light-mode .miu-work-section .gallery-card-footer {
    border-top-color: rgba(234, 114, 153, 0.18);
}

body.light-mode .miu-work-section [data-action="share"]:hover {
    background: rgba(234, 114, 153, 0.12);
}

body.light-mode .miu-nav a:focus-visible,
body.light-mode .miu-nav button:focus-visible,
body.light-mode .miu-work-section button:focus-visible,
body.light-mode .miu-work-section input:focus-visible,
body.light-mode .miu-work-section select:focus-visible,
body.light-mode .miu-work-section .gallery-item:focus-visible {
    outline-color: #ea7299;
}

/* ===================================================
   Glass refinement: calmer type scale, soft corners, useful motion
   =================================================== */
.miu-nav {
    top: 14px !important;
    left: 16px !important;
    width: calc(100% - 32px) !important;
    padding: 0.72rem 1rem !important;
    border: 1px solid rgba(0, 229, 204, 0.22) !important;
    border-radius: 20px;
    background: rgba(7, 11, 18, 0.68) !important;
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

nav.miu-nav .miu-nav-links li a {
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
}

nav.miu-nav .miu-nav-links li a:hover {
    background: rgba(0, 229, 204, 0.09);
    color: #00e5cc !important;
}

.miu-nav-contact {
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(0, 229, 204, 0.22);
    border-radius: 11px;
    background: rgba(13, 22, 36, 0.4);
}

.miu-nav-icon {
    border-radius: 11px;
}

.miu-hero {
    min-height: 90svh;
    padding: 114px 24px 58px;
    border-bottom: 0;
}

.miu-hero-grid {
    width: min(100%, 1200px);
    grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.86fr);
    gap: clamp(2rem, 5vw, 5rem);
}

.miu-hero-copy { padding-block: 0.5rem; }
.miu-kicker { margin-bottom: clamp(1.15rem, 2.8vh, 2.1rem); }

.miu-display {
    font-size: clamp(3rem, 5.8vw, 5.9rem);
    letter-spacing: -0.075em;
    line-height: 0.84;
}

.miu-display-outline { padding-left: clamp(0.65rem, 3.5vw, 3.4rem); }

.miu-hero-intro {
    max-width: 31rem;
    margin-top: 0.85rem;
    font-size: clamp(0.82rem, 1vw, 0.98rem);
    line-height: 1.7;
}

.miu-hero-actions { margin-top: 1.45rem; gap: 0.7rem; }
.miu-primary-action, .miu-text-action { min-height: 2.75rem; font-size: 0.64rem; border-radius: 12px; }
.miu-text-action { padding-inline: 0.72rem; }
.miu-hero-notes { margin-top: clamp(1.7rem, 4vh, 3rem); font-size: 0.56rem; }

.miu-hero-stage {
    min-height: min(56vw, 530px);
    border-radius: 30px;
    border-color: rgba(0, 229, 204, 0.24);
    background: linear-gradient(145deg, rgba(18, 32, 48, 0.78), rgba(7, 11, 18, 0.55));
    box-shadow: 0 24px 70px rgba(0, 229, 204, 0.1), inset 0 1px rgba(255, 255, 255, 0.08);
}

.miu-stage-panel { border-radius: 18px; }
.miu-stage-panel-main { border-radius: 22px; }

.miu-work-section { padding-block: clamp(4.5rem, 9vw, 7rem) !important; }
.miu-work-heading { gap: clamp(1.5rem, 4vw, 3rem); }
.miu-work-title { font-size: clamp(2.45rem, 4.9vw, 4.9rem); line-height: 0.92; }
.miu-work-title em { padding-left: clamp(0.6rem, 3.5vw, 3.5rem); }
.miu-work-summary { font-size: 0.78rem; line-height: 1.65; }

.miu-work-section .gallery-btn,
.miu-work-section .gallery-sort-select { border-radius: 12px; }
.miu-work-section .portfolio-grid { gap: 12px; }
.miu-work-section .gallery-item {
    border-radius: 22px;
    border-color: rgba(0, 229, 204, 0.2);
    background: rgba(13, 22, 36, 0.58);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}
.miu-work-section .gallery-item.futuristic-card:hover {
    border-color: rgba(0, 229, 204, 0.58);
    box-shadow: 0 14px 32px rgba(0, 229, 204, 0.11), inset 0 1px rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
}
.miu-work-section .gallery-media { border-radius: 21px 21px 0 0; }
.miu-work-section .gallery-card-content { padding: 0.82rem 0.9rem 0; }
.miu-work-section .gallery-card-title { font-size: 0.84rem; }
.miu-work-section .gallery-card-description { font-size: 0.66rem; }
.miu-work-section .gallery-card-footer { margin-top: 0.68rem; padding: 0.58rem 0.9rem 0.75rem; }
.miu-work-section [data-action="share"] { border-radius: 9px; }

.cinema-player-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.62rem 1.1rem;
    border-bottom: 1px solid rgba(0, 229, 204, 0.14);
    background: rgba(8, 16, 27, 0.88);
}
.cinema-player-label { color: #8fa5b8; font-size: 0.61rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.cinema-player-label i { color: #00e5cc; margin-right: 0.3rem; }
.cinema-player-control {
    display: inline-flex;
    width: 1.9rem;
    height: 1.9rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 229, 204, 0.24);
    border-radius: 9px;
    background: rgba(13, 22, 36, 0.72);
    color: #00e5cc;
    font-size: 0.66rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.cinema-player-control:not(:disabled):hover { border-color: #00e5cc; background: rgba(0, 229, 204, 0.12); transform: translateY(-1px); }
.cinema-player-control:disabled { opacity: 0.35; cursor: not-allowed; }
.cinema-playlist-position { min-width: 3.7rem; color: #94a3b8; font-size: 0.62rem; font-weight: 800; text-align: center; letter-spacing: 0.08em; }

.forum-comment {
    display: flex;
    gap: 0.72rem;
    padding: 0.9rem;
    border: 1px solid rgba(0, 229, 204, 0.14);
    border-radius: 16px;
    background: rgba(5, 10, 17, 0.42);
}
.forum-avatar {
    display: grid;
    width: 1.85rem;
    height: 1.85rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(0, 229, 204, 0.3);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(0, 229, 204, 0.26), rgba(8, 51, 56, 0.75));
    color: #eafffb;
    font-size: 0.68rem;
    font-weight: 800;
}
.forum-reply-action { margin-top: 0.55rem; color: #00e5cc; font-size: 0.62rem; font-weight: 800; }
.forum-reply-action:hover { color: #f0fdf4; }
.forum-replies { display: grid; gap: 0.65rem; margin-top: 0.75rem; padding-left: 0.75rem; border-left: 1px solid rgba(0, 229, 204, 0.22); }
.forum-reply { padding: 0.76rem; border-radius: 13px; background: rgba(13, 22, 36, 0.42); }
.forum-reply .forum-avatar { width: 1.6rem; height: 1.6rem; border-radius: 8px; font-size: 0.6rem; }

body.light-mode .miu-nav { border-color: rgba(234, 114, 153, 0.28) !important; background: rgba(255, 245, 248, 0.76) !important; }
body.light-mode .miu-nav-contact, body.light-mode .miu-nav-icon { border-color: rgba(234, 114, 153, 0.26); background: rgba(255, 255, 255, 0.54); }
body.light-mode .miu-hero-stage { border-color: rgba(234, 114, 153, 0.26); border-radius: 30px; }
body.light-mode .miu-work-section .gallery-item { border-color: rgba(234, 114, 153, 0.24); background: rgba(255, 255, 255, 0.68); }
body.light-mode .miu-work-section .gallery-item.futuristic-card:hover { border-color: rgba(234, 114, 153, 0.62); box-shadow: 0 14px 32px rgba(234, 114, 153, 0.12); }
body.light-mode .cinema-player-toolbar { border-color: rgba(234, 114, 153, 0.2); background: rgba(255, 245, 248, 0.92); }
body.light-mode .cinema-player-control, body.light-mode .forum-comment { border-color: rgba(234, 114, 153, 0.25); background: rgba(255, 255, 255, 0.72); }
body.light-mode .forum-avatar { border-color: rgba(234, 114, 153, 0.35); background: linear-gradient(145deg, rgba(234, 114, 153, 0.28), rgba(255, 255, 255, 0.8)); color: #7e183e; }
body.light-mode .forum-replies { border-left-color: rgba(234, 114, 153, 0.3); }
body.light-mode .forum-reply-action, body.light-mode .cinema-player-label i, body.light-mode .cinema-player-control { color: #d82662; }

@media (max-width: 1023px) {
    .miu-hero { min-height: auto; padding-top: 106px; }
    .miu-hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
    .miu-hero-stage { width: min(100%, 560px); min-height: min(112vw, 540px); }
}

@media (max-width: 639px) {
    .miu-nav { top: 9px !important; left: 10px !important; width: calc(100% - 20px) !important; padding: 0.58rem 0.75rem !important; border-radius: 16px; }
    .miu-hero { padding: 92px 18px 42px; }
    .miu-display { font-size: clamp(3rem, 15.5vw, 4.75rem); }
    .miu-hero-actions { flex-direction: row; align-items: center; }
    .miu-primary-action, .miu-text-action { min-height: 2.6rem; font-size: 0.58rem; }
    .miu-hero-notes { margin-top: 1.6rem; }
    .miu-hero-stage { min-height: 92vw; border-radius: 24px; }
    .miu-work-title { font-size: clamp(2.5rem, 13.5vw, 4.1rem); }
    .cinema-player-toolbar { padding: 0.55rem 0.75rem; }
    .cinema-player-label { font-size: 0.54rem; }
    .forum-comment { gap: 0.58rem; padding: 0.75rem; }
}

/* Interactive 3D character hero */
.miu-character-viewer {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.miu-character-canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    touch-action: pan-y;
}

.miu-character-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: max-content;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(0, 229, 204, 0.24);
    border-radius: 12px;
    background: rgba(7, 11, 18, 0.72);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    color: #b9d3d8;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(12px);
}

.miu-character-loader-orbit {
    width: 0.85rem;
    height: 0.85rem;
    border: 1px solid rgba(0, 229, 204, 0.28);
    border-top-color: #00e5cc;
    border-radius: 50%;
    animation: miuSlowSpin 0.85s linear infinite;
}

.miu-character-caption {
    position: absolute;
    right: 7%;
    bottom: 8%;
    z-index: 4;
    display: grid;
    gap: 0.18rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(0, 229, 204, 0.19);
    border-radius: 12px;
    background: rgba(7, 11, 18, 0.44);
    color: #00e5cc;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    line-height: 1.3;
    backdrop-filter: blur(10px);
}

.miu-character-caption small {
    color: #8aa3b2;
    font-size: 0.45rem;
    letter-spacing: 0.09em;
}

.miu-hero-stage.character-ready { cursor: default; }
.miu-hero-stage.character-ready .miu-character-canvas { opacity: 1; }
.miu-hero-stage.character-ready .miu-character-loader { display: none; }
.miu-hero-stage.character-ready .miu-stage-panel {
    animation: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
}
.miu-hero-stage.character-ready .miu-stage-ring { opacity: 0.28; }
.miu-hero-stage.character-ready .miu-stage-stamp,
.miu-hero-stage.character-ready .miu-stage-explore { z-index: 4; }

.miu-hero-stage.character-failed .miu-character-loader {
    border-color: rgba(148, 163, 184, 0.22);
    color: #94a3b8;
}
.miu-hero-stage.character-failed .miu-character-loader-orbit { display: none; }

body.light-mode .miu-character-loader,
body.light-mode .miu-character-caption {
    border-color: rgba(234, 114, 153, 0.24);
    background: rgba(255, 245, 248, 0.72);
}
body.light-mode .miu-character-loader { color: #765666; }
body.light-mode .miu-character-loader-orbit { border-color: rgba(234, 114, 153, 0.24); border-top-color: #d82662; }
body.light-mode .miu-character-caption { color: #d82662; }

@media (max-width: 639px) {
    .miu-character-caption { right: 5%; bottom: 7%; }
    .miu-character-loader { font-size: 0.52rem; }
    .miu-hero-stage.character-ready .miu-stage-stamp { display: none; }
}

/* The Miku eye is an intentional hero detail, not a scroll-pinned character. */
.miu-hero-stage.miku-eye-ready .miu-stage-glow {
    opacity: 0.7;
    top: calc(var(--miku-pointer-y, 50%) - 31.5%);
    left: calc(var(--miku-pointer-x, 50%) - 31.5%);
    transform: scale(1.15);
    transition: top 180ms ease-out, left 180ms ease-out, opacity 300ms ease;
}

.miu-hero-stage.miku-eye-ready .miu-character-caption span {
    color: #00e5cc;
}

.miu-hero-stage.miku-eye-ready .miu-stage-grid {
    background-position:
        calc(var(--miku-pointer-x, 50%) * -0.035) calc(var(--miku-pointer-y, 50%) * -0.035),
        calc(var(--miku-pointer-x, 50%) * -0.035) calc(var(--miku-pointer-y, 50%) * -0.035);
    transition: background-position 220ms ease-out;
}
/* Optional hero 3D keeps the studio artwork visible before interaction. */
.hero-eye-preview { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
#hero-stage .miu-stage-panel { display:none; }
.character-ready .hero-eye-preview { visibility:hidden; }
.hero-activate { position:absolute; left:24px; top:24px; z-index:12; border:1px solid #00d4be; border-radius:999px; padding:10px 16px; min-height:44px; background:rgba(7,21,29,.82); color:#d9fff5; font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; backdrop-filter:blur(12px); transition:background .2s ease,color .2s ease,transform .2s ease; }
.hero-activate:not(:disabled):hover { background:#00d4be; color:#041312; transform:translateY(-2px); }
.hero-activate:disabled { opacity:.72; cursor:default; }
.hero-activate:focus-visible { outline:3px solid #00d4be; outline-offset:4px; }
.miu-character-loader { pointer-events:none; }
.miu-character-viewer:not(.character-ready) .miu-character-loader { top:auto; bottom:20%; background:rgba(7,11,18,.9); border-radius:10px; padding:8px 12px; }
body.light-mode .hero-activate { background:rgba(255,245,248,.86); color:#8c2549; border-color:#ea7299; }
body.light-mode .hero-activate:not(:disabled):hover { background:#ea7299; color:#fff; }
/* Readable secondary text, native-sized controls and reduced motion. */
body:not(.light-mode) .text-gray-500 { color:#98a4b5; }
body:not(.light-mode) .bg-maroon-light.text-white { color:#042522; }
.gallery-card-footer [data-action="open"] { min-height:44px; padding:6px 4px; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid #00bfae; outline-offset:4px; }
body.light-mode .text-gray-500 { color:#665160; }
body.light-mode .miu-work-section .gallery-item { background:#fff7fa; }
body.light-mode .miu-work-section .gallery-card-title { color:#261720!important; }
body.light-mode .miu-work-section .gallery-card-description { color:#635061!important; }
body.light-mode .gallery-card-footer [data-action="open"] { color:#93254c!important; }
body.light-mode .text-maroon-light,body.light-mode .miu-section-index { color:#a2214d!important; }
body.light-mode .social-button[aria-pressed="true"] { color:#8c2549!important; border-color:#a83a61; }
body.light-mode .gallery-card-footer .social-button { color:#4c2a3e; background:#fff7fa; }
@media(prefers-reduced-motion:reduce) {
    html { scroll-behavior:auto!important; }
    *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:0s!important; }
    .cursor-dot,.cursor-outline { display:none!important; }
}

/* ===================================================
   KOUIN kinetic motion system
   Inspired by colorful rhythm-game interfaces while
   retaining the studio's own content and visual identity.
   =================================================== */
.miu-intro {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #050910;
    pointer-events: none;
    animation: miuIntroExit .5s .9s cubic-bezier(.76, 0, .24, 1) forwards;
}

.miu-intro::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(0, 229, 204, .12) 50%, transparent 70%);
    content: '';
    transform: translateX(-100%);
    animation: miuIntroSweep .9s .18s cubic-bezier(.22, 1, .36, 1) forwards;
}

.miu-intro-slice {
    position: absolute;
    width: 54vw;
    height: 140vh;
    opacity: .85;
    transform: rotate(18deg) scaleY(0);
    animation: miuIntroSlice .7s cubic-bezier(.16, 1, .3, 1) forwards;
}

.miu-intro-slice-a {
    left: -24vw;
    background: linear-gradient(180deg, #00e5cc, rgba(0, 229, 204, .05));
}

.miu-intro-slice-b {
    right: -28vw;
    background: linear-gradient(0deg, #ea7299, rgba(234, 114, 153, .04));
    animation-delay: .12s;
}

.miu-intro-mark {
    position: relative;
    display: grid;
    width: min(72vw, 620px);
    gap: .45rem;
    color: #f5fffd;
}

.miu-intro-label {
    font-size: clamp(.55rem, 1vw, .72rem);
    font-weight: 800;
    letter-spacing: .28em;
    opacity: 0;
    transform: translateY(12px);
    animation: miuIntroCopy .45s .38s ease-out forwards;
}

.miu-intro-mark strong {
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(4.5rem, 16vw, 11rem);
    font-weight: 900;
    letter-spacing: -.09em;
    line-height: .82;
    opacity: 0;
    transform: translateY(35%) skewY(4deg);
    animation: miuIntroCopy .65s .42s cubic-bezier(.16, 1, .3, 1) forwards;
}

.miu-intro-mark strong span { color: #00e5cc; }

.miu-intro-mark i {
    display: block;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #00e5cc 0 72%, #ea7299 72%);
    box-shadow: 0 0 26px rgba(0, 229, 204, .65);
    animation: miuIntroRule .7s .62s cubic-bezier(.16, 1, .3, 1) forwards;
}

.miu-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10001;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, .04);
    pointer-events: none;
}

.miu-scroll-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #00e5cc 0 72%, #ea7299);
    box-shadow: 0 0 18px rgba(0, 229, 204, .65);
    transform: scaleX(var(--miu-scroll-progress, 0));
    transform-origin: left center;
    will-change: transform;
}

.miu-motion-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.miu-ribbon,
.miu-shard,
.miu-motion-word {
    position: absolute;
    will-change: transform;
}

.miu-ribbon {
    width: clamp(360px, 52vw, 820px);
    height: clamp(62px, 7vw, 112px);
    border: 1px solid rgba(0, 229, 204, .22);
    background: linear-gradient(90deg, transparent, rgba(0, 229, 204, .09), transparent);
    transform: rotate(-17deg) translate3d(var(--miu-scroll-x, 0), 0, 0);
}

.miu-ribbon-a { top: 13%; left: -17%; }
.miu-ribbon-b {
    right: -18%;
    bottom: 10%;
    border-color: rgba(234, 114, 153, .16);
    background: linear-gradient(90deg, transparent, rgba(234, 114, 153, .07), transparent);
    transform: rotate(-17deg) translate3d(var(--miu-scroll-x-neg, 0), 0, 0);
}

.miu-shard {
    border: 1px solid rgba(0, 229, 204, .58);
    background: rgba(0, 229, 204, .035);
    clip-path: polygon(50% 0, 100% 100%, 0 76%);
    filter: drop-shadow(0 0 16px rgba(0, 229, 204, .18));
    animation: miuShardDrift 8s ease-in-out infinite;
}

.miu-shard-a { top: 20%; left: 5%; width: 40px; height: 55px; }
.miu-shard-b { top: 16%; right: 4%; width: 72px; height: 94px; animation-delay: -2.8s; }
.miu-shard-c { right: 47%; bottom: 4%; width: 30px; height: 42px; animation-delay: -5.1s; }

.miu-motion-word {
    right: -2rem;
    top: 54%;
    color: rgba(0, 229, 204, .14);
    font-size: clamp(.62rem, 1vw, .8rem);
    font-weight: 800;
    letter-spacing: .48em;
    writing-mode: vertical-rl;
    transform: translateY(calc(var(--miu-hero-progress, 0) * -50px));
}

.miu-hero-copy > * {
    opacity: 0;
    transform: translateY(30px) skewY(2deg);
    animation: miuHeroReveal .8s cubic-bezier(.16, 1, .3, 1) forwards;
}

.miu-hero-copy > :nth-child(1) { animation-delay: 1.75s; }
.miu-hero-copy > :nth-child(2) { animation-delay: 1.84s; }
.miu-hero-copy > :nth-child(3) { animation-delay: 1.94s; }
.miu-hero-copy > :nth-child(4) { animation-delay: 2.04s; }
.miu-hero-copy > :nth-child(5) { animation-delay: 2.14s; }

.miu-hero-stage {
    opacity: 0;
    transform: translate3d(30px, 18px, 0) rotate(2deg);
    animation: miuStageReveal .95s 1.88s cubic-bezier(.16, 1, .3, 1) forwards;
}

.miu-hero-stage::after {
    position: absolute;
    inset: -40%;
    z-index: 9;
    background: linear-gradient(105deg, transparent 43%, rgba(255, 255, 255, .2) 49%, transparent 55%);
    content: '';
    pointer-events: none;
    transform: translateX(-65%) rotate(8deg);
    animation: miuStageShine 1.1s 2.32s ease-out forwards;
}

main > section:not(#home).miu-motion-section {
    --miu-reveal-shift: 52px;
}

main > section:not(#home).miu-motion-section > * {
    /* Tall mobile sections must never depend on an intersection ratio to be visible. */
    opacity: 1;
    transform: translateY(var(--miu-reveal-shift)) scale(.985);
    transition: opacity .85s ease, transform .85s cubic-bezier(.16, 1, .3, 1);
}

main > section:not(#home).miu-motion-section.miu-in-view > * {
    opacity: 1;
    transform: none;
}

.miu-motion-section::after {
    position: absolute;
    top: 0;
    right: clamp(1rem, 4vw, 4rem);
    width: 72px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00e5cc);
    content: '';
    opacity: .62;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .8s .12s cubic-bezier(.16, 1, .3, 1);
}

.miu-motion-section.miu-in-view::after { transform: scaleX(1); }

body.light-mode .miu-scroll-progress { background: rgba(216, 38, 98, .06); }
body.light-mode .miu-scroll-progress span { background: linear-gradient(90deg, #ea7299 0 72%, #00bfae); }
body.light-mode .miu-ribbon { border-color: rgba(216, 38, 98, .18); background: linear-gradient(90deg, transparent, rgba(234, 114, 153, .08), transparent); }
body.light-mode .miu-shard { border-color: rgba(216, 38, 98, .42); background: rgba(234, 114, 153, .035); }
body.light-mode .miu-motion-word { color: rgba(216, 38, 98, .14); }
body.light-mode .miu-motion-section::after { background: linear-gradient(90deg, transparent, #ea7299); }

@keyframes miuIntroSweep { to { transform: translateX(100%); } }
@keyframes miuIntroSlice { to { transform: rotate(18deg) scaleY(1); } }
@keyframes miuIntroCopy { to { opacity: 1; transform: none; } }
@keyframes miuIntroRule { to { width: 100%; } }
@keyframes miuIntroExit { to { opacity: 0; visibility: hidden; transform: translateY(-2%); } }
@keyframes miuHeroReveal { to { opacity: 1; transform: none; } }
@keyframes miuStageReveal { to { opacity: 1; transform: none; } }
@keyframes miuStageShine { to { transform: translateX(65%) rotate(8deg); } }
@keyframes miuShardDrift {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(-8deg); }
    50% { transform: translate3d(10px, -18px, 0) rotate(12deg); }
}

@media (max-width: 639px) {
    .miu-intro { display: none !important; }
    .miu-intro-mark { width: 80vw; }
    .miu-shard-b, .miu-motion-word { display: none; }
    .miu-ribbon { opacity: .58; }
}

@media (prefers-reduced-motion: reduce) {
    .miu-intro { display: none !important; }
    .miu-scroll-progress { display: none; }
    .miu-hero-copy > *, .miu-hero-stage,
    main > section:not(#home).miu-motion-section > * {
        opacity: 1 !important;
        transform: none !important;
    }
    .miu-hero-stage::after, .miu-motion-field { display: none; }
}

/* KOUIN kinetic identity: CSS-only hero artwork, no character or WebGL asset. */
.miu-kinetic-sculpture {
    position: absolute;
    inset: 9%;
    z-index: 2;
    display: grid;
    place-items: center;
    perspective: 900px;
}

.miu-kinetic-halo {
    position: absolute;
    border: 1px solid rgba(0, 229, 204, .42);
    border-radius: 50%;
    box-shadow: inset 0 0 45px rgba(0, 229, 204, .035), 0 0 38px rgba(0, 229, 204, .05);
}

.miu-kinetic-halo-a {
    width: 78%;
    aspect-ratio: 1;
    border-style: dashed;
    transform: rotateX(68deg) rotateZ(12deg);
    animation: miuKineticOrbitA 13s linear infinite;
}

.miu-kinetic-halo-b {
    width: 62%;
    aspect-ratio: 1;
    border-color: rgba(234, 114, 153, .36);
    transform: rotateY(68deg) rotateZ(-18deg);
    animation: miuKineticOrbitB 10s linear infinite reverse;
}

.miu-kinetic-core {
    position: relative;
    display: grid;
    width: clamp(165px, 24vw, 270px);
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(0, 229, 204, .45);
    border-radius: 30% 70% 58% 42% / 42% 35% 65% 58%;
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .16), transparent 20%),
        linear-gradient(145deg, rgba(0, 229, 204, .22), rgba(8, 22, 34, .92) 58%, rgba(234, 114, 153, .14));
    box-shadow: inset -22px -28px 58px rgba(0, 0, 0, .36), inset 12px 14px 40px rgba(0, 229, 204, .11), 0 32px 90px rgba(0, 229, 204, .16);
    transform-style: preserve-3d;
    animation: miuKineticCore 9s cubic-bezier(.45, 0, .55, 1) infinite;
}

.miu-kinetic-core::before,
.miu-kinetic-core::after {
    position: absolute;
    border: 1px solid rgba(240, 253, 244, .22);
    content: '';
}

.miu-kinetic-core::before { inset: 13%; border-radius: 50%; }
.miu-kinetic-core::after { inset: 28%; transform: rotate(45deg); }

.miu-kinetic-core span {
    position: relative;
    z-index: 2;
    color: #eafffb;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(5rem, 10vw, 8.5rem);
    font-weight: 900;
    letter-spacing: -.13em;
    line-height: 1;
    text-shadow: 10px 12px 0 rgba(0, 229, 204, .16), -7px -5px 0 rgba(234, 114, 153, .12);
    transform: translateZ(45px) translateX(-.05em);
}

.miu-kinetic-core i {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e5cc;
    box-shadow: 0 0 16px #00e5cc;
}

.miu-kinetic-core i:nth-of-type(1) { top: 12%; left: 48%; }
.miu-kinetic-core i:nth-of-type(2) { right: 13%; bottom: 30%; background: #ea7299; box-shadow: 0 0 16px #ea7299; }
.miu-kinetic-core i:nth-of-type(3) { bottom: 14%; left: 22%; width: 5px; height: 5px; }

.miu-kinetic-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    display: grid;
    gap: .2rem;
    padding: .7rem .8rem;
    border: 1px solid rgba(0, 229, 204, .22);
    border-radius: 12px;
    background: rgba(7, 11, 18, .62);
    backdrop-filter: blur(10px);
}

.miu-kinetic-caption strong { color: #00e5cc; font-size: .56rem; letter-spacing: .12em; }
.miu-kinetic-caption small { color: #8aa3b2; font-size: .44rem; font-weight: 800; letter-spacing: .08em; }

body.light-mode .miu-kinetic-core {
    border-color: rgba(216, 38, 98, .35);
    background: radial-gradient(circle at 35% 28%, #fff, transparent 22%), linear-gradient(145deg, rgba(234, 114, 153, .28), rgba(255, 255, 255, .92) 58%, rgba(0, 191, 174, .14));
    box-shadow: inset -22px -28px 58px rgba(174, 64, 104, .12), inset 12px 14px 40px rgba(255, 255, 255, .72), 0 32px 90px rgba(234, 114, 153, .16);
}
body.light-mode .miu-kinetic-core span { color: #28131e; }
body.light-mode .miu-kinetic-caption { border-color: rgba(234, 114, 153, .24); background: rgba(255, 245, 248, .72); }
body.light-mode .miu-kinetic-caption strong { color: #d82662; }
body.light-mode .miu-kinetic-halo-a { border-color: rgba(216, 38, 98, .36); }

@keyframes miuKineticCore {
    0%, 100% { border-radius: 30% 70% 58% 42% / 42% 35% 65% 58%; transform: rotateY(-14deg) rotateX(5deg) translateY(0); }
    50% { border-radius: 63% 37% 32% 68% / 55% 62% 38% 45%; transform: rotateY(18deg) rotateX(-5deg) translateY(-12px); }
}
@keyframes miuKineticOrbitA { to { transform: rotateX(68deg) rotateZ(372deg); } }
@keyframes miuKineticOrbitB { to { transform: rotateY(68deg) rotateZ(342deg); } }

@media (max-width: 639px) {
    .miu-kinetic-sculpture { inset: 7%; }
    .miu-kinetic-core { width: min(54vw, 220px); }
    .miu-kinetic-caption { right: 1%; bottom: 1%; }
}

@media (prefers-reduced-motion: reduce) {
    .miu-kinetic-core, .miu-kinetic-halo { animation: none !important; }
}
