/* ===== Google Fonts Import ===== */
/* Playfair Display for headings, Lato for body text — gives the site a unique, polished feel */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:wght@400;700;800&display=swap');

/* ===== Global Reset & Base Styles ===== */
/* Box-sizing border-box makes padding/margin calculations easier */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body uses warm off-white background to distinguish from default white template look */
body {
    font-family: 'Lato', sans-serif;
    background-color: #f5f0eb;
    color: #2c2c2c;
    line-height: 1.7;
}

/* ===== Header & Site Title ===== */
/* Dark navy gradient header gives the site its own identity, distinct from the Canvas site */
header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding: 2rem 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Title block centers the site name and subtitle */
.title-block {
    text-align: center;
    margin-bottom: 1rem;
}

/* Main heading uses Playfair Display serif font for an academic, editorial feel */
.title-block h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    border-bottom: 3px solid #c0392b;
    display: inline-block;
    padding-bottom: 0.3rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

/* Subtitle styled lighter and smaller for visual hierarchy */
.title-block h2 {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: #b0b0b0;
    letter-spacing: 1px;
    margin-top: 0.4rem;
}

/* ===== Navigation Bar ===== */
nav {
    margin-top: 0.75rem;
}

/* Flex layout for navigation links, wraps on small screens */
.action-bar {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.25rem;
}

/* Navigation link buttons with red background */
.action-bar a {
    background-color: #c0392b;
    color: #ffffff;
    padding: 0.55rem 1.3rem;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

/* Hover effect lifts the button slightly */
.action-bar a:hover {
    background-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Active page link uses WHITE background with DARK text for maximum contrast */
/* This addresses accessibility feedback about red-on-red being hard for colorblind users */
.action-bar a.active {
    background-color: #ffffff;
    color: #1a1a2e;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ===== Page Content Wrapper ===== */
/* This div constrains all page content to a readable width with consistent margins */
/* Addresses professor feedback about text going edge-to-edge */
.page-wrapper {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ===== Typography ===== */
/* All headings use Playfair Display for consistency across pages */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
}

main h1 {
    font-size: 2rem;
    color: #1a1a2e;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

main h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

main h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

main p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

/* Section title used for centered page headings */
.section-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

/* ===== Home Page Banner ===== */
/* Banner image is constrained and rounded for a polished look */
.banner {
    display: block;
    margin: 0 auto 2rem;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* ===== Welcome Panel (Home Page) ===== */
/* Card-style panel with a red left border accent */
.welcome-panel {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    border-left: 6px solid #c0392b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
}

.welcome-panel p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #333;
}

.welcome-panel .group {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* ===== Page Preview Cards (Home Page) ===== */
/* Grid of clickable cards that preview other sections of the site */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Each preview card is a clickable link styled as a card */
.preview-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    border-top: 4px solid #c0392b;
}

/* Card hover effect — lifts up to show interactivity */
.preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.preview-card h3 {
    font-family: 'Playfair Display', serif;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.preview-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ===== About Page ===== */
/* Profile container uses flexbox for side-by-side headshot and bio layout */
.about-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Circular headshot images with red accent border */
.about-container .headshot {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #c0392b;
    flex-shrink: 0;
}

/* Bio text takes up remaining space */
.about-text {
    flex: 1;
}

.about-text h2 {
    font-family: 'Playfair Display', serif;
    margin-top: 0;
    font-size: 1.8rem;
    color: #c0392b;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}

/* Dashed divider line between team member profiles — addresses peer feedback about spacing */
.about-divider {
    border: none;
    border-top: 2px dashed #d4c5b9;
    margin: 2.5rem auto;
    width: 60%;
}

/* ===== Resources Page ===== */
/* Resources page uses its own wrapper for consistent max-width */
.resources-page {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 2rem;
    color: #2c2c2c;
}

/* Page title for resources page */
.resources-page h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
    text-align: center;
}

/* Intro paragraph centered below the title */
.resources-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* Each resource topic is styled as a white card with red left border */
.resource-category {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #c0392b;
}

.resource-category h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #1a1a2e;
    border-bottom: 2px solid #e8ddd3;
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
    margin-top: 0;
}

.resource-category p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Links within resource sections use red color and underline */
.resource-category a {
    color: #c0392b;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.resource-category a:hover {
    color: #e74c3c;
}

/* Styled button-style link for key resources — uses higher specificity to override .resource-category a */
.resource-category a.resource-link {
    display: inline-block;
    background-color: #c0392b;
    color: #ffffff;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.resource-category a.resource-link:hover {
    background-color: #e74c3c;
    transform: translateY(-1px);
    color: #ffffff;
}

/* Responsive video embed container — maintains 16:9 aspect ratio */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Iframe stretches to fill the responsive container */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* Dark call-to-action box for the IAT test — draws attention visually */
.cta-box {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin: 2rem 0;
}

.cta-box h2 {
    color: #ffffff;
    border-bottom: none;
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.cta-box p {
    color: #d0d0d0;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

/* Button link inside the CTA box */
.cta-box a {
    display: inline-block;
    background-color: #c0392b;
    color: #ffffff;
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 0.5rem;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.cta-box a:hover {
    background-color: #e74c3c;
    transform: translateY(-2px);
}

/* Closing quote/reminder styled as an italic card */
.resources-closing {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #1a1a2e;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
    font-style: italic;
}

/* ===== Tech Hero Page ===== */
/* Each tech hero profile is a white card with centered image and left-aligned text */
.tech-hero-section {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

/* Tech hero portrait image — full width with rounded corners and red border */
.tech-hero-section img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 4px solid #c0392b;
    margin-bottom: 1.5rem;
}

/* Text content within each hero section is left-aligned for readability */
.tech-hero-text {
    text-align: left;
}

.tech-hero-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #c0392b;
    text-align: center;
    margin-top: 0;
}

.tech-hero-text h3 {
    color: #1a1a2e;
    margin-top: 1rem;
}

.tech-hero-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 1.2rem;
}

/* Blockquote styling for tech hero quotes — left red border with warm background */
.tech-hero-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: #555;
    font-size: 1.1rem;
    border-left: 4px solid #c0392b;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: #faf6f2;
    border-radius: 0 8px 8px 0;
}

/* Resource links listed vertically below each hero profile */
.tech-hero-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.5rem;
}

.tech-hero-links h3 {
    text-align: center;
}

.tech-hero-links a {
    color: #c0392b;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.tech-hero-links a:hover {
    color: #e74c3c;
}

/* Red divider line between tech hero profiles */
.hero-divider {
    border: none;
    border-top: 3px solid #c0392b;
    margin: 3rem auto;
    width: 40%;
}

/* ===== Responsive Design ===== */
/* Adjustments for tablets and mobile devices */
@media (max-width: 768px) {
    .title-block h1 {
        font-size: 1.8rem;
    }

    /* Stack nav links vertically on small screens */
    .action-bar {
        flex-direction: column;
        align-items: center;
    }

    /* Stack about page layout vertically on small screens */
    .about-container {
        flex-direction: column;
        text-align: center;
    }

    /* Reduce side padding on mobile */
    .page-wrapper,
    .resources-page {
        padding: 0 1rem;
    }

    /* Single column grid on mobile */
    .preview-grid {
        grid-template-columns: 1fr;
    }
}
