/* 1. CSS Reset */

/* ==========
    Design Variables
    Edit these to customize the site safely
===== */

:root {
    --background-color: #f8f9fb;
    --text-color: #1f2937;
    --muted-text-color: #6b7280;
    --accent-color: #4f46e5; /* Soft indigo */
    --border-color: #e5e7eb;

    /* Typography */
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing */
    --section-spacing: 4rem;
}

/* 2. Base Styles */

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
}

/* 3. Typography */

/* ==========
    (Headings, paragraphs, text styles)
========== */

/* 4. Layout (header, footer, grids) */

#intro {
    max-width: 60ch;
    margin-bottom: 3rem;
}

#intro h1 {
    margin-bottom: 0.5rem;
}

.intro-role {
    font-weight: 600;
    margin-bottom: 1rem;
}

.intro-summary {
    line-height: 1.6;
}

/* ==========
    About Preview section
    Short intro with optional link
*/

#about-preview {
    max-width: 60ch;
    margin-top: 4rem;
}

#about-preview p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ==========
    Featured Projects Grid
    Controls Layout of project cards
    Safe to edit columns only
========== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* Project image wrapper */
.project-image {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
}

footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}

footer p {
    margin-bottom: 0.5rem;
}

section {
    margin-bottom: var(--section-spacing);
}

/* 5. Components (nav, cards, links) */

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

nav li {
    display: flex;
    align-items: center;
}

nav a {
    text-decoration: none;
    font-weight: 500;
    color: var(--text-color);
}

nav a:hover, nav a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

nav li + li::before {
    content: "|";
    margin: 0 0.75rem;
    color: var(--muted-text-color);
}

a {
    color: var(--accent-color);
}

a:hover, a:focus-visible {
    text-decoration: underline;
}

/* =========
    Project Card
    Each individual project
*/

.project-card {
    display: flex;
    flex-direction: column;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

/* ==========
    Project Thumbnail Sizing
    Keeps images from dominating cards
    Safe to adjust max-height only
========== */

.project-image img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
}

/* Ensure visible focus for keyboard users */

.project-card a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* 6. Page-specific tweaks (minimal) */

/* ==========
    About Page
    Minimal styling to keep content readable
========== */

#about-intro {
    max-width: 60ch;
    margin-bottom: 3rem;
}

#about-content {
    max-width: 65ch;
}

#about-content p + p {
    margin-top: 1rem;
}