/* ============================================
   PORTFOLIO — 3D Artist & Video Editor
   Professional Dark Theme · v2
   ============================================ */

/* ─── Variables ─── */
:root {
    --bg-0: #050507;
    --bg-1: #0a0a0f;
    --bg-2: #0f0f17;
    --bg-3: #14141e;
    --bg-card: #111119;
    --bg-card-h: #18182a;

    --text-0: #f5f5fa;
    --text-1: #c8c8d8;
    --text-2: #7c7c96;
    --text-3: #4a4a60;

    --purple: #8b5cf6;
    --purple-l: #a78bfa;
    --purple-d: #7c3aed;
    --cyan: #06b6d4;
    --cyan-l: #22d3ee;
    --pink: #ec4899;
    --green: #22c55e;

    --grad: linear-gradient(135deg, var(--purple), var(--cyan));
    --grad-alt: linear-gradient(135deg, var(--purple), var(--pink));
    --glass: rgba(15, 15, 23, 0.65);
    --border: rgba(139, 92, 246, 0.12);
    --border-h: rgba(139, 92, 246, 0.3);

    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-xl: 32px;
    --r-full: 9999px;

    --ease: cubic-bezier(.4, 0, .2, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-h: 'Sora', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg-0);
    color: var(--text-0);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: rgba(139, 92, 246, .25);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-0);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-d);
    border-radius: var(--r-full);
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

/* ─── Noise ─── */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' 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;
}

/* ─── Custom Cursor ─── */
.cursor-dot,
.cursor-ring {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width .25s var(--ease), height .25s var(--ease), opacity .25s;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--purple-l);
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(167, 139, 250, .35);
}

/* ─── Particle Canvas ─── */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .4;
}

/* ─── Loader ─── */
.loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .6s var(--ease), visibility .6s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    text-align: center;
}

.loader-bar {
    width: 120px;
    height: 2px;
    background: var(--bg-3);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 16px;
}

.loader-bar::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: var(--grad);
    border-radius: 2px;
    animation: loaderSlide 1s var(--ease) infinite;
}

@keyframes loaderSlide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

.loader-text {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-2);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.loader-dots::after {
    content: '';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0% {
        content: '';
    }

    33% {
        content: '.';
    }

    66% {
        content: '..';
    }

    100% {
        content: '...';
    }
}

