/* ==========================================================================
   RobCParker.com — Main Stylesheet
   Mobile-first, CSS custom properties, no external dependencies
   ========================================================================== */

/* ==========================================================================
   0. TYPOGRAPHY — @font-face (SPEC-008: self-hosted Fraunces + Inter)
   ========================================================================== */

/* WHY: fonts are self-hosted to eliminate the Google Fonts third-party
   dependency (per SPEC-008 A-5). Served from /fonts/ with long-lived
   immutable Cache-Control (_headers rule). font-display: swap prevents
   blocking the first paint — fallback serif/sans render immediately. */

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-variable.woff2") format("woff2-variations"),
         url("/fonts/inter-variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Fraunces";
    src: url("/fonts/fraunces-variable.woff2") format("woff2-variations"),
         url("/fonts/fraunces-variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   1. CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
    /* Color Palette — SPEC-008 / SPEC-009 design system
       All text/background combinations verified against WCAG 2.1 via relative-luminance formula.

       On --color-cream (#F7F6F2) — page background:
         --color-charcoal (#111318) on --color-cream:                 17.2:1  — AAA
         --color-text-muted (#5C5854) on --color-cream:                6.54:1 — AA normal text
         --color-text-subtle (#8A8480) on --color-cream:               3.41:1 — AA large only
         --color-magenta-text (#A51D65) on --color-cream:              6.56:1 — AA normal text (inline links)
         --color-charcoal (#111318) on --color-magenta (#E8449B):      5.07:1 — AA (primary button label)
         --color-magenta (#E8449B) on --color-charcoal (#111318):      5.07:1 — AA (accent on dark)
         --color-magenta (#E8449B) on --color-cream:                   3.39:1 — AA large only (display/buttons/focus)
         --color-magenta-hover (#CC3A88) on --color-cream:             4.29:1 — AA large (button hover)
         --color-border-hairline (#7E7A74) on --color-cream:           3.95:1 — passes 1.4.11

       On --surface-color (#EDEBE4) — section-alt band (SPEC-009 R4, darkened from #F3F1EB):
         --color-charcoal on --surface-color:                         15.57:1 — AAA
         --color-text-muted on --surface-color:                        5.91:1 — AA normal text
         --color-text-subtle on --surface-color:                       3.09:1 — AA large only; NEAR FLOOR
         --color-magenta-text on --surface-color:                      5.94:1 — AA normal text
         --color-magenta on --surface-color:                           3.07:1 — AA large only; NEAR FLOOR
         --color-magenta-hover on --surface-color:                     3.89:1 — AA large
         --color-border-hairline (#7E7A74) on --surface-color:         3.58:1 — passes 1.4.11

       On --color-surface-elevated (#F3F1EB) — card surface (unchanged):
         --color-border-hairline (#7E7A74) on --color-surface-elevated: 3.78:1 — passes 1.4.11

       WHY: --color-cream (#F7F6F2) replaces pure white per SPEC-008 AP-2.
       WHY: Charcoal label on magenta button (5.07:1) is required — cream on magenta fails AA normal.
       WHY: --color-text-subtle and --color-magenta margins above 3:1 are narrow on --surface-color
            (0.09 and 0.07 respectively). Do not darken --surface-color further without re-verifying.
       WHY (SPEC-009 AG-1): --color-border-hairline darkened from #8E8A84 to #7E7A74 so hairlines
            pass WCAG 1.4.11 on the new --surface-color band. All three surfaces now compliant.
    */

    /* Core palette — SPEC-008 */
    --color-charcoal: #111318;
    --color-cream: #F7F6F2;
    --color-magenta: #E8449B;

    /* Derived text shades on cream */
    --color-text-primary: #111318;
    --color-text-muted: #5C5854;
    --color-text-subtle: #8A8480;

    /* Surfaces on cream */
    --color-surface-elevated: #F3F1EB;
    --color-border-hairline: #7E7A74;

    /* Magenta variants */
    --color-magenta-hover: #CC3A88;
    --color-magenta-muted: #F7BBDB;
    --color-magenta-text: #A51D65;

    /* Dark-surface derivatives (for text/borders on --color-charcoal) */
    --color-text-on-dark: #F7F6F2;
    --color-text-muted-on-dark: #B8B4AE;
    --color-text-subtle-on-dark: #8E8A84;
    --color-border-dark: #2E2F36;

    /* Legacy token aliases — preserved names, new values (R1 semantic layer).
       --primary-color, --secondary-color, --accent-color all removed (SPEC-008
       A-7 + SPEC-009 R2). Remaining aliases below are retained because their
       callsites have not yet been migrated to explicit tokens. */
    --text-color: #111318;
    --text-muted: #5C5854;
    --text-light: #F7F6F2;
    --background-color: #F7F6F2;
    --surface-color: #EDEBE4;
    --surface-dark: #111318;
    --border-color: #7E7A74;
    --text-muted-dark: #B8B4AE;
    --text-subtle-dark: #8E8A84;
    --text-on-dark: #F7F6F2;
    --border-dark: #2E2F36;

    /* Typography — SPEC-008: self-hosted Fraunces (display) + Inter (body) */
    --font-family-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-family-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-family-mono: ui-monospace, "SFMono-Regular", Consolas,
        "Liberation Mono", Menlo, monospace;

    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    --font-size-5xl: 3rem;      /* 48px */

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.2;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;

    /* Spacing Scale */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */

    /* Layout */
    --container-max-width: 1100px;
    --container-padding: var(--space-6);

    /* Borders */
    --border-radius-sm: 0.25rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ==========================================================================
   2. CSS RESET / NORMALIZE
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

ul,
ol {
    list-style: none;
}

a {
    color: var(--color-magenta-text);
    text-decoration: underline;
}

a:hover {
    color: var(--color-magenta-text);
}

/* ==========================================================================
   3. ACCESSIBILITY
   ========================================================================== */

/* Visually hidden — accessible to screen readers, invisible to sighted users.
   WHY: Preferred over aria-label on a section because it preserves a real
   DOM heading for screen reader navigation (landmark + heading = better UX). */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip-to-content link — visually hidden until focused */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: 9999;
    padding: var(--space-3) var(--space-6);
    background-color: var(--color-magenta);
    color: var(--color-charcoal);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* WHY (SPEC-008 QA-B2): Use the canonical new token --color-magenta rather
   than the legacy --primary-color alias. Focus rings are WCAG-critical —
   aliasing risks silent breakage if the alias is ever remapped. */
:focus-visible {
    outline: 3px solid var(--color-magenta);
    outline-offset: 2px;
}

/* WHY: Sticky header (64px) would obscure skip-link target without offset */
#main-content {
    scroll-margin-top: 80px;
}

/* ==========================================================================
   4. LAYOUT — Container
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* ==========================================================================
   5. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-color);
}

/* WHY: H1/H2 use Fraunces display serif per SPEC-008. H3–H6 stay in Inter
   (via body inheritance) — display serif at smaller sizes reduces legibility. */
h1, h2 {
    font-family: var(--font-family-display);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-4xl); line-height: 1.05; }
