@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@property --accent-1 {
    syntax: '<color>';
    initial-value: #6366f1;
    inherits: true;
}

@property --accent-2 {
    syntax: '<color>';
    initial-value: #8b5cf6;
    inherits: true;
}

@property --accent-3 {
    syntax: '<color>';
    initial-value: #ec4899;
    inherits: true;
}

/* ========================================
   USELESS PROJECTS — Design System V4
   ======================================== */

:root {
    --bg: #050505;
    --bg-elevated: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.025);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --text: #f0f0f0;
    --text-dim: rgba(255, 255, 255, 0.45);
    --text-mid: rgba(255, 255, 255, 0.7);
    --accent-1: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #ec4899;
    --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    --radius: 24px;
    --radius-sm: 14px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    transition: --accent-1 0.5s, --accent-2 0.5s, --accent-3 0.5s;
}

/* ---- Reset ---- */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    cursor: none;
}

a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }
button { background: none; border: none; color: inherit; font: inherit; cursor: none; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* ---- Loading Screen ---- */

.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    animation: loaderPulse 1.2s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.96); filter: drop-shadow(0 0 0 var(--accent-1)); }
    50%      { opacity: 1;   transform: scale(1);     filter: drop-shadow(0 0 20px var(--accent-1)); }
}

.loader-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent-1);
    border-right-color: var(--accent-2);
    animation: loaderSpin 1s linear infinite;
}

@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}

/* ---- Custom Cursor ---- */

.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
}

body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring { opacity: 1; }

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-2);
    box-shadow: 0 0 10px var(--accent-2);
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255,255,255,0.3);
    transition: width 0.35s var(--ease), height 0.35s var(--ease), border-color 0.35s, opacity 0.3s;
}

.cursor-ring.is-hover {
    width: 64px;
    height: 64px;
    border-color: var(--accent-1);
}

/* ---- Ambient Cursor Glow ---- */

.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 70%);
    will-change: transform;
}

/* ---- Cursor Trail ---- */

.trail-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9;
}

/* ---- Noise Overlay ---- */

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
}

/* ---- Scroll Progress ---- */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1000;
}

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
    mix-blend-mode: difference;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-cta {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-cta:hover { opacity: 1; }

.dot { color: var(--accent-1); }

/* ---- Theme Picker ---- */

.theme-picker {
    display: flex;
    gap: 10px;
    align-items: center;
}

.theme-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--dot-color);
    border: 2px solid transparent;
    padding: 0;
    transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.theme-dot:hover,
.theme-dot.is-active {
    transform: scale(1.35);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 12px var(--dot-color);
}

/* ---- Hero ---- */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.burst-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 30%, var(--bg) 75%);
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 1.5rem;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3.5rem, 12vw, 10rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.hero-title-line {
    display: block;
    opacity: 0;
    transform: translateY(60px);
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 500;
    margin-top: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(30px);
}

.hero-sub {
    font-size: clamp(0.9rem, 1.5vw, 1.15rem);
    color: var(--text-dim);
    max-width: 520px;
    margin: 1.2rem auto 0;
    opacity: 0;
    transform: translateY(20px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
}

.scroll-indicator span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

.scroll-indicator-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent-1), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50%      { opacity: 1;   transform: scaleY(1); }
}

/* ---- Gradient Dividers ---- */

.gradient-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-2), var(--accent-3), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite alternate;
    opacity: 0.5;
}

@keyframes shimmer {
    0%   { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* ---- Marquee ---- */

.marquee-section {
    padding: 4rem 0;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: max-content;
    will-change: transform;
}

.marquee-track span {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-mid);
}

.marquee-sep {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-1);
    opacity: 0.5;
    flex-shrink: 0;
}

/* ---- Section Headers ---- */

.section-header {
    text-align: center;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.section-sub {
    color: var(--text-dim);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    margin-top: 1rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Showcase ---- */

.showcase {
    padding: clamp(5rem, 10vw, 10rem) 0;
}

/* ---- Bento Grid ---- */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 24px;
}

.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-wide  { grid-column: span 2; }
.bento-full  { grid-column: 1 / -1; }

.bento-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    transition: background 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: conic-gradient(from var(--border-angle), transparent 30%, rgba(255,255,255,0.08), transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 5;
    transition: background 0.5s var(--ease);
}

.bento-card:hover::before {
    background: conic-gradient(from var(--border-angle), transparent 10%, var(--accent-1), var(--accent-2), var(--accent-3), transparent 90%);
    animation: borderSpin 4s linear infinite;
}

@keyframes borderSpin {
    to { --border-angle: 360deg; }
}

.bento-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 20px 60px -15px rgba(99,102,241,0.15), 0 0 0 1px rgba(99,102,241,0.08);
}

.bento-inner {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.5s var(--ease);
}

