/* ============================
   NEON GRID — Neo-Glassmorphism
   ============================ */

:root {
    --bg: #07070e;
    --bg-glass: rgba(255,255,255,0.03);
    --bg-glass-hover: rgba(255,255,255,0.06);
    --border-glass: rgba(255,255,255,0.08);
    --border-glass-hover: rgba(255,255,255,0.15);
    --text: #f0eef5;
    --text-dim: #6b6b8a;
    --purple: #a78bfa;
    --purple-rgb: 167, 139, 250; /* Added for rgba usage */
    --pink: #f472b6;
    --pink-rgb: 244, 114, 182;   /* Added for rgba usage */
    --cyan: #22d3ee;
    --green: #34d399;
    --orange: #fb923c;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Zen Kaku Gothic New', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --surface-shadow: 0 14px 38px rgba(7, 7, 20, 0.42);
}

[data-theme="light"] {
    --bg: #f4f2f8;
    --bg-glass: rgba(255,255,255,0.55);
    --bg-glass-hover: rgba(255,255,255,0.75);
    --border-glass: rgba(0,0,0,0.06);
    --border-glass-hover: rgba(0,0,0,0.12);
    --text: #1a1a2e;
    --text-dim: #888899;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    font-size: 16.5px;
}
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.5s var(--ease-out), color 0.5s var(--ease-out);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--purple), var(--pink), var(--cyan));
    z-index: 2000;
    box-shadow: 0 0 16px rgba(var(--purple-rgb), 0.65);
}

/* --- Grain Texture --- */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.035;
    filter: url(#grain);
    width: 100%;
    height: 100%;
}

[data-theme="light"] .grain { opacity: 0.02; }

/* --- Cursor Spotlight --- */
.spotlight-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.16s ease;
    will-change: opacity;
}

.spotlight-layer.active {
    opacity: 0.88;
}

.spotlight-layer::before {
    content: '';
    position: absolute;
    left: var(--src-x, calc(100% + 160px));
    top: var(--src-y, -120px);
    width: var(--beam-length, 680px);
    height: var(--beam-width, 260px);
    transform-origin: 0 50%;
    transform: translateY(-50%) rotate(var(--beam-angle, 135deg));
    clip-path: polygon(0 49.2%, 0 50.8%, 100% 100%, 100% 0);
    background:
        linear-gradient(
            90deg,
            rgba(255, 251, 235, 0.28) 0%,
            rgba(255, 246, 215, 0.24) 26%,
            rgba(255, 235, 185, 0.14) 58%,
            rgba(255, 224, 162, 0.06) 82%,
            rgba(7, 7, 14, 0) 100%
        );
    mix-blend-mode: screen;
    filter: blur(2px);
}

.spotlight-layer::after {
    content: none;
}

/* --- Glass Utility --- */
.glass {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.3s, border-color 0.3s, transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.glass:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-4px); /* Subtle lift on hover */
    box-shadow: 0 8px 30px rgba(var(--purple-rgb), 0.15); /* More vibrant shadow */
}

/* --- Cursor --- */
.cursor-dot, .cursor-ring {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--purple);
    box-shadow: 0 0 8px var(--purple);
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(167,139,250,0.4);
    transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s;
}

.cursor-ring.hover {
    width: 56px;
    height: 56px;
    border-color: var(--pink);
}

.cursor-dot,
.cursor-ring {
    display: none !important;
}

/* --- Loading --- */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #050509;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s var(--ease-out), visibility 1s;
}

.loading-screen.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-inner { text-align: center; }

.loading-letters {
    display: flex;
    justify-content: center;
    gap: 0.15em;
    margin-bottom: 2.5rem;
}

.loading-letters span {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    animation: letterIn 0.5s var(--ease-out) forwards;
}

.loading-space { width: 0.3em; }

@keyframes letterIn {
    to { opacity: 1; transform: translateY(0); }
}

.loading-bar-wrap {
    width: 180px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0 auto 1rem;
    overflow: hidden;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
}

.loading-percent {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.2em;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(7,7,14,0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--border-glass);
}

[data-theme="light"] .header.scrolled {
    background: rgba(244,242,248,0.7);
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav { display: flex; gap: 2rem; }

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    transition: color 0.3s;
    position: relative;
}

.nav-link.active,
.nav-link:hover { color: var(--text); }

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--purple);
    box-shadow: 0 0 6px var(--purple);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    transition: color 0.3s;
}

.social-link:hover { color: var(--purple); }

