/* ==========================================================================
   Eliseo Nathaniel Ruiz Nowell — portfolio styles
   Authored directly (no build step): edit this file, not a minified copy.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
    color-scheme: dark;

    /* Surfaces */
    --bg: #08090c;
    --bg-soft: #0d0f14;
    --surface: #12151c;
    --surface-2: #171b23;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);

    /* Ink */
    --text: #f3f5f8;
    --muted: #aab2c0;
    --faint: #7b8494;

    /* Accent */
    --accent: #ff9a3c;
    --accent-bright: #ffb066;
    --accent-ink: #1a1204;
    --accent-wash: rgba(255, 154, 60, 0.12);
    --accent-line: rgba(255, 154, 60, 0.35);

    /* Shape */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    /* Depth */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
    --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, 0.95);

    /* Rhythm */
    --container: 1140px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section-gap: clamp(4.5rem, 9vw, 8rem);

    /* Type */
    --font-display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */

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

* {
    margin: 0;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
    padding: 0;
}

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

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

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

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.5rem, 1.6rem + 4.4vw, 4.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.85rem, 1.4rem + 2vw, 2.75rem);
}

h3 {
    font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
}

h4 {
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
}

p {
    text-wrap: pretty;
}

strong {
    color: var(--text);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   4. Utilities
   -------------------------------------------------------------------------- */

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

.section {
    padding-block: var(--section-gap);
    scroll-margin-top: 5.5rem;
}

.section--tight {
    padding-block: calc(var(--section-gap) * 0.6);
}

.section__head {
    max-width: 46rem;
    margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.section__head p:not(.eyebrow) {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 1px;
    background-color: var(--accent-line);
}

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

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    padding: 0.7rem 1.1rem;
    background-color: var(--accent);
    color: var(--accent-ink);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.muted {
    color: var(--muted);
}

/* Buttons ---------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: transform 0.18s ease, background-color 0.18s ease,
        border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn svg {
    flex: none;
    width: 1.05em;
    height: 1.05em;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn--primary {
    background-color: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 12px 30px -14px rgba(255, 154, 60, 0.8);
}

.btn--primary:hover {
    background-color: var(--accent-bright);
}

.btn--ghost {
    border-color: var(--line-strong);
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.02);
}

.btn--ghost:hover {
    border-color: var(--accent-line);
    background-color: var(--accent-wash);
    color: var(--accent-bright);
}

.btn--sm {
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
}

/* Text link with arrow --------------------------------------------------- */

.link-out {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.925rem;
    transition: gap 0.18s ease, color 0.18s ease;
}

.link-out svg {
    width: 0.95em;
    height: 0.95em;
}

.link-out:hover {
    gap: 0.75rem;
    color: var(--accent-bright);
}

/* Cards ----------------------------------------------------------------- */

.card {
    position: relative;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* Tags ------------------------------------------------------------------ */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.3rem 0.7rem;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.tag--accent {
    background-color: var(--accent-wash);
    border-color: var(--accent-line);
    color: var(--accent-bright);
}

/* Reveal on scroll ------------------------------------------------------ */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   5. Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    transition: background-color 0.25s ease, border-color 0.25s ease,
        backdrop-filter 0.25s ease;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background-color: rgba(8, 9, 12, 0.82);
    border-bottom-color: var(--line);
    backdrop-filter: blur(14px) saturate(140%);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    background: linear-gradient(135deg, var(--accent), #ff6f61);
    border-radius: 0.7rem;
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand__name {
    font-size: 0.98rem;
}

.brand__role {
    display: block;
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.75rem);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.75rem);
}

.nav__link {
    position: relative;
    padding-block: 0.35rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.18s ease;
}

.nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1.5px;
    background-color: var(--accent);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.nav__link:hover,
.nav__link[aria-current="true"] {
    color: var(--text);
}

.nav__link:hover::after,
.nav__link[aria-current="true"]::after {
    transform: scaleX(1);
}

.nav__toggle {
    display: none;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
}

.nav__toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.nav__toggle .icon-close,
.nav__toggle[aria-expanded="true"] .icon-menu {
    display: none;
}

.nav__toggle[aria-expanded="true"] .icon-close {
    display: block;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    padding-top: clamp(8rem, 14vw, 11rem);
    padding-bottom: clamp(3rem, 6vw, 5rem);
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.hero::before {
    top: -18vw;
    right: -6vw;
    width: 46vw;
    height: 46vw;
    background: radial-gradient(circle, rgba(255, 154, 60, 0.28), transparent 65%);
}

.hero::after {
    bottom: -22vw;
    left: -14vw;
    width: 42vw;
    height: 42vw;
    background: radial-gradient(circle, rgba(94, 130, 255, 0.18), transparent 65%);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
}

.hero__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.9rem 0.4rem 0.55rem;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-size: 0.85rem;
}

.hero__pill-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}

.hero__title {
    margin-top: 1.5rem;
}

.hero__title span {
    display: block;
    background: linear-gradient(100deg, var(--text) 5%, var(--accent-bright) 55%, var(--accent) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__lede {
    max-width: 34rem;
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.hero__socials {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.75rem;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease,
        background-color 0.18s ease;
}

.icon-btn svg {
    width: 1.15rem;
    height: 1.15rem;
}

.icon-btn:hover {
    color: var(--accent-bright);
    border-color: var(--accent-line);
    background-color: var(--accent-wash);
    transform: translateY(-2px);
}

/* Portrait --------------------------------------------------------------- */

.hero__portrait {
    position: relative;
    justify-self: center;
    width: min(100%, 22rem);
}

.hero__portrait > img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-lg);
}

.hero__portrait::after {
    content: "";
    position: absolute;
    inset: auto -0.75rem -0.75rem auto;
    z-index: -1;
    width: 70%;
    height: 70%;
    background: linear-gradient(135deg, var(--accent), transparent 70%);
    border-radius: var(--radius-lg);
    opacity: 0.45;
}

.hero__badge {
    position: absolute;
    bottom: -1.25rem;
    left: -1.25rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    background-color: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero__badge img {
    width: 4.5rem;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
}

.hero__badge span {
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Stats ----------------------------------------------------------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: clamp(3rem, 7vw, 5rem);
    padding-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
}

.stat__value {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, var(--accent-bright), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat__label {
    margin-top: 0.35rem;
    color: var(--faint);
    font-size: 0.875rem;
    line-height: 1.45;
}

/* --------------------------------------------------------------------------
   7. About
   -------------------------------------------------------------------------- */

.about__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.about__body p + p {
    margin-top: 1.15rem;
}

.about__body p {
    color: var(--muted);
    font-size: 1.05rem;
}

.facts {
    display: grid;
    gap: 1.15rem;
}

.fact {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.fact__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--accent-wash);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-sm);
    color: var(--accent-bright);
}

.fact__icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.fact__label {
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fact__value {
    margin-top: 0.15rem;
    font-size: 0.98rem;
}

/* --------------------------------------------------------------------------
   8. Experience timeline
   -------------------------------------------------------------------------- */

.timeline {
    display: grid;
    gap: 1.25rem;
}

.role {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2rem);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.role:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.role__logo {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    padding: 0.7rem;
    background-color: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.role__logo img {
    width: auto;
    max-width: 100%;
    max-height: 3.1rem;
    object-fit: contain;
}

.role__head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    align-items: baseline;
    justify-content: space-between;
}

.role__org {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.role__dates {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    white-space: nowrap;
}

.role__title {
    margin-top: 0.35rem;
}

.role__tags {
    margin-top: 1rem;
}

.role__points {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.25rem;
}

.role__points li {
    position: relative;
    padding-left: 1.4rem;
    color: var(--muted);
    font-size: 0.98rem;
}

.role__points li::before {
    content: "";
    position: absolute;
    top: 0.62em;
    left: 0.1rem;
    width: 0.42rem;
    height: 0.42rem;
    background-color: var(--accent);
    border-radius: 2px;
    transform: rotate(45deg);
}

.role__footer {
    margin-top: 1.35rem;
}

/* Collapsed "earlier roles" --------------------------------------------- */

.more-roles {
    margin-top: 1.25rem;
}

.more-roles > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.25rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease,
        background-color 0.18s ease;
}

.more-roles > summary::-webkit-details-marker {
    display: none;
}

.more-roles > summary:hover {
    color: var(--accent-bright);
    border-color: var(--accent-line);
    background-color: var(--accent-wash);
}

.more-roles > summary svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.more-roles[open] > summary svg {
    transform: rotate(180deg);
}

.more-roles[open] > summary .more-roles__show,
.more-roles__hide {
    display: none;
}

.more-roles[open] > summary .more-roles__hide {
    display: inline;
}

.more-roles__list {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

/* --------------------------------------------------------------------------
   9. Skills
   -------------------------------------------------------------------------- */

.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.25rem;
}

.skill-group h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.15rem;
    font-size: 1.05rem;
}

.skill-group h3 svg {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   10. Projects
   -------------------------------------------------------------------------- */

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1.25rem;
}

.project {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.project:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

.project__media {
    display: grid;
    place-items: center;
    overflow: hidden;
    height: 16rem;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 154, 60, 0.16), transparent 60%),
        var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.project__media img {
    width: auto;
    max-width: 100%;
    max-height: 13rem;
    object-fit: contain;
    border-radius: var(--radius-sm);
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
}

.project__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.9rem;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

.project__body p {
    color: var(--muted);
    font-size: 0.95rem;
}

.project__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
    margin-top: auto;
    padding-top: 0.35rem;
}

.project__note {
    color: var(--faint);
    font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   11. Education
   -------------------------------------------------------------------------- */

.education {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: start;
}

.degree__head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.degree__logo {
    display: grid;
    place-items: center;
    flex: none;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.5rem;
    background-color: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.degree__logo img {
    width: auto;
    max-height: 2.5rem;
    object-fit: contain;
}

.degree__meta {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.75rem;
}

.degree__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    justify-content: space-between;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}

.degree__row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.degree__row dt {
    color: var(--faint);
}

.degree__row dd {
    margin: 0;
    font-weight: 600;
}

.degree__actions {
    margin-top: 1.75rem;
}

.coursework h3,
.beyond h3 {
    margin-bottom: 1.15rem;
    font-size: 1.05rem;
}

.coursework__list {
    display: grid;
    gap: 0.85rem;
}

.coursework__list li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.85rem;
    border-bottom: 1px dashed var(--line);
    font-size: 0.95rem;
}

.coursework__list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.coursework__code {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.beyond {
    margin-top: 1.25rem;
}

.beyond__row + .beyond__row {
    margin-top: 1.25rem;
}

.beyond__label {
    margin-bottom: 0.7rem;
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   12. Contact + footer
   -------------------------------------------------------------------------- */

.contact {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-block: clamp(3rem, 7vw, 4.5rem);
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 154, 60, 0.16), transparent 60%),
        var(--surface);
}

.contact h2 {
    max-width: 26rem;
    margin-inline: auto;
}

.contact p {
    max-width: 34rem;
    margin: 1.25rem auto 0;
    color: var(--muted);
}

.contact .eyebrow {
    max-width: none;
    margin: 0 auto 1rem;
    justify-content: center;
    color: var(--accent);
}

.contact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2rem;
}

