/* ================================
   CSS CUSTOM PROPERTIES
   ================================ */
:root {
    /* Colors - Dark Mode */
    --bg-primary: #0A0A0A;
    --bg-secondary: #141414;
    --bg-elevated: #1E1E1E;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --accent-primary: #6366F1;
    --accent-secondary: #EC4899;
    --accent-tertiary: #10B981;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #EC4899 50%, #F59E0B 100%);
    --gradient-hover: linear-gradient(180deg, rgba(99,102,241,0.1) 0%, rgba(236,72,153,0.1) 100%);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Satoshi', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 120px;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
}

/* Light Mode */
[data-theme="light"] {
    --bg-primary: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --bg-elevated: #F3F4F6;
    --text-primary: #171717;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --accent-primary: #5B5FC7;
    --accent-secondary: #DB2777;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ================================
   RESET & BASE STYLES
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* DEBUG: Show all element boundaries */
/* * { outline: 1px solid red !important; } */

html {
    scroll-behavior: initial;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ================================
   CUSTOM CURSOR
   ================================ */

/* Hide default cursor on desktop */
body {
    cursor: none;
}

a, button, input, textarea, select, [role="button"], .project-card, .skill-card, .feature-card, .tech-tag {
    cursor: none !important;
}

/* Show default cursor on mobile */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    a, button, input, textarea, select, [role="button"] {
        cursor: pointer !important;
    }

    input, textarea, select {
        cursor: text !important;
    }
}

.cursor,
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--accent-primary);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cursor.active {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.3);
}

/* Hide cursor on mobile */
@media (max-width: 768px) {
    .cursor,
    .cursor-follower {
        display: none;
    }
}

/* Hide custom cursor on confetti screen */
body.confetti-active .cursor,
body.confetti-active .cursor-follower {
    display: none !important;
}

/* Light theme cursor colors */
[data-theme="light"] .cursor {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f59e0b 100%);
    mix-blend-mode: normal;
}

[data-theme="light"] .cursor-follower {
    background: transparent !important;
    border: none;
    mix-blend-mode: normal;
}

[data-theme="light"] .cursor-follower::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f59e0b 100%);
    -webkit-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: 1;
}

[data-theme="light"] .cursor.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(236, 72, 153, 0.3) 50%, rgba(245, 158, 11, 0.3) 100%);
}

/* ================================
   PRELOADER
   ================================ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loader-logo {
    margin-bottom: -20px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.loader-logo .logo-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loader-logo .logo-bracket {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    opacity: 0.7;
}

.loader-logo .logo-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.loader-logo .logo-signature {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.6;
    letter-spacing: 0.5px;
    margin-left: 27px;
    margin-top: -9px;
}

.logo-gradient-loader {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loader-counter {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ================================
   NAVIGATION
   ================================ */
.nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-width);
    padding: 20px 40px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: transform 0.3s ease, background 0.3s ease;
    box-sizing: border-box;
}

[data-theme="light"] .nav {
    background: rgba(250, 250, 250, 0.8);
}