.is-demo-link {
    pointer-events: none;
    cursor: default;
    opacity: 0.64;
}

.btn-back {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-back:hover {
    border-color: var(--purple);
    color: var(--purple);
}

.theme-toggle {
    background: linear-gradient(135deg, rgba(var(--purple-rgb), 0.2), rgba(var(--pink-rgb), 0.16));
    border: 1px solid rgba(var(--purple-rgb), 0.52);
    color: var(--text);
    cursor: pointer;
    min-width: 88px;
    height: 34px;
    padding: 0 0.55rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset, 0 8px 20px rgba(var(--purple-rgb), 0.2);
    transition: border-color 0.3s, color 0.3s, transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.3s;
}

#toggleIcon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.14);
    font-size: 0.82rem;
    box-shadow: 0 0 14px rgba(var(--purple-rgb), 0.34);
}

.theme-toggle-label {
    color: var(--text);
    opacity: 0.95;
}

.theme-toggle:hover {
    border-color: var(--cyan);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 12px 26px rgba(var(--purple-rgb), 0.28);
}

[data-theme="light"] .theme-toggle {
    background: linear-gradient(135deg, rgba(var(--purple-rgb), 0.14), rgba(var(--pink-rgb), 0.1));
    border-color: rgba(26, 26, 46, 0.16);
    color: #1a1a2e;
}

[data-theme="light"] #toggleIcon {
    background: rgba(255,255,255,0.72);
    box-shadow: 0 0 0 1px rgba(26,26,46,0.08) inset;
}

[data-theme="light"] .theme-toggle-label {
    color: #1a1a2e;
}

/* --- Hamburger (2-line) --- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 26px;
    height: 14px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--text);
    transition: all 0.35s var(--ease-out);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { bottom: 0; }

.hamburger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

.mobile-menu.open { opacity: 1; visibility: visible; }

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mobile-nav-link {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: color 0.3s;
}

.mobile-nav-link:hover { color: var(--purple); }

.mobile-social {
    display: flex;
    gap: 1.5rem;
}

.mobile-social a, .mobile-social .is-demo-link, .mobile-back {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.demo-note {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.48);
}

.mobile-demo-note {
    margin-top: 0.85rem;
}

.mobile-back {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-glass);
    border-radius: 4px;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 7rem 2rem 5rem;
    overflow: hidden;
}

.hero-grid-lines {
    position: absolute;
    inset: -25% -12%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 20%, rgba(var(--purple-rgb), 0.22), transparent 35%),
        radial-gradient(circle at 75% 70%, rgba(var(--pink-rgb), 0.2), transparent 38%),
        repeating-linear-gradient(
            90deg,
            transparent 0 52px,
            rgba(255, 255, 255, 0.05) 52px 53px
        ),
        repeating-linear-gradient(
            180deg,
            transparent 0 52px,
            rgba(255, 255, 255, 0.04) 52px 53px
        );
    animation: hero-grid-drift 24s linear infinite;
}

@keyframes hero-grid-drift {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-52px, -42px, 0);
    }
}

#particles-js {
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: transform 0.4s var(--ease-out);
}

#particles-js .neon-particle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--size);
    height: var(--size);
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(var(--purple-rgb), 0.65) 65%, transparent);
    filter: drop-shadow(0 0 10px rgba(var(--purple-rgb), 0.55));
    opacity: 0.6;
    animation: particle-drift var(--dur) ease-in-out var(--delay) infinite alternate;
}

@keyframes particle-drift {
    from {
        transform: translate3d(0, 0, 0) scale(0.8);
        opacity: 0.35;
    }

    to {
        transform: translate3d(var(--dx), var(--dy), 0) scale(1.45);
        opacity: 0.85;
    }
}

.hero-layout {
    position: relative;
    z-index: 2;
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: end;
    gap: 2rem;
    padding-bottom: 4.5rem;
}

.hero-content {
    text-align: left;
    position: relative;
    z-index: 3;
    transition: transform 0.4s var(--ease-out);
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.4em;
    margin-bottom: 1.5rem;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.title-line {
    font-family: var(--font-mono);
    font-size: clamp(4rem, 14vw, 10rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 0.95;
    position: relative;
    display: block;
}

/* グリッチ */
.title-line::before,
.title-line::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
}

.title-line::before {
    color: var(--pink);
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
    animation: glitch-a 3s infinite linear alternate; /* Reduced duration, added alternate */
}

