/* ===================================
   CSS VARIABLES - THEME COLORS
   =================================== */

:root {
    /* Light Mode Colors */
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-color: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --border-color: #e2e8f0;
    --hero-gradient-start: #a855f7;
    --hero-gradient-end: #7c3aed;
    --skill-bar-bg: #e2e8f0;
    --skill-bar-fill: #8b5cf6;
    
    /* Fixed Colors */
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 80px 20px;
    --card-padding: 30px;
    
    /* Transitions */
    --transition-speed: 0.3s;
}

/* Dark Mode Colors - Activated by checkbox */
body:has(#theme-toggle:checked) {
    --bg-color: #0d1117;
    --bg-secondary: #161b22;
    --text-color: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-light: #cbd5e0;
    --accent-color: #a78bfa;
    --accent-hover: #9333ea;
    --card-bg: #161b22;
    --card-shadow: rgba(0, 0, 0, 0.45);
    --border-color: #1f2937;
    --hero-gradient-start: #c084fc;
    --hero-gradient-end: #9333ea;
    --skill-bar-bg: #1f2937;
    --skill-bar-fill: #c084fc;
}

/* System Preference Support - Disabled (Light mode is default) */
/* Uncomment below to enable automatic dark mode based on system preference */
/*
@media (prefers-color-scheme: dark) {
    :root:not(:has(#theme-toggle:checked)) {
        --bg-color: #0d1117;
        --bg-secondary: #161b22;
        --text-color: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-light: #cbd5e0;
        --accent-color: #a78bfa;
        --accent-hover: #9333ea;
        --card-bg: #161b22;
        --card-shadow: rgba(0, 0, 0, 0.45);
        --border-color: #1f2937;
        --hero-gradient-start: #c084fc;
        --hero-gradient-end: #9333ea;
        --skill-bar-bg: #1f2937;
        --skill-bar-fill: #c084fc;
    }
}
*/

/* ===================================
   THEME TOGGLE SWITCH
   =================================== */

.theme-toggle-checkbox {
    display: none;
}

.theme-toggle-label {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 70px;
    height: 35px;
    background: var(--card-bg);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--card-shadow);
    border: 2px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.theme-toggle-label:hover {
    transform: scale(1.05);
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 25px;
    height: 25px;
    background: var(--accent-color);
    border-radius: 50%;
    transition: transform var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:checked ~ .theme-toggle-label .theme-toggle-slider {
    transform: translateX(35px);
}

.theme-icon {
    position: absolute;
    font-size: 14px;
    transition: opacity var(--transition-speed) ease;
}

.sun-icon {
    opacity: 1;
}

.moon-icon {
    opacity: 0;
}

#theme-toggle:checked ~ .theme-toggle-label .sun-icon {
    opacity: 0;
}

#theme-toggle:checked ~ .theme-toggle-label .moon-icon {
    opacity: 1;
}

/* ===================================
   GLOBAL STYLES
   =================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

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

.btn-secondary:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

.header {
    background: var(--card-bg);
    box-shadow: 0 2px 10px var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background var(--transition-speed) ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-speed) ease;
}

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

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

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.highlight {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 600;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

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

/* ===================================
   ABOUT SECTION
   =================================== */

.about {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-description strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* ===================================
   SERVICES SECTION
   =================================== */

.services {
    padding: var(--section-padding);
    background: var(--bg-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--card-bg);
    padding: var(--card-padding);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--card-shadow);
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px var(--card-shadow);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.service-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===================================
   SKILLS SECTION
   =================================== */

.skills {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.skill-item {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--card-shadow);
    transition: all var(--transition-speed) ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--card-shadow);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.skill-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

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

.skill-bar {
    width: 100%;
    height: 10px;
    background: var(--skill-bar-bg);
    border-radius: 50px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-color);
    border-radius: 50px;
    transition: width 1s ease;
}

/* ===================================
   PORTFOLIO SECTION
   =================================== */

.portfolio {
    padding: var(--section-padding);
    background: var(--bg-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--card-shadow);
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--border-color);
}

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

.project-image {
    width: 100%;
    height: 250px;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder {
    color: var(--white);
    font-size: 2rem;
    font-weight: 600;
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: var(--bg-secondary);
    color: var(--accent-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* ===================================
   WHY CHOOSE ME SECTION
   =================================== */

.why-choose {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.benefit-card {
    background: var(--card-bg);
    padding: var(--card-padding);
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--card-shadow);
    text-align: center;
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--border-color);
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 25px var(--card-shadow);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.benefit-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.benefit-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===================================
   CONTACT SECTION
   =================================== */

.contact {
    padding: var(--section-padding);
    background: var(--bg-color);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 50px;
    margin-top: 50px;
}

.contact-form-wrapper {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--card-shadow);
    border: 1px solid var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-input,
.form-textarea {
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--card-shadow);
    border: 1px solid var(--border-color);
}

.contact-info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-info-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.contact-info-text p {
    color: var(--text-light);
}

.contact-cta {
    background: var(--accent-color);
    padding: 30px;
    border-radius: 12px;
    color: var(--white);
    margin-top: 10px;
}

.contact-cta-text {
    line-height: 1.8;
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--bg-secondary);
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-text {
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--card-bg);
    border-radius: 50%;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 2px 10px var(--card-shadow);
    border: 1px solid var(--border-color);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 4px 15px var(--card-shadow);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 968px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .services-grid,
    .skills-grid,
    .portfolio-grid,
    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    :root {
        --section-padding: 50px 20px;
        --card-padding: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .services-grid,
    .skills-grid,
    .portfolio-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .theme-toggle-label {
        top: 10px;
        right: 10px;
        width: 60px;
        height: 30px;
    }
    
    .theme-toggle-slider {
        width: 22px;
        height: 22px;
    }
    
    #theme-toggle:checked ~ .theme-toggle-label .theme-toggle-slider {
        transform: translateX(30px);
    }
    
    .contact-form-wrapper {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 15px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .project-placeholder {
        font-size: 1.5rem;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Smooth transitions for theme switching */
* {
    transition-property: background-color, border-color, color;
    transition-duration: var(--transition-speed);
    transition-timing-function: ease;
}

/* Preserve specific animations */
.hero-title,
.hero-subtitle,
.hero-description,
.hero-buttons {
    transition-property: opacity, transform;
}

.skill-progress {
    transition-property: width;
}
