/* GLOBAL RESETS & VARIABLES */
:root {
    --color-primary: #0047AB; /* Cobalt Blue */
    --color-secondary: #F8F8FF; /* Ghost White */
    --color-text: #333;
    --color-dark-bg: #1c273a; /* Dark background for contrast sections */
    --font-family-primary: 'Helvetica Neue', Arial, sans-serif;
    --spacing-unit: 1rem;
}

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

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--color-text);
    background-color: white;
}

/* Reusable Container for Content Centering and Padding */
.container {
    width: 90%;
    max-width: 1200px; /* Max width for desktop viewing */
    margin: 0 auto;
    padding: var(--spacing-unit) 0;
}

/* SECTION STYLING */
.section {
    padding: 4rem 0; /* Generous vertical padding for visual separation */
    min-height: 50vh; /* Ensures sections have visible height */
}

.dark-bg {
    background-color: var(--color-dark-bg);
    color: var(--color-secondary);
}
.dark-bg a {
    color: var(--color-secondary);
}

/* TYPOGRAPHY */
h1, h2, h3 {
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--color-primary);
}
.dark-bg h3 {
    color: var(--color-secondary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1rem; }
ul { margin-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }


/* NAVIGATION (Mobile-First: Stacked and Simple) */
#main-nav {
    background-color: var(--color-dark-bg);
    color: white;
    padding: 0.75rem 0;
    position: sticky; /* Keeps nav visible when scrolling */
    top: 0;
    z-index: 1000;
}

#main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Use full width for mobile nav */
    padding: 0 5%;
}

#main-nav h1 {
    color: white;
    font-size: 1.5rem;
}

.nav-links {
    display: none; /* Hidden by default on mobile */
    flex-direction: column;
    width: 100%;
    text-align: center;
    background-color: var(--color-dark-bg);
    position: absolute;
    top: 100%; /* Position below the nav bar */
    left: 0;
}

.nav-links.active {
    display: flex; /* Shown when JavaScript toggles the 'active' class */
}

.nav-links li {
    list-style: none;
    padding: 0;
}

.nav-links a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: var(--color-secondary);
    transition: background-color 0.3s;
}

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

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: block; /* Visible on mobile */
}

/* HERO SECTION */
#hero {
    background: var(--color-secondary); /* Use an image here later if desired */
    text-align: center;
    padding: 6rem 0;
}

/* CTA BUTTONS */
.cta-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: 2px solid var(--color-primary);
}

.cta-button:hover {
    background-color: transparent;
    color: var(--color-primary);
}

/* CONTACT FORM STYLING */
#contact form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto 0;
    padding: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: var(--color-secondary);
}

#contact label {
    font-weight: bold;
    color: var(--color-primary);
}

#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
}

#contact textarea {
    resize: vertical;
}


/* FOOTER */
footer {
    text-align: center;
    padding: 2rem 0;
    background-color: var(--color-dark-bg);
    color: var(--color-secondary);
    font-size: 0.9rem;
}
footer a {
    color: var(--color-secondary);
}

/* ------------------------------------------------------------------- */
/* MEDIA QUERY: Desktop and Tablet Styles (Over 768px) */
/* ------------------------------------------------------------------- */
@media (min-width: 768px) {
    
    /* Navigation: Horizontal Display */
    #main-nav .container {
        padding: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        position: static; /* Remove mobile positioning */
        width: auto;
    }

    .nav-links a {
        padding: 0.5rem 1rem;
    }

    .menu-toggle {
        display: none; /* Hide the hamburger icon on larger screens */
    }

    /* Typography adjustments for desktop legibility */
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    
    /* Section Layout (e.g., could use flexbox to align content side-by-side) */
    .section {
        padding: 6rem 0;
    }

    .project-section .container {
        /* Example: If you wanted a two-column layout for project details */
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 2rem;
        align-items: start;
    }
    .project-section h3 {
        grid-column: 1 / span 2; /* Make the title span both columns */
    }
}