.title-line::after {
    color: var(--cyan);
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    animation: glitch-b 3s infinite linear alternate; /* Reduced duration, added alternate */
}

@keyframes glitch-a {
    0%, 40%, 44%, 58%, 61%, 65%, 69%, 73%, 100% { transform: none; opacity: 1; } /* Keep visible most of the time */
    41% { transform: translate(-4px, -2px) scaleY(1.02); opacity: 0.8; }
    59% { transform: translate(4px, 1px) scaleY(0.98); opacity: 0.8; }
    62% { transform: translate(-2px, 3px) scaleY(1.03); opacity: 0.8; }
    70% { transform: translate(3px, -1px) scaleY(0.97); opacity: 0.8; }
}

@keyframes glitch-b {
    0%, 42%, 46%, 60%, 63%, 67%, 71%, 75%, 100% { transform: none; opacity: 1; } /* Keep visible most of the time */
    43% { transform: translate(3px, 2px) scaleY(0.98); opacity: 0.8; }
    61% { transform: translate(-3px, -1px) scaleY(1.02); opacity: 0.8; }
    64% { transform: translate(2px, -3px) scaleY(0.97); opacity: 0.8; }
    72% { transform: translate(-1px, 4px) scaleY(1.03); opacity: 0.8; }
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.3em;
    margin-top: 2rem;
}

.hero-meta {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    color: #cfd1f9;
}

[data-theme="light"] .hero-meta span {
    color: #262845;
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(26, 26, 46, 0.16);
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.08);
}

.hero-console {
    border-radius: 16px;
    padding: 1.05rem;
    box-shadow: var(--surface-shadow);
    position: relative;
    overflow: hidden;
}

.hero-console::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(var(--purple-rgb), 0.14), transparent 35%, rgba(var(--pink-rgb), 0.1));
}

.console-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e6e7ff;
    margin-bottom: 0.8rem;
}

.console-preview {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    aspect-ratio: 4 / 5;
    position: relative;
}

.console-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.08);
    transform: scale(1.05);
}

.console-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.console-stats li {
    padding: 0.5rem 0.45rem;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    gap: 0.2rem;
}

.console-stats span {
    font-family: var(--font-mono);
    font-size: 0.54rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

.console-stats strong {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.console-bars {
    margin-top: 0.9rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.42rem;
    align-items: end;
    height: 28px;
}

.console-bars span {
    display: block;
    height: 30%;
    border-radius: 3px;
    background: linear-gradient(to top, rgba(var(--purple-rgb), 0.45), rgba(34, 211, 238, 0.9));
    animation: console-bars 1.8s ease-in-out infinite;
}

.console-bars span:nth-child(2) { animation-delay: 0.25s; }
.console-bars span:nth-child(3) { animation-delay: 0.5s; }
.console-bars span:nth-child(4) { animation-delay: 0.75s; }

@keyframes console-bars {
    0%, 100% { height: 32%; opacity: 0.75; }
    50% { height: 100%; opacity: 1; }
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.hero-scroll span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.2em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--purple), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.6); }
}

/* --- Gallery --- */
.gallery-section {
    padding: 4.5rem 0 0;
    overflow-x: hidden;
    overflow-y: visible;
}

.gallery-track-wrap {
    overflow-x: hidden;
    overflow-y: visible;
    padding: 4rem 0 2.4rem;
}

.gallery-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    will-change: transform; /* Performance optimization */
    cursor: grab;
}

.gallery-track.active-drag {
    cursor: grabbing;
}

.gallery-item { flex: 0 0 auto; width: 200px; }

.gallery-img {
    width: 200px;
    height: 270px;
    background:
        linear-gradient(180deg, rgba(8, 9, 20, 0.05), rgba(8, 9, 20, 0.55)),
        linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1), filter 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.gallery-item:hover .gallery-img {
    transform: translateY(-10px) scale(1.07) rotate(7deg);
    box-shadow: 0 18px 46px rgba(167,139,250,0.28), 0 0 24px rgba(var(--pink-rgb), 0.25);
    filter: saturate(1.2) brightness(1.08);
    animation: tile-spin 0.9s var(--ease-out);
}

@keyframes tile-spin {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    30% { transform: translateY(-12px) scale(1.08) rotate(10deg); }
    70% { transform: translateY(-9px) scale(1.06) rotate(-6deg); }
    100% { transform: translateY(-10px) scale(1.07) rotate(7deg); }
}

.gallery-item span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.6rem;
    padding-left: 0.2rem;
}





