/* Light Theme (Blue) */
:root {
    --primary: #4361EE;
    --secondary: #3A0CA3;
    --accent: #4CC9F0;
    --text: #1A1A2E;
    --bg: #F8F9FA;
    --card-bg: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
    --card-bg-rgb: 255, 255, 255;
    --primary-rgb: 67, 97, 238;
}

/* Dark Theme (Orange) */
[data-theme="dark"] {
    --primary: #FF6B35;
    --secondary: #FF9E1F;
    --accent: #FFD166;
    --text: #F7F7F7;
    --bg: #292929;
    --card-bg: #2D2D2D;
    --shadow: rgba(0, 0, 0, 0.3);
    --card-bg-rgb: 45, 45, 45;
    --primary-rgb: 255, 107, 53;
}

/* System preference detection */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary: #FF6B35;
        --secondary: #FF9E1F;
        --accent: #FFD166;
        --text: #F7F7F7;
        --bg: #292929;
        --card-bg: #2D2D2D;
        --shadow: rgba(0, 0, 0, 0.3);
        --card-bg-rgb: 45, 45, 45;
        --primary-rgb: 255, 107, 53;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg);
}
html {
    scroll-behavior: smooth;
}
body {
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    transition: none !important;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    position: relative;
    z-index: 100;
}
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}
.logo span {
    color: var(--text);
}
.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}
.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s;
}
.nav-link:hover, 
.nav-link.active {
    color: var(--primary);
}
.nav-link:hover::after, 
.nav-link.active::after {
    width: 100%;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}
.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text);
    margin: 5px 0;
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 100px 0;
    gap: 50px;
}
.hero-content {
    flex: 1;
}
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    line-height: 1.2;
}
.greeting {
    display: block;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}
.name {
    display: block;
    font-weight: 700;
}
.title {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary);
}
.hero-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    opacity: 0.9;
}
.hero-buttons {
    display: flex;
    gap: 20px;
}
.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    border: 2px solid transparent;
    min-width: 44px;
    min-height: 44px;
    will-change: transform;
}
.btn.primary {
    background-color: var(--primary);
    color: white;
}
.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.btn.secondary {
    border-color: var(--primary);
    color: var(--primary);
}
.btn.secondary:hover {
    background-color: var(--primary);
    color: white;
}
.image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}

/* Sections */
.section {
    padding: 100px 0;
}
.section-header {
    margin-bottom: 50px;
    text-align: center;
}
.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--primary);
    opacity: 0.8;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}
.skill-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 5px 15px var(--shadow);
    will-change: transform;
}
.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow);
}
.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}
.skill-name {
    font-weight: 600;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}
.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s;
    will-change: transform;
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow);
}
.project-image {
    height: 200px;
    overflow: hidden;
}
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}
.project-card:hover .project-image img {
    transform: scale(1.1);
}
.project-content {
    padding: 25px;
}
.project-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.project-description {
    margin-bottom: 20px;
    opacity: 0.8;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 15px;
}
.project-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    transition: opacity 0.3s;
    min-width: 44px;
    min-height: 44px;
}
.project-link:hover {
    opacity: 0.8;
}

/* Contact Information Styles */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
}
.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}
.info-item i {
    font-size: 1.2rem;
    color: var(--primary);
    width: 30px;
    text-align: center;
}
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    transition: all 0.3s;
    font-size: 1.2rem;
    min-width: 44px;
    min-height: 44px;
}
.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Footer */
.footer {
    padding: 50px 0;
    text-align: center;
}
.copyright {
    margin-top: 20px;
    opacity: 0.7;
}

/* Scroll To Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
    min-width: 44px;
    min-height: 44px;
}
.scroll-top.active {
    opacity: 1;
    visibility: visible;
}
.scroll-top:hover {
    transform: translateY(-5px);
}

/* Theme Controls */
.theme-controls {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}
.theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px var(--shadow);
    position: relative;
    overflow: hidden;
    min-width: 44px;
    min-height: 44px;
}
.theme-toggle i {
    position: absolute;
    font-size: 1.2rem;
    transition: all 0.3s;
}
.theme-toggle .fa-sun {
    opacity: 0;
    transform: translateY(20px);
    display: none;
}
[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: translateY(-20px);
    display: none;
}
[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: translateY(0);
    display: block;
}
.color-schemes {
    display: flex;
    gap: 10px;
    justify-content: center;
    background-color: var(--card-bg);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 5px 15px var(--shadow);
}
.color-scheme {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-width: 30px;
    min-height: 30px;
}
.color-scheme::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}
.color-scheme.active::after {
    opacity: 1;
}
.color-scheme.orange {
    background: linear-gradient(45deg, #FF6B35, #FF9E1F);
}
.color-scheme.blue {
    background: linear-gradient(45deg, #4361EE, #3A0CA3);
}

/* Animations */
@keyframes glowPulse {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    100% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 5px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary);
}

/* Reduced Motion Settings */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .skill-card:hover, 
    .project-card:hover,
    .btn:hover,
    .social-link:hover,
    .scroll-top:hover {
        transform: none !important;
    }
    
    .project-card:hover .project-image img {
        transform: none !important;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 80px 0;
    }

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

    .hero-text {
        margin-left: auto;
        margin-right: auto;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}
/* Mobile Menu Styles */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: rgba(var(--card-bg-rgb), 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s;
        z-index: 999;
        box-shadow: -5px 0 15px var(--shadow);
    }

    .nav.active {
        right: 0;
    }

    .nav ul {
        flex-direction: column;
        align-items: center;
        margin-top: 100px;
    }

    .menu-toggle {
        display: block;
    }

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

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

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

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

    .theme-controls {
        top: auto;       /* remove top */
        bottom: 30px;    /* stick to bottom */
        right: auto;     /* remove right */
        left: 30px;      /* stick to left */
        flex-direction: row; /* horizontal if you want */
        gap: 10px;
    }

    .hero {
        min-height: calc(100svh - 60px);
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 60px 0;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

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

    .image-wrapper {
        width: 280px;
        height: 280px;
    }

    .section {
        padding: 70px 0;
    }
}