/* === Reset & Foundation === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.35);
    --accent-subtle: rgba(139, 92, 246, 0.08);
    --bg: #06060b;
    --bg-elevated: #0c0c14;
    --bg-card: #0f0f19;
    --surface: #16162a;
    --text: #eeeef2;
    --text-secondary: #a8a8c8;
    --text-tertiary: #7a7a9a;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(139, 92, 246, 0.25);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
}

html { scroll-behavior: smooth; }

/* === Loader === */
.loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-done {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loader-logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    animation: loaderFadeIn 0.6s ease both;
}

.loader-logo span {
    color: var(--accent);
}

.loader-bar-bg {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    animation: loaderFadeIn 0.6s ease 0.2s both;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #c084fc);
    border-radius: 10px;
    transition: width 0.15s ease;
    box-shadow: 0 0 16px var(--accent-glow);
}

.loader-percent {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 2px;
    animation: loaderFadeIn 0.6s ease 0.3s both;
}

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

/* Hide content until loaded */
body:not(.loaded) .navbar {
    opacity: 0;
}

body.loaded .navbar {
    animation: fadeUp 0.8s ease-out both;
}

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

/* === Custom Cursor === */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s, margin 0.3s;
}

.cursor-hover {
    width: 40px;
    height: 40px;
    margin-left: -16px;
    margin-top: -16px;
    background: rgba(139, 92, 246, 0.3);
    mix-blend-mode: normal;
    border: 1px solid rgba(139, 92, 246, 0.5);
}

.cursor-glow {
    position: fixed;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06), transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* === Scroll Progress === */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #c084fc, #818cf8);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 10000;
}

/* === Star Field === */
#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* === Grain Texture === */
.grain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.022;
    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;
    background-size: 200px;
}

/* === Ambient Orbs === */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 70%);
    top: -10%; left: -5%;
    animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
    top: 40%; right: -8%;
    animation: orbFloat2 25s ease-in-out infinite;
}

.orb-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.06), transparent 70%);
    bottom: 10%; left: 20%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(40px, 60px); }
    66% { transform: translate(-30px, 20px); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-50px, -40px); }
    66% { transform: translate(30px, 50px); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(60px, -30px); }
    66% { transform: translate(-40px, -60px); }
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
    background: rgba(6, 6, 11, 0.8);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 101;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo span { color: var(--accent); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: none;
}

.nav-links a:hover { color: var(--text); }

.nav-links .nav-cta {
    background: var(--accent-subtle);
    color: var(--accent-light);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.nav-links .nav-cta:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    color: #fff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: none;
    padding: 4px;
    z-index: 101;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
}

/* Background glow */
.hero-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(99, 102, 241, 0.05) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: glowPulse 5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.6; }
}

/* Rotating ring */
.hero-ring {
    position: absolute;
    width: 520px;
    height: 520px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(139, 92, 246, 0.06);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: ringRotate 40s linear infinite;
}

.hero-ring::before,
.hero-ring::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(139, 92, 246, 0.2);
}

