/* ============================================
   TH3-C0DER PORTFOLIO - COMPLETE REDESIGN
   Ultra-Modern, Anime.js-Powered Experience
   ============================================ */

/* CSS Custom Properties - Design System */
:root {
    /* Colors - Dark Mode (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-glass: rgba(18, 18, 26, 0.7);
    --bg-glass-light: rgba(255, 255, 255, 0.03);

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;

    --accent-primary: #00ff9d;
    --accent-secondary: #00cc7e;
    --accent-tertiary: #00f0ff;
    --accent-glow: rgba(0, 255, 157, 0.3);
    --accent-glow-strong: rgba(0, 255, 157, 0.6);

    --gradient-primary: linear-gradient(135deg, #00ff9d 0%, #00f0ff 100%);
    --gradient-secondary: linear-gradient(135deg, #00cc7e 0%, #00a86b 100%);
    --gradient-bg: radial-gradient(ellipse at top, #1a1a25 0%, #0a0a0f 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);
    --shadow-glow-strong: 0 0 60px var(--accent-glow-strong);

    /* Typography */
    --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 8rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-Index Scale */
    --z-background: -1;
    --z-base: 0;
    --z-content: 10;
    --z-header: 100;
    --z-overlay: 200;
    --z-modal: 300;
    --z-cursor: 9999;
}

/* Light Mode Variables */
.light-mode {
    /* Mint Green Palette */
    --bg-primary: #e6f2ee;
    /* Soft Mint Background */
    --bg-secondary: #f2fbf8;
    /* Mint Cream (Card Backgrounds) */
    --bg-tertiary: #dbece6;
    /* Darker Mint Accent */
    --bg-glass: rgba(242, 251, 248, 0.85);
    --bg-glass-light: rgba(0, 20, 10, 0.03);

    --text-primary: #0a1f18;
    /* Dark Green-Black for better contrast */
    --text-secondary: #3d5c52;
    /* Muted Green-Gray */
    --text-muted: #6e8f85;

    --accent-primary: #00cc7e;
    /* Kept existing green accent */
    --accent-secondary: #00a86b;
    --accent-tertiary: #00b8d4;
    --accent-glow: rgba(0, 204, 126, 0.2);
    --accent-glow-strong: rgba(0, 204, 126, 0.4);

    --gradient-bg: radial-gradient(ellipse at top, #f2fbf8 0%, #dbece6 100%);

    --shadow-sm: 0 2px 8px rgba(0, 20, 10, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 20, 10, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 20, 10, 0.1);
}

/* ============================================
   BASE RESET & GLOBAL STYLES
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-secondary);
    background: var(--gradient-bg);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    cursor: none;
    /* Hide default cursor */
    transition: background var(--transition-slow), color var(--transition-base);
}

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Selection Color */
::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
    cursor: text;
}

/* Force custom cursor on interactive elements */
a,
button,
input[type="submit"],
input[type="button"],
.interactive,
.nav-link,
.theme-switch,
.menu-toggle,
.project-card,
.social-link {
    cursor: none !important;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */

.cursor-wrapper {
    pointer-events: none;
    position: fixed;
    z-index: var(--z-cursor);
    mix-blend-mode: difference;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, opacity 0.2s;
    z-index: var(--z-cursor);
}

.cursor-outline {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    z-index: calc(var(--z-cursor) - 1);
}

.cursor-trail {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 157, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: calc(var(--z-cursor) - 2);
}

/* Cursor States */
body.cursor-hover .cursor-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
}

body.cursor-hover .cursor-outline {
    width: 60px;
    height: 60px;
    border-color: var(--accent-primary);
}

body.cursor-click .cursor-dot {
    transform: translate(-50%, -50%) scale(0.5);
}

body.cursor-click .cursor-outline {
    transform: translate(-50%, -50%) scale(0.8);
}