h2 { font-size: var(--font-size-3xl); line-height: 1.1; }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
    line-height: var(--line-height-relaxed);
    color: var(--text-muted);
}

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.btn {
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: 0.02em;
    text-decoration: none;
    /* WHY: R3.3 — sharp button corners (≤4px) diverge from pill/heavily-rounded
       template pattern (AP-5). */
    border-radius: var(--border-radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color var(--transition-base),
                color var(--transition-base),
                border-color var(--transition-base),
                box-shadow var(--transition-base);
    /* WHY: Minimum 44x44px touch target per WCAG 2.5.5 */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* WHY: btn-primary uses charcoal label (#111318 on #E8449B = 5.07:1 AA).
   Cream/white on magenta is 3.39:1 — fails AA normal text. See contrast
   verification block in :root. */
.btn-primary {
    background-color: var(--color-magenta);
    color: var(--color-charcoal);
    border-color: var(--color-magenta);
}

.btn-primary:hover {
    background-color: var(--color-magenta-hover);
    border-color: var(--color-magenta-hover);
    color: var(--color-charcoal);
}

/* WHY: Split 1 — text uses --color-magenta-text (AA normal, 6.56:1 on cream),
   border uses --color-magenta (decorative UI, passes 1.4.11). */
.btn-secondary {
    background-color: transparent;
    color: var(--color-magenta-text);
    border-color: var(--color-magenta);
}

.btn-secondary:hover {
    background-color: var(--color-magenta);
    color: var(--color-charcoal);
}

.btn-white {
    background-color: var(--color-cream);
    color: var(--color-charcoal);
    border-color: var(--color-cream);
}

.btn-white:hover {
    background-color: var(--color-surface-elevated);
    border-color: var(--color-surface-elevated);
    color: var(--color-charcoal);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--color-text-on-dark);
    border-color: var(--color-text-on-dark);
}

.btn-outline-white:hover {
    background-color: var(--color-cream);
    color: var(--color-charcoal);
}

/* ==========================================================================
   7. NAVIGATION
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-logo:hover {
    color: var(--color-magenta);
}

/* Navigation links — visible by default (no-JS baseline) */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-links a {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-muted);
    text-decoration: none;
    padding: var(--space-2) var(--space-1);
    border-bottom: 2px solid transparent;
    transition: color var(--transition-base), border-color var(--transition-base);
}

/* WHY: R3.5 — nav hover is underline-only, not a text color change.
   Active state gets magenta border-bottom; text color unchanged from default.
   Preserves main.js initActiveNav() behavior (class toggle only, no inline styles). */
.nav-links a:hover {
    border-bottom-color: var(--color-magenta);
}

.nav-links a.active {
    border-bottom-color: var(--color-magenta);
}

/* Hamburger button — hidden by default (no-JS baseline: plain list is shown)
   WHY (IG-4): The button only becomes visible when JS adds .js-enabled to body.
   Without JS, users see the full nav list — no broken toggle. */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: var(--space-2);
    background: none;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    color: var(--text-color);
    transition: background-color var(--transition-fast);
}

.nav-toggle:hover {
    background-color: var(--surface-color);
}

.nav-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}

.nav-toggle-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Hamburger → X animation when nav is open */
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile navigation — applied when .js-enabled is on body */
@media (max-width: 767px) {
    .js-enabled .nav-toggle {
        display: flex;
    }

    .js-enabled .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background-color: var(--background-color);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        padding: var(--space-4) 0;
    }

    .js-enabled .nav-links.is-open {
        display: flex;
    }

    .js-enabled .nav-links a {
        padding: var(--space-4) var(--space-6);
        border-bottom: none;
        border-left: 3px solid transparent;
        font-size: var(--font-size-base);
    }

    .js-enabled .nav-links a:hover,
    .js-enabled .nav-links a.active {
        border-left-color: var(--color-magenta);
        background-color: var(--surface-color);
    }
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */

.site-footer {
    background-color: var(--surface-dark);
    color: var(--text-light);
    padding: var(--space-12) 0 var(--space-8);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-logo {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-light);
    text-decoration: none;
}

.footer-logo:hover {
    color: var(--color-magenta);
}

.footer-tagline {
    color: var(--text-muted-dark);
    font-size: var(--font-size-sm);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4) var(--space-8);
}

.footer-nav a {
    color: var(--text-muted-dark);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-base);
}

.footer-nav a:hover {
    color: var(--text-light);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-dark);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.footer-copyright {
    color: var(--text-subtle-dark);
    font-size: var(--font-size-sm);
}