.hero-ring::before {
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-ring::after {
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* === Hero entrance animations (triggered by JS) === */
.hero-anim {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
    transition: none;
}

.hero.active .hero-anim {
    animation: heroEnter 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero.active .hero-anim[data-delay="0"] { animation-delay: 0s; }
.hero.active .hero-anim[data-delay="1"] { animation-delay: 0.15s; }
.hero.active .hero-anim[data-delay="2"] { animation-delay: 0.35s; }
.hero.active .hero-anim[data-delay="3"] { animation-delay: 0.55s; }
.hero.active .hero-anim[data-delay="4"] { animation-delay: 0.7s; }

@keyframes heroEnter {
    0% {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 14px;
    background: var(--accent-subtle);
    border: 1px solid rgba(139, 92, 246, 0.12);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-light);
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.hero-headline {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.8rem, 6.5vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 32px;
    letter-spacing: -3px;
}

.hero-line {
    display: block;
}

/* Word rotator */
.hero-line-rotate {
    min-height: 1.2em;
    position: relative;
}

.hero-rotator {
    display: inline-block;
    position: relative;
    overflow: hidden;
    vertical-align: bottom;
    height: 1.15em;
}

.hero-rotate-word {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--accent), #c084fc, #818cf8);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    opacity: 0;
    transform: translateY(100%) rotateX(-60deg);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-rotate-word.active {
    position: relative;
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

.hero-rotate-word.exit {
    opacity: 0;
    transform: translateY(-100%) rotateX(60deg);
}

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

.split-line {
    display: inline-block;
    overflow: hidden;
}

.nowrap { white-space: nowrap; }

.highlight {
    background: linear-gradient(135deg, var(--accent), #c084fc, #818cf8);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    position: relative;
}

.hero-desc {
    font-size: 1.12rem;
    color: var(--text-secondary);
    margin: 0 auto 44px;
    max-width: 500px;
    line-height: 1.75;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Scroll cue */
.hero-scroll-cue {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 34px;
    border: 2px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    z-index: 1;
    opacity: 0;
    animation: heroEnter 0.8s ease-out 1.8s both;
}

.scroll-dot {
    width: 3px;
    height: 8px;
    background: var(--accent);
    border-radius: 3px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: none;
    border: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::before { opacity: 1; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-primary:hover {
    box-shadow: 0 8px 50px var(--accent-glow), 0 0 80px rgba(139, 92, 246, 0.15), inset 0 1px 0 rgba(255,255,255,0.15);
    filter: brightness(1.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 15px 32px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: none;
}

.btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--accent-subtle);
}

.btn-magnetic {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s, filter 0.35s, background 0.35s, border-color 0.35s, color 0.35s;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn.sent {
    background: #22c55e;
    box-shadow: 0 4px 24px rgba(34, 197, 94, 0.3);
}

/* === Section Headers === */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    color: var(--accent-light);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    position: relative;
    padding-left: 20px;
}

.section-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* === Portfolio === */
.portfolio {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.portfolio-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.5s, box-shadow 0.5s;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    cursor: none;
}

.card-glow {
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
    pointer-events: none;
}

.portfolio-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-hover), 0 0 60px rgba(139, 92, 246, 0.08);
}

.portfolio-card:hover .card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* iframe hover scale handled by JS */

.card-image {
    height: 230px;
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    background-image: linear-gradient(90deg, var(--bg-card) 0%, var(--surface) 50%, var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.card-image:has(iframe[src]) {
    animation: none;
    background: var(--bg);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.card-image:has(img) {
    animation: none;
    background: none;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: auto;
    transform-origin: top left;
    pointer-events: none;
}

.card-image iframe {
    width: 1280px;
    height: 800px;
    border: none;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom, transparent 50%, rgba(6, 6, 11, 0.4));
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-category {
    background: rgba(6, 6, 11, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.06);
}

.card-arrow {
    width: 36px;
    height: 36px;
    background: rgba(6, 6, 11, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255,255,255,0.06);
}

.card-info {
    padding: 24px 28px 28px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.card-info h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.card-info p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-tags span {
    background: var(--accent-subtle);
    color: var(--accent-light);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid rgba(139, 92, 246, 0.08);
    letter-spacing: 0.2px;
    transition: all 0.3s;
}

.portfolio-card:hover .card-tags span {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.2);
}

/* === About === */
.about {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

.about-inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    margin-top: 8px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1.05rem;
    line-height: 1.75;
}

.about-stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    justify-content: center;
}

.stat {
    text-align: center;
    padding: 24px 28px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color 0.4s, box-shadow 0.4s;
    transform-style: preserve-3d;
    will-change: transform;
    cursor: none;
    flex: 1;
}

.stat:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 40px rgba(139, 92, 246, 0.06);
}

.stat-number {
    display: inline;
    font-family: 'Syne', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-plus {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 8px;
    display: block;
}

/* === Contact === */
.contact {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

.contact-wrapper {
    max-width: 640px;
    margin: 0 auto;
}

.contact-info-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.contact-info-col {
    display: flex;
    flex-direction: row;
    gap: 24px;
    margin-bottom: 48px;
    justify-content: center;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 24px 20px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    flex: 1;
    transition: border-color 0.4s, box-shadow 0.4s;
    transform-style: preserve-3d;
    will-change: transform;
    cursor: none;
}

.contact-item:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 40px rgba(139, 92, 246, 0.06);
}

.contact-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-subtle);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    background: rgba(139, 92, 246, 0.18);
    border-color: var(--border-hover);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.contact-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--accent-light);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
    transition: all 0.3s ease;
    outline: none;
    cursor: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle), 0 0 30px rgba(139, 92, 246, 0.1);
    background: var(--bg-card);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

/* === Footer === */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-content p {
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

/* === Animations === */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.portfolio-card.reveal:nth-child(1) { transition-delay: 0s; }
.portfolio-card.reveal:nth-child(2) { transition-delay: 0.15s; }
.portfolio-card.reveal:nth-child(3) { transition-delay: 0.3s; }
.portfolio-card.reveal:nth-child(4) { transition-delay: 0.45s; }
.portfolio-card.reveal:nth-child(5) { transition-delay: 0.6s; }

/* === Responsive === */

/* Large screens */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    .hero-headline {
        font-size: 6rem;
    }

    .hero-content {
        max-width: 1050px;
    }

    .hero-ring {
        width: 650px;
        height: 650px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1500px;
    }

    .hero-headline {
        font-size: 7rem;
    }

    .hero-content {
        max-width: 1200px;
    }

    .hero-ring {
        width: 750px;
        height: 750px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .hero-ring {
        width: 400px;
        height: 400px;
    }

    .hero-glow {
        width: 500px;
        height: 500px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .container { padding: 0 24px; }

    .portfolio, .about, .contact { padding: 90px 0; }

    .section-header { margin-bottom: 44px; }
}

/* Mobile */
@media (max-width: 768px) {
    /* Cursor off */
    body { cursor: auto; }
    .cursor, .cursor-glow { display: none; }
    a, button, input, textarea, .stat, .contact-item, .portfolio-card { cursor: auto; }

    /* Disable 3D tilt & magnetic on touch */
    [data-tilt], [data-magnetic] {
        transform: none !important;
    }

    .container { padding: 0 20px; }

    /* Nav */
    .nav-toggle { display: flex; cursor: auto; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75vw;
        max-width: 300px;
        height: 100dvh;
        background: rgba(12, 12, 20, 0.97);
        flex-direction: column;
        padding: 100px 32px 32px;
        gap: 4px;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-left: 1px solid var(--border);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
    }

    .nav-links.active { right: 0; }

    .nav-links li { width: 100%; }

    .nav-links a {
        font-size: 1.1rem;
        padding: 14px 0;
        cursor: auto;
        display: block;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }

    .nav-links .nav-cta {
        background: none;
        border: none;
        border-bottom: 1px solid var(--border);
        padding: 14px 0;
        border-radius: 0;
        margin-top: 0;
    }

    /* Hero */
    .hero {
        min-height: 100dvh;
        padding: 120px 0 60px;
    }

    .hero-headline {
        font-size: clamp(2.2rem, 10vw, 3.4rem);
        letter-spacing: -1.5px;
    }

    .nowrap { white-space: normal; }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 36px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 7px 16px 7px 12px;
        margin-bottom: 28px;
    }

    .hero-ring {
        width: 300px;
        height: 300px;
    }

    .hero-glow {
        width: 350px;
        height: 350px;
    }

    .hero-scroll-cue { display: none; }

    .hero-buttons .btn {
        cursor: auto;
        padding: 11px 22px;
        font-size: 0.8rem;
    }

    /* Sections */
    .portfolio, .about, .contact { padding: 72px 0; }
    .section-header { margin-bottom: 36px; }

    .section-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
        letter-spacing: -1px;
    }

    .section-desc { font-size: 0.95rem; }

    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-image { height: 200px; }

    /* iframe scale handled by JS */

    .card-info {
        padding: 20px 22px 24px;
    }

    .card-info h3 { font-size: 1.15rem; }
    .card-info p { font-size: 0.85rem; margin-bottom: 14px; }

    .card-arrow {
        opacity: 1;
        transform: translate(0, 0);
    }

    /* About */
    .about-inner { max-width: 100%; }

    .about-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .about-stats {
        gap: 12px;
        flex-wrap: wrap;
        padding-top: 32px;
        margin-top: 32px;
    }

    .stat {
        padding: 20px 16px;
        min-width: 0;
    }

    .stat-number { font-size: 2rem; }
    .stat-plus { font-size: 1.4rem; }
    .stat-label { font-size: 0.75rem; }

    /* Contact */
    .contact-info-row { gap: 12px; }

    .contact-info-col {
        flex-direction: column;
        gap: 12px;
    }

    .contact-item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 16px 20px;
        gap: 16px;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .contact-item h4 { font-size: 0.85rem; }
    .contact-item p { font-size: 0.8rem; }

    .form-row { grid-template-columns: 1fr; }

    .form-group input,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px; /* prevents iOS zoom on focus */
        cursor: auto;
    }

    .btn-full { padding: 14px 24px; font-size: 0.88rem; }

    /* Footer */
    .footer { padding: 32px 0; }
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    /* Orbs smaller on mobile */
    .orb-1 { width: 300px; height: 300px; }
    .orb-2 { width: 250px; height: 250px; }
    .orb-3 { width: 200px; height: 200px; }
}

/* Small phones */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.8rem;
        letter-spacing: -0.5px;
    }

    .hero-desc { font-size: 0.92rem; }

    .about-stats { flex-direction: column; gap: 10px; }

    .contact-info-row { flex-direction: column; }

    .card-image { height: 180px; }

    /* iframe scale handled by JS */

    .section-title { font-size: 1.5rem; }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(32px + env(safe-area-inset-bottom));
    }

    .nav-links {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal { opacity: 1; transform: none; }
    .split-line { opacity: 1; transform: none; }
}
