/* =========================================
   VARIABLES & THEME
========================================= */
:root {
    /* Colors */
    --bg-color: #050508;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #7c3aed, #2563eb, #06b6d4);
    --grad-secondary: linear-gradient(135deg, #f43f5e, #8b5cf6, #3b82f6);
    --grad-neon: linear-gradient(to right, #00f2fe 0%, #4facfe 100%);

    /* Solid Brand Colors */
    --brand-purple: #7c3aed;
    --brand-cyan: #06b6d4;
    --brand-pink: #f43f5e;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);

    /* Border Radius */
    --br-lg: 24px;
    --br-md: 16px;
    --br-sm: 8px;
}

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

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

ol,
ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    position: relative;
    z-index: 10;
}

/* =========================================
   UTILITIES
========================================= */
.gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.animated-gradient {
    background-size: 200% auto;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--br-lg);
    box-shadow: var(--glass-shadow);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

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

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

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-purple);
}

/* Background Particles Canvas */
#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* =========================================
   BUTTONS
========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--grad-secondary);
    z-index: -1;
    transition: opacity 0.5s ease;
    opacity: 0;
    border-radius: 50px;
}

.btn-primary:hover::before {
    opacity: 1;
}

.glowing-btn:hover {
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.6), 0 0 40px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.resume-btn {
    border-color: rgba(6, 182, 212, 0.5);
}

.resume-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

/* =========================================
   NAVIGATION
========================================= */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: var(--transition-smooth);
    padding: 1.5rem 0;
}

#navbar.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

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

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

.nav-link:hover {
    color: #fff;
}

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

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s ease;
}

/* =========================================
   HERO SECTION
========================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.subtitle {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-cyan);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Glass Profile Card in Hero */
.glass-profile-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: var(--br-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.1s;
}

.profile-img-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e1e2d, #0b0b13);
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    transform: translateZ(30px);
    /* 3D pop effect */
}

/* Avatar abstract visual */
.glow-orb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--grad-primary);
    filter: blur(20px);
    animation: pulseOrb 4s ease-in-out infinite alternate;
}

@keyframes pulseOrb {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.profile-info {
    text-align: center;
    transform: translateZ(20px);
}

.profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.tech-badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* =========================================
   ABOUT SECTION
========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
}

.about-text {
    padding: 3rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-stats {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.stat-item h3 {
    font-size: 3rem;
    margin-bottom: 0.2rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* =========================================
   SKILLS SECTION
========================================= */
.skills-container {
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--grad-primary);
    border-radius: 10px;
    width: 0;
    /* Animated via JS */
    transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    z-index: 2;
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--grad-primary);
    filter: blur(5px);
    width: 0;
    /* Animated via JS matching progress */
    transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
    opacity: 0.5;
}

/* =========================================
   PROJECTS SECTION
========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 1.5rem;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--br-lg);
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: var(--transition-smooth);
}

.project-card:hover::before {
    background: var(--grad-neon);
}

.project-image {
    width: 100%;
    height: 220px;
    border-radius: var(--br-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transform: translateZ(30px);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.gradient-1 {
    background: linear-gradient(135deg, #1e1e2d, #2563eb);
}

.gradient-2 {
    background: linear-gradient(135deg, #8b5cf6, #1e1e2d);
}

.gradient-3 {
    background: linear-gradient(135deg, #0b0b13, #06b6d4);
}

.project-card:hover .image-placeholder {
    transform: scale(1.05);
}

.project-content {
    transform: translateZ(20px);
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.project-tech span {
    font-size: 0.75rem;
    color: var(--brand-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.project-btn {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    transition: var(--transition-smooth);
}

.project-btn .arrow {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.project-btn:hover {
    color: var(--brand-pink);
}

.project-btn:hover .arrow {
    transform: translateX(5px);
}

/* =========================================
   CONTACT SECTION
========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    padding: 1rem;
    border-radius: var(--br-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateX(5px);
}

.info-item .icon {
    font-size: 1.5rem;
}

.contact-container {
    width: 100%;
}

.contact-form {
    padding: 3rem;
    position: relative;
    height: 100%;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--br-sm);
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group textarea {
    resize: vertical;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    pointer-events: none;
    background: transparent;
    padding: 0 0.2rem;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

/* Floating Label Magic */
.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: -0.6rem;
    left: 0.8rem;
    font-size: 0.8rem;
    color: var(--brand-cyan);
    background: var(--bg-color);
    /* fake background to cut border line */
    border-radius: 2px;
}

/* Input Focus Glow */
.input-glow {
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--grad-neon);
    transition: width 0.4s ease;
    box-shadow: 0 0 10px var(--brand-cyan);
    z-index: 10;
}

.form-group input:focus~.input-glow,
.form-group textarea:focus~.input-glow {
    width: calc(100% - 2rem);
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    min-height: 20px;
}

/* =========================================
   FOOTER
========================================= */
footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
}

/* =========================================
   ANIMATIONS & REVEALS
========================================= */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.left {
    transform: translateX(-50px);
}

.reveal.right {
    transform: translateX(50px);
}

.reveal.active {
    opacity: 1;
    transform: translate(0);
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 900px) {

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

    .hero-content {
        text-align: center;
        order: 2;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        order: 1;
        display: flex;
        justify-content: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-description {
        margin: 0 auto 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 8, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

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

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .glass-profile-card {
        padding: 1.5rem;
    }

    section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .profile-img-placeholder {
        width: 150px;
        height: 150px;
    }

    .about-text,
    .about-stats,
    .skills-container,
    .contact-info {
        padding: 1.5rem;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }

    .info-items {
        flex-direction: column !important;
        width: 100%;
    }

    .info-item {
        width: 100%;
        justify-content: center;
    }

    .project-card {
        padding: 1rem;
    }

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