.site-footer {
    padding-block: 2.5rem;
    border-top: 1px solid var(--line);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    align-items: center;
    justify-content: space-between;
}

.site-footer p {
    color: var(--faint);
    font-size: 0.875rem;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.site-footer__links a {
    color: var(--muted);
    font-size: 0.875rem;
    transition: color 0.18s ease;
}

.site-footer__links a:hover {
    color: var(--accent-bright);
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 62rem) {
    .hero__grid,
    .about__grid,
    .education {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__portrait {
        grid-row: 1;
        justify-self: start;
        width: min(100%, 15rem);
    }

    .hero__badge {
        left: auto;
        right: -1rem;
        bottom: -1rem;
        padding: 0.55rem 0.8rem;
    }

    .hero__badge img {
        width: 3.5rem;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem 1rem;
    }
}

@media (max-width: 48rem) {
    .nav__toggle {
        display: grid;
    }

    .nav__list {
        position: absolute;
        inset: 100% 0 auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem var(--gutter) 1.25rem;
        background-color: var(--bg-soft);
        border-bottom: 1px solid var(--line-strong);
        box-shadow: var(--shadow-lg);
    }

    .nav__list[hidden] {
        display: none;
    }

    .nav__link {
        display: block;
        padding-block: 0.85rem;
        border-bottom: 1px solid var(--line);
        font-size: 1rem;
    }

    .nav__link::after {
        display: none;
    }

    .nav .btn {
        display: none;
    }

    .brand__role {
        display: none;
    }

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

    .role__logo {
        width: 3.5rem;
        height: 3.5rem;
    }

    .role__dates {
        width: 100%;
    }
}

@media (max-width: 30rem) {
    .stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   14. Motion & print
   -------------------------------------------------------------------------- */

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

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }

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

@media print {
    :root {
        --bg: #fff;
        --surface: #fff;
        --surface-2: #fff;
        --text: #111;
        --muted: #333;
        --faint: #555;
        --line: #ddd;
        --line-strong: #bbb;
    }

    body {
        background: #fff;
        color: #111;
    }

    .site-header,
    .hero__socials,
    .contact__actions,
    .nav,
    .skip-link {
        display: none !important;
    }

    .card,
    .role {
        box-shadow: none;
        break-inside: avoid;
    }

    .more-roles__list {
        display: grid !important;
        content-visibility: visible !important;
    }

    /* Gradient-clipped text has no colour of its own; give it one for paper. */
    .hero__title span,
    .stat__value {
        background: none;
        color: #111;
        -webkit-text-fill-color: #111;
    }
}
