/* =========================================================================
   Alex Morgan Portfolio — Main Stylesheet
   Implements the design system from DESIGN-SPEC.md
   ========================================================================= */

/* ---------- 1. RESET & BASE -------------------------------------------- */

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

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color .25s ease, color .25s ease;
}

img, svg, video, canvas, picture {
    display: block;
    max-width: 100%;
    height: auto;
}

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

button {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: inherit;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: var(--accent-hover); }

ul, ol { padding-left: 1.25rem; }
p { margin: 0 0 1em; }

::selection { background: var(--accent-soft); color: var(--text); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- 2. TOKENS ---------------------------------------------------- */

:root {
    /* Colors */
    --bg: #FAFAFA;
    --surface: #FFFFFF;
    --surface-2: #F1F5F9;
    --border: #E2E8F0;
    --text: #0F172A;
    --text-muted: #64748B;
    --accent: #14B8A6;
    --accent-hover: #0D9488;
    --accent-soft: rgba(20, 184, 166, .1);
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', var(--font-sans);
    --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-lg: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
    --fs-xl: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
    --fs-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --fs-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --fs-display: clamp(2.5rem, 1.5rem + 5vw, 4.5rem);

    /* Spacing */
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;
    --space-10: 8rem;

    /* Radii */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);
    --shadow-glow: 0 0 0 1px var(--accent-soft), 0 0 24px var(--accent-soft);

    /* Layout */
    --container: 1200px;
    --container-text: 720px;
    --header-h: 72px;
}

[data-theme="dark"] {
    --bg: #0A0E1A;
    --surface: #131826;
    --surface-2: #1A2030;
    --border: #1E293B;
    --text: #E6E9F0;
    --text-muted: #94A3B8;
    --accent: #2DD4BF;
    --accent-hover: #5EEAD4;
    --accent-soft: rgba(45, 212, 191, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
}

/* ---------- 3. UTILITIES ------------------------------------------------- */

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.5rem;
}
@media (min-width: 768px) {
    .container { padding-inline: 2rem; }
}

.text-container {
    max-width: var(--container-text);
    margin-inline: auto;
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .75rem;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    background: var(--accent);
    color: #fff;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- 4. TYPOGRAPHY ----------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
}
h1 { font-size: var(--fs-display); font-weight: 700; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); }

.section {
    padding-block: clamp(3rem, 8vw, 6rem);
}
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }

.section__head {
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: 3rem;
}
.section__head--left { text-align: left; margin-inline: 0; }
.section__title { margin-bottom: .75rem; }
.section__lead { color: var(--text-muted); font-size: var(--fs-lg); }

/* ---------- 5. BUTTONS -------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: var(--fs-base);
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
    white-space: nowrap;
    cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
    background: var(--accent);
    color: #06121A;
    border-color: var(--accent);
}
.btn--primary:hover {
    background: var(--accent-hover);
    color: #06121A;
    box-shadow: var(--shadow-glow);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn--outline:hover {
    background: var(--accent-soft);
}

.btn--sm { padding: .5rem .9rem; font-size: var(--fs-sm); }
.btn--lg { padding: 1rem 1.75rem; font-size: var(--fs-lg); }

.btn .icon { width: 1em; height: 1em; }

.amp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.amp-icon-btn:hover {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-soft);
}

/* ---------- 6. HEADER ---------------------------------------------------- */

.amp-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, background-color .25s ease;
}
.amp-header.is-scrolled {
    border-bottom-color: var(--border);
    background: color-mix(in srgb, var(--bg) 95%, transparent);
}

.amp-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--header-h);
}

.amp-logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
}
.amp-logo__mark {
    color: var(--accent);
    font-weight: 700;
}
.amp-logo:hover { color: var(--accent); }

.amp-nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: .25rem;
}
.amp-nav__link {
    display: inline-block;
    padding: .5rem .85rem;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-pill);
    transition: color .2s ease, background-color .2s ease;
}
.amp-nav__link:hover,
.amp-nav__link.is-active {
    color: var(--text);
    background: var(--accent-soft);
}