/* ─── Container ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ─── Navbar ─── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: padding .35s var(--ease), background .35s, backdrop-filter .35s;
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(5, 5, 7, .8);
    backdrop-filter: blur(24px) saturate(1.8);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .4s var(--spring);
}

.logo-mark:hover {
    transform: rotate(30deg) scale(1.1);
}

.logo-name {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: 4px;
    color: var(--text-0);
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 8px 18px;
    border-radius: var(--r-full);
    transition: color .25s, background .25s;
    position: relative;
}

.nav-link:hover {
    color: var(--text-0);
}

.nav-link.active {
    color: var(--purple-l);
    background: rgba(139, 92, 246, .1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-cta {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-0);
    padding: 10px 24px;
    border-radius: var(--r-full);
    background: var(--grad);
    position: relative;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, .3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--text-0);
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .3s;
    transform-origin: center;
}

.nav-toggle.active span:first-child {
    transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle.active span:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}

/* ─── Hero ─── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 28px 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .3;
    animation: orbDrift 20s ease-in-out infinite;
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--purple);
    top: -15%;
    right: -10%;
}

.hero-orb-2 {
    width: 450px;
    height: 450px;
    background: var(--cyan);
    bottom: -15%;
    left: -8%;
    animation-delay: -7s;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: var(--pink);
    top: 45%;
    left: 45%;
    opacity: .15;
    animation-delay: -14s;
}

@keyframes orbDrift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(25px, -20px) scale(1.04);
    }

    66% {
        transform: translate(-15px, 15px) scale(.96);
    }
}

.hero-mesh {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(139, 92, 246, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, .025) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-3d {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-3d canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.hero-tag {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp .8s .3s var(--ease) forwards;
}

.tag-line {
    width: 40px;
    height: 1px;
    background: var(--purple);
}

.hero-tag span {
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: 4px;
    color: var(--purple-l);
}

.hero-title {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: clamp(3.2rem, 7.5vw, 5.8rem);
    line-height: 1.05;
    letter-spacing: -3px;
    margin-bottom: 28px;
}

.title-reveal {
    display: block;
    overflow: hidden;
}

.title-inner {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: titleSlide .9s var(--spring) forwards;
}

.title-reveal:nth-child(1) .title-inner {
    animation-delay: .5s;
}

.title-reveal:nth-child(2) .title-inner {
    animation-delay: .65s;
}

.title-reveal:nth-child(3) .title-inner {
    animation-delay: .8s;
}

.title-gradient {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes titleSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-1);
    max-width: 560px;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp .8s 1s var(--ease) forwards;
}

.hero-cta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp .8s 1.15s var(--ease) forwards;
}

.cta-primary,
.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: .95rem;
    font-weight: 600;
    border-radius: var(--r-full);
    transition: transform .25s, box-shadow .25s;
}

.cta-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, .25);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, .35);
}

.cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    transition: transform .3s var(--spring);
}

.cta-primary:hover .cta-icon {
    transform: translate(2px, -2px);
}

.cta-secondary {
    color: var(--text-0);
    border: 1.5px solid var(--border-h);
    background: transparent;
}

.cta-secondary:hover {
    background: rgba(139, 92, 246, .08);
    border-color: var(--purple);
    transform: translateY(-2px);
}

/* Hero Footer */
.hero-footer {
    position: absolute;
    bottom: 40px;
    left: 28px;
    right: 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 2;
    opacity: 0;
    animation: fadeUp .8s 1.4s var(--ease) forwards;
}

.hero-stats-row {
    display: flex;
    gap: 48px;
}

.hero-stat {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.stat-num {
    font-family: var(--font-h);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-0);
}

.stat-num::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--purple-l);
}

.stat-label {
    font-size: .75rem;
    color: var(--text-2);
    line-height: 1.4;
    padding-top: 4px;
}