.bento-content { position: relative; z-index: 3; }

.bento-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-1);
    margin-bottom: 0.5rem;
}

.bento-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}

.bento-content p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* -- Card Hints (mobile) -- */

.card-hint {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--accent-1);
    background: rgba(99,102,241,0.1);
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    z-index: 10;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.5s, transform 0.5s;
    display: none;
}

/* -- Touch Ripple -- */

.touch-ripple {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: rippleExpand 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes rippleExpand {
    to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* -- Card: 3D Tilt -- */

.card-3d-layers {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card-3d-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease-out;
}

.shape { border-radius: 50%; }

.shape-circle {
    width: 200px;
    height: 200px;
    background: var(--accent-1);
    filter: blur(50px);
    opacity: 0.2;
}

.shape-ring {
    width: 150px;
    height: 150px;
    border: 2px solid var(--accent-2);
    opacity: 0.3;
}

.shape-dot {
    width: 14px;
    height: 14px;
    background: var(--accent-3);
    opacity: 0.9;
    box-shadow: 0 0 40px var(--accent-3), 0 0 80px rgba(236,72,153,0.3);
}

/* -- Card: Gradient Mesh -- */

.gradient-mesh {
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 30% 30%, rgba(99,102,241,0.6), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(236,72,153,0.5), transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(16,185,129,0.4), transparent 50%);
    animation: meshShift 8s ease-in-out infinite alternate;
    transition: background-position 0.3s ease;
}

@keyframes meshShift {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(40deg); }
}

/* -- Card: SVG Morph -- */

.morph-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.morph-path {
    fill: var(--accent-2);
    animation: blobMorph 10s ease-in-out infinite;
}

@keyframes blobMorph {
    0%, 100% { d: path("M100,15 C145,15 185,55 185,100 C185,145 145,185 100,185 C55,185 15,145 15,100 C15,55 55,15 100,15Z"); }
    25%      { d: path("M100,25 C160,10 195,65 175,110 C155,155 140,190 100,180 C60,170 5,155 25,100 C45,45 40,40 100,25Z"); }
    50%      { d: path("M100,10 C140,30 190,80 170,115 C150,150 130,195 100,185 C70,175 15,150 30,100 C45,50 60,-10 100,10Z"); }
    75%      { d: path("M100,20 C175,15 200,60 180,105 C160,150 155,185 100,190 C45,195 10,160 20,110 C30,60 25,25 100,20Z"); }
}

/* -- Card: Typography -- */

.typo-demo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15em;
    z-index: 1;
}

.typo-char {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    color: rgba(255,255,255,0.08);
    cursor: none;
    transition: color 0.35s var(--ease), text-shadow 0.35s var(--ease);
    display: inline-block;
    line-height: 1;
}

.typo-char:hover {
    color: var(--accent-2);
    text-shadow: 0 0 40px rgba(139,92,246,0.5);
}

/* -- Card: Glass -- */

.bento-glass-demo { overflow: hidden; }

.glass-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.glass-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
}

.glass-orb-1 {
    width: 100px;
    height: 100px;
    background: var(--accent-1);
    top: 10%;
    left: 20%;
    animation: orbFloat1 6s ease-in-out infinite alternate;
}

.glass-orb-2 {
    width: 80px;
    height: 80px;
    background: var(--accent-3);
    top: 50%;
    right: 15%;
    animation: orbFloat2 7s ease-in-out infinite alternate;
}

.glass-orb-3 {
    width: 60px;
    height: 60px;
    background: var(--accent-2);
    bottom: 20%;
    left: 40%;
    animation: orbFloat3 5s ease-in-out infinite alternate;
}

@keyframes orbFloat1 { 0% { transform: translate(0, 0); }   100% { transform: translate(30px, 20px); } }
@keyframes orbFloat2 { 0% { transform: translate(0, 0); }   100% { transform: translate(-20px, -30px); } }
@keyframes orbFloat3 { 0% { transform: translate(0, 0); }   100% { transform: translate(20px, -15px); } }

.glass-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 65%;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 1rem;
    z-index: 2;
}

.glass-panel-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 0.8rem;
}

.glass-panel-dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}

.gl {
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 8px;
}

.gl-short { width: 60%; }

/* -- Card: Particle Canvas -- */

.particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* -- Card: Audio Wave -- */

.wave-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* -- Card: Code Demo -- */

.code-demo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    z-index: 1;
    overflow: hidden;
}

.code-lines {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: clamp(0.65rem, 1.2vw, 0.8rem);
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
    white-space: pre;
    margin: 0;
    background: none;
}