.amp-header__actions {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.amp-menu-toggle { display: none; }

@media (max-width: 880px) {
    .amp-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        transform: translateY(-110%);
        transition: transform .25s ease;
        box-shadow: var(--shadow-md);
    }
    .amp-nav.is-open { transform: translateY(0); }
    .amp-nav__list { flex-direction: column; gap: .25rem; }
    .amp-nav__link { display: block; padding: .75rem 1rem; }
    .amp-menu-toggle { display: inline-flex; }
    .amp-header__actions .amp-icon-btn[aria-label="LinkedIn"],
    .amp-header__actions .amp-icon-btn[aria-label="YouTube"] { display: none; }
}

/* Theme toggle icon swap */
.amp-theme-toggle__sun  { display: none; }
.amp-theme-toggle__moon { display: inline; }
[data-theme="dark"] .amp-theme-toggle__sun  { display: inline; }
[data-theme="dark"] .amp-theme-toggle__moon { display: none; }

/* ---------- 7. HERO ------------------------------------------------------ */

.amp-hero {
    position: relative;
    padding-block: clamp(4rem, 10vw, 7rem) clamp(3rem, 6vw, 5rem);
    overflow: hidden;
}

.amp-hero::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.amp-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: center;
}
@media (max-width: 880px) {
    .amp-hero__inner { grid-template-columns: 1fr; gap: 2rem; }
    .amp-hero__avatar { order: -1; max-width: 240px; margin: 0 auto; }
}

.amp-hero__role {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .85rem;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    margin-bottom: 1.25rem;
}
.amp-hero__role .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.amp-hero__title {
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}
.amp-hero__title .accent { color: var(--accent); }
.amp-hero__title .cursor {
    display: inline-block;
    width: .08em;
    height: .9em;
    background: var(--accent);
    margin-left: .08em;
    vertical-align: text-top;
    animation: amp-blink 1s steps(1) infinite;
}
@keyframes amp-blink { 50% { opacity: 0; } }

.amp-hero__tagline {
    font-size: var(--fs-lg);
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 1.75rem;
}

.amp-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.75rem;
}

.amp-hero__social {
    display: flex;
    gap: .25rem;
}

.amp-hero__avatar {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-soft), transparent);
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
}
.amp-hero__avatar::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(from 180deg, var(--accent), transparent 70%);
    z-index: -1;
    opacity: .35;
    filter: blur(20px);
}
.amp-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 8. CARDS / GRIDS -------------------------------------------- */

.amp-grid {
    display: grid;
    gap: 1.5rem;
}
.amp-grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.amp-grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.amp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    display: flex;
    flex-direction: column;
}
.amp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.amp-card__media {
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    overflow: hidden;
    position: relative;
}
.amp-card__media img,
.amp-card__media svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.amp-card:hover .amp-card__media img { transform: scale(1.04); }

.amp-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.amp-card__title { font-size: var(--fs-lg); margin-bottom: .5rem; }
.amp-card__desc { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: 1rem; flex: 1; }

.amp-card__meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: .75rem;
}
.amp-card__meta .lang {
    display: inline-flex; align-items: center; gap: .35rem;
}
.amp-card__meta .lang::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
}

.amp-card__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.amp-card__links { display: flex; gap: .5rem; }

/* ---------- 9. TAGS / PILLS --------------------------------------------- */

.amp-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    border: 1px solid var(--border);
    transition: color .2s ease, border-color .2s ease;
}
.amp-tag:hover { color: var(--accent); border-color: var(--accent); }

.amp-tag--accent {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.amp-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* ---------- 10. SKILLS / ABOUT ------------------------------------------- */

.amp-skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.amp-skill-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.amp-skill-group__title {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.amp-skill-group__title::before {
    content: "##";
    opacity: .6;
}

/* ---------- 11. TIMELINE ------------------------------------------------- */

.amp-timeline {
    position: relative;
    padding-left: 2rem;
}
.amp-timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), transparent);
}
.amp-timeline__item {
    position: relative;
    padding-bottom: 2.5rem;
}
.amp-timeline__item:last-child { padding-bottom: 0; }
.amp-timeline__item::before {
    content: "";
    position: absolute;
    left: -2rem;
    top: .35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    margin-left: -5px;
    box-shadow: 0 0 0 4px var(--bg);
}
.amp-timeline__when {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--accent);
    margin-bottom: .25rem;
}
.amp-timeline__title { font-size: var(--fs-lg); margin-bottom: .15rem; }
.amp-timeline__org { color: var(--text-muted); font-weight: 500; margin-bottom: .75rem; }
.amp-timeline__desc ul { color: var(--text-muted); padding-left: 1.1rem; }
.amp-timeline__desc li { margin-bottom: .35rem; }