.nav.hidden {
    transform: translate(-50%, -100%);
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.logo-main {
    display: flex;
    align-items: center;
    gap: 5px;
}

.logo-signature {
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.6;
    letter-spacing: 0.5px;
    margin-left: 18px;
    margin-top: -4px;
}

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

.logo-name {
    color: var(--text-primary);
}

.logo-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

.sun-icon,
.moon-icon {
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

[data-theme="dark"] .sun-icon {
    transform: rotate(180deg);
    opacity: 0;
}

[data-theme="dark"] .moon-icon {
    transform: rotate(0);
    opacity: 1;
}

[data-theme="light"] .sun-icon {
    transform: rotate(0);
    opacity: 1;
}

[data-theme="light"] .moon-icon {
    transform: rotate(-180deg);
    opacity: 0;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 24px;
}

.nav-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

.nav-mobile-menu {
    display: none;
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 100px 0 80px;
}

.hero-main-view {
    width: 100%;
}

.hero-visual-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hero {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: auto;
        height: 100svh;
        padding: 0;
        align-items: stretch;
    }

    .hero-visual-mobile {
        display: none !important;
        height: 0;
        min-height: 0;
        max-height: 0;
        overflow: hidden;
    }

    .hero-main-view {
        position: relative;
        height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        padding: 0;
    }

    .hero-content-wrapper {
        display: flex;
        flex-direction: column;
        gap: 50px;
        width: 100%;
    }

    .hero-visual {
        display: none !important;
    }

    .hero-visual-mobile {
        display: none;
    }

    .hero-badge {
        margin-top: 0;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#particleCanvas {
    width: 100%;
    height: 100%;
}

.canvas-hint {
    display: none;
}

@media (max-width: 768px) {
    .canvas-hint {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-family: 'Courier New', monospace;
        font-size: 0.85rem;
        color: var(--text-secondary);
        opacity: 0.7;
        pointer-events: none;
        animation: hintPulse 2s ease-in-out infinite;
        z-index: 10;
        margin-top: 100px;
    }

    @keyframes hintPulse {
        0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) translateY(0); }
        50% { opacity: 1; transform: translate(-50%, -50%) translateY(-5px); }
    }

    .canvas-hint.hide {
        animation: fadeOut 0.5s ease forwards;
    }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        padding: 0 40px;
        gap: 0;
    }
}

.hero-content {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.5s;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: var(--bg-elevated);
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 30px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-tertiary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.title-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 80px;
}

.stat-item {
    text-align: left;
    flex-shrink: 0;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    .mobile-break {
        display: inline;
    }
}

.hero-visual {
    position: relative;
    height: 600px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.8s;
}

@media (max-width: 768px) {
    .hero-visual {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 80px 0;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

#threeCanvas {
    width: 100%;
    height: 100%;
}

/* Interactive Grid Styles */
.interactive-grid {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    --grid-gap: 12px;
}

.grid-container {
    display: flex;
    flex-direction: column;
    gap: var(--grid-gap);
}

.grid-row {
    display: flex;
    gap: var(--grid-gap);
}

.grid-cell {
    --cell-size: 24px;
    width: var(--cell-size);
    height: var(--cell-size);
    background: var(--gradient-primary);
    border-radius: 50%;
    will-change: transform;
    cursor: pointer;
    position: relative;
}

.grid-cell::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.8),
        rgba(236, 72, 153, 0.8),
        rgba(245, 158, 11, 0.8));
    opacity: 0;
    filter: blur(6px);
    z-index: -1;
}

.grid-cell:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

.grid-row {
    animation-delay: calc(var(--row-index) * 0.15s);
}

.grid-row .grid-cell::before {
    animation: gridGradientSweep 3s ease-in-out infinite;
    animation-delay: calc(var(--cell-index) * 0.1s);
}

@keyframes gridGradientSweep {
    0%, 60% {
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
}

/* Responsive grid sizing */
@media (max-width: 768px) {
    .interactive-grid {
        --grid-gap: 8px;
    }

    .grid-cell {
        --cell-size: 18px;
    }
}

@media (max-width: 480px) {
    .interactive-grid {
        --grid-gap: 6px;
    }

    .grid-cell {
        --cell-size: 14px;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.2s;
}

@media (max-width: 768px) {
    .scroll-indicator {
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0;
        margin-bottom: 0;
    }

    .scroll-text {
        display: none;
    }
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--text-secondary);
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.scroll-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
}

/* ================================
   BUTTONS
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-text,
.btn-icon {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.btn-secondary:hover {
    background: var(--accent-primary);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-secondary:hover {
    background: var(--accent-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   SECTIONS
   ================================ */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.container,
.container-case {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 80px;
}

.section-number {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
}

/* ================================
   ABOUT SECTION
   ================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: start;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    mix-blend-mode: multiply;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.image-wrapper:hover .profile-image {
    transform: scale(1.05);
}

.image-wrapper:hover .image-overlay {
    opacity: 0.1;
}

.about-greeting {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 30px;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-specialties {
    margin-bottom: 40px;
}

.about-specialties h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.specialty-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.specialty-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.specialty-icon {
    color: var(--accent-primary);
    font-weight: 700;
}

/* ================================
   WORK SECTION
   ================================ */
.work-filters {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    background: var(--accent-primary);
    transform: translateY(-2px);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.project-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-elevated);
    transition: transform 0.3s ease;
}

