/* CSS Variables for Themes */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #ff6b6b;
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f8f9fa;
    --shadow: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #ffffff;
    --card-bg: #1e1e1e;
    --shadow: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

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

/* Header and Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

/* Sections */
.section {
    padding: 100px 0 80px; /* Account for fixed header */
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Home Section */
#home {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.home-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem; /* Space between image and text */
    flex-wrap: wrap; /* Stack on mobile */
    text-align: left; /* Align text to the left for better readability */
}

.profile-image {
    flex-shrink: 0; /* Prevent image from shrinking */
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%; /* Circular shape */
    object-fit: cover; /* Ensures image fits without distortion */
    border: 5px solid var(--accent-color); /* Accent border for professionalism */
    box-shadow: 0 8px 20px var(--shadow); /* Subtle shadow for depth */
    transition: var(--transition);
}

.avatar:hover {
    transform: scale(1.05); /* Slight zoom on hover for interactivity */
}

.text-content {
    max-width: 500px; /* Limit text width for readability */
}

.home-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.role {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    display: inline-block;
}

.btn.primary {
    background-color: var(--accent-color);
    color: white;
}

.btn.secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow);
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Education Section Enhancements */
.timeline {
    position: relative;
    padding-left: 2rem; /* Space for timeline line */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem; /* Align with markers */
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

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

.timeline-marker {
    position: absolute;
    left: -1rem; /* Align with timeline line */
    top: 1.5rem;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
}

.timeline-content {
    margin-left: 1rem;
}

.education-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow);
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow);
}

.education-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.education-header i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.education-header h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
}

.status {
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
}

.status.ongoing {
    background-color: var(--accent-color);
    color: white;
}

.status.completed {
    background-color: var(--secondary-color);
    color: white;
}

.institution {
    margin-bottom: 0.5rem;
}

.duration, .subjects {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.duration i, .subjects i {
    color: var(--primary-color);
}

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

.skill-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow);
    text-align: center;
}

.progress-bar {
    background-color: #e9ecef;
    height: 10px;
    border-radius: 5px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 1s ease;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0; /* Rounded top corners to match card */
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

input, textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: var(--transition);
}

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

.contact-info {
    text-align: center;
}

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

.contact-info p {
    margin-bottom: 1rem;
}

.contact-info p:last-of-type {
    margin-bottom: 1.5rem; /* Extra space before social links */
}

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

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 2rem 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease;
    }

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

    .nav-toggle {
        display: flex;
    }

    .home-content {
        flex-direction: column; /* Stack image and text vertically on mobile */
        text-align: center; /* Center text on mobile */
        gap: 1.5rem;
    }

    .avatar {
        width: 150px; /* Smaller size on mobile */
        height: 150px;
    }

    .home-content h1 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

    /* Responsive Adjustments for Education */
    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        display: none; /* Hide timeline line on mobile */
    }

    .timeline-marker {
        display: none; /* Hide markers on mobile */
    }

    .timeline-content {
        margin-left: 0;
    }

    .education-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}