/* Hide cursor on touch devices */
@media (hover: none) {
    .cursor-wrapper {
        display: none;
    }
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.gradient-orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-tertiary);
    bottom: -100px;
    right: -100px;
    animation-delay: -7s;
}

.gradient-orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.95);
    }

    75% {
        transform: translate(-50px, -20px) scale(1.02);
    }
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.light-mode .gradient-orb {
    opacity: 0.2;
    filter: blur(100px);
}

.light-mode #particle-canvas {
    opacity: 0.3;
}

/* ============================================
   NAVIGATION
   ============================================ */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    padding: var(--space-md) var(--space-lg);
    transition: all var(--transition-base);
}

.main-header.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gradient-primary);
    padding: 2px;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-md) - 2px);
}

.logo-text {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--space-sm) 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.contact-btn {
    background: var(--bg-glass-light);
    padding: var(--space-sm) var(--space-md) !important;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary) !important;
    border-color: var(--accent-primary);
}

.contact-btn::after {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.theme-switch {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-glass-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all var(--transition-base);
}

.theme-switch i {
    position: absolute;
    font-size: 1.1rem;
    transition: all var(--transition-base);
}

.theme-switch .fa-moon {
    color: var(--text-secondary);
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.theme-switch .fa-sun {
    color: #ffd93d;
    opacity: 0;
    transform: translateY(20px) rotate(-90deg);
}

.light-mode .theme-switch .fa-moon {
    opacity: 0;
    transform: translateY(-20px) rotate(90deg);
}

.light-mode .theme-switch .fa-sun {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.theme-switch:hover {
    background: var(--accent-glow);
    border-color: var(--accent-primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: var(--bg-glass-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    gap: 5px;
    transition: all var(--transition-base);
    position: relative;
    z-index: 201;
    /* Ensure above nav-links overlay */
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: calc(var(--z-header) - 1);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-2xl) var(--space-lg);
}

/* Parallax Layers */
.parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-primary);
    top: 10%;
    left: 5%;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--accent-tertiary);
    top: 60%;
    right: 10%;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent-secondary);
    top: 30%;
    right: 20%;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: var(--accent-primary);
    bottom: 20%;
    left: 15%;
}

.shape-5 {
    width: 80px;
    height: 80px;
    background: var(--accent-tertiary);
    top: 50%;
    left: 50%;
}

/* Dynamic Centerpiece - Morphing Orb */
.centerpiece-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-base);
}

.orb-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb-core {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 30% 30%,
            var(--accent-primary) 0%,
            var(--accent-secondary) 50%,
            transparent 100%);
    border-radius: 50%;
    filter: blur(1px);
    animation: orbPulse 4s ease-in-out infinite;
}

.orb-ring {
    position: absolute;
    border: 2px solid;
    border-radius: 50%;
    opacity: 0.3;
}

.ring-1 {
    width: 180px;
    height: 180px;
    border-color: var(--accent-primary);
    animation: ringRotate 10s linear infinite;
}

.ring-2 {
    width: 240px;
    height: 240px;
    border-color: var(--accent-tertiary);
    animation: ringRotate 15s linear infinite reverse;
}

.ring-3 {
    width: 300px;
    height: 300px;
    border-color: var(--accent-secondary);
    animation: ringRotate 20s linear infinite;
    border-style: dashed;
}

.orb-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow-strong) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes orbPulse {

    0%,
    100% {
        transform: scale(1);
        filter: blur(1px) brightness(1);
    }

    50% {
        transform: scale(1.1);
        filter: blur(2px) brightness(1.2);
    }
}

@keyframes ringRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: var(--z-content);
    text-align: center;
    max-width: 900px;
    padding: 0 var(--space-lg);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
    opacity: 0;
    transform: translateY(20px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--accent-glow-strong);
    }

    50% {
        box-shadow: 0 0 0 8px transparent;
    }
}

.badge-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
    overflow: hidden;
}

.char-wrapper {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
}

