/* General Styling & Variables */
:root {
    --primary-color: #2c3e50; /* Dark Blue */
    --secondary-color: #3498db; /* Bright Blue */
    --background-color: #ecf0f1; /* Light Gray */
    --text-color: #34495e; /* Dark Gray */
    --card-bg-color: #ffffff;
    --font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header and Navigation */
header {
    background-color: var(--card-bg-color);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

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

/* General Section Styling */
.content-section {
    padding: 5rem 10%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Hero Section */
#hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?q=80&w=2070') center/cover no-repeat;
    color: white;
    padding: 2rem;
}

#hero h1 {
    font-size: 4rem;
    margin: 0;
}

#hero .subtitle {
    font-size: 1.5rem;
    margin: 1rem 0 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

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

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

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: auto;
}

.about-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.about-text h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

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

.skill-category {
    background: var(--card-bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.skill-category h3 {
    color: var(--secondary-color);
    margin-top: 0;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 1rem 0;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 2.5rem;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 2.5rem;
    text-align: left;
}

.timeline-item ul {
    text-align: left;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border: 3px solid var(--secondary-color);
    border-radius: 50%;
    top: 1.5rem;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -8px;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-company {
    font-weight: 600;
    color: var(--secondary-color);
}

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

.project-card {
    background: var(--card-bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-card h3 {
    color: var(--primary-color);
    margin: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.project-card p {
    padding: 0 1.5rem;
    flex-grow: 1; /* Pushes links to the bottom */
}

.project-tech {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
}

.project-tech span {
    display: inline-block;
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 0.2rem;
}

.project-links {
    padding: 0 1.5rem 1.5rem 1.5rem;
    display: flex;
    gap: 0.5rem;
}
.project-links .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.project-links .btn-secondary {
    background-color: transparent;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}
.project-links .btn-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}


/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: auto;
}

.education-item, .certifications-item {
    background: var(--card-bg-color);
    padding: 2rem;
    border-radius: 8px;
}

/* Footer / Contact */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 4rem 10%;
}

footer h2 {
    color: white;
}

footer .btn {
    background-color: white;
    color: var(--primary-color);
    margin: 1rem 0;
    border-color: white;
}

footer .btn:hover {
    background-color: #f0f0f0;
}

.social-links {
    margin: 2rem 0;
}

.social-links a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.copyright {
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        height: 100vh;
        background-color: var(--card-bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links li {
        margin: 2rem 0;
    }
    .hamburger {
        display: block;
        z-index: 1001; /* Make sure it's above the nav */
    }
    .hamburger.toggle .line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .hamburger.toggle .line:nth-child(2) {
        opacity: 0;
    }
    .hamburger.toggle .line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

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

    h2 {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 4rem 5%;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-image {
        margin: 0 auto;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }

    .timeline-item::after {
        left: 15px;
    }

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