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

/* CSS Variables for Theming */
:root {
    --bg-color: #f4f4f4;
    --bg-color-alt: #fff;
    --text-color: #333;
    --text-color-alt: #555;
    --primary-color: #f7c08a;
    --primary-color-darker: #e0ac76;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: #ddd;
    --header-bg: rgba(255, 255, 255, 0.9);
}

body.dark-mode {
    --bg-color: #121212;
    --bg-color-alt: #1e1e1e;
    --text-color: #e0e0e0;
    --text-color-alt: #adadad;
    --shadow-color: rgba(255, 255, 255, 0.1);
    --border-color: #444;
    --header-bg: rgba(30, 30, 30, 0.9);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden; /* Prevents horizontal scroll */
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

/* Header & Navigation */
header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: top 0.3s ease-in-out;
}

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

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

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

.nav-links li {
    padding: 0 1rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

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

/* Dark Mode Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
    display: flex;
    align-items: center;
}
.slider .sun-icon, .slider .moon-icon {
    position: absolute;
    color: #fff;
    transition: opacity 0.3s, transform 0.3s;
}
.slider .sun-icon {
    left: 5px;
    opacity: 1;
}
.slider .moon-icon {
    right: 5px;
    opacity: 0;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--primary-color);
}
input:checked + .slider .sun-icon {
    opacity: 0;
}
input:checked + .slider .moon-icon {
    opacity: 1;
}
input:checked + .slider:before {
    transform: translateX(24px);
}


/* General Section Styling */
main {
    padding-top: 70px;
}

section {
    padding: 5rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-color-darker);
}

/* Sections Background */
#about, #education, #skills, #contact {
    background: var(--bg-color-alt);
}

/* Home Section */
#home {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.pexels.com/photos/1714208/pexels-photo-1714208.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1') no-repeat center center/cover;
    height: 100vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}
.about-image img {
    width: 100%;
    max-width: 350px; /* Control image size */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    display: block;
    margin: 0 auto;
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: var(--bg-color-alt);
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after { left: -16px; }
.timeline-content {
    padding: 20px 30px;
    background-color: var(--bg-color-alt);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 3px 10px var(--shadow-color);
}
.timeline-date {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 600;
    margin-bottom: 10px;
}
.timeline-content .company {
    font-style: italic;
    color: var(--text-color-alt);
}
.timeline-content ul {
    list-style-position: inside;
    padding-left: 5px;
}

/* Education Section */
.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.education-box {
    background: var(--bg-color);
    padding: 2.5rem;
    text-align: center;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.education-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px var(--shadow-color);
}
.education-box i { color: var(--primary-color); }

/* Skills Section */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.skill-item {
    background: var(--bg-color);
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}
.contact-info {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 10px;
}
.contact-info a {
    color: var(--text-color);
}
.contact-info i {
    color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--bg-color-alt);
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
}

/* --- RESPONSIVE DESIGN --- */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0px;
        top: 70px;
        /* FIX 1: Changed background to be fully opaque for readability */
        background-color: var(--bg-color-alt);
        height: calc(100vh - 70px);
        width: 60%;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .hamburger {
        display: block;
    }

    /* Hamburger Animation */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    section {
        padding: 4rem 2rem;
    }

    .about-content, .contact-content {
        grid-template-columns: 1fr;
    }

    /* Timeline Responsive */
    .timeline::after {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 55px;
        padding-right: 15px;
    }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-item::after {
        /* FIX 2: Adjusted 'left' value to perfectly center the circle on the line */
        left: 11px;
    }
}