/* ---------- 12. PROJECT FILTERS ---------------------------------------- */

.amp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.amp-filter {
    padding: .4rem 1rem;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: var(--fs-sm);
    font-weight: 500;
    transition: all .2s ease;
    cursor: pointer;
}
.amp-filter:hover { color: var(--text); border-color: var(--text-muted); }
.amp-filter.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.amp-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.amp-project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .2s ease;
    display: flex;
    flex-direction: column;
}
.amp-project-card.is-hidden {
    opacity: 0;
    transform: scale(.96);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}
.amp-project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.amp-project-card__thumb {
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.amp-project-card__thumb svg { width: 100%; height: 100%; }
.amp-project-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.amp-project-card__title { font-size: var(--fs-lg); margin-bottom: .5rem; }
.amp-project-card__desc { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: 1rem; flex: 1; }
.amp-project-card__stack { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.amp-project-card__meta {
    display: flex; align-items: center; gap: 1rem;
    font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted);
    margin-bottom: 1rem;
}
.amp-project-card__meta .lang-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: .35rem; vertical-align: middle; }
.amp-project-card__links { display: flex; gap: .5rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ---------- 13. VIDEO GRID ---------------------------------------------- */

.amp-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.amp-video-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
}
.amp-video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.amp-video-card__media {
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    position: relative;
    overflow: hidden;
}
.amp-video-card__media img { width: 100%; height: 100%; object-fit: cover; }
.amp-video-card__media::after {
    content: "▶";
    position: absolute;
    inset: 0;
    display: grid; place-items: center;
    background: rgba(10, 14, 26, .35);
    color: #fff;
    font-size: 2rem;
    opacity: 0;
    transition: opacity .25s ease;
}
.amp-video-card:hover .amp-video-card__media::after { opacity: 1; }
.amp-video-card__body { padding: 1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.amp-video-card__title { font-size: 1rem; line-height: 1.4; margin-bottom: .5rem; }
.amp-video-card__meta { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); margin-top: auto; }

/* ---------- 14. BLOG / POSTS -------------------------------------------- */

.amp-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
.amp-post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex; flex-direction: column;
}
.amp-post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.amp-post-card__media { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.amp-post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.amp-post-card:hover .amp-post-card__media img { transform: scale(1.04); }
.amp-post-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.amp-post-card__meta { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: .5rem; }
.amp-post-card__title { font-size: var(--fs-xl); margin-bottom: .5rem; line-height: 1.3; }
.amp-post-card__excerpt { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: 1rem; flex: 1; }

/* Single post */
.amp-post {
    max-width: 720px;
    margin-inline: auto;
}
.amp-post__header { margin-bottom: 2rem; text-align: center; }
.amp-post__meta { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: .5rem; }
.amp-post__title { margin-bottom: 1rem; }
.amp-post__content { font-size: 1.0625rem; line-height: 1.75; }
.amp-post__content h2 { margin: 2.5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.amp-post__content h3 { margin: 2rem 0 .75rem; }
.amp-post__content p { margin: 0 0 1.25em; }
.amp-post__content img { margin: 1.5rem auto; border-radius: var(--radius); }
.amp-post__content pre,
.amp-post__content code { font-family: var(--font-mono); }
.amp-post__content pre {
    background: #0A0E1A;
    color: #E6E9F0;
    padding: 1.25rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: var(--fs-sm);
    line-height: 1.5;
    margin: 1.5rem 0;
}
.amp-post__content code { background: var(--surface-2); padding: .15em .35em; border-radius: 4px; font-size: .9em; }
.amp-post__content pre code { background: transparent; padding: 0; font-size: inherit; }
.amp-post__content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}
.amp-post__content ul, .amp-post__content ol { margin-bottom: 1.25em; padding-left: 1.5rem; }
.amp-post__content li { margin-bottom: .35em; }

.amp-progress {
    position: fixed; top: 0; left: 0; right: 0;
    height: 3px; z-index: 200;
    background: transparent;
    pointer-events: none;
}
.amp-progress__bar {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width .1s ease;
}

/* ---------- 15. CONTACT FORM -------------------------------------------- */

.amp-form {
    display: grid;
    gap: 1.25rem;
    max-width: 560px;
    margin-inline: auto;
}
.amp-form__row { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .amp-form__row { grid-template-columns: 1fr; } }
.amp-form__field { display: flex; flex-direction: column; gap: .35rem; }
.amp-form__field label { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 500; }
.amp-form__field input,
.amp-form__field textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .75rem 1rem;
    color: var(--text);
    font-family: var(--font-sans);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.amp-form__field input:focus,
.amp-form__field textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.amp-form__field textarea { resize: vertical; min-height: 140px; }

.amp-contact-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 880px) { .amp-contact-grid { grid-template-columns: 1fr; } }

