/* Basic Reset & Variables */
:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #6c757d; /* Gray */
    --accent-color: #ffc107; /* Yellow */
    --text-color: #333;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --header-background: #343a40; /* Dark gray for header/navbar */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    scroll-behavior: smooth;
    /* Smooth scrolling for anchor links */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.primary-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.primary-btn:hover {
    background-color: #0056b3; /* Darker blue */
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    margin-right: 10px;
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* --- Header / Hero Section --- */
.hero-section {
    background: var(--header-background); /* Dark background */
    color: #fff;
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden; /* Hide overflow for potential background animations */
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0; /* Will animate in with JS */
    transform: translateY(20px); /* Will animate in with JS */
}

.hero-title .highlight {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0; /* Will animate in with JS */
    transform: translateY(20px); /* Will animate in with JS */
    animation-delay: 0.2s; /* Stagger animation */
}

.hero-section .btn {
    opacity: 0; /* Will animate in with JS */
    transform: translateY(20px); /* Will animate in with JS */
    animation-delay: 0.4s; /* Stagger animation */
}

/* --- Navbar --- */
.navbar {
    background-color: var(--header-background);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: center; 
    align-items: center;
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: #fff;
    font-weight: bold;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { 
    width: 100%;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* --- Sections --- */
.section {
    padding: 80px 0;
    text-align: center;
}

.section:nth-of-type(even) { /* Alternate background for sections */
    background-color: #e9ecef;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5em;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    color: var(--header-background);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background-color: var(--primary-color);
    left: 20%;
    bottom: -10px;
    border-radius: 2px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1em;
    text-align: left;
    line-height: 1.8;
}
.about-content p {
    margin-bottom: 15px;
}

/* Skills Section */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    cursor: pointer;
}

.skill-item {
    background-color: var(--card-background);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.project-thumbnail {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Crop image to fit */
    display: block;
}

.project-info {
    padding: 20px;
    flex-grow: 1; /* Allows info to take up remaining space */
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--header-background);
}

.project-info p {
    font-size: 0.95em;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-links .btn {
    font-size: 0.9em;
    padding: 8px 15px;
}

/* Contact Section */
.contact-description {
    font-size: 1.1em;
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-item {
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-item:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.contact-item i {
    font-size: 1.3em;
    color: var(--primary-color);
}

/* --- Footer --- */
footer {
    background-color: var(--header-background);
    color: #fff;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

/* --- Animations (Initial State - will be controlled by JS) --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for hero section */
.hero-title.is-visible,
.hero-subtitle.is-visible,
.hero-section .btn.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5em;
    }

    .hero-subtitle {
        font-size: 1em;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2em;
    }

    .nav-links li {
        margin: 0 10px;
    }

    .skills-grid {
        gap: 15px;
    }

    .skill-item {
        padding: 12px 20px;
    }

    .project-grid {
        grid-template-columns: 1fr; /* Stack projects on smaller screens */
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}