:root {
    --bg-color: #030303;
    --bg-alt: #0a0a0a;
    --text-primary: #f8f8f8;
    --text-secondary: #888888;
    --accent-color: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.04);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Noise Texture Overlay */
.noise-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Cursor */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-primary);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo), background-color 0.3s var(--ease-out-expo);
}

.cursor-outline {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo), background-color 0.3s var(--ease-out-expo), border-color 0.3s var(--ease-out-expo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #111;
    text-transform: uppercase;
    font-family: var(--font-heading);
    opacity: 0; /* Default hidden until mouse moves */
}

.cursor-outline.hovering {
    width: 55px;
    height: 55px;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
}

.cursor-outline.project-hover {
    width: 90px;
    height: 90px;
    background-color: #fff;
    border-color: #fff;
    mix-blend-mode: normal;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.05;
}

a {
    text-decoration: none;
    color: inherit;
}

.highlight {
    color: var(--text-primary);
    font-style: italic;
    font-weight: 300;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 0.2em;
    margin-bottom: -0.2em;
    display: inline-block;
}

/* Header */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: transform 0.6s var(--ease-out-expo), background 0.6s ease, padding 0.6s ease;
}

.header.scrolled {
    background: rgba(3, 3, 3, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    padding: 1.25rem 5%;
}

.header.header-hidden {
    transform: translateY(-100%);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-subtitle {
    font-family: var(--font-body);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 5px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.2);
}

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

.nav-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0%; height: 1px;
    background-color: var(--text-primary);
    transition: width 0.3s var(--ease-out-expo);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.menu-btn span {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #fff;
    left: 0;
    transition: all 0.3s ease;
}

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

/* Sections */
section {
    padding: 10rem 5%;
}

.section-header {
    max-width: 800px;
    margin-bottom: 6rem;
}

.section-title {
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.section-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.8;
}

/* Pill Badge */
.pill-badge {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.pill-badge:hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
}

.pill-badge a {
    color: #fff;
    font-weight: 600;
    position: relative;
}

.pill-badge a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; width: 100%; height: 1px;
    background-color: #fff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.pill-badge a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hero */
.hero {
    height: 100vh;
    min-height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 10rem;
}

.hero-content {
    max-width: 1200px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3.5rem, 10vw, 8.5rem);
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

.line-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.2em;
    margin-bottom: -0.2em;
}

.line-inner {
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 4rem;
    font-weight: 300;
    line-height: 1.6;
}

/* Orbs Background */
.hero-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.4;
    mix-blend-mode: screen;
}

.orb-1 {
    width: 600px; height: 600px;
    background: #4f46e5;
    top: -20%; right: -10%;
    animation: drift 20s infinite alternate ease-in-out;
}

.orb-2 {
    width: 700px; height: 700px;
    background: #9333ea;
    bottom: -15%; left: -15%;
    animation: drift 25s infinite alternate-reverse ease-in-out;
}