.c-kw { color: #c084fc; }
.c-fn { color: #f0f0f0; }
.c-st { color: #34d399; }
.c-pr { color: #67e8f9; }
.c-vr { color: #93c5fd; }
.c-cm { color: rgba(255,255,255,0.25); font-style: italic; }

.code-caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--accent-1);
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: caretBlink 0.8s step-end infinite;
}

@keyframes caretBlink { 50% { opacity: 0; } }

/* ---- Carousel Dots ---- */

.carousel-dots {
    display: none;
}

/* ---- Selected Works ---- */

.works-wrap {
    padding: clamp(5rem, 10vw, 8rem) 0;
    overflow: hidden;
}

.works-header {
    text-align: center;
    margin-bottom: 3rem;
}

.works-track {
    display: flex;
    gap: 2rem;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.work-card {
    flex-shrink: 0;
    width: 360px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
    position: relative;
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(99,102,241,0.12);
}

.work-card-visual {
    height: 220px;
    background: linear-gradient(135deg, var(--wc1, var(--accent-1)), var(--wc2, var(--accent-2)));
    position: relative;
    overflow: hidden;
}

.work-card-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.1), transparent 60%);
}

.work-card-body {
    padding: 1.5rem;
}

.work-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-1);
    margin-bottom: 0.4rem;
}

.work-card-body h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}

.work-card-body p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ---- Philosophy ---- */

.philosophy {
    position: relative;
    padding: clamp(6rem, 12vw, 14rem) 0;
    text-align: center;
    overflow: hidden;
}

/* -- Parallax Shapes -- */

.philosophy-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.p-shape {
    position: absolute;
    border-radius: 50%;
}

.p-shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-1);
    filter: blur(100px);
    opacity: 0.08;
    top: -10%;
    left: -5%;
}

.p-shape-2 {
    width: 200px;
    height: 200px;
    border: 2px solid var(--accent-2);
    opacity: 0.06;
    top: 30%;
    right: 5%;
}

.p-shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent-3);
    filter: blur(80px);
    opacity: 0.07;
    bottom: -5%;
    left: 30%;
}

.philosophy .container { position: relative; z-index: 1; }

.philosophy-words {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.45em;
    max-width: 800px;
    margin: 0 auto;
}

.pw {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
}

.pw-accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.philosophy-sub {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: var(--text-dim);
    max-width: 560px;
    margin: 2.5rem auto 0;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(20px);
}

/* ---- Stats ---- */

.stats {
    padding: clamp(4rem, 8vw, 8rem) 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat { opacity: 0; transform: translateY(30px); }

.stat-num {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suf {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    color: var(--text-mid);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
    letter-spacing: 0.02em;
}

/* ---- CTA ---- */

.cta {
    position: relative;
    padding: clamp(6rem, 14vw, 16rem) 0;
    text-align: center;
    overflow: hidden;
}

.cta-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
}

.cta-orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-1);
    top: 10%;
    left: -5%;
    animation: orbFloat1 10s ease-in-out infinite alternate;
}

.cta-orb-2 {
    width: 350px;
    height: 350px;
    background: var(--accent-3);
    bottom: 5%;
    right: -5%;
    animation: orbFloat2 12s ease-in-out infinite alternate;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    position: relative;
}

.cta-accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-sub {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: var(--text-dim);
    margin: 1.5rem auto 3rem;
    max-width: 460px;
    line-height: 1.7;
    position: relative;
}

/* -- Magnetic Button -- */

.mag-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.3rem 3.5rem;
    border-radius: 100px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    overflow: hidden;
    cursor: none;
    border: 1px solid rgba(255,255,255,0.15);
    transition: border-color 0.4s, box-shadow 0.4s;
}

.mag-btn:hover {
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 0 40px rgba(99,102,241,0.15);
}

.mag-btn-text {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.mag-btn-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
    z-index: 1;
}

.mag-btn:hover .mag-btn-bg { opacity: 0.18; }

/* ---- Contact Widget ---- */

.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 850;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 30px rgba(99,102,241,0.35);
    transition: transform 0.4s var(--ease), box-shadow 0.4s;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(99,102,241,0.5);
}

.fab svg { width: 22px; height: 22px; pointer-events: none; }

.contact-overlay {
    position: fixed;
    inset: 0;
    z-index: 860;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.contact-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.contact-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 870;
    width: min(460px, 100vw);
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(15,15,15,0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
    border-right: none;
    border-radius: var(--radius) 0 0 0;
    padding: 2.5rem;
    transform: translateY(100%);
    transition: transform 0.5s var(--ease);
}

.contact-panel.is-open {
    transform: translateY(0);
}

.contact-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    font-size: 1.8rem;
    color: var(--text-dim);
    transition: color 0.2s;
    line-height: 1;
}

.contact-close:hover { color: var(--text); }

.contact-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.contact-sub {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.form-group { margin-bottom: 1rem; }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    cursor: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-submit {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: var(--gradient);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.3);
}