.amp-contact-info {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.amp-contact-info__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.amp-contact-info__list a { color: var(--text); font-weight: 500; }
.amp-contact-info__list a:hover { color: var(--accent); }
.amp-contact-info__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    margin-right: .75rem;
    flex-shrink: 0;
}
.amp-contact-info__row { display: flex; align-items: center; }

/* ---------- 16. RESUME --------------------------------------------------- */

.amp-resume-banner {
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap;
    margin-bottom: 3rem;
}
.amp-resume-banner h2 { font-size: var(--fs-xl); margin-bottom: .25rem; color: var(--text); }
.amp-resume-banner p { color: var(--text-muted); margin: 0; }

.amp-resume-cta {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

/* ---------- 17. CTA STRIP ----------------------------------------------- */

.amp-cta {
    background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.amp-cta::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent), transparent 50%);
    opacity: .15;
    z-index: 0;
    pointer-events: none;
}
.amp-cta > * { position: relative; z-index: 1; }
.amp-cta h2 { margin-bottom: .5rem; }
.amp-cta p { color: var(--text-muted); max-width: 520px; margin: 0 auto 1.5rem; }
.amp-cta__buttons { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- 18. FOOTER --------------------------------------------------- */

.amp-footer {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding-block: 3rem 1.5rem;
}
.amp-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 720px) { .amp-footer__grid { grid-template-columns: 1fr; gap: 2rem; } }
.amp-footer__logo {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-mono); font-weight: 600;
    color: var(--text); margin-bottom: 1rem;
}
.amp-footer__tagline { color: var(--text-muted); max-width: 320px; margin-bottom: 1rem; }
.amp-footer__social { display: flex; gap: .25rem; }
.amp-footer__heading {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    margin-bottom: 1rem;
}
.amp-footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.amp-footer__links a { color: var(--text-muted); transition: color .2s ease; }
.amp-footer__links a:hover { color: var(--accent); }
.amp-footer__note { color: var(--text-muted); font-size: var(--fs-sm); margin-top: 1rem; }
.amp-footer__bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    color: var(--text-muted); font-size: var(--fs-sm);
}
.amp-footer__bottom a { color: var(--text-muted); }
.amp-footer__bottom a:hover { color: var(--accent); }

/* ---------- 19. UTILITY ANIMATIONS -------------------------------------- */

.amp-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
}
.amp-reveal.is-in { opacity: 1; transform: none; }
.amp-reveal[data-stagger="1"] { transition-delay: 80ms; }
.amp-reveal[data-stagger="2"] { transition-delay: 160ms; }
.amp-reveal[data-stagger="3"] { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .amp-reveal { opacity: 1; transform: none; }
}

/* ---------- 20. PROSE (default WP content) ----------------------------- */

.amp-prose h2, .amp-prose h3, .amp-prose h4 { margin-top: 1.5em; margin-bottom: .5em; }
.amp-prose p { margin-bottom: 1.25em; }
.amp-prose img { border-radius: var(--radius); margin: 1.5em 0; }
.amp-prose ul, .amp-prose ol { margin-bottom: 1.25em; padding-left: 1.5em; }

/* ---------- 21. RESPONSIVE --------------------------------------------- */

@media (max-width: 600px) {
    .amp-hero__cta { width: 100%; }
    .amp-hero__cta .btn { flex: 1; justify-content: center; }
    .amp-projects-grid,
    .amp-video-grid,
    .amp-blog-grid { grid-template-columns: 1fr; }
}

/* ---------- 22. ACCESSIBILITY ------------------------------------------- */

@media (prefers-contrast: more) {
    :root { --border: #94A3B8; --text-muted: #475569; }
    [data-theme="dark"] { --border: #475569; --text-muted: #CBD5E1; }
}
