/* ============================================================
   JUSTIN FRENCH — DIGITAL RESUME
   Mobile-first. Separate CSS. Cloudflare Pages ready.
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
    --paper: #f6f3ec;
    --paper-2: #efeae0;
    --ink: #16181d;
    --muted: #5c6370;
    --line: #ddd4c6;
    --navy: #152238;
    --navy-2: #1e3354;
    --accent: #2b5ea8;
    --result: #1d4d3c;
    --white: #fffcf7;
    --max: 1080px;
    --header-h: 64px;
    --sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* ---------- RESET / BASE ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    font-size: 1.02rem;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent);
}

h1,
h2,
h3,
p,
dl,
dd,
dt,
blockquote,
figure {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.15;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2rem);
}

h3 {
    font-size: 1.15rem;
}

ul {
    margin: 0;
    padding-left: 1.1rem;
}

li + li {
    margin-top: 0.35rem;
}

/* ---------- LAYOUT ---------- */
.wrap {
    width: min(100% - 2rem, var(--max));
    margin-inline: auto;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--paper-2);
    border-block: 1px solid var(--line);
}

.section-head {
    margin-bottom: 1.75rem;
}

.eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.45rem;
}

/* ---------- SKIP LINK ---------- */
.skip-link {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 200;
    background: var(--navy);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* ---------- HEADER ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 243, 236, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    width: min(100% - 2rem, var(--max));
    margin-inline: auto;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--navy);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.brand-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem 1rem;
}

.nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.nav a:hover,
.nav a:focus-visible {
    color: var(--navy);
}

/* ---------- HERO ---------- */
.hero {
    padding: 3.2rem 0 2.6rem;
}

.hero h1 {
    font-size: clamp(2.4rem, 8vw, 4.4rem);
    font-weight: 600;
    letter-spacing: -0.035em;
}

.hero-role {
    margin-top: 0.7rem;
    color: var(--muted);
    font-weight: 500;
}

.hero-lead {
    margin-top: 1.4rem;
    max-width: 36rem;
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2.4vw, 1.55rem);
    line-height: 1.4;
}

.hero-summary {
    margin-top: 1rem;
    max-width: 40rem;
    color: var(--muted);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1rem;
    margin-top: 2.4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.metric dt {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.metric dd {
    font-family: var(--serif);
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-top: 0.15rem;
}

/* ---------- EXPERIENCE ---------- */
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--line);
}

.timeline > li {
    padding: 0 0 2rem 1.25rem;
    position: relative;
}

.timeline > li:last-child {
    padding-bottom: 0;
}

.timeline > li::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 0.55rem;
    width: 7px;
    height: 7px;
    background: var(--navy);
}

.role-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
    row-gap: 0.2rem;
    margin-bottom: 0.7rem;
    align-items: baseline;
}

.role-meta h3,
.role-org {
    grid-column: 1;
}

.role-dates {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    text-align: right;
    white-space: nowrap;
}

.role-dates,
.role-org {
    color: var(--muted);
    font-size: 0.92rem;
}

.role-org {
    font-weight: 500;
}

.role ul {
    color: var(--ink);
}

/* ---------- PROJECTS ---------- */
.project-grid {
    display: grid;
    gap: 1rem;
}

.project {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 1.25rem 1.2rem 1.1rem;
}

.project h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.project dl {
    display: grid;
    gap: 0.85rem;
}

.project dt {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.project-result dt,
.project-result dd {
    color: var(--result);
}

/* ---------- SKILLS ---------- */
.skill-grid {
    display: grid;
    gap: 0.85rem;
}

.skill {
    padding: 1.1rem 1.05rem 1.05rem;
    border-top: 2px solid var(--navy);
    background: var(--white);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.skill p {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.97rem;
}

/* ---------- QUOTES ---------- */
.quotes {
    background: var(--navy);
    color: #e8e4db;
    padding: 4rem 0;
}

.quotes .eyebrow {
    color: #9bb4d9;
}

.quotes h2 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.quotes blockquote p {
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    line-height: 1.45;
    color: #fff;
    min-height: 4.2em;
    transition: opacity 0.35s ease;
}

.quotes cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-size: 0.9rem;
    color: #b7c3d4;
    transition: opacity 0.35s ease;
}

.quote-controls {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.quote-controls button {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

.quote-controls button:hover,
.quote-controls button:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

#dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.dot.active {
    background: #fff;
}

/* ---------- ABOUT ---------- */
.about-grid {
    display: grid;
    gap: 2.4rem;
}

.prose {
    display: grid;
    gap: 1rem;
    max-width: 40rem;
    color: var(--muted);
}

.prose p:first-child {
    color: var(--ink);
}

.approach {
    background: var(--navy);
    color: #e8e4db;
    padding: 1.5rem 1.3rem;
}

.approach h2 {
    color: #fff;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.approach ul {
    list-style: none;
    padding: 0;
}

.approach li + li {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.approach strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

/* ---------- FOOTER ---------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 1.5rem 0 2rem;
}

.footer-inner {
    display: grid;
    gap: 0.75rem;
}

.footer-name {
    font-family: var(--serif);
    font-weight: 600;
}

.footer-role,
.footer-copy {
    color: var(--muted);
    font-size: 0.88rem;
}

/* ---------- MOTION ---------- */
.fade {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade.visible {
    opacity: 1;
    transform: none;
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 700px) {
    .metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-wide {
        grid-column: 1 / -1;
    }

    .skill-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-inner {
        grid-template-columns: 1fr auto;
        align-items: end;
    }
}

@media (min-width: 980px) {
    .hero {
        padding: 4.5rem 0 3.2rem;
    }

    .section {
        padding: 5rem 0;
    }

    .skill-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .about-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
        gap: 3rem;
        align-items: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .fade,
    .quotes blockquote p,
    .quotes cite {
        transition: none;
    }

    .fade {
        opacity: 1;
        transform: none;
    }
}