.scroll-cue {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-cue span {
    font-size: .7rem;
    color: var(--text-3);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-mouse {
    width: 22px;
    height: 34px;
    border: 1.5px solid var(--text-3);
    border-radius: 12px;
    position: relative;
}

.scroll-wheel {
    width: 3px;
    height: 7px;
    background: var(--purple-l);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollAnim 2s var(--ease) infinite;
}

@keyframes scrollAnim {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

/* ─── Marquee ─── */
.marquee-band {
    padding: 20px 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-1);
}

.marquee-track {
    display: flex;
    gap: 40px;
    align-items: center;
    animation: marqueeScroll 30s linear infinite;
    width: max-content;
}

.marquee-track span {
    font-family: var(--font-h);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-3);
    white-space: nowrap;
}

.marquee-dot {
    color: var(--purple);
    font-size: .5rem;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ─── Sections ─── */
.section {
    padding: 130px 0;
    position: relative;
    z-index: 1;
}

.section-dark {
    background: var(--bg-1);
}

.section-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.section-label.center {
    justify-content: center;
}

.label-index {
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 500;
    color: var(--purple-l);
    letter-spacing: 2px;
}

.label-line {
    width: 32px;
    height: 1px;
    background: var(--border-h);
}

.label-text {
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: 4px;
    color: var(--text-3);
}

.section-heading {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    letter-spacing: -1px;
}

.section-heading.center {
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-2);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 16px auto 60px;
}

.text-gradient {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Reveal ─── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── About ─── */
.about-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-body {
    font-size: 1.05rem;
    color: var(--text-1);
    margin-bottom: 18px;
    line-height: 1.85;
}

.about-badges {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 36px;
}

.badge-item {
    display: flex;
    gap: 20px;
    padding: 22px 24px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: border-color .3s, transform .3s;
}

.badge-item:hover {
    border-color: var(--purple);
    transform: translateX(6px);
}

.badge-num {
    font-family: var(--font-mono);
    font-size: .85rem;
    font-weight: 600;
    color: var(--purple-l);
    flex-shrink: 0;
    padding-top: 2px;
}

.badge-item h4 {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.badge-item p {
    font-size: .82rem;
    color: var(--text-2);
    line-height: 1.5;
}

/* Portrait */
.about-portrait {
    position: relative;
}

.portrait-frame {
    aspect-ratio: 3/4;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.portrait-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--bg-2), var(--bg-3));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.portrait-placeholder span {
    font-size: .8rem;
    color: var(--text-3);
}

.portrait-accent {
    position: absolute;
    top: 20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    z-index: 0;
}

.portrait-tag {
    position: absolute;
    bottom: -20px;
    left: -16px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
}

.tag-icon {
    font-size: 1.3rem;
}

.portrait-tag strong {
    display: block;
    font-size: .85rem;
}

.portrait-tag span {
    font-size: .75rem;
    color: var(--text-2);
}

/* ─── Services ─── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    padding: 36px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: border-color .35s, transform .35s, box-shadow .35s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, .06), rgba(6, 182, 212, .04));
    opacity: 0;
    transition: opacity .35s;
}

.service-card:hover {
    border-color: var(--purple);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(139, 92, 246, .12);
}

.service-card:hover::before {
    opacity: 1;
}

.service-num {
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 2px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.service-icon-wrap {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--r-sm);
    background: rgba(139, 92, 246, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple-l);
}

.service-card h3 {
    position: relative;
    z-index: 1;
    font-family: var(--font-h);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.service-card p {
    position: relative;
    z-index: 1;
    font-size: .85rem;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-tools {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-tools span {
    font-size: .7rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 4px 12px;
    border-radius: var(--r-full);
    border: 1px solid var(--border);
    letter-spacing: .5px;
}

/* ─── Stack ─── */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.stack-item {
    padding: 28px 20px;
    text-align: center;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: border-color .3s, transform .3s;
}

.stack-item:hover {
    border-color: var(--purple);
    transform: translateY(-4px);
}

.stack-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.stack-name {
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 14px;
    display: block;
}

.stack-bar {
    height: 3px;
    background: rgba(139, 92, 246, .1);
    border-radius: 2px;
    overflow: hidden;
}

.stack-fill {
    height: 100%;
    background: var(--grad);
    border-radius: 2px;
    width: 0;
    transition: width 1.2s var(--ease);
}

/* ─── Works (YouTube Grid) ─── */
.works-grid-yt {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.work-yt-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s;
}

.work-yt-item:hover {
    border-color: var(--border-h);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(139, 92, 246, .12);
}

.work-yt-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.work-yt-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.work-yt-info {
    padding: 18px 22px;
}

.work-yt-info h3 {
    font-family: var(--font-h);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 4px;
}

.work-yt-info span {
    font-size: .8rem;
    color: var(--text-2);
    letter-spacing: .5px;
}

.filter-btn {
    padding: 10px 24px;
    font-size: .85rem;
    font-weight: 500;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    cursor: pointer;
    transition: all .25s;
}

.filter-btn:hover {
    border-color: var(--purple);
    color: var(--text-0);
}

.filter-btn.active {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
}

.works-masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.work-item {
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all .4s var(--ease);
}

.work-item.hidden {
    display: none;
}

.work-item.work-large {
    grid-column: span 2;
}

.work-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--r-lg);
    cursor: pointer;
}

.work-large .work-thumb {
    aspect-ratio: 2/1;
}

.work-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            hsl(var(--h), var(--s), var(--l)),
            hsl(calc(var(--h) + 30), var(--s), calc(var(--l) + 5%)));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .6s var(--ease);
}

.work-item:hover .work-placeholder {
    transform: scale(1.05);
}