/* --- Container & Section --- */
.container { max-width: 1060px; margin: 0 auto; padding: 0 2.5rem; }

.section-label {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 3rem;
}

.label-num {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--purple);
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(167,139,250,0.4);
}

.section-label h2 {
    font-family: var(--font-mono);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* --- Works --- */
.works-section { padding: 6rem 0; }

.works-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.cat-btn {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.4rem 1.1rem;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.3s var(--ease-out);
    letter-spacing: 0.03em;
}

.cat-btn:hover {
    border-color: var(--text);
    color: var(--text);
}

.cat-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    box-shadow: 0 0 12px rgba(167,139,250,0.15);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    perspective: 1000px; /* Added for 3D tilt effect */
}

.work-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0; /* Initial state for staggered reveal */
    transform: translateY(20px); /* Initial state for staggered reveal */
    transition: opacity 0.8s var(--ease-out), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.3s, border-color 0.3s, box-shadow 0.4s var(--ease-out); /* Combined transitions */
}

.work-card.stagger-visible {
    opacity: 1;
    transform: translateY(0);
}

.work-card:hover {
    transform: translateY(-12px) rotate(-2.2deg); /* Clear and intentional hover movement */
    box-shadow: 0 18px 45px rgba(var(--purple-rgb), 0.25),
                0 0 20px rgba(var(--pink-rgb), 0.3); /* Multi-color glow */
}

.work-card.hidden { display: none; }

.work-thumb {
    height: 200px;
    background:
        linear-gradient(180deg, rgba(8, 9, 20, 0.08), rgba(8, 9, 20, 0.62)),
        linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
    background-size: cover;
    background-position: center;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-thumb { transform: scale(1.05); }

.work-info { padding: 1.2rem; }

.work-id {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--purple);
    letter-spacing: 0.08em;
    text-shadow: 0 0 6px rgba(167,139,250,0.3);
}

.work-info h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 0.3rem;
}

.work-cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    display: block;
    margin-top: 0.25rem;
}

/* --- Pickup --- */
.pickup-section { padding: 2rem 0 6rem; }

.pickup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    perspective: 1000px; /* Added for 3D tilt effect */
}

.pickup-card {
    border-radius: 12px;
    overflow: hidden;
    opacity: 0; /* Initial state for staggered reveal */
    transform: translateY(20px); /* Initial state for staggered reveal */
    transition: opacity 0.8s var(--ease-out), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.3s, border-color 0.3s, box-shadow 0.4s var(--ease-out); /* Combined transitions */
}

.pickup-card.stagger-visible {
    opacity: 1;
    transform: translateY(0);
}

.pickup-card:hover {
    transform: translateY(-12px) rotate(2.2deg);
    box-shadow: 0 18px 45px rgba(var(--purple-rgb), 0.25),
                0 0 20px rgba(var(--pink-rgb), 0.3); /* Multi-color glow */
}

.pickup-thumb {
    height: 190px;
    background:
        linear-gradient(180deg, rgba(8, 9, 20, 0.08), rgba(8, 9, 20, 0.62)),
        linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
    background-size: cover;
    background-position: center;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.pickup-card:hover .pickup-thumb { transform: scale(1.05); }

.pickup-info { padding: 1.2rem; }

.pickup-info h3 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.pickup-info span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* --- Events --- */
.events-section { padding: 6rem 0; }

.events-note {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-item {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    gap: 1.5rem;
    opacity: 0; /* Initial state for staggered reveal */
    transform: translateY(20px); /* Initial state for staggered reveal */
    transition: opacity 0.8s var(--ease-out), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.3s, border-color 0.3s, box-shadow 0.4s var(--ease-out); /* Combined transitions */
}

.event-item.stagger-visible {
    opacity: 1;
    transform: translateY(0);
}

.event-item:hover {
    transform: translateX(14px) rotate(0.9deg); /* Stronger, easier-to-read hover feedback */
    box-shadow: 0 10px 28px rgba(var(--purple-rgb), 0.2), 0 0 18px rgba(var(--pink-rgb), 0.15);
}

.event-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.event-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    flex: 1;
}

.event-arrow {
    font-size: 1rem;
    color: var(--text-dim);
    transition: transform 0.3s var(--ease-out), color 0.3s;
}

.event-item:hover .event-arrow {
    transform: translateX(4px);
    color: var(--purple);
}

/* --- Profile --- */
.profile-section { padding: 6rem 0; }

.profile-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 3rem;
    padding: 2.5rem;
    border-radius: 16px;
    align-items: start;
}