.form-submit:active { transform: translateY(0); }

.form-submit.is-loading .form-submit-text { opacity: 0; }
.form-submit.is-loading .form-submit-loader { opacity: 1; }

.form-submit-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.form-submit-loader::after {
    content: '';
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
    min-height: 1.2em;
}

.form-status.is-success { color: #34d399; }
.form-status.is-error { color: #f87171; }

/* ---- Footer ---- */

.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-tagline {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 260px;
    }
    .bento-large { grid-column: span 2; grid-row: span 2; }
    .bento-wide  { grid-column: span 2; }
    .bento-full  { grid-column: 1 / -1; }

    .work-card { width: 320px; }
}

@media (max-width: 768px) {
    body { cursor: auto; }
    .cursor-dot, .cursor-ring, .cursor-glow { display: none !important; }
    button, a, input, textarea, .typo-char, .mag-btn, .form-submit { cursor: auto; }

    .trail-canvas { display: none; }

    /* Bento carousel */
    .bento-grid {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-padding: 0 7.5vw;
        gap: 16px;
        padding: 0 7.5vw;
    }
    .bento-grid::-webkit-scrollbar { display: none; }
    .bento-grid { scrollbar-width: none; }

    .bento-card {
        min-width: 85vw;
        height: 300px;
        scroll-snap-align: center;
        flex-shrink: 0;
    }

    .bento-large,
    .bento-wide,
    .bento-full {
        min-width: 85vw;
        height: 300px;
        grid-column: unset;
        grid-row: unset;
    }

    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 1.5rem;
    }

    .carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255,255,255,0.2);
        border: none;
        padding: 0;
        transition: background 0.3s, transform 0.3s;
        cursor: auto;
    }

    .carousel-dot.is-active {
        background: var(--accent-1);
        transform: scale(1.3);
    }

    /* Card hints visible */
    .card-hint {
        display: block;
    }
    .card-hint.is-visible {
        opacity: 0.8;
        transform: translateY(0);
        animation: hintPulse 2s ease-in-out 0.5s;
    }

    .bento-card:hover { transform: none; box-shadow: none; }
    .bento-card:active {
        background: var(--bg-card-hover);
        transform: scale(0.98);
    }
    .bento-card:active::before {
        background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(139,92,246,0.25) 50%, rgba(236,72,153,0.5));
    }

    .typo-char {
        color: rgba(255,255,255,0.12);
        cursor: auto;
        -webkit-tap-highlight-color: transparent;
    }
    .typo-char.is-tapped {
        color: var(--accent-2);
        text-shadow: 0 0 40px rgba(139,92,246,0.5);
    }

    /* Works mobile scroll */
    .works-track {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 7.5vw;
    }
    .works-track::-webkit-scrollbar { display: none; }
    .works-track { scrollbar-width: none; }

    .work-card {
        min-width: 80vw;
        width: auto;
        scroll-snap-align: center;
    }
    .work-card:hover { transform: none; }
    .work-card:active { transform: scale(0.97); }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .stat-num {
        font-size: clamp(3rem, 10vw, 4rem);
    }

    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
    .footer-links a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .nav { padding: 1rem 1.5rem; }
    .theme-picker { gap: 8px; }
    .theme-dot { width: 12px; height: 12px; }

    .contact-panel {
        width: 100vw;
        border-radius: var(--radius) var(--radius) 0 0;
        padding: 2rem 1.5rem;
    }

    .fab { bottom: 1.5rem; right: 1.2rem; }

    .mag-btn {
        cursor: auto;
        -webkit-tap-highlight-color: transparent;
    }
    .mag-btn:active {
        border-color: var(--accent-1);
        box-shadow: 0 0 30px rgba(99,102,241,0.25);
    }
    .mag-btn:active .mag-btn-bg { opacity: 0.2; }

    .form-submit { cursor: auto; }
    .form-submit:active {
        transform: scale(0.97);
        box-shadow: 0 4px 20px rgba(99,102,241,0.3);
    }

    .marquee-section { padding: 2.5rem 0; }
    .hero-sub { max-width: 90vw; }

    /* Parallax shapes smaller on mobile */
    .p-shape-1 { width: 180px; height: 180px; }
    .p-shape-2 { width: 120px; height: 120px; }
    .p-shape-3 { width: 100px; height: 100px; }
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .work-card { min-width: 85vw; }
}

/* ---- Reduced Motion ---- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .marquee-track { animation: none !important; }
    .trail-canvas, .burst-canvas { display: none !important; }
    .hero-title-line, .hero-tagline, .hero-sub, .scroll-indicator,
    .pw, .philosophy-sub, .stat { opacity: 1 !important; transform: none !important; }
}

/* ---- Selection ---- */

::selection {
    background: rgba(99,102,241,0.3);
    color: #fff;
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