.project-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-card:hover,
.project-card.mobile-hover {
    transform: translateY(-10px);
}

.project-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image img,
.project-card.mobile-hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.95) 70%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay,
.project-card.mobile-hover .project-overlay {
    opacity: 1;
}

.project-info {
    width: 100%;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: white;
}

.project-category {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 15px;
}

.link-arrow {
    font-size: 1.5rem;
}

/* Status Badge */
.status-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(236, 72, 153, 0.95) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 20px;
    z-index: 2;
    backdrop-filter: blur(10px);
}

/* Inline status badge (for use in headings) */
.status-badge.inline {
    position: relative;
    top: auto;
    right: auto;
    display: inline-block;
    margin-left: 20px;
    vertical-align: middle;
    font-size: 0.9rem;
    -webkit-text-fill-color: white;
    background-clip: border-box;
    -webkit-background-clip: border-box;
}

/* ================================
   SKILLS SECTION
   ================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.skill-card {
    padding: 40px;
    background: var(--bg-elevated);
    border-radius: 20px;
    transition: var(--transition-smooth);
    position: relative;
}

/* Gradient border effect */
.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1.5px;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.3) 0%,
        rgba(236, 72, 153, 0.3) 50%,
        rgba(245, 158, 11, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

/* Animated gradient glow */
.skill-card::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.2) 0%,
        rgba(236, 72, 153, 0.2) 50%,
        rgba(245, 158, 11, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    filter: blur(15px);
}