.profile-avatar {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(160deg, rgba(8, 9, 20, 0.1), rgba(8, 9, 20, 0.5)),
        linear-gradient(135deg, var(--purple), var(--pink), var(--cyan));
    background-size: cover;
    background-position: center;
}

.avatar-glow {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--purple-rgb), 0.45), rgba(var(--pink-rgb), 0.42), rgba(34, 211, 238, 0.38));
    opacity: 0.68;
    animation: avatarShift 8s ease-in-out infinite;
}

@keyframes avatarShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.profile-text h3 {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.profile-role {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--purple);
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
}

.profile-text p {
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--text-dim);
    margin-bottom: 0.7rem;
}

.profile-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.profile-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    transition: all 0.3s;
}

.profile-link:hover {
    border-color: var(--purple);
    color: var(--purple);
}

.profile-text .demo-note {
    margin-top: 1rem;
}

/* --- Contact --- */
.contact-section {
    padding: 8rem 0;
    text-align: center;
    position: relative;
}

.contact-heading {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
}

.contact-heading span { display: block; }

.gradient-text {
    background: linear-gradient(135deg, var(--purple), var(--pink), var(--cyan));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.contact-sub {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 3rem;
}

.contact-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-btn:hover {
    transform: translateY(-4px) scale(1.03);
    border-color: var(--purple);
    background: var(--bg-glass-hover);
    box-shadow: 0 0 25px rgba(var(--purple-rgb), 0.2); /* Stronger glow for buttons */
}

.contact-btn-label { color: var(--text); }

.contact-btn-arrow {
    color: var(--text-dim);
    transition: transform 0.3s var(--ease-out), color 0.3s;
}

.contact-btn:hover .contact-btn-arrow {
    transform: translateX(4px);
    color: var(--purple);
}

/* --- Footer --- */
.footer { padding-top: 0; }

.marquee {
    overflow: hidden;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 0;
}

.marquee-content {
    display: inline-flex;
    gap: 2.5rem;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.marquee-content span {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-dim);
    font-weight: 700;
    letter-spacing: 0.06em;
}

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

.footer-inner {
    padding: 2.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a,
.footer-links .is-demo-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--purple); }

.footer-demo-note {
    margin: 0 0 1rem;
}

.copyright {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.15);
}

[data-theme="light"] .copyright { color: rgba(0,0,0,0.2); }

/* --- Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .works-grid, .pickup-grid { grid-template-columns: repeat(2, 1fr); }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-bottom: 3rem;
    }

    .hero-console {
        width: min(480px, 100%);
    }
}

@media (max-width: 768px) {
    .nav, .header-right .social-link, .btn-back { display: none; }
    .hamburger { display: block; }
    .header { padding: 0.8rem 1.5rem; }

    .hero {
        padding: 6.2rem 1.2rem 4rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-title {
        align-items: center;
    }

    .hero-meta {
        justify-content: center;
    }

    .hero-console {
        width: 100%;
        max-width: 520px;
    }

    .hero-layout {
        padding-bottom: 2.2rem;
    }

    .hero-scroll {
        bottom: 0.9rem;
    }

    .title-line { font-size: clamp(2.5rem, 14vw, 5rem); }
    .hero-label { font-size: 0.7rem; letter-spacing: 0.25em; }

    .gallery-item { width: 150px; }
    .gallery-img { width: 150px; height: 200px; }

    .works-grid, .pickup-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .work-thumb, .pickup-thumb { height: 150px; }

    .event-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .event-arrow { display: none; }

    .profile-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .profile-avatar { width: 130px; height: 130px; }
    .profile-links { justify-content: center; }

    .contact-heading { font-size: clamp(2rem, 10vw, 3rem); }
    .contact-links { flex-direction: column; align-items: center; }
    .contact-btn { width: 100%; max-width: 300px; justify-content: center; }

    .cursor-dot, .cursor-ring { display: none; }
    .spotlight-layer { display: none; }
    .container { padding: 0 1.5rem; }
}

@media (max-width: 480px) {
    .works-grid, .pickup-grid { grid-template-columns: 1fr; }
    .gallery-item { width: 130px; }
    .gallery-img { width: 130px; height: 175px; }

    .hero-meta span {
        font-size: 0.52rem;
        letter-spacing: 0.08em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spotlight-layer {
        display: none;
    }
}