/* 3D placeholders */
.ph-3d {
    perspective: 500px;
}

.ph-cube {
    width: 70px;
    height: 70px;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRot 10s ease-in-out infinite;
}

@keyframes cubeRot {

    0%,
    100% {
        transform: rotateX(25deg) rotateY(0);
    }

    25% {
        transform: rotateX(25deg) rotateY(90deg);
    }

    50% {
        transform: rotateX(25deg) rotateY(180deg);
    }

    75% {
        transform: rotateX(25deg) rotateY(270deg);
    }
}

.face {
    position: absolute;
    width: 70px;
    height: 70px;
    border: 1px solid rgba(139, 92, 246, .35);
    background: rgba(139, 92, 246, .06);
    backdrop-filter: blur(2px);
}

.face.front {
    transform: translateZ(35px);
}

.face.back {
    transform: rotateY(180deg) translateZ(35px);
}

.face.right {
    transform: rotateY(90deg) translateZ(35px);
}

.face.left {
    transform: rotateY(-90deg) translateZ(35px);
}

.face.top {
    transform: rotateX(90deg) translateZ(35px);
}

.face.bottom {
    transform: rotateX(-90deg) translateZ(35px);
}

.ph-sphere {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%,
            rgba(6, 182, 212, .5), rgba(6, 182, 212, .08) 60%, transparent);
    border: 1px solid rgba(6, 182, 212, .25);
    box-shadow: 0 0 40px rgba(6, 182, 212, .15), inset 0 0 24px rgba(6, 182, 212, .08);
    animation: sphereBob 4s ease-in-out infinite;
}

@keyframes sphereBob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.ph-torus {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 10px solid rgba(236, 72, 153, .35);
    box-shadow: 0 0 24px rgba(236, 72, 153, .15);
    animation: torusSpin 8s linear infinite;
}

@keyframes torusSpin {
    0% {
        transform: rotateX(35deg) rotateZ(0);
    }

    100% {
        transform: rotateX(35deg) rotateZ(360deg);
    }
}

.ph-video {
    color: rgba(255, 255, 255, .4);
    animation: vidPulse 3s ease-in-out infinite;
}

@keyframes vidPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: .4;
    }

    50% {
        transform: scale(1.08);
        opacity: .8;
    }
}

.ph-motion {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mo-ring {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: absolute;
    border: 2px solid var(--purple);
    opacity: 0;
    animation: ringPulse 2.4s ease-out infinite;
}

.mo-ring.r2 {
    animation-delay: .8s;
    border-color: var(--cyan);
}

.mo-ring.r3 {
    animation-delay: 1.6s;
    border-color: var(--pink);
}

@keyframes ringPulse {
    0% {
        width: 10px;
        height: 10px;
        opacity: .8;
    }

    100% {
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

/* Work hover overlay */
.work-hover {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 7, .92) 0%, rgba(5, 5, 7, .5) 50%, transparent);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 28px;
    opacity: 0;
    transition: opacity .35s var(--ease);
}

.work-item:hover .work-hover {
    opacity: 1;
}

.work-cat {
    display: inline-block;
    padding: 4px 14px;
    background: var(--grad);
    border-radius: var(--r-full);
    font-size: .7rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: .5px;
}

.work-meta h3 {
    font-family: var(--font-h);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.work-meta p {
    font-size: .8rem;
    color: var(--text-2);
}

.work-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: background .25s, transform .25s;
}

.work-link:hover {
    background: var(--purple);
    transform: scale(1.1);
}

/* ─── Process ─── */
.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 32px;
    left: calc(12.5% + 12px);
    right: calc(12.5% + 12px);
    height: 1px;
    background: var(--border);
}

.process-step {
    text-align: center;
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: .85rem;
    font-weight: 600;
    color: var(--purple-l);
    background: var(--bg-2);
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
    transition: border-color .3s, background .3s;
}

.process-step:hover .step-number {
    border-color: var(--purple);
    background: rgba(139, 92, 246, .1);
}

