/* ===== CSS VARIABLES / DESIGN TOKENS ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.06);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --accent-1: #6c63ff;
    --accent-2: #00d4aa;
    --accent-3: #ff6b9d;
    --gradient-primary: linear-gradient(135deg, #6c63ff, #00d4aa);
    --gradient-accent: linear-gradient(135deg, #ff6b9d, #6c63ff);
    --gradient-bg: linear-gradient(180deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(108, 99, 255, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-1) var(--bg-secondary);
}

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

::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 3px;
}

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

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

/* ===== ANIMATED BACKGROUND PARTICLES ===== */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ===== UTILITIES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all var(--transition-smooth);
}

.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(108, 99, 255, 0.2);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

/* ===== ANIMATIONS ===== */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-smooth);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.nav-logo i {
    color: var(--accent-1);
    font-size: 1.4rem;
}

.nav-logo:hover {
    color: var(--accent-1);
}

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

.nav-link {
    position: relative;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transform: translateX(-50%);
    transition: width var(--transition-smooth);
}

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

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

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

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

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

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

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 40%, rgba(108, 99, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 212, 170, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 107, 157, 0.04) 0%, transparent 50%);
    animation: hero-glow 12s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes hero-glow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, -20px) rotate(3deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-2);
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}

.hero-badge i {
    font-size: 0.8rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.45);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

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

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

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

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

.stat-plus {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--glass-border);
}

/* Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-dot {
    width: 3px;
    height: 8px;
    background: var(--accent-1);
    border-radius: 2px;
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.3; }
}

/* ===== SECTIONS ===== */
.section {
    position: relative;
    padding: 100px 0;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.about-card {
    padding: 40px 32px;
    text-align: center;
}

.about-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border-radius: var(--radius-md);
    background: rgba(108, 99, 255, 0.1);
    font-size: 1.5rem;
    color: var(--accent-1);
}

.about-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.about-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-card {
    padding: 32px;
    text-align: center;
}

.skill-icon-wrapper {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    padding: 12px;
}

.skill-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.skill-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.skill-progress {
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== GALLERY SECTION ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    padding: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.gallery-overlay i {
    font-size: 1.5rem;
    color: var(--accent-1);
}

.gallery-overlay span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    transform: scale(0.9);
    transition: transform var(--transition-spring);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* ===== CONTACT SECTION ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.contact-card {
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.contact-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    font-size: 1.3rem;
    transition: all var(--transition-smooth);
}

.contact-icon.github {
    background: rgba(255, 255, 255, 0.08);
    color: #f0f0f5;
}

.contact-icon.linkedin {
    background: rgba(10, 102, 194, 0.15);
    color: #0a66c2;
}

.contact-icon.email {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent-1);
}

.contact-icon.phone {
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent-2);
}

.contact-card:hover .contact-icon {
    transform: scale(1.15);
}

.contact-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.contact-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: all var(--transition-smooth);
}

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

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

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

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-logo i {
    color: var(--accent-1);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-smooth);
}

.footer-social a:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.4);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 15, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 32px 32px;
        gap: 4px;
        transition: right var(--transition-smooth);
        border-left: 1px solid var(--glass-border);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .hero {
        padding: 100px 20px 60px;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }
}