.skill-card:hover,
.skill-card.active {
    transform: translateY(-8px);
    box-shadow:
        0 15px 50px rgba(99, 102, 241, 0.25),
        0 25px 70px rgba(236, 72, 153, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.skill-card:hover::before,
.skill-card.active::before {
    opacity: 1;
}

.skill-card:hover::after,
.skill-card.active::after {
    opacity: 1;
}

.skill-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--gradient-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.skill-card:hover .skill-icon,
.skill-card.active .skill-icon {
    transform: scale(1.1) rotate(5deg);
}

.skill-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.skill-description {
    color: var(--text-secondary);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.tech-stack {
    text-align: center;
    margin-top: 80px;
}

.tech-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 50px;
    color: var(--text-primary);
    font-weight: 700;
}

.tech-tags {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.tech-tag {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-elevated);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Logo image - shown by default */
.tech-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 1;
    z-index: 2;
}

/* Tech name - text wordmark, hidden by default */
.tech-name {
    position: absolute;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-name svg {
    max-width: 90%;
    max-height: 50%;
    transition: all 0.5s ease;
}

/* Gradient border effect */
.tech-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1.5px;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.3) 0%,
        rgba(236, 72, 153, 0.3) 50%,
        rgba(245, 158, 11, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Animated gradient glow */
.tech-tag::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.2) 0%,
        rgba(236, 72, 153, 0.2) 50%,
        rgba(245, 158, 11, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    filter: blur(15px);
}

/* Hover state - Logo fades out, text fades in */
.tech-tag:hover,
.tech-tag.active {
    transform: translateY(-8px) scale(1.08);
    background: rgba(30, 30, 30, 0.95);
    box-shadow:
        0 15px 50px rgba(99, 102, 241, 0.25),
        0 25px 70px rgba(236, 72, 153, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tech-tag:hover::before,
.tech-tag.active::before {
    opacity: 1;
}

.tech-tag:hover::after,
.tech-tag.active::after {
    opacity: 1;
    animation: rotateGradient 4s linear infinite;
}

/* Logo image fades out and scales down on hover */
.tech-tag:hover .tech-logo-img,
.tech-tag.active .tech-logo-img {
    opacity: 0;
    transform: scale(0.5);
}

/* Text wordmark fades in and scales up on hover */
.tech-tag:hover .tech-name,
.tech-tag.active .tech-name {
    opacity: 1;
    transform: scale(1);
}

/* Active state for mobile */
.tech-tag:active {
    transform: translateY(-6px) scale(1.05);
}

/* Gradient rotation animation */
@keyframes rotateGradient {
    0% {
        filter: blur(15px) hue-rotate(0deg);
    }
    100% {
        filter: blur(15px) hue-rotate(360deg);
    }
}

/* Individual tech colors */
.tech-tag[data-tech="claude"] .tech-logo svg {
    color: #D97757;
}

.tech-tag[data-tech="claude"]:hover .tech-logo svg,
.tech-tag[data-tech="claude"].active .tech-logo svg {
    color: #D97757;
}

.tech-tag[data-tech="webflow"] .tech-logo svg {
    color: #4353FF;
}

.tech-tag[data-tech="photoshop"] .tech-logo svg {
    color: #31A8FF;
}

.tech-tag[data-tech="nextjs"] .tech-logo svg {
    color: var(--text-primary);
}

.tech-tag[data-tech="react"] .tech-logo svg {
    color: #61DAFB;
}

.tech-tag[data-tech="gsap"] .tech-logo svg {
    color: #88CE02;
}

.tech-tag[data-tech="figma"] .tech-logo svg {
    color: #F24E1E;
}

.tech-tag[data-tech="javascript"] .tech-logo svg {
    color: #F7DF1E;
}

/* Light mode adjustments */
[data-theme="light"] .tech-tag {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .tech-tag:hover,
[data-theme="light"] .tech-tag.active {
    background: rgba(255, 255, 255, 1);
    box-shadow:
        0 15px 50px rgba(99, 102, 241, 0.15),
        0 25px 70px rgba(236, 72, 153, 0.1),
        inset 0 1px 0 rgba(99, 102, 241, 0.08);
}

.tech-tag .tech-logo svg text {
    fill: var(--bg-primary);
}

[data-theme="light"] .tech-tag .tech-logo svg text {
    fill: var(--text-primary);
}

/* ================================
   CONTACT SECTION
   ================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
}

.contact-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 20px;
}

.contact-text {
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
}

.contact-method svg {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.social-link:hover {
    background: var(--accent-primary);
    transform: translateY(-5px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

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

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-40px);
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.form-label {
    position: absolute;
    top: 18px;
    left: 20px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: var(--transition-smooth);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-tertiary);
    display: block;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    display: block;
}

/* ================================
   FOOTER
   ================================ */
.footer {
    padding: 80px 0 40px;
    background: var(--bg-elevated);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 80px;
    margin-bottom: 60px;
}

/* Footer Brand */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand .logo-container {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand .logo-main {
    font-family: var(--font-heading);
}

.footer-brand .logo-bracket {
    font-size: 1.5rem;
}

.footer-brand .logo-name {
    font-size: 1.5rem;
}

.footer-brand .logo-signature {
    font-size: 0.75rem;
    margin-left: 20px;
    margin-top: -6px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 300px;
    margin-left: 20px;
}

/* Footer Links */
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    width: fit-content;
}

.footer-link:hover {
    color: var(--accent-primary);
    transform: translateX(4px);
}

.footer-link-cta {
    color: var(--accent-primary);
    font-weight: 500;
    margin-top: 0;
}

.footer-link-cta:hover {
    transform: translateX(8px);
}

/* Footer Bottom */
.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright,
.footer-made-by {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-made-by {
    font-style: italic;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .hero-container,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-visual {
        height: 400px;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    /* Footer Tablet */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .hero {
        padding-top: 0;
        padding-bottom: 0;
    }

    .about {
        margin-top: 40px;
        padding-top: 0;
        padding-bottom: 40px;
    }

    .work {
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .skills {
        padding-bottom: 80px;
    }

    .contact {
        padding-top: 80px;
        padding-bottom: 80px;
    }

    /* Remove bottom margins from last children in sections for consistent spacing */
    .section > .container > *:last-child {
        margin-bottom: 0 !important;
    }

    .hero-stats {
        margin-bottom: 0 !important;
    }

    .container,
    .container-case {
        padding: 0 40px;
    }

    .loader-logo {
        margin-bottom: -60px;
    }

    .nav {
        padding: 20px 40px;
    }

    .nav-list {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-mobile-menu {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-primary);
        padding: 40px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .nav-mobile-menu.active {
        display: block;
        transform: translateX(0);
    }

    .nav-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 30px;
        list-style: none;
    }

    .nav-mobile-list .nav-link {
        font-size: 1.5rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .hero {
        padding: 80px 0 50px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        width: 100%;
    }

    .stat-number {
        font-size: 2rem;
    }

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

    .specialty-list {
        grid-template-columns: 1fr;
    }

    .work-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .tech-tags {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        max-width: 600px;
    }

    .tech-logo {
        width: 40px;
        height: 40px;
    }

    .tech-name {
        font-size: 0.75rem;
    }

    .tech-title {
        font-size: 1.5rem;
        margin-bottom: 40px;
    }

    /* Footer Mobile */
    .footer {
        padding: 60px 0 30px;
    }

    .footer-content {
        gap: 50px;
        margin-bottom: 40px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-brand {
        text-align: left;
    }

    .footer-tagline {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .tech-tags {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 400px;
    }

    .tech-logo {
        width: 35px;
        height: 35px;
    }

    .tech-name {
        font-size: 0.7rem;
    }

    .tech-title {
        font-size: 1.3rem;
    }

    /* Footer Small Mobile */
    .footer-logo {
        font-size: 1.25rem;
    }

    .footer-heading {
        font-size: 0.8rem;
    }

    .footer-link {
        font-size: 0.9rem;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* ================================
   CONFETTI CELEBRATION
   ================================ */
.contact.section {
    position: relative;
    min-height: 600px;
}

.contact .container {
    position: relative;
    z-index: 2;
}

.pricing-hero {
    align-items: center;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
    min-height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.pricing-hero__content {
    padding-bottom: 0;
    padding-top: max(4rem, min(10.7443vw + 1.4818rem, 14.375rem));
    text-align: center;
    width: 100%;
    pointer-events: none;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}

.confetti-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #6366F1 0%, #EC4899 25%, #6366F1 50%, #EC4899 75%, #6366F1 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s linear infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.confetti-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.confetti-instructions {
    font-size: 0.95rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 40px;
}

.confetti-back-btn {
    pointer-events: all;
    margin: 0 auto;
    margin-top: auto;
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .pricing-hero__content {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 100vh;
        padding-top: 120px;
        padding-bottom: 40px;
    }

    .confetti-back-btn {
        margin-top: auto;
    }

    .pricing-hero {
        overflow: hidden;
        touch-action: none;
    }
}

.pricing-hero__flair {
    display: block;
    margin: max(2rem, min(2.0712vw + 1.51456rem, 4rem)) auto
        max(2rem, min(6.21359vw + 0.543689rem, 8rem));
    width: 100%;
}

.pricing-hero__hand {
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    width: 30px;
    z-index: 4;
}

.pricing-hero__hand small {
    left: -60%;
    position: absolute;
    top: 20px;
    width: 200%;
}

.pricing-hero__drag,
.pricing-hero__rock {
    position: absolute;
    z-index: 4;
}

.pricing-hero__rock,
.pricing-hero__drag {
    max-width: 141%;
    opacity: 0;
    right: 1px;
    top: -22px;
    width: 131%;
}

.pricing-hero__drag {
    opacity: 1;
}

.pricing-hero__handle {
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: -40px;
    width: 100%;
}

.pricing-hero__canvas {
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}

.pricing-hero__canvas,
.pricing-hero__proxy {
    bottom: 0;
    height: 100%;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
}

.pricing-hero__proxy {
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: all;
}

.explosion-img {
    will-change: transform;
}

.explosion-img {
    will-change: transform;
    pointer-events: none;
}

/* ================================
   UTILITIES
   ================================ */
.hidden {
    display: none !important;
}

.no-scroll {
    overflow: hidden;
}
