/* ========================================
   Custom Properties & Reset
   ======================================== */
:root {
    /* Colors */
    --color-bg: #0a0a0f;
    --color-bg-secondary: #12121a;
    --color-bg-tertiary: #1a1a25;
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-secondary: #22d3ee;
    --color-accent: #f472b6;
    --color-text: #e2e8f0;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-success: #10b981;
    --color-error: #ef4444;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --gradient-text: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary));
    --gradient-card: linear-gradient(145deg, var(--color-bg-secondary), var(--color-bg-tertiary));

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

    /* Container */
    --container-max: 1200px;
    --container-padding: 2rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

/* Selection */
::selection {
    background: var(--color-primary);
    color: white;
}

/* Links & Buttons */
a {
    color: inherit;
    text-decoration: none;
}

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

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

ul, ol {
    list-style: none;
}

/* ========================================
   Layout
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

section {
    padding: var(--space-4xl) 0;
    position: relative;
}

/* ========================================
   NO LOADER - Content visible immediately
   ======================================== */
.loader {
    display: none !important;
}

/* ========================================
   Floating Decorative Elements
   ======================================== */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    animation: float-rotate 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -5%;
    border-color: rgba(99, 102, 241, 0.15);
    animation-duration: 25s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -3%;
    border-color: rgba(34, 211, 238, 0.15);
    animation-duration: 20s;
    animation-direction: reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 30%;
    right: 10%;
    border-color: rgba(244, 114, 182, 0.1);
    animation-duration: 18s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 5%;
    border-color: rgba(99, 102, 241, 0.2);
    animation-duration: 15s;
    animation-direction: reverse;
}

.shape-5 {
    width: 250px;
    height: 250px;
    top: 70%;
    left: 30%;
    border-color: rgba(34, 211, 238, 0.1);
    animation-duration: 30s;
}

.shape-6 {
    width: 180px;
    height: 180px;
    top: 5%;
    right: 25%;
    border-color: rgba(244, 114, 182, 0.15);
    animation-duration: 22s;
    animation-direction: reverse;
}

@keyframes float-rotate {
    0%, 100% {
        transform: rotate(0deg) translateY(0) scale(1);
    }
    25% {
        transform: rotate(90deg) translateY(-20px) scale(1.05);
    }
    50% {
        transform: rotate(180deg) translateY(0) scale(1);
    }
    75% {
        transform: rotate(270deg) translateY(20px) scale(0.95);
    }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: orb-float 15s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    top: 0;
    left: 10%;
    animation-duration: 20s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.12) 0%, transparent 70%);
    top: 50%;
    right: 5%;
    animation-duration: 18s;
    animation-delay: -5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.1) 0%, transparent 70%);
    bottom: 10%;
    left: 20%;
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes orb-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translate(20px, 30px) scale(1.05);
        opacity: 0.6;
    }
}

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

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease;
}

.cursor.active {
    transform: translate(-50%, -50%) scale(0.5);
}

.cursor-follower.active {
    width: 60px;
    height: 60px;
    border-color: var(--color-secondary);
}

@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none;
    }
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-lg) 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: var(--space-md) 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

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

.nav-menu {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

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

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

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

.nav-toggle {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.hamburger {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

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

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

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 0 var(--container-padding);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: #ffffff;
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.5),
                 0 0 80px rgba(99, 102, 241, 0.3),
                 0 4px 20px rgba(0, 0, 0, 0.8);
}

.title-line {
    display: block;
}

.name-highlight {
    background: linear-gradient(135deg, #6366f1 0%, #22d3ee 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.8));
    position: relative;
}

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

.hero-subtitle {
    font-size: 1.5rem;
    color: #22d3ee;
    font-family: var(--font-mono);
    margin-bottom: var(--space-lg);
    min-height: 1.5em;
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
}

.typing-cursor {
    animation: blink 1s infinite;
}

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

.hero-description {
    font-size: 1.2rem;
    color: #e2e8f0;
    max-width: 650px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-cta {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    margin-bottom: var(--space-3xl);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--color-text-muted);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

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

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

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    top: 10%;
    left: -10%;
    animation: float 15s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--color-secondary);
    bottom: 20%;
    right: -5%;
    animation: float 12s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--color-accent);
    top: 50%;
    left: 50%;
    animation: float 18s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(5deg); }
    50% { transform: translate(-20px, 20px) rotate(-5deg); }
    75% { transform: translate(10px, -10px) rotate(3deg); }
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: var(--space-md) auto 0;
}