.footer-social a {
    color: var(--text-muted-dark);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-base);
}

.footer-social a:hover {
    color: var(--text-light);
}

/* ==========================================================================
   9. HERO SECTION — SPEC-008 Concept A (Two-Column Asymmetric)
   ========================================================================== */

/* WHY: R3.1 Concept A — cream hero with charcoal text, 12-col grid with
   58/42 asymmetric split, bottom-aligned. Diverges from AP-3 template
   centered-with-stacked-dual-CTAs pattern. */
.hero {
    background-color: var(--color-cream);
    color: var(--color-text-primary);
    padding: var(--space-20) 0 var(--space-16);
    border-bottom: 1px solid var(--color-border-hairline);
}

/* Legacy .hero-content wrapper retained for subpage compatibility (resume
   document-style header, about hero-profile variant). Single-column fallback
   when the Concept A grid markup is not applied. */
.hero-content {
    max-width: 860px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-8);
    align-items: end;
    min-height: 320px;
}

.hero-headline-col {
    grid-column: 1 / 8;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-copy-col {
    grid-column: 8 / 13;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: var(--space-8);
    padding-bottom: 0.25rem;
}

/* WHY: AP-8 — eyebrow on cream is charcoal-muted at hairline weight,
   NOT magenta (magenta fails AA at small eyebrow scale and reads as
   color-block template accent). On dark surfaces (e.g. .cta-section),
   a separate eyebrow variant would use magenta. */
.hero-eyebrow {
    display: block;
    font-family: var(--font-family-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.hero h1 {
    color: var(--color-text-primary);
    font-family: var(--font-family-display);
    font-size: clamp(3rem, 5vw, 4.75rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 0;
}

.hero-subheadline {
    font-family: var(--font-family-base);
    font-size: var(--font-size-lg);
    line-height: 1.65;
    color: var(--color-text-muted);
    margin-bottom: 0;
    max-width: none;
}

/* Legacy horizontal CTA stack — preserved for subpage use during propagation */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

/* Concept A: vertical CTA stack inside .hero-copy-col */
.hero-cta-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
}

/* Editorial text-link CTA variant (R3.3) — magenta underline + arrow glyph.
   Use for secondary hero CTAs and inline editorial affordances where a
   filled button would be visually heavy. */
.btn-textlink {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--color-magenta);
    padding-bottom: 1px;
    transition: color var(--transition-base);
}

.btn-textlink:hover {
    color: var(--color-magenta-text);
}

.btn-textlink:focus-visible {
    outline: 2px solid var(--color-magenta);
    outline-offset: 3px;
}

.btn-textlink .arrow {
    display: inline-block;
    transition: transform var(--transition-base);
}

.btn-textlink:hover .arrow {
    transform: translateX(3px);
}

/* Hero grid collapse at tablet + mobile */
@media (max-width: 1023px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }
    .hero-headline-col { grid-column: 1 / 2; }
    .hero-copy-col { grid-column: 2 / 3; }
    .hero h1 {
        font-size: clamp(2.25rem, 4vw, 3.25rem);
    }
}

@media (max-width: 767px) {
    .hero {
        padding: var(--space-16) 0 var(--space-12);
    }
    .hero-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .hero-headline-col,
    .hero-copy-col {
        grid-column: 1 / -1;
    }
    .hero h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
}

/* WHY (SPEC-009 R1): Contact hero uses a left-aligned single-column variant
   rather than the Concept A 58/42 grid. The page has no second-column content
   candidate (no photo, no CTA, no secondary block) — a grid here would produce
   an empty right column reading as a template slot. Left-aligned asymmetry on
   cream still carries SPEC-008 editorial language. Do not migrate to .hero-grid. */
.contact-page-hero .hero-content {
    max-width: 640px;
    margin-left: 0;      /* left-align, not centered */
    text-align: left;
}

/* ==========================================================================
   10. SECTION UTILITIES
   ========================================================================== */

.section {
    padding: var(--space-20) 0;
}

.section-alt {
    background-color: var(--surface-color);
}

/* WHY (SPEC-009 R3 / AG-3): .section-rule-top — hairline rule above a section
   in lieu of alternating band treatment. Used on document-dense pages (resume)
   where editorial dividers read better than band alternation per SPEC-008 R3.4. */
.section-rule-top {
    border-top: 1px solid var(--color-border-hairline);
}

.section-dark {
    background-color: var(--surface-dark);
    color: var(--text-light);
}

.section-header {
    margin-bottom: var(--space-12);
}

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    font-size: var(--font-size-lg);
    max-width: 600px;
}

.section-dark .section-header h2 {
    color: var(--text-light);
}

/* ==========================================================================
   11. EXPERIENCE HIGHLIGHTS (Metrics-style cards)
   ========================================================================== */

.highlights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

/* WHY: R3.2 — thin-hairline border on tinted elevated surface; no drop-shadow
   (AP-4 diverge from template SaaS card grammar). */
.highlight-card {
    padding: var(--space-8);
    background-color: var(--color-surface-elevated);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border-hairline);
}

.highlight-metric {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-magenta);
    line-height: 1;
    margin-bottom: var(--space-2);
}

.highlight-label {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    margin-bottom: var(--space-3);
}

.highlight-desc {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--text-muted);
}

/* ==========================================================================
   12. SERVICE CARDS
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

/* WHY: R3.2 — thin-hairline border on tinted elevated surface; no drop-shadow.
   Hover affordance preserved via border-color darken + translateY lift
   (AG-2 option b). Applies to .engagement-card via composition (SPEC-005 AG-1). */
.service-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-8);
    background-color: var(--color-surface-elevated);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border-hairline);
    transition: border-color var(--transition-base), transform var(--transition-base);
}

