* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gray-dark: #475569;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-text: linear-gradient(135deg, var(--primary), var(--accent));
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 10px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
[data-theme="light"] {
    --dark: #f8fafc;
    --darker: #ffffff;
    --light: #0f172a;
    --gray: #475569;
    --gray-dark: #94a3b8;
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .skill-category,
[data-theme="light"] .project-card {
    background: #f1f5f9;
}

[data-theme="light"] .section-dark {
    background: #e2e8f0;
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .form-group label {
    background: #e2e8f0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--darker);
    color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

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

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

.loader-logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    animation: pulse 1.5s infinite;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    animation: loading 1.5s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

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

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient);
    z-index: 10001;
    transition: width 0.1s;
}

/* Custom Cursor */
#cursor, #cursor-follower {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

#cursor {
    width: 8px;
    height: 8px;
    background: var(--light);
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

#cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--light);
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s, height 0.3s;
}

#cursor-follower.hover {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--light);
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--light);
}

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

/* Nav Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .lang-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--light);
    font-size: 1.1rem;
}

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

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

[data-theme="light"] .theme-toggle .fa-sun {
    display: block;
}

[data-theme="light"] .theme-toggle .fa-moon {
    display: none;
}

.lang-toggle {
    font-weight: 600;
    font-size: 0.85rem;
}

.lang-text {
    font-family: inherit;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--light);
    transition: var(--transition);
}

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

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

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-greeting {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.cursor-blink {
    animation: blink 1s infinite;
    color: var(--primary);
}

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

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--gray-dark);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn-cv:hover {
    background: var(--primary);
    color: #fff;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    animation: fadeInUp 0.8s ease 1s forwards;
    opacity: 0;
    margin-bottom: 6rem;
}

.stat {
    text-align: center;
}

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

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gray);
    animation: bounce 2s infinite;
    z-index: 10;
    cursor: pointer;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--gray);
    border-radius: 15px;
    position: relative;
}

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

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Sections */
.section {
    padding: 8rem 0;
}

.section-dark {
    background: var(--dark);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-number {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    color: var(--primary);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: center;
}

.image-wrapper {
    position: relative;
}

.profile-photo {
    width: 280px;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
    filter: grayscale(20%);
    transition: var(--transition);
}

.image-wrapper:hover .profile-photo {
    filter: grayscale(0%);
}

.image-border {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 280px;
    height: 350px;
    border: 3px solid var(--primary);
    border-radius: 10px;
    z-index: -1;
    transition: var(--transition);
}

.image-wrapper:hover .image-border {
    top: 15px;
    left: 15px;
}

.about-text {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary);
    font-weight: 600;
}

.about-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray);
}

.detail-item i {
    color: var(--primary);
    font-size: 1.1rem;
}


/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--darker);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
}

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

.project-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card.featured .project-img {
    height: 100%;
    min-height: 350px;
}

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

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

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

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    width: 50px;
    height: 50px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 1.2rem;
    text-decoration: none;
    transition: var(--transition);
    transform: translateY(20px);
}

.project-card:hover .project-link {
    transform: translateY(0);
}

.project-link:hover {
    background: var(--dark);
    color: var(--light);
}

.project-content {
    padding: 2rem;
}

.project-label {
    font-size: 0.85rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.project-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-tech span {
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Skills Section */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.skill-category {
    background: var(--dark);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.category-header h3 {
    font-size: 1.3rem;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.skill-info span:last-child {
    color: var(--primary);
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-heading {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-text {
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

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

.contact-item i {
    width: 45px;
    height: 45px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 1.2rem;
    text-decoration: none;
    transition: var(--transition);
}

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

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--light);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.form-group label {
    position: absolute;
    left: 1.2rem;
    top: 1.2rem;
    color: var(--gray);
    pointer-events: none;
    transition: var(--transition);
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -0.75rem;
    left: 1rem;
    font-size: 0.85rem;
    background: var(--dark);
    padding: 0 0.5rem;
    color: var(--primary);
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    text-align: center;
    color: var(--gray);
}

.footer-name {
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.5rem;
}

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

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        display: flex;
        justify-content: center;
    }
    
    .about-details {
        justify-content: center;
    }
    
    .project-card.featured {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        position: relative;
    }
    
    .navbar {
        background: rgba(15, 23, 42, 0.95);
    }
    
    .hero {
        padding-top: 100px;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        padding-top: 80px;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-controls {
        display: flex;
        gap: 0.5rem;
        margin-right: 1rem;
    }
    
    .theme-toggle, .lang-toggle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .skills-wrapper {
        grid-template-columns: 1fr;
    }
    
    #cursor, #cursor-follower {
        display: none;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
