@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color-light: #4a00e0;
    --secondary-color-light: #8e2de2;
    --background-light: #f4f4f9;
    --text-color-light: #333;
    --card-bg-light: #ffffff;
    --header-bg-light: rgba(255, 255, 255, 0.8);

    --primary-color-dark: #805ad5;
    --secondary-color-dark: #553c9a;
    --background-dark: #1a202c;
    --text-color-dark: #edf2f7;
    --card-bg-dark: #2d3748;
    --header-bg-dark: rgba(26, 32, 44, 0.8);
    
    --gradient-light: linear-gradient(135deg, var(--primary-color-light), var(--secondary-color-light));
    --gradient-dark: linear-gradient(135deg, var(--primary-color-dark), var(--secondary-color-dark));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    transition: background-color 0.4s ease, color 0.4s ease;
}

body.light-mode {
    background-color: var(--background-light);
    color: var(--text-color-light);
}

body.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-color-dark);
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: background-color 0.4s ease;
}

.light-mode .header { background-color: var(--header-bg-light); }
.dark-mode .header { background-color: var(--header-bg-dark); }

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
}

.light-mode .logo { color: var(--primary-color-light); }
.dark-mode .logo { color: var(--primary-color-dark); }


.navbar a {
    font-size: 1.1rem;
    margin-left: 2rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.light-mode .navbar a { color: var(--text-color-light); }
.dark-mode .navbar a { color: var(--text-color-dark); }

.navbar a:hover, .navbar a.active {
    background: var(--gradient-light);
    -webkit-background-clip: text;
    color: transparent;
}
.dark-mode .navbar a:hover, .dark-mode .navbar a.active {
    background: var(--gradient-dark);
    -webkit-background-clip: text;
    color: transparent;
}

/* --- Theme Switcher --- */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.theme-switcher i {
    font-size: 1.5rem;
}
.light-mode .theme-switcher i { color: var(--primary-color-light); }
.dark-mode .theme-switcher i { color: var(--primary-color-dark); }

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input { display: none; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background: var(--gradient-dark);
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* --- Hero Section --- */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 120px 8% 60px;
    min-height: 100vh;
}
.hero-content {
    max-width: 50%;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
}
.hero-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 10px 0;
    background: var(--gradient-light);
    -webkit-background-clip: text;
    color: transparent;
}
.dark-mode .hero-content h3 {
    background: var(--gradient-dark);
    -webkit-background-clip: text;
    color: transparent;
}
.hero-content p {
    font-size: 1rem;
    margin: 20px 0 30px;
}

.hero-buttons .btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.btn {
    background: var(--gradient-light);
    color: #fff;
}
.dark-mode .btn {
    background: var(--gradient-dark);
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.btn-secondary {
    background: transparent;
    margin-left: 15px;
}
.light-mode .btn-secondary {
    border-color: var(--primary-color-light);
    color: var(--primary-color-light);
}
.dark-mode .btn-secondary {
    border-color: var(--primary-color-dark);
    color: var(--primary-color-dark);
}

.social-links {
    margin-top: 30px;
}
.social-links a {
    font-size: 2rem;
    margin-right: 15px;
    text-decoration: none;
    transition: transform 0.3s;
}
.social-links a:hover {
    transform: scale(1.2);
}
.light-mode .social-links a { color: var(--primary-color-light); }
.dark-mode .social-links a { color: var(--primary-color-dark); }


.hero-image {
    width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.profile-picture-container {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    padding: 10px;
    background: var(--gradient-light);
    display: flex;
    justify-content: center;
    align-items: center;
}
.dark-mode .profile-picture-container {
    background: var(--gradient-dark);
}
.profile-picture-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Line Light Animation */
.line-light-animation {
    height: 2px;
    width: 100%;
    background: var(--gradient-light);
    position: relative;
    overflow: hidden;
}
.dark-mode .line-light-animation {
    background: var(--gradient-dark);
}
.line-light-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}


/* --- General Section Styling --- */
.content-section {
    padding: 60px 8%;
}
.content-section h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}
.light-mode .content-section h2 { color: var(--primary-color-light); }
.dark-mode .content-section h2 { color: var(--primary-color-dark); }

#about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.7;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}
.skill-card {
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}
.light-mode .skill-card {
    background-color: var(--card-bg-light);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.dark-mode .skill-card {
    background-color: var(--card-bg-dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.skill-card i {
    font-size: 3rem;
    background: var(--gradient-light);
    -webkit-background-clip: text;
    color: transparent;
}
.dark-mode .skill-card i {
    background: var(--gradient-dark);
    -webkit-background-clip: text;
    color: transparent;
}
.skill-card img {
    width: 48px;
    height: 48px;
}

/* NEW rule for embedded SVG */
.skill-card svg {
    width: 48px;
    height: 48px;
}
/* Style for Express.js SVG path in dark mode */
.dark-mode .skill-card svg path:nth-child(2) {
    fill: #fff;
}


/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}
.project-card {
    padding: 25px;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 5px solid;
}
.light-mode .project-card {
    background-color: var(--card-bg-light);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-color: var(--primary-color-light);
}
.dark-mode .project-card {
    background-color: var(--card-bg-dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-color: var(--primary-color-dark);
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.project-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.light-mode .project-card h4 { color: var(--primary-color-light); }
.dark-mode .project-card h4 { color: var(--primary-color-dark); }

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--gradient-light);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}
.dark-mode .timeline::after {
    background: var(--gradient-dark);
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
}
.timeline-item:nth-child(even) {
    left: 50%;
}
.timeline-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border: 4px solid var(--primary-color-light);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.dark-mode .timeline-dot {
    border-color: var(--primary-color-dark);
}
.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}
.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}
.timeline-content {
    padding: 20px 30px;
    border-radius: 8px;
    position: relative;
}
.light-mode .timeline-content {
    background-color: var(--card-bg-light);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.dark-mode .timeline-content {
    background-color: var(--card-bg-dark);
}
.timeline-content h4 { font-size: 1.2rem; }
.timeline-content p { font-weight: 600; font-size: 0.9rem; margin: 5px 0 10px; }
.timeline-content ul {
    list-style-position: inside;
    font-size: 0.9rem;
    padding-left: 5px;
}

/* Footer */
.footer {
    padding: 2rem 8%;
    text-align: center;
    font-size: 0.9rem;
}
.light-mode .footer {
    background-color: #e2e8f0;
}
.dark-mode .footer {
    background-color: #2d3748;
}
.footer a {
    font-weight: 600;
    text-decoration: none;
}
.light-mode .footer a { color: var(--primary-color-light); }
.dark-mode .footer a { color: var(--primary-color-dark); }


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-image {
        width: 60%;
        margin-top: 40px;
    }
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 23px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem 5%;
    }
    .navbar {
        display: none; /* Simple hiding for now, can implement a mobile menu */
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content h3 {
        font-size: 1.5rem;
    }
    .content-section h2 {
        font-size: 2rem;
    }
    .hero-image {
    width: 80%;
    
}
}