/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-color: #1f2937;
    --text-light: #4b5563;
    --bg-color: #f9fafb;
    --bg-light: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 13px -6px 32px rgba(121, 133, 235, 1);
    --shadow-lg: 0px 0px 28px -8px rgb(89 96 205);
    --glow: 0 0 20px rgba(99, 102, 241, 0.15);
    --glow-strong: 0 0 32px rgba(99, 102, 241, 0.2);
    --preloader-bg: rgb(255, 255, 255);
    --popup-color : #f7f7f7;
    --popup-text-color : #111827;
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --secondary-color: #a78bfa;
    --text-color: #f7f8fa;
    --text-light: #9ca3af;
    --bg-color: #111827;
    --bg-light: #1f2937;
    --border-color: #d1d2d4;
    --shadow: 13px -6px 32px rgba(121, 133, 235, 1);
    --shadow-lg: 0px 0px 28px -1px rgb(89 96 205);
    --glow: 0 0 20px rgba(129, 140, 248, 0.15);
    --glow-strong: 0 0 32px rgba(129, 141, 248, 0.322);
    --preloader-bg: rgb(100, 128, 206);
    --popup-color : #f7f7f7;
    --popup-text-color : #111827;

}

/* Theme toggle styles */
.theme-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.theme-toggle .theme-option {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    color: var(--text-light);
}

.theme-toggle .theme-option:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.theme-toggle .theme-option.active {
    color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.2);
}

.theme-toggle .theme-option svg {
    display: block;
    width: 24px;
    height: 24px;
}

/* Light mode adjustments (existing) */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light mode adjustments */
.navbar {
    background: var(--bg-color) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.nav-menu li a {
    color: var(--text-light) !important;
}

.skill-item, 
.experience-card, 
.contact-form {
    background: var(--bg-color) !important;
    box-shadow: var(--shadow-lg) !important;
}

.skill-item:hover, 
.experience-card:hover {
    box-shadow: var(--shadow-lg) !important;
}

.experience-card .company,
.experience-card .duration {
    color: var(--text-light) !important;
}

.footer {
    background-color: var(--bg-color) !important;
    color: var(--text-light) !important;
}

/* Improve contrast for light mode */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.3s ease, opacity 0.3s ease;
    position: relative;
    opacity: 0.9;
}

.nav-menu li a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.nav-menu li a.active {
    color: var(--primary-color);
    opacity: 1;
}

.nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 3rem 2rem;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 2rem auto;
    display: block;
    box-shadow: var(--glow-strong);
}

/* Section Styles */
.section {
    margin: 4rem 0;
}

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

.section-content {
    max-width: 800px;
    margin: 0 auto;
}

/* About Section */
.about-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    text-align: center;
}

.about-image {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    margin: 2rem auto;
    display: block;
    box-shadow: var(--glow-strong);
}

/* Experience Section */
.experience-subtitle {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
    text-align: center;
    color: var(--text-color);
}

.experience-timeline {
    position: relative;
    max-width: 900px;
    margin: 2rem auto;
    padding-left: 2.5rem;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0.8rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    opacity: 0.9;
}

.experience-timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.experience-timeline-item::before {
    content: '';
    position: absolute;
    left: -2.24rem;
    top: 0.9rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.experience-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 1.75rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.experience-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.experience-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.experience-card .company {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.experience-card .duration {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-style: italic;
}

.experience-card .description {
    color: var(--text-color);
    line-height: 1.6;
}

.experience-card ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.experience-card ul li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(17, 24, 39, 0.85);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--glow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--glow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-strong);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0px 0px 32px 10px rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.btn-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background-color: #f3f4f6;
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    margin-top: 4rem;
}

/* SVG Icon Styles */
.svg-icon {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    fill: currentColor;
    vertical-align: middle;
    margin-bottom: 0.5rem;
}

.skill-item .svg-icon,
.experience-card .svg-icon,
.social-links .svg-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
}

/* Adjustable SVG height classes */
.svg-sm {
    width: 1.5rem;
    height: 1.5rem;
}

.svg-md {
    width: 2rem;
    height: 2rem;
}

.svg-lg {
    width: 3rem;
    height: 3rem;
}

.svg-xl {
    width: 4rem;
    height: 4rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-color);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--glow);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

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

    .main-content {
        padding: 2rem 1rem;
    }

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

    .experience-timeline {
        padding-left: 2rem;
    }

    .experience-timeline-item::before {
        left: -0.25rem;
    }
    .experience-timeline {
        padding-left: 1.5rem;
    }

    .experience-timeline-item {
        padding-left: 1.5rem;
    }

    .experience-timeline-item::before {
        left: -1.25rem;
    }
}