.service-card:hover {
    border-color: var(--color-charcoal);
    transform: translateY(-2px);
}

.service-card h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-4);
    color: var(--text-color);
}

.service-card p {
    flex: 1;
    margin-bottom: var(--space-8);
}

/* ==========================================================================
   12a. ENGAGEMENT CARDS (SPEC-005)
   ========================================================================== */

/* WHY: .engagement-card is a composition on .service-card, not a fork (SPEC-005 AG-1).
   Base card chrome — padding, background, border-radius, border, shadow, hover lift —
   is inherited from .service-card. This block defines only sub-element styles specific
   to the engagement card (description spacing, meta list). Do not duplicate base chrome
   here; any visual identity change to the card shell should be made on .service-card. */

/* WHY: descendant selector (specificity 0,2,0) is required to override
   .service-card p { flex: 1; margin-bottom: var(--space-8); } (specificity 0,1,1),
   which exists to push the service-card CTA button to the card footer. Engagement
   cards have no footer CTA — without this neutralization, the description paragraph
   would stretch and leave trailing whitespace before the meta dl. */
.engagement-card .engagement-card-desc {
    flex: initial;
    margin-bottom: var(--space-6);
}

.engagement-card-meta {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-5);
}

.engagement-card-meta dt {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: var(--space-4);
    margin-bottom: var(--space-1);
}

.engagement-card-meta dt:first-child {
    margin-top: 0;
}

.engagement-card-meta dd {
    font-size: var(--font-size-sm);
    color: var(--text-color);
    line-height: var(--line-height-relaxed);
    margin-left: 0;
}

/* ==========================================================================
   12b. ENGAGEMENTS GRID (SPEC-005)
   ========================================================================== */

/* WHY: .engagements-grid is a new modifier separate from .services-grid (SPEC-005 IG-4).
   .services-grid must not be altered — it controls the home-page 2-up layout. This grid
   adds a third column breakpoint at 1024px to accommodate 5 engagement cards cleanly
   (3+2 trailing row at desktop is intentional and visually acceptable). */
.engagements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

/* ==========================================================================
   12c. PROCESS STEPS — Lighter counter-list variant (SPEC-005)
   ========================================================================== */

/* WHY: .process-steps is the lighter variant of the CSS-counter numbered-list
   pattern established in .ai-framework-list (SPEC-005 AG-5). The counter and
   ::before pseudo-element are reused, but the heavy card chrome (background,
   border, box treatment) is omitted — this section is a simple intake process,
   not a feature showcase, and heavy chrome would read as overselling. Steps stack
   vertically at all breakpoints for consistent reading order and a11y. */
.process-steps {
    counter-reset: step-counter;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.process-steps li {
    counter-increment: step-counter;
    display: flex;
    align-items: flex-start;
    gap: var(--space-6);
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--border-color);
}

.process-steps li:last-child {
    border-bottom: none;
}

/* WHY: ::before renders the step number in magenta for visual emphasis but
   without the filled-circle chrome used in .ai-framework-list — keeping visual
   weight lighter per AG-5. Post-SPEC-008 both contexts use --color-magenta;
   weight distinction is delivered by geometry (filled circle vs bare numeral),
   not by color. aria-hidden is not needed here; the <ol> element provides
   ordering semantics and the counter is decorative reinforcement. */
.process-steps li::before {
    content: counter(step-counter);
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--color-magenta);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.process-steps li h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

.process-steps li p {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

.process-steps-body {
    flex: 1;
}

/* ==========================================================================
   13. ABOUT TEASER
   ========================================================================== */

.about-teaser {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.about-teaser p {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
}

/* ==========================================================================
   14. CONTACT CTA SECTION
   ========================================================================== */

.cta-section {
    text-align: center;
    padding: var(--space-20) 0;
}

.cta-section h2 {
    color: var(--text-light);
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-4);
}

.cta-section p {
    color: var(--text-on-dark);
    font-size: var(--font-size-lg);
    max-width: 540px;
    margin-inline: auto;
    margin-bottom: var(--space-10);
}

/* ==========================================================================
   15. ABOUT PAGE — Hero Profile Variant
   ========================================================================== */

/* WHY (SPEC-009 R1 IG-3): .hero-profile .hero-content flex rules deleted —
   about.html migrated to .hero-grid (AG-2 Option A); .hero-content no longer
   exists inside .hero-profile. .hero-profile-photo retained below — the photo
   element is present in the new .hero-headline-col structure. */

/* WHY (SPEC-009 R1 AG-2): margin-bottom formerly inherited from the deleted
   .hero-profile .hero-content flex gap. Now explicit — spacing between the
   photo and the eyebrow/H1 that follow it inside .hero-headline-col. */
.hero-profile-photo {
    flex-shrink: 0;
    margin-bottom: var(--space-6);
}

/* WHY (I-1): Both width and height are explicit here; the HTML width/height
   attributes (400x400) convey the image's intrinsic aspect ratio for CLS,
   while the CSS pixel values control rendered display size. Do not change
   to a single dimension without updating CLS reasoning.
   WHY (I-5): background-color reserves a visible placeholder circle while
   the JPEG downloads — prevents a brief "hole" in the hero.
   WHY (SPEC-008 CR-1): Hero background is now cream, not charcoal. Border is
   a hairline (AP-4 forbids drop-shadows), placeholder tint is the elevated
   cream surface so it blends rather than flashing dark on load. */
.hero-profile-photo img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-border-hairline);
    background-color: var(--color-surface-elevated);
}

/* WHY (SPEC-009 R1 IG-3): .hero-profile-text rules deleted — no .hero-profile-text
   element remains after the about.html markup migration to .hero-grid. Color and
   typography for the about hero now fall through to base .hero h1, .hero-subheadline,
   and .hero-eyebrow rules, which carry the correct SPEC-008 tokens. */