.title-highlight .highlight-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.word-animate {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    margin: 0 0.2em;
}

.word-animate.accent {
    color: var(--accent-primary);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
}

/* Buttons */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-full);
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-base);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
}

.btn-primary .btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn-primary:hover .btn-bg {
    opacity: 1;
}

.btn-primary .btn-text,
.btn-primary .btn-icon {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: var(--bg-glass);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-icon {
    transition: transform var(--transition-base);
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Magnetic Button Effect */
.magnetic-btn {
    transition: transform var(--transition-fast);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 2s;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(12px);
    }
}

.scroll-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects-section {
    padding: var(--space-2xl) var(--space-lg);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--space-md);
    opacity: 0;
    transform: translateY(20px);
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
}

.title-word.accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(50px);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            var(--accent-glow) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.project-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--gradient-primary);
    color: var(--bg-primary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .card-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover .image-overlay {
    opacity: 0.8;
}

.overlay-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform var(--transition-bounce);
}

.overlay-icon i {
    color: var(--bg-primary);
    font-size: 1.5rem;
}

.project-card:hover .overlay-icon {
    transform: scale(1);
}

.card-info {
    padding: var(--space-lg);
}

.card-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    transition: color var(--transition-fast);
}

.project-card:hover .card-title {
    color: var(--accent-primary);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.tag {
    background: var(--bg-glass-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.card-link i {
    transition: transform var(--transition-base);
}

.card-link:hover i {
    transform: translateX(4px);
}

/* Featured Card Styling */
.featured-card {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--bg-glass) 0%, rgba(0, 255, 157, 0.05) 100%);
    border: 2px solid var(--accent-primary);
}

.featured-card .card-image {
    height: 280px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
    padding: var(--space-2xl) var(--space-lg);
    position: relative;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about-visual {
    position: relative;
}

.visual-frame {
    position: relative;
    padding: var(--space-md);
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.frame-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-md);
    opacity: 0.3;
}

.code-block {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-header {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-tertiary);
}

.code-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27ca40;
}

.code-content {
    padding: var(--space-lg);
    font-family: 'Fira Code', 'SF Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-keyword {
    color: #ff79c6;
}

.code-variable {
    color: #8be9fd;
}

.code-property {
    color: #50fa7b;
}

.code-string {
    color: #f1fa8c;
}

.about-content {
    opacity: 0;
    transform: translateX(50px);
}

.about-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.social-links {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.social-link {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.25rem;
    text-decoration: none;
    transition: all var(--transition-base);
    overflow: hidden;
}

.link-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-glow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-base);
}

.social-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.social-link:hover .link-glow {
    width: 100%;
    height: 100%;
}

.coffee-link:hover {
    color: #ff813f;
    border-color: #ff813f;
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
    position: relative;
    background: var(--bg-secondary);
    margin-top: var(--space-xl);
}

.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(-99%);
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 60px;
    fill: var(--bg-secondary);
}

.footer-content {
    padding-top: var(--space-lg);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-primary);
}

/* ============================================
   CONTACT MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transform: translateY(50px) scale(0.9);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    background: var(--bg-glass-light);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.modal-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    padding-top: var(--space-lg);
    background: var(--bg-glass-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group label {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all var(--transition-fast);
}

.form-group textarea~label {
    top: var(--space-lg);
    transform: translateY(0);
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:focus~label,
.form-group textarea:not(:placeholder-shown)~label {
    top: var(--space-sm);
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.form-group input:focus~.input-highlight,
.form-group textarea:focus~.input-highlight {
    width: 100%;
}

.submit-btn {
    position: relative;
    width: 100%;
    padding: var(--space-md);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--bg-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-base);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.submit-btn .btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid transparent;
    border-top-color: var(--bg-primary);
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 50px;
    height: 50px;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--accent-primary);
    font-size: 1rem;
    cursor: pointer;
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-5px);
}

.progress-ring {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 54px;
    height: 54px;
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 2;
    stroke-dasharray: 100.53;
    stroke-dashoffset: 100.53;
    transition: stroke-dashoffset var(--transition-fast);
}

/* ============================================
   PAGE TRANSITION
   ============================================ */

