/* --- CSS RESET & BASIC SETUP --- */
:root {
    --color-primary: #E87A33;
    --color-text: #333333;
    --color-text-light: #555555;
    --color-background: #FFFFFF;
    --color-background-dots: #F1F1F1;
    --color-border: #E0E0E0;
    --font-family-main: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
}

body {
    font-family: var(--font-family-main);
    color: var(--color-text);
    background-color: var(--color-background);
    background-image: radial-gradient(var(--color-background-dots) 1px, transparent 1px);
    background-size: 20px 20px;
    line-height: 1.6;
}

img, svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

h1, h2 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75em;
}

h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--color-text);
}

h2 {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    color: var(--color-text);
}

p {
    margin-bottom: 1.5em;
    color: var(--color-text-light);
}

/* --- UTILITY CLASSES --- */
.btn {
    display: inline-block;
    padding: 0.6em 1.5em;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-background);
    border: 1px solid var(--color-primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #d16c2a;
    transform: translateY(-2px);
}

/* --- HEADER & NAVIGATION --- */
.main-header {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-background);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}


.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo__icon {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo__text {
    display: none; /* Hidden on mobile per instructions */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-link svg {
    display: block;
}

/* Mobile Navigation (Checkbox Hack) */
.nav-toggle-checkbox {
    display: none; /* Hide the actual checkbox */
}

.nav-toggle {
    display: block; /* Show hamburger on mobile */
    cursor: pointer;
    z-index: 1001;
    color: var(--color-text);
}

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--color-background);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    padding-top: 5rem;
}

/* When the checkbox is checked, slide the nav in */
#nav-toggle-checkbox:checked ~ .main-nav {
    transform: translateX(0);
}

.main-nav ul {
    display: flex;
    flex-direction: column;
}

.main-nav ul a {
    display: block;
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.main-nav ul a:hover,
.main-nav ul a.active {
    background-color: #f8f8f8;
    color: var(--color-primary);
}

/* --- MAIN CONTENT --- */
.main-content {
    padding: 2rem 0;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.learn-section > article,
.learn-section > .publications-section {
    margin-bottom: 3rem;
}

.publications-section p {
    margin-bottom: 2rem;
}

.resource-list li {
    border-bottom: 1px solid var(--color-border);
}

.resource-list li:first-child {
    border-top: 1px solid var(--color-border);
}

.resource-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.5rem;
    font-weight: 600;
    transition: color 0.2s;
}

.resource-list a:hover {
    color: var(--color-primary);
}

.resource-list a svg {
    transition: transform 0.2s ease-in-out;
}

.resource-list a:hover svg {
    transform: translateX(4px);
}

/* --- DESKTOP & TABLET STYLES --- */
@media (min-width: 992px) {
    .nav-toggle {
        display: none; /* Hide hamburger on desktop */
    }

    .logo__text {
        display: block; /* Show logo text on desktop */
    }

    /* Position nav between logo and actions */
    .header-container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 2rem;
    }

    .main-nav {
        position: static;
        transform: none;
        height: auto;
        width: auto;
        background: none;
        box-shadow: none;
        padding: 0;
        justify-self: center; /* Center the nav links */
    }

    .main-nav ul {
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
        justify-content: center;
        align-items: center;
        white-space: nowrap; /* Prevent links from wrapping */
    }


    .main-nav ul a {
        padding: 0.25rem 0;
        position: relative;
    }

    .main-nav ul a:hover,
    .main-nav ul a.active {
        background-color: transparent;
        color: var(--color-primary);
    }

    /* Underline effect for active/hover links */
    .main-nav ul a::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--color-primary);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .main-nav ul a:hover::after,
    .main-nav ul a.active::after {
        transform: scaleX(1);
    }

    .main-content {
        padding: 4rem 0;
    }
} /* Closing brace for @media (min-width: 992px) */

/* Realistic & Professional Footer Styling */
/* MOVED OUTSIDE MEDIA QUERY TO APPLY GLOBALLY */
.site-footer {
    background-color: #FFFFFF; /* Pure white background for the footer */
    color: #333333;            /* Dark gray for main footer text/elements for contrast */
    padding: clamp(30px, 5vw, 60px) 0; /* Responsive padding top/bottom */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center; /* This centers inline content like text */
    border-top: 1px solid #e0e0e0; /* Subtle light gray top border for separation */
}

/* Inner Container */
.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(15px, 4vw, 30px); /* Responsive horizontal padding */
    display: flex; /* Use flexbox for robust centering of children */
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center children horizontally */
    justify-content: center; /* Center children vertically if container has height */
}

/* --- FOOTER --- */
.site-footer {
    background-color: var(--background-white);
    color: #f0f0f0;
    padding: 30px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    border-top: 1px solid #fff;
}

.footer-wrapper {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link svg {
    width: 28px;
    height: 28px;
    fill: #ddd;
    transition: fill 0.3s ease;
    cursor: pointer;
}

.social-link:hover svg,
.social-link:focus svg {
    fill: #1da1f2;
    outline: none;
}

.social-link[aria-label="Facebook"]:hover svg {
    fill: #1877F2;
}

.social-link[aria-label="Instagram"]:hover svg {
    fill: #E4405F;
}

.social-link:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.site-footer p {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* Responsive Tweaks (most handled by clamp(), but for specific breakpoints) */
@media (max-width: 768px) {
    .site-footer .container {
        padding: 0 clamp(10px, 3vw, 20px); /* More condensed horizontal padding on smaller tablets */
    }

    .site-footer .footer-links {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: clamp(20px, 4vw, 30px) 0; /* Slightly less padding on smallest screens */
    }

    .site-footer p {
        font-size: clamp(13px, 3vw, 14px); /* Smaller font for tiny screens */
    }

    .site-footer .footer-links a {
        margin: 0 8px; /* Reduce spacing between links */
        font-size: clamp(13px, 3vw, 14px);
    }
}