/* ==========================================================================
   15b. ABOUT PAGE — Leadership Philosophy
   ========================================================================== */

.philosophy-quote {
    border-left: 4px solid var(--color-magenta);
    padding: var(--space-6) var(--space-8);
    margin-bottom: var(--space-10);
    background-color: var(--surface-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.philosophy-quote blockquote p {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-snug);
    color: var(--text-color);
    font-style: italic;
    margin-bottom: var(--space-3);
}

.philosophy-quote blockquote footer {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-style: normal;
}

.philosophy-quote blockquote cite {
    font-style: normal;
    font-weight: var(--font-weight-semibold);
}

.philosophy-body p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.philosophy-body p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   15c. ABOUT PAGE — AI Adoption Framework
   ========================================================================== */

.ai-framework-intro p {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

/* WHY (IG-7): Stepped list uses CSS counter and additive left-border visual.
   All text lives in DOM — no content: injection — so screen readers read
   the actual tier names and descriptions directly. */
.ai-framework-list {
    counter-reset: tier-counter;
    list-style: none;
    margin: var(--space-10) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* WHY (SPEC-008 R3.2 / QA N-2): Sharp card treatment — hairline border on
   elevated surface, no large radius, no shadow. */
.ai-framework-list li {
    counter-increment: tier-counter;
    display: flex;
    align-items: flex-start;
    gap: var(--space-5);
    padding: var(--space-6);
    background-color: var(--color-surface-elevated);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border-hairline);
}

/* WHY (I-3): CSS counter renders tier number visually. Since the <ol> already
   provides ordering semantics, screen readers may announce the number twice
   (native <ol> ordering + ::before content). Trade-off accepted: the stepped
   circle is part of the visual identity for this section. The counter number
   is decorative reinforcement, not primary content — tier names and descriptions
   live in DOM text. */
.ai-framework-list li::before {
    content: counter(tier-counter);
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background-color: var(--color-magenta);
    color: var(--color-charcoal);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.ai-framework-tier-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    font-size: var(--font-size-base);
    display: block;
    margin-bottom: var(--space-1);
}

.ai-framework-tier-desc {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

.ai-framework-outcome {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-6) var(--space-8);
    background-color: var(--color-magenta);
    border-radius: var(--border-radius-lg);
    margin: var(--space-6) 0;
    flex-wrap: wrap;
}

.ai-framework-outcome .highlight-metric {
    color: var(--color-charcoal);
    margin-bottom: 0;
}

.ai-framework-outcome-text {
    flex: 1;
}

.ai-framework-outcome-text p {
    color: var(--color-charcoal);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

.ai-framework-tools {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.ai-framework-tools strong {
    color: var(--text-color);
}

.ai-framework-supporting p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

/* ==========================================================================
   15d. ABOUT PAGE — Off the Clock
   ========================================================================== */

.off-the-clock p {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--text-muted);
    max-width: 700px;
}

/* WHY (I-6): body-link modifier — subtler than default primary-color link.
   Inline links inside body copy should feel integrated, not prominent.
   Still keyboard-accessible and meets WCAG AA (text-color on surface-color). */
.body-link {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: var(--border-color);
    text-underline-offset: 0.2em;
    transition: text-decoration-color var(--transition-base), color var(--transition-base);
}

.body-link:hover {
    color: var(--color-magenta-text);
    text-decoration-color: var(--color-magenta-text);
}

/* ==========================================================================
   15e. ABOUT PAGE — CTA actions (dual button)
   ========================================================================== */

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
}

/* ==========================================================================
   15f. SECTION HEADING — Standalone (no descriptor below)
   ========================================================================== */

/* WHY (S-3): Used for sections with only an H2 and no descriptor paragraph.
   Avoids the extra margin-bottom that .section-header would add. */
.section-heading-standalone {
    margin-bottom: var(--space-8);
}

/* ==========================================================================
   15g. RESUME PAGE — Header
   ========================================================================== */

/* WHY (IG-1): New .resume-header component — document-style page, not hero-style.
   No photo, no dark background. Intentionally distinct from .hero-profile. */
.resume-header-section {
    padding-bottom: var(--space-12);
    border-bottom: 1px solid var(--border-color);
}

.resume-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.resume-header-identity h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-3);
    color: var(--text-color);
}

.resume-positioning {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    line-height: var(--line-height-snug);
    margin-bottom: 0;
}

.resume-header-contact {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-6);
    align-items: center;
}

.resume-contact-item {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

a.resume-contact-item {
    text-decoration: underline;
    text-decoration-color: var(--border-color);
    text-underline-offset: 0.2em;
    transition: text-decoration-color var(--transition-base), color var(--transition-base);
}

a.resume-contact-item:hover {
    color: var(--color-magenta-text);
    text-decoration-color: var(--color-magenta-text);
}

/* ==========================================================================
   15h. RESUME PAGE — Summary
   ========================================================================== */

.resume-summary p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--text-muted);
    max-width: 860px;
}

/* ==========================================================================
   15i. RESUME PAGE — Experience Roles
   ========================================================================== */

/* WHY (IG-3): .resume-role is a document-dense component. No card shadow or
   border-radius — this is a resume, not a marketing card. Subtle bottom
   separator between roles provides rhythm without introducing card weight. */
.resume-role {
    padding-bottom: var(--space-12);
    margin-bottom: var(--space-12);
    border-bottom: 1px solid var(--border-color);
}

.resume-role--last {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.resume-role-header {
    margin-bottom: var(--space-6);
}

.resume-role-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    margin-bottom: var(--space-1);
    line-height: var(--line-height-snug);
}