.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
}

.transition-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateY(100%);
}

.transition-layer:nth-child(1) {
    background: var(--accent-primary);
}

.transition-layer:nth-child(2) {
    background: var(--accent-secondary);
}

.transition-layer:nth-child(3) {
    background: var(--bg-primary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .featured-card {
        grid-column: span 1;
    }

    .featured-card .card-image {
        height: 200px;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .about-visual {
        order: 2;
    }

    .about-content {
        order: 1;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 3rem;
        --space-2xl: 5rem;
    }

    .main-header {
        padding: var(--space-sm) var(--space-md);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: var(--bg-glass);
        /* Glass effect */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-lg);
        transition: right var(--transition-base);
        z-index: var(--z-overlay);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.25rem;
    }

    .menu-toggle {
        display: flex;
    }

    .centerpiece-container {
        width: 300px;
        height: 300px;
    }

    .orb-wrapper {
        width: 200px;
        height: 200px;
    }

    .orb-core {
        width: 80px;
        height: 80px;
    }

    .ring-1 {
        width: 120px;
        height: 120px;
    }

    .ring-2 {
        width: 160px;
        height: 160px;
    }

    .ring-3 {
        width: 200px;
        height: 200px;
    }

    .orb-glow {
        width: 130px;
        height: 130px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .card-info {
        padding: var(--space-md);
    }

    .card-title {
        font-size: 1.25rem;
    }

    .modal-container {
        padding: var(--space-lg);
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gradient-orb,
    .orb-core,
    .orb-ring,
    .orb-glow {
        animation: none;
    }
}

/* ============================================
   CONTACT SECTION (INLINE)
   ============================================ */

.contact-section {
    padding: var(--space-2xl) var(--space-lg);
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-2xl);
    align-items: center;
}

.contact-info {
    padding-right: var(--space-xl);
}

.contact-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

.contact-title .title-word {
    display: block;
}

.contact-title .accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.contact-method:hover {
    border-color: var(--accent-primary);
    transform: translateX(10px);
}

.method-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.method-details {
    display: flex;
    flex-direction: column;
}

.method-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.method-value {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

a.method-value:hover {
    color: var(--accent-primary);
}

.contact-social {
    margin-top: var(--space-lg);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.contact-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-form .form-group {
    position: relative;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--space-md) 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-secondary);
    transition: border-color var(--transition-base);
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-primary);
}

.contact-form label {
    position: absolute;
    left: 0;
    top: var(--space-md);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all var(--transition-base);
}

.contact-form input:focus~label,
.contact-form input:not(:placeholder-shown)~label,
.contact-form textarea:focus~label,
.contact-form textarea:not(:placeholder-shown)~label {
    top: calc(var(--space-sm) * -1);
    font-size: 0.75rem;
    color: var(--accent-primary);
}

.contact-form .input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.contact-form input:focus~.input-line,
.contact-form textarea:focus~.input-line {
    width: 100%;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .submit-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.contact-form .submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.contact-form .submit-btn .btn-icon {
    transition: transform var(--transition-base);
}

.contact-form .submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

.contact-form .submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.contact-form .submit-btn.success {
    background: #00cc7e;
}

/* Contact section responsive */
@media (max-width: 1024px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .contact-info {
        padding-right: 0;
        text-align: center;
    }

    .contact-title .title-word {
        display: inline;
    }

    .contact-social {
        justify-content: center;
    }

    .contact-form .submit-btn {
        align-self: center;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: var(--space-xl) var(--space-md);
    }

    .contact-form-wrapper {
        padding: var(--space-lg);
    }

    .contact-method {
        padding: var(--space-sm);
    }

    .method-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}