/* ========================================
   About Section
   ======================================== */
.about {
    background: var(--color-bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-4xl);
    align-items: center;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder .initials {
    font-size: 6rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.image-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid var(--color-primary);
    border-radius: calc(var(--radius-2xl) + 10px);
    opacity: 0.3;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--gradient-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.exp-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.exp-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

.about-text {
    color: var(--color-text-secondary);
}

.about-intro {
    font-size: 1.25rem;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.about-text p {
    margin-bottom: var(--space-lg);
    line-height: 1.8;
}

.about-text strong {
    color: var(--color-text);
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text);
}

.highlight-item svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* ========================================
   Skills Section
   ======================================== */
.skills {
    background: var(--color-bg);
    position: relative;
    overflow: hidden;
}

.skills .container {
    position: relative;
    z-index: 1;
}

#skills-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* Mobile skills canvas */
@media (max-width: 768px) {
    .skills {
        min-height: auto;
        padding-top: var(--space-2xl);
        padding-bottom: var(--space-2xl);
    }

    #skills-canvas {
        opacity: 0.5;
    }
}

/* Skills Orbit */
.skills-orbit {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 0 auto var(--space-4xl);
    z-index: 1;
}

.skills .section-header {
    position: relative;
    z-index: 2;
}

.skills .section-title {
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.5),
                 0 4px 15px rgba(0, 0, 0, 0.8);
}

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    box-shadow: var(--shadow-glow);
    z-index: 10;
    animation: orbit-center-pulse 3s ease-in-out infinite;
}

@keyframes orbit-center-pulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.3),
                    0 0 60px rgba(99, 102, 241, 0.2),
                    0 0 80px rgba(99, 102, 241, 0.1);
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        box-shadow: 0 0 60px rgba(34, 211, 238, 0.4),
                    0 0 80px rgba(34, 211, 238, 0.3),
                    0 0 100px rgba(34, 211, 238, 0.2);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px dashed var(--color-border);
    border-radius: 50%;
    animation: orbitRotate 30s linear infinite;
}

.orbit-1 {
    width: 220px;
    height: 220px;
    margin: -110px 0 0 -110px;
}

.orbit-2 {
    width: 340px;
    height: 340px;
    margin: -170px 0 0 -170px;
    animation-direction: reverse;
    animation-duration: 40s;
}

.orbit-3 {
    width: 460px;
    height: 460px;
    margin: -230px 0 0 -230px;
    animation-duration: 50s;
}

.orbit-4 {
    width: 580px;
    height: 580px;
    margin: -290px 0 0 -290px;
    animation-direction: reverse;
    animation-duration: 60s;
}

@keyframes orbitRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.orbit-item {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: orbitItemRotate 30s linear infinite reverse;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.orbit-1 .orbit-item {
    --total: 5;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
    transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(110px) rotate(calc(-360deg / var(--total) * var(--i)));
}

.orbit-2 .orbit-item {
    --total: 6;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
    transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(170px) rotate(calc(-360deg / var(--total) * var(--i)));
    animation-direction: normal;
    animation-duration: 40s;
}

.orbit-3 .orbit-item {
    --total: 7;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
    transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(230px) rotate(calc(-360deg / var(--total) * var(--i)));
    animation-duration: 50s;
}

.orbit-4 .orbit-item {
    --total: 8;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
    transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(290px) rotate(calc(-360deg / var(--total) * var(--i)));
    animation-direction: normal;
    animation-duration: 60s;
}

@keyframes orbitItemRotate {
    from { transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(var(--orbit-radius)) rotate(calc(-360deg / var(--total) * var(--i) + 360deg)); }
    to { transform: rotate(calc(360deg / var(--total) * var(--i))) translateX(var(--orbit-radius)) rotate(calc(-360deg / var(--total) * var(--i))); }
}

.orbit-item img {
    width: 28px;
    height: 28px;
    filter: grayscale(100%) brightness(1.5);
    transition: filter var(--transition-normal);
}

.orbit-item:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.2);
}