.resume-role-company {
    display: block;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    /* WHY: --text-color (not --primary-color) — primary-color reads as a link to
       sighted users, especially adjacent to the hyperlinked header contacts. Semibold
       weight alone carries enough visual hierarchy. SPEC-003 I-3. */
    color: var(--text-color);
    margin-bottom: var(--space-1);
}

.resume-role-meta {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.resume-role-bullets {
    /* WHY: disc markers intentionally retained here (overriding the site-wide
       list-style:none convention). Resume bullets are traditional document markers —
       recruiters expect them. Other visually-stripped lists restore semantics via
       role="list"; this list doesn't need that workaround because markers are visible. */
    list-style: disc;
    padding-left: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.resume-role-bullets li {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--text-muted);
}

/* ==========================================================================
   15j. RESUME PAGE — Metric Callouts (Senior Director role only)
   ========================================================================== */

/* WHY (IG-4): .resume-metrics is a 3-up flex strip placed between the role
   header and the bullet list. Color is --color-magenta, unified with the
   home-page .highlight-metric treatment post-SPEC-008 (A-7 Split 3) — the
   old blue-family micro-distinction had no semantic value in the new palette. */
.resume-metrics {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
    padding: var(--space-6) var(--space-8);
    background-color: var(--surface-color);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.resume-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
    flex: 1;
    min-width: 120px;
}

.resume-metric-number {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-magenta);
    line-height: 1;
}

.resume-metric-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--text-muted);
    line-height: var(--line-height-snug);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ==========================================================================
   15k. RESUME PAGE — Earlier Experience
   ========================================================================== */

/* WHY (IG-5): compact text rows, no card styling. Each <li> is a strong
   company/title line followed by a one-sentence descriptor. */