.step-content h3 {
    font-family: var(--font-h);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-content p {
    font-size: .82rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ─── Testimonials ─── */
.testimonials-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 60px;
}

.test-card {
    padding: 36px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: border-color .3s, transform .3s;
}

.test-card:hover {
    border-color: var(--purple);
    transform: translateY(-4px);
}

.test-stars {
    color: #fbbf24;
    font-size: 1rem;
    letter-spacing: 3px;
    margin-bottom: 18px;
}

.test-card p {
    font-size: .95rem;
    color: var(--text-1);
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 24px;
}

.test-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.test-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
}

.test-author strong {
    display: block;
    font-size: .9rem;
}

.test-author span {
    font-size: .78rem;
    color: var(--text-2);
}

/* ─── Contact ─── */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
}

.contact-body {
    font-size: 1.05rem;
    color: var(--text-1);
    margin-bottom: 36px;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.contact-link-item {
    display: flex;
    align-items: center;
    gap: 14px;
    transition: color .25s;
}

.contact-link-item:hover {
    color: var(--purple-l);
}

.cli-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, .08);
    border-radius: var(--r-sm);
    color: var(--purple-l);
    flex-shrink: 0;
}

.contact-link-item span {
    font-size: .92rem;
}

.social-row {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-2);
    transition: border-color .25s, color .25s, transform .25s;
}

.social-btn:hover {
    border-color: var(--purple);
    color: var(--purple-l);
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.form-field {
    position: relative;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 18px 20px 8px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-0);
    font-family: var(--font);
    font-size: .92rem;
    outline: none;
    transition: border-color .25s;
}

.form-field select {
    cursor: pointer;
    appearance: none;
}

.form-field select option {
    background: var(--bg-2);
}

.form-field label {
    position: absolute;
    top: 14px;
    left: 20px;
    font-size: .82rem;
    color: var(--text-3);
    pointer-events: none;
    transition: all .25s var(--ease);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--purple);
}

.form-field input:focus+label,
.form-field input:not(:placeholder-shown)+label,
.form-field textarea:focus+label,
.form-field textarea:not(:placeholder-shown)+label,
.form-field select:focus+label,
.form-field select:valid+label {
    top: 5px;
    font-size: .65rem;
    color: var(--purple-l);
}

.form-field textarea {
    resize: vertical;
    min-height: 110px;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: var(--grad);
    border: none;
    border-radius: var(--r-full);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
    transition: transform .25s, box-shadow .25s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(139, 92, 246, .3);
}

/* ─── Footer ─── */
.footer {
    padding: 40px 0;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-name {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: 4px;
    color: var(--text-1);
}

.footer-nav {
    display: flex;
    gap: 28px;
}

.footer-nav a {
    font-size: .82rem;
    color: var(--text-2);
    transition: color .25s;
}

.footer-nav a:hover {
    color: var(--purple-l);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
}

.footer-bottom p {
    font-size: .78rem;
    color: var(--text-3);
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stack-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .process-timeline::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        inset: 0;
        background: rgba(5, 5, 7, .96);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s, visibility .3s;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .hero-3d {
        display: none;
    }

    .hero-title {
        font-size: clamp(2.6rem, 10vw, 4rem);
        letter-spacing: -2px;
    }

    .hero-footer {
        flex-direction: column;
        gap: 32px;
        align-items: flex-start;
    }

    .hero-stats-row {
        gap: 28px;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-right {
        order: -1;
    }

    .portrait-frame {
        max-width: 280px;
        margin: 0 auto;
    }

    .portrait-accent {
        display: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .works-grid-yt {
        grid-template-columns: 1fr;
    }

    .testimonials-row {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 90px 0;
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-cta-row {
        flex-direction: column;
    }

    .cta-primary,
    .cta-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-stats-row {
        flex-direction: column;
        gap: 16px;
    }

    .stack-grid {
        grid-template-columns: 1fr;
    }

    .process-timeline {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}