.orbit-item:hover img {
    filter: grayscale(0%) brightness(1);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
}

.skill-category {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.category-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.category-title svg {
    color: var(--color-primary);
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.skill-bar {
    position: relative;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.skill-name {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.skill-percent {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
}

.skill-progress {
    height: 6px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   Projects Section
   ======================================== */
.projects {
    background: var(--color-bg-secondary);
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.project-card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.project-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.project-links {
    display: flex;
    gap: var(--space-md);
}

.project-link {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all var(--transition-normal);
}

.project-link:hover {
    transform: scale(1.1);
}

.project-content {
    padding: var(--space-lg);
}

.project-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: var(--space-sm) 0;
    color: var(--color-text);
}

.project-description {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.project-tech span {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

/* ========================================
   Experience Section
   ======================================== */
.experience {
    background: var(--color-bg);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: var(--space-3xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-3xl);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: calc(-1 * var(--space-3xl) - 6px);
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--color-primary);
    border: 3px solid var(--color-bg);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--color-primary);
}

.timeline-content {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    border-color: var(--color-primary);
    transform: translateX(10px);
}

.timeline-header {
    margin-bottom: var(--space-sm);
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.timeline-company {
    color: var(--color-primary);
    font-weight: 500;
}

.timeline-date {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.timeline-details {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.timeline-details li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.timeline-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
}

/* Certifications */
.certifications {
    max-width: 800px;
    margin: var(--space-4xl) auto 0;
    text-align: center;
}

.cert-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
    color: var(--color-text);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    max-width: 600px;
    margin: 0 auto;
}

.cert-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    text-decoration: none;
    cursor: pointer;
}

.cert-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.cert-item svg {
    color: var(--color-primary);
}

.cert-item span {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* ========================================
   Blog Section
   ======================================== */
.blog {
    background: var(--color-bg-secondary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.blog-card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.blog-image {
    position: relative;
    aspect-ratio: 16/9;
}

.blog-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.blog-category {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.blog-content {
    padding: var(--space-lg);
}

.blog-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.blog-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: var(--space-sm) 0;
    color: var(--color-text);
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: gap var(--transition-normal);
}

.blog-link:hover {
    gap: var(--space-sm);
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    background: var(--color-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-4xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.contact-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-value {
    font-size: 1rem;
    color: var(--color-text);
    transition: color var(--transition-fast);
}

a.contact-value:hover {
    color: var(--color-primary);
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: all var(--transition-normal);
}

.social-link:hover {
    color: white;
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-lg) 0 var(--space-sm);
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
    outline: none;
    transition: border-color var(--transition-normal);
}

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

.form-group label {
    position: absolute;
    top: var(--space-lg);
    left: 0;
    font-size: 1rem;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all var(--transition-normal);
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: 0;
    font-size: 0.75rem;
    color: var(--color-primary);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--color-bg-secondary);
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
    gap: var(--space-xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--color-bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-xl);
        transition: right 0.4s ease;
        border-left: 1px solid var(--color-border);
    }

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

    .nav-toggle {
        display: block;
        z-index: 1001;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .skills-orbit {
        display: none;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }
}

@media (max-width: 768px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-stats {
        gap: var(--space-xl);
    }

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

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

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

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

/* ========================================
   In-App Browser Fixes (Instagram, Facebook, etc.)
   Simplify animations to prevent blinking
   ======================================== */
.in-app-browser #hero-canvas {
    display: none !important;
}

/* Keep skills canvas but reduce opacity */
.in-app-browser #skills-canvas {
    opacity: 0.5 !important;
}

.in-app-browser .hero {
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #1a1a25 100%) !important;
}

.in-app-browser .hero-content {
    background: rgba(10, 10, 15, 0.85) !important;
    padding: 30px !important;
    border-radius: 16px !important;
}

.in-app-browser .hero-title,
.in-app-browser .hero-subtitle,
.in-app-browser .hero-description {
    text-shadow: none !important;
}

.in-app-browser .name-highlight {
    -webkit-text-fill-color: #a78bfa !important;
    filter: none !important;
    animation: none !important;
    background: none !important;
}

.in-app-browser .floating-elements,
.in-app-browser .hero-bg-elements {
    display: none !important;
}

/* Add gradient background to skills section for in-app browsers */
.in-app-browser .skills {
    background: linear-gradient(180deg,
        var(--color-bg) 0%,
        rgba(99, 102, 241, 0.05) 50%,
        var(--color-bg) 100%) !important;
}

.in-app-browser .loader {
    display: none !important;
}

.in-app-browser .cursor,
.in-app-browser .cursor-follower {
    display: none !important;
}

/* Disable gradient animation in in-app browsers */
.in-app-browser .name-highlight {
    animation: none !important;
}

.in-app-browser .badge-dot {
    animation: none !important;
}

.in-app-browser .typing-cursor {
    animation: none !important;
    opacity: 1 !important;
}

/* ========================================
   Theme Toggle (Dark/Light Mode)
   ======================================== */
.theme-toggle {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    margin-right: 15px;
}

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

.theme-toggle:hover svg {
    color: white;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--color-text);
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

/* Light Theme */
body.light-theme {
    --color-bg: #f8fafc;
    --color-bg-secondary: #ffffff;
    --color-bg-tertiary: #e2e8f0;
    --color-text: #1e293b;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --color-border: rgba(0, 0, 0, 0.12);
    --gradient-card: linear-gradient(145deg, #ffffff, #f1f5f9);
}

body.light-theme .theme-toggle .sun-icon {
    display: block;
}

body.light-theme .theme-toggle .moon-icon {
    display: none;
}

/* Light Theme Hero Section - improved appearance */
body.light-theme .hero {
    background: linear-gradient(180deg, #f0f4ff 0%, #f8fafc 50%, #e0e7ff 100%);
}

body.light-theme .hero-content {
    background: none;
}

body.light-theme .hero-title {
    color: #1e293b;
    text-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
}

body.light-theme .name-highlight {
    background: linear-gradient(135deg, #4f46e5 0%, #0891b2 50%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: none;
}

body.light-theme .hero-subtitle {
    color: #4f46e5;
    text-shadow: none;
}

body.light-theme .hero-description {
    color: #334155;
    text-shadow: none;
}

body.light-theme .hero-badge {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.2);
    color: #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-theme .stat-number {
    background: linear-gradient(135deg, #4f46e5, #0891b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .stat-label {
    color: #64748b;
}

body.light-theme #hero-canvas {
    opacity: 0.25;
}

body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

body.light-theme .navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

body.light-theme .nav-link {
    color: #475569;
}

body.light-theme .nav-link:hover,
body.light-theme .nav-link.active {
    color: #4f46e5;
}

body.light-theme .section-title {
    color: #1e293b;
}

body.light-theme .section-tag {
    background: rgba(99, 102, 241, 0.08);
}

body.light-theme .card,
body.light-theme .project-card,
body.light-theme .blog-card,
body.light-theme .skill-category,
body.light-theme .timeline-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.light-theme .btn-secondary {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.3);
    color: #4f46e5;
}

body.light-theme .btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #4f46e5;
}

body.light-theme .scroll-indicator {
    color: #64748b;
}

body.light-theme .mouse {
    border-color: #94a3b8;
}

body.light-theme .floating-elements {
    opacity: 0.3;
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}