.resume-earlier {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.resume-earlier li {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.resume-earlier li strong {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    line-height: var(--line-height-snug);
}

.resume-earlier li span {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
}

/* ==========================================================================
   15l. RESUME PAGE — Education
   ========================================================================== */

.resume-education {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.resume-education li {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    line-height: var(--line-height-snug);
}

.resume-education li strong {
    color: var(--text-color);
    font-weight: var(--font-weight-semibold);
}

/* ==========================================================================
   15m. RESUME PAGE — Skills
   ========================================================================== */

/* WHY (IG-6): Semantic <dl> with <dt>/<dd> pairs. A wrapper <div> per group
   allows two-column grid layout on desktop without sacrificing <dl> semantics
   — <div> children of <dl> are valid HTML and preserve <dt>/<dd> association. */
.resume-skills {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.resume-skills-group {
    padding: var(--space-5) var(--space-6);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.resume-skills dt {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.resume-skills dd {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
}

/* ==========================================================================
   15. PLACEHOLDER PAGE
   ========================================================================== */

.placeholder-content {
    padding: var(--space-24) 0;
    text-align: center;
}

.placeholder-content h1 {
    margin-bottom: var(--space-4);
}

.placeholder-content p {
    font-size: var(--font-size-lg);
    color: var(--text-muted);
    margin-bottom: var(--space-8);
}

/* ==========================================================================
   16. RESPONSIVE — Tablet / Desktop (>= 768px)
   ========================================================================== */

@media (min-width: 768px) {
    h1 { font-size: var(--font-size-4xl); }
    h2 { font-size: var(--font-size-3xl); }

    .hero {
        padding: var(--space-24) 0;
    }

    .hero-profile-photo img {
        width: 200px;
        height: 200px;
    }

    .ai-framework-list {
        gap: var(--space-5);
    }

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

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

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

    .about-teaser {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-12);
    }

    .about-teaser-text {
        flex: 1;
    }

    .about-teaser-action {
        flex-shrink: 0;
        padding-top: var(--space-2);
    }

    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-brand {
        max-width: 280px;
    }

    /* Resume — tablet/desktop enhancements */
    .resume-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: var(--space-4);
    }

    .resume-header-identity {
        flex: 1;
        min-width: 280px;
    }

    .resume-header-contact {
        flex-direction: column;
        align-items: flex-end;
        gap: var(--space-2);
    }

    .resume-header-download {
        align-self: flex-start;
    }

    .resume-header-identity h1 {
        font-size: var(--font-size-4xl);
    }

    .resume-metrics {
        flex-wrap: nowrap;
    }

    .resume-skills {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   17. RESPONSIVE — Large Desktop (>= 1024px)
   ========================================================================== */

@media (min-width: 1024px) {
    .highlights-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

/* ==========================================================================
   18. RESPONSIVE — Small Mobile (<= 480px)
   ========================================================================== */

@media (max-width: 480px) {
    :root {
        --container-padding: var(--space-4);
    }

    .hero {
        padding: var(--space-16) 0;
    }

    .hero-subheadline {
        font-size: var(--font-size-base);
    }

    .section {
        padding: var(--space-16) 0;
    }

    .cta-section {
        padding: var(--space-16) 0;
    }

    /* WHY: Ensure stacked CTAs are full-width on very small screens for easy tapping */
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* WHY (WARN 2.7): Match hero-actions pattern — bottom CTA buttons stack
       full-width on narrow screens for consistent tap targets */
    .cta-actions {
        flex-direction: column;
    }

    .cta-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* Resume — small mobile: download button full-width, metrics stacked */
    .resume-download-btn {
        width: 100%;
        text-align: center;
    }

    .resume-metrics {
        flex-direction: column;
        gap: var(--space-5);
    }

    /* WHY: at <=480px each callout is a horizontal row (number + label) rather than
       stacking label under number. Three vertically-stacked 3xl-size numbers would
       waste significant screen height; the number is visually dominant enough at
       row-layout without extra size. The 4rem min-width locks labels into an aligned
       column. SPEC-003 I-4. */
    .resume-metric {
        flex-direction: row;
        align-items: center;
        gap: var(--space-4);
        min-width: unset;
    }

    .resume-metric-number {
        font-size: var(--font-size-3xl);
        min-width: 4rem;
    }
}

/* ==========================================================================
   19. PRINT STYLESHEET — Resume page
   ========================================================================== */

/* WHY (IG-9): Print rules scoped inside a single @media print block appended
   to the main stylesheet — no separate print.css file needed at this scale.
   WHY (IG-9): URL expansion is targeted (mailto: and linkedin.com only), not
   global a[href], to avoid printing internal nav URLs unnecessarily. */
@media print {
    /* Page geometry */
    @page {
        margin: 1in;
    }

    /* WHY: Scoped print reset rather than a universal `*` selector.
       A wholesale `* !important` reset strips color/border intent from every element
       in the DOM, making future print-only styles painful to reason about. This
       version targets only what we actually want neutralized (body text, accent
       backgrounds on alt sections and metric/skill groups, and shadows). SPEC-003 I-2. */
    body {
        color: #000000;
        background-color: #ffffff;
    }

    .section-alt,
    .resume-metrics,
    .resume-skills-group {
        background-color: #ffffff !important;
    }

    .resume-role,
    .resume-metrics,
    .resume-skills-group {
        box-shadow: none !important;
    }

    /* Hide chrome that doesn't belong in print */
    .site-header,
    .site-footer,
    .cta-section,
    .skip-link,
    .resume-download-btn {
        display: none !important;
    }

    /* Strip accent color from metric callout numbers — keep number, drop color */
    .resume-metric-number {
        color: #000000 !important;
    }

    /* Show email and LinkedIn URLs inline — targeted selectors only */
    a[href^="mailto:"]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #444444 !important;
    }

    a[href*="linkedin.com"]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #444444 !important;
    }

    /* Prevent awkward mid-entry page breaks */
    .resume-role {
        page-break-inside: avoid;
    }

    .resume-earlier > li {
        page-break-inside: avoid;
    }

    /* WHY: prevent H2 orphans at the bottom of a printed page — keep the section
       heading attached to its following content. `break-after` is the modern alias
       kept alongside the legacy `page-break-after` for broader engine support.
       SPEC-003 I-5. */
    h2 {
        page-break-after: avoid;
        break-after: avoid;
    }

    /* Keep body readable at print size */
    body {
        font-size: 11pt;
        line-height: 1.4;
    }
}

/* ==========================================================================
   20. CONTACT PAGE — Form Primitives & Layout (SPEC-004)
   ========================================================================== */

/* Page-level layout: form column + alt-channels aside, side-by-side on desktop
   WHY: .contact-page scopes all contact-specific rules so they cannot leak
   to other pages that also use .section, .container, or .hero. */
.contact-page .contact-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    align-items: flex-start;
}

/* Form column — comfortable reading width on desktop */
.contact-form-column {
    width: 100%;
    max-width: 560px;
}

/* ==========================================================================
   20a. FORM PRIMITIVES
   ========================================================================== */

/* Individual field wrapper — label + input + error in a vertical stack */
.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.form-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    line-height: var(--line-height-snug);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-color);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    /* WHY: Minimum 44px height matches WCAG 2.5.5 touch target for inputs */
    min-height: 44px;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-magenta);
    box-shadow: 0 0 0 3px rgb(232 68 155 / 0.15);
}

/* WHY: aria-invalid="true" provides a magenta border as a redundant visual cue
   for validation errors — color alone is not sufficient (WCAG 1.4.1), but
   the inline error text already satisfies that; the border reinforces it.
   WHY (SPEC-008 R3.6 / QA-B1): Magenta is the sole accent and error-signal
   color in the SPEC-008 palette — there is no separate red. */
.form-input[aria-invalid="true"],
.form-textarea[aria-invalid="true"] {
    border-color: var(--color-magenta);
    box-shadow: 0 0 0 3px rgb(232 68 155 / 0.15);
}

.form-textarea {
    resize: vertical;
    /* WHY: Prevent horizontal resize which would break the column layout */
    min-height: 140px;
}

/* Inline validation error message */
.form-error {
    font-size: var(--font-size-sm);
    color: var(--color-magenta-text);
    line-height: var(--line-height-snug);
    /* WHY: The element is hidden via the `hidden` HTML attribute (toggled by JS),
       not via CSS display:none, so AT always queries the live DOM correctly.
       WHY (SPEC-008 R3.6): --color-magenta-text (#A51D65) is the AA-compliant
       inline-text magenta on cream (6.56:1); base --color-magenta fails AA at
       small text sizes and must not be used for body-level copy. */
}

/* ==========================================================================
   20b. FORM STATUS (generic error / Turnstile load-failure messages)
   ========================================================================== */

/* WHY: .form-status is rendered empty at page-load so the browser registers
   the aria-live region before any content is injected. The visible styles
   only kick in when the JS populates it (the empty state is invisible). */
.form-status {
    /* Empty state — invisible but in the DOM */
    margin-bottom: 0;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

.form-status:not(:empty) {
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
}

/* WHY (SPEC-008 Arch Gate AG-3): Banner-level error/warning palette retains
   red (`#dc2626` family) and yellow (`#fffbeb` family) as a semantic layer
   OUTSIDE the SPEC-008 identity system. Magenta applies only to the
   inline-level `.form-input[aria-invalid]` border + `.form-error` text, per
   R3.6. This banner is a form-submit failure surface — red signals "blocked"
   more unambiguously than the brand magenta and avoids accent-as-alarm
   conflation. Do not migrate these to magenta without reopening AG-3. */
.form-status--error:not(:empty) {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.form-status--error a {
    color: #991b1b;
    font-weight: var(--font-weight-semibold);
}

/* WHY (SPEC-008 AG-3 / SPEC-009 R6): Warning banner retains amber palette as a
   semantic layer OUTSIDE the SPEC-008 identity system — identical reasoning to
   the `.form-status--error` AG-3 retention above. Yellow signals "caution/degraded"
   at banner scale more unambiguously than brand magenta and avoids accent-as-alarm
   conflation. Do not migrate to magenta without reopening AG-3. */
.form-status--warning:not(:empty) {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.form-status--warning a {
    color: #92400e;
    font-weight: var(--font-weight-semibold);
}

/* ==========================================================================
   20c. HONEYPOT — off-screen, not display:none (IG-7)
   ========================================================================== */

/* WHY: position:absolute off-screen (not display:none or visibility:hidden) —
   naive bots detect and skip fields that are invisible via CSS display/visibility
   properties. Off-screen positioning keeps the field in the normal DOM flow
   for bots while aria-hidden="true" and tabindex="-1" exclude it from real
   user interactions. */
.honeypot-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ==========================================================================
   20d. TURNSTILE WIDGET SLOT (IG-5)
   ========================================================================== */

/* WHY: min-height reserves the widget's space before the Turnstile iframe
   loads, preventing cumulative layout shift (CLS). width:300px matches the
   widget's natural render width; max-width:100% ensures it shrinks on narrow
   viewports (320px) instead of triggering horizontal scroll (S-6). */
.turnstile-slot {
    min-height: 65px;
    width: 300px;
    max-width: 100%;
    margin-bottom: var(--space-6);
}

/* ==========================================================================
   20e. SUBMIT BUTTON
   ========================================================================== */

.contact-submit-btn {
    margin-bottom: var(--space-4);
}

.contact-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   20f. PRIVACY NOTE
   ========================================================================== */

.form-privacy-note {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
    margin-top: var(--space-2);
}

.form-privacy-note a {
    color: var(--text-muted);
}

.form-privacy-note a:hover {
    color: var(--color-magenta-text);
}

/* ==========================================================================
   20g. SUCCESS STATE
   ========================================================================== */

/* WHY: .success-state replaces the form element entirely (not just hides it)
   so the heading prominence and visual treatment signal clearly that the form
   interaction is complete, not paused. */
/* WHY (SPEC-008 R3.2 / QA N-7): Sharp corners + canonical magenta token for
   the left accent. Radius reduced from --border-radius-lg to --border-radius-sm
   to conform to the card grammar. */
.success-state {
    max-width: 560px;
    padding: var(--space-10) var(--space-8);
    background-color: var(--color-surface-elevated);
    border: 1px solid var(--color-border-hairline);
    border-left: 4px solid var(--color-magenta);
    border-radius: var(--border-radius-sm);
}

.success-heading {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    margin-bottom: var(--space-4);
    line-height: var(--line-height-tight);
}

/* WHY: outline:none on success-state because it receives programmatic focus
   (focus() in JS) not user-initiated focus — visible ring would be confusing. */
.success-state:focus {
    outline: none;
}

.success-body {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-6);
}

.success-nudge {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-6);
}

/* ==========================================================================
   20h. ALTERNATE CHANNELS
   ========================================================================== */

.alt-channels {
    width: 100%;
}

.alt-channels-heading {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    margin-bottom: var(--space-6);
    line-height: var(--line-height-tight);
}

.alt-channels-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

/* WHY (SPEC-008 R3.2 / QA N-3): Hairline on elevated cream, sharp corners,
   no shadow per AP-4. Drop-shadow card grammar is retired site-wide. */
.alt-channel-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-5) var(--space-6);
    background-color: var(--color-surface-elevated);
    border: 1px solid var(--color-border-hairline);
    border-radius: var(--border-radius-sm);
}