.orb-3 {
    width: 400px; height: 400px;
    background: #0ea5e9;
    top: 40%; left: 40%;
    animation: drift 30s infinite alternate ease-in-out;
    opacity: 0.25;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(120px, 80px) scale(1.1); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 3.5rem;
    border-radius: 100px;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: transform 0.1s linear; /* Fast response for JS magnetic effect */
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.btn-text {
    position: relative;
    z-index: 2;
    pointer-events: none;
    transition: transform 0.1s linear;
}

/* Infinite Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 3rem 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    white-space: nowrap;
}

.marquee {
    display: inline-flex;
    animation: marquee 40s linear infinite;
}

.marquee span {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    text-transform: uppercase;
    padding: 0 1.5rem;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.15);
    transition: all 0.4s ease;
}

.marquee span:hover {
    color: var(--text-primary);
    -webkit-text-stroke: 1px var(--text-primary);
}

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

/* Bento Box Services */
.services {
    background: var(--bg-alt);
    position: relative;
    z-index: 2;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 340px;
    gap: 1.5rem;
}

.bento-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 3rem;
    transition: background 0.5s ease, transform 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.bento-item:hover {
    background: var(--card-hover);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(155deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
}

.bento-large h3 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.bento-large p {
    font-size: 1.25rem;
    max-width: 85%;
    line-height: 1.6;
}

.bento-wide {
    grid-column: span 2;
}

.bento-icon {
    font-size: 2.5rem;
    margin-bottom: auto;
    background: linear-gradient(135deg, #ffffff, #6b7280);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bento-visual {
    flex: 1;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mock-window {
    width: 70%;
    height: 60%;
    background: rgba(0,0,0,0.5);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.mock-dots {
    display: flex; gap: 6px; padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mock-dots span {
    width: 10px; height: 10px; border-radius: 50%; background: #444;
}
.mock-dots span:nth-child(1) { background: #ff5f56; }
.mock-dots span:nth-child(2) { background: #ffbd2e; }
.mock-dots span:nth-child(3) { background: #27c93f; }

.mock-content {
    padding: 15px; display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.mock-line {
    height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px;
}
.mock-box {
    flex: 1; background: rgba(99, 102, 241, 0.2); border-radius: 6px;
    margin-top: 5px;
}

.bento-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bento-item h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.bento-item p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.5;
}

.bento-content-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    height: 100%;
}

.bento-wide h3 {
    margin-bottom: 0.5rem;
}

.bento-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
}

.stat-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 600;
}

/* Works */
.work {
    background: var(--bg-color);
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 12rem;
}

.project-row {
    display: flex;
    align-items: center;
    gap: 8rem;
}

.project-row.reverse {
    flex-direction: row-reverse;
}

.project-image-link {
    flex: 1.2;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: var(--card-bg);
}

.project-image-wrapper {
    width: 100%;
    padding-top: 70%; /* Aspect Ratio */
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.project-image {
    position: absolute;
    top: -15%; left: -10%;
    width: 120%; height: 130%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1s ease;
    filter: brightness(0.9);
}

.project-image-link:hover .project-image {
    transform: scale(0.95);
    filter: brightness(1.1);
}

.project-info {
    flex: 1;
}

.project-meta {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
}

.project-info h3 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.tags {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--card-border);
    border-radius: 100px;
    color: var(--text-primary);
    background: rgba(255,255,255,0.02);
    font-weight: 500;
}

/* Footer */
.footer {
    padding: 12rem 5% 2rem;
    position: relative;
    overflow: hidden;
    background: var(--bg-alt);
    border-top: 1px solid var(--card-border);
}

.footer-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.footer-glow {
    position: absolute;
    width: 100vw; height: 60vh;
    background: radial-gradient(ellipse at bottom, rgba(79, 70, 229, 0.15), transparent 70%);
    bottom: 0; left: 0;
}

.footer-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.footer-title {
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -3px;
    margin-bottom: 1.5rem;
}

.footer-subtitle {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    font-weight: 300;
    line-height: 1.6;
}

.footer-cta-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-cta-wrapper .btn {
    font-size: 1.5rem;
    padding: 1.75rem 4.5rem;
}

.email-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 450px;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    margin-top: 14rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 3rem;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand {
    font-weight: 500;
}

.footer-credit {
    text-align: center;
}

.credit-link {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.25);
    text-underline-offset: 5px;
    transition: text-decoration-color 0.3s ease;
}

.credit-link:hover {
    text-decoration-color: rgba(255,255,255,1);
}

.social-links {
    display: flex;
    gap: 2.5rem;
}

.social-links a {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Entrance Animations */
.fade-in-up {
    opacity: 0;
}

.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.2s var(--ease-out-expo), transform 1.2s var(--ease-out-expo);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1400px) {
    .project-row {
        gap: 5rem;
    }
}

@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    section {
        padding: 7rem 5%;
    }
    
    .nav {
        display: none; 
    }
    
    .menu-btn {
        display: block;
    }
    
    .project-row, .project-row.reverse {
        flex-direction: column;
        gap: 3rem;
    }
    
    .project-image-link {
        width: 100%;
    }

    .project-info h3 {
        font-size: 3rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    * {
        cursor: auto !important;
    }
    .cursor-dot, .cursor-outline {
        display: none !important;
    }
    .hero {
        min-height: 600px;
    }
    .hero-title {
        letter-spacing: -1px;
    }
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .bento-large, .bento-wide {
        grid-column: span 1;
    }
    .bento-content-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    .footer-cta-wrapper .btn {
        padding: 1.25rem 2rem;
        font-size: 1.2rem;
    }
}