.alt-channel-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.alt-channel-link {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-magenta-text);
    text-decoration: none;
    transition: color var(--transition-base);
}

.alt-channel-link:hover {
    color: var(--color-magenta-text);
    text-decoration: underline;
}

/* Email container and its decoded anchor share the same visual style as .alt-channel-link */
.alt-channel-email-container {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

.alt-channel-email-container a {
    color: var(--color-magenta-text);
    text-decoration: none;
    transition: color var(--transition-base);
}

.alt-channel-email-container a:hover {
    color: var(--color-magenta-text);
    text-decoration: underline;
}

.alt-channel-email-fallback {
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================================================
   20i. CONTACT PAGE — Responsive (768px desktop)
   ========================================================================== */

@media (min-width: 768px) {
    .contact-page .contact-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-16);
    }

    .contact-form-column {
        flex: 0 0 560px;
        max-width: 560px;
    }

    .alt-channels {
        flex: 1;
        max-width: 320px;
    }

    /* Side-by-side alt-channel items on desktop */
    .alt-channels-list {
        flex-direction: column;
        gap: var(--space-4);
    }
}

/* ==========================================================================
   20j. CONTACT PAGE — Responsive (480px small mobile)
   ========================================================================== */

@media (max-width: 480px) {
    .contact-form-column {
        max-width: 100%;
    }

    .success-state {
        padding: var(--space-6) var(--space-5);
    }

    .alt-channel-item {
        padding: var(--space-4) var(--space-5);
    }
}

/* ==========================================================================
   21. REDUCED-MOTION OVERRIDES
   ========================================================================== */

/* WHY (SPEC-008 NFR accessibility / QA N-5): The redesign introduced hover
   transitions on .btn-textlink arrow glide, .service-card / .highlight-card
   translateY lift, and nav underline fade-in. WCAG 2.3.3 (AAA) plus the spec
   require that any motion introduced have an instant-state fallback under
   `prefers-reduced-motion: reduce`. Blanket-neutralizing transitions is the
   simplest correct approach for a site this small — we do not rely on
   transition completion for any state correctness. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .btn-textlink:hover .arrow {
        transform: none;
    }

    .highlight-card:hover,
    .service-card:hover {
        transform: none;
    }
}
