/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
    color-scheme: dark;

    --bg: #05061a;
    --bg-raised: #0b0d2a;
    --surface: rgba(18, 21, 58, 0.62);
    --surface-strong: rgba(24, 28, 74, 0.85);
    --border: rgba(150, 160, 255, 0.14);
    --border-strong: rgba(150, 160, 255, 0.28);

    --text: #eceeff;
    --muted: #a7acd9;
    --faint: #7a7fb3;

    --cyan: #5fd4ff;
    --blue: #6b8cff;
    --violet: #a178ff;
    --pink: #ec7bdc;
    --gradient: linear-gradient(115deg, var(--cyan) 0%, var(--blue) 35%, var(--violet) 70%, var(--pink) 100%);

    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius: 18px;
    --radius-sm: 10px;
    --header-h: 64px;
    --gutter: clamp(16px, 4vw, 32px);
    --max-w: 1160px;
    --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

/* Nebula glow; a fixed pseudo-element rather than background-attachment:
   fixed, which iOS Safari ignores. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(60vmax 45vmax at 85% 15%, rgba(161, 120, 255, 0.16), transparent 60%),
        radial-gradient(55vmax 40vmax at 5% 55%, rgba(95, 212, 255, 0.10), transparent 60%),
        radial-gradient(50vmax 40vmax at 70% 95%, rgba(236, 123, 220, 0.10), transparent 60%),
        var(--bg);
}

#starfield {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

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

a {
    color: var(--cyan);
    text-decoration: none;
}

a:hover {
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 6px;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}

p {
    margin: 0 0 1em;
}

p:last-child {
    margin-bottom: 0;
}

iconify-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

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

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
}

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

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    min-height: 46px;
    padding: 0.7em 1.3em;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: 500 0.95rem/1 var(--font-body);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    color: #fff;
    border-color: var(--violet);
    background: var(--surface-strong);
    transform: translateY(-2px);
}

.btn-primary {
    border-color: transparent;
    background: var(--gradient);
    color: #090a24;
    font-weight: 600;
    box-shadow: 0 10px 30px -10px rgba(161, 120, 255, 0.8);
}

.btn-primary:hover {
    color: #090a24;
    border-color: transparent;
    background: var(--gradient);
    box-shadow: 0 14px 36px -10px rgba(161, 120, 255, 1);
}

.btn-sm {
    min-height: 38px;
    padding: 0.55em 1em;
    font-size: 0.875rem;
}

.icon-link {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 1.35rem;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-link:hover {
    color: #fff;
    border-color: var(--violet);
    transform: translateY(-2px);
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--header-h);
    transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(5, 6, 26, 0.78);
    border-bottom-color: var(--border);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font: 700 1.15rem/1 var(--font-display);
    letter-spacing: -0.01em;
}

.brand:hover {
    color: #fff;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--gradient);
    color: #090a24;
    font-size: 0.85rem;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a:not(.btn) {
    position: relative;
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.2rem;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.nav-links a:not(.btn):hover,
.nav-links a[aria-current] {
    color: var(--text);
}

.nav-links a:not(.btn):hover::after,
.nav-links a[aria-current]::after {
    transform: scaleX(1);
}

.nav-links .btn {
    margin-left: 0.5rem;
}

@media (max-width: 820px) {
    .nav-toggle {
        display: grid;
    }

    .nav-links {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem var(--gutter) 1.25rem;
        background: rgba(5, 6, 26, 0.95);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    }

    .site-header.is-open .nav-links {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .nav-links a:not(.btn) {
        padding: 0.85rem 0;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links a:not(.btn)::after {
        display: none;
    }

    .nav-links .btn {
        margin: 1rem 0 0;
        width: 100%;
    }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--header-h) + 2rem) 0 5rem;
    text-align: center;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(5, 6, 26, 0.35) 0%, rgba(5, 6, 26, 0.2) 45%, var(--bg) 100%),
        url("../files/web/banner.webp") center 30% / cover no-repeat;
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}

.hero-portrait {
    width: clamp(140px, 26vw, 200px);
    aspect-ratio: 1;
    margin: 0 auto 1.75rem;
    padding: 4px;
    border-radius: 50%;
    background: var(--gradient);
    box-shadow: 0 0 60px -10px rgba(161, 120, 255, 0.7);
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--bg);
    object-fit: cover;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--cyan);
    font: 500 0.8rem/1.4 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.6rem, 8vw, 5rem);
    font-weight: 700;
    text-shadow: 0 4px 30px rgba(5, 6, 26, 0.6);
}

.hero-lead {
    max-width: 38rem;
    margin: 1.25rem auto 2rem;
    color: #d4d7f7;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero .socials {
    justify-content: center;
    margin-top: 1.75rem;
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    translate: -50% 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--muted);
    font-size: 1.6rem;
    animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
    50% {
        transform: translateY(8px);
    }
}

@media (max-height: 640px) {
    .scroll-cue {
        display: none;
    }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
    padding-block: clamp(4rem, 10vw, 7rem);
}

.section-head {
    margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section-head h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
}

.section-head p {
    max-width: 40rem;
    margin-top: 0.75rem;
    color: var(--muted);
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* About */
.about-grid {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    }
}

.about-text p {
    color: #d4d7f7;
    font-size: 1.075rem;
}

.facts {
    margin: 0;
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.facts div {
    display: grid;
    gap: 0.15rem;
    padding-block: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.facts div:first-child {
    padding-top: 0;
}

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

.facts dt {
    color: var(--faint);
    font: 500 0.75rem/1.4 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.facts dd {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
}

/* Experience timeline */
.timeline {
    position: relative;
    display: grid;
    gap: 1.25rem;
    margin: 0;
    padding: 0 0 0 1.75rem;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--cyan), var(--violet), var(--pink));
    opacity: 0.6;
}

.timeline-item {
    position: relative;
    padding: clamp(1.15rem, 3vw, 1.6rem);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: calc(-1.75rem + 0px);
    top: 1.75rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--violet);
    box-shadow: 0 0 12px var(--violet);
}

.timeline-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
}

.timeline-head h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.timeline-date {
    color: var(--cyan);
    font: 500 0.8rem/1.4 var(--font-mono);
    white-space: nowrap;
}

.timeline-org {
    margin: 0.2rem 0 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.timeline-item ul {
    margin: 0;
    padding-left: 1.1rem;
    color: #cfd2f2;
    font-size: 0.95rem;
}

.timeline-item li + li {
    margin-top: 0.35rem;
}

.timeline-item li::marker {
    color: var(--violet);
}

/* ==========================================================================
   Projects
   ========================================================================== */
.projects {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.5rem);
}

.project {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2.25rem);
    padding: clamp(1rem, 2.5vw, 1.75rem);
    align-items: start;
}

@media (min-width: 960px) {
    .project {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    }

    .project:nth-child(even) .project-media {
        order: 2;
    }

    /* Keep the gallery in view while reading long write-ups. */
    .project-media {
        position: sticky;
        top: calc(var(--header-h) + 1.5rem);
    }
}

.project-body h3 {
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    font-weight: 700;
}

.project-meta {
    margin: 0.4rem 0 1rem;
    color: var(--cyan);
    font: 500 0.8rem/1.5 var(--font-mono);
    letter-spacing: 0.03em;
}

.project-body p {
    color: #cfd2f2;
    font-size: 0.98rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.tags li {
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(107, 140, 255, 0.08);
    color: var(--muted);
    font: 500 0.75rem/1.5 var(--font-mono);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: linear-gradient(115deg, rgba(95, 212, 255, 0.16), rgba(161, 120, 255, 0.22));
    border: 1px solid rgba(161, 120, 255, 0.4);
    color: #e3d8ff;
    font: 500 0.75rem/1.5 var(--font-mono);
}

/* Gallery (scroll-snap carousel); controls and caption are added by site.js */
.gallery-frame {
    position: relative;
}

.gallery-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(3, 4, 18, 0.7);
    scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 100%;
    margin: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.gallery-open {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.gallery-open img,
.gallery-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-slide video {
    aspect-ratio: 16 / 9;
}

.gallery-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.75rem;
    margin-top: 0.6rem;
    color: var(--faint);
    font-size: 0.85rem;
    line-height: 1.4;
}

.gallery-count {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    white-space: nowrap;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: rgba(5, 6, 26, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.gallery-btn:hover {
    border-color: var(--violet);
}

.gallery-btn:disabled {
    opacity: 0;
    pointer-events: none;
}

.gallery-btn.prev {
    left: 10px;
}

.gallery-btn.next {
    right: 10px;
}

.gallery-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    translate: -50% 0;
    display: flex;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(5, 6, 26, 0.6);
}

.gallery-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(236, 238, 255, 0.35);
    cursor: pointer;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.gallery-dots button[aria-current="true"] {
    width: 20px;
    background: var(--gradient);
}

.gallery.is-single .gallery-count {
    display: none;
}

/* Lightbox */
.lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(3, 4, 16, 0.97);
    color: var(--text);
}

.lightbox::backdrop {
    background: rgba(3, 4, 16, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lightbox[open] {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem var(--gutter);
    color: var(--muted);
    font: 500 0.8rem/1 var(--font-mono);
}

.lightbox-stage {
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 0 var(--gutter);
}

.lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-caption {
    max-width: 50rem;
    margin: 0 auto;
    padding: 1rem var(--gutter) 1.25rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.lightbox-close,
.lightbox-nav {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: rgba(11, 13, 42, 0.85);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    translate: 0 -50%;
}

.lightbox-nav.prev {
    left: 12px;
}

.lightbox-nav.next {
    right: 12px;
}

.lightbox-nav[hidden] {
    display: none;
}

@media (max-width: 640px) {
    .lightbox-nav {
        top: auto;
        bottom: 12px;
        translate: none;
    }

    /* Leave room for the prev/next buttons along the bottom edge. */
    .lightbox-caption {
        min-height: 68px;
        padding-inline: 68px;
        padding-bottom: 12px;
    }
}

/* ==========================================================================
   Skills
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.25rem;
}

.skill-group {
    --accent: var(--blue);
    padding: clamp(1.25rem, 3vw, 1.6rem);
}

.skill-group:nth-child(1) { --accent: var(--cyan); }
.skill-group:nth-child(2) { --accent: var(--blue); }
.skill-group:nth-child(3) { --accent: var(--violet); }
.skill-group:nth-child(4) { --accent: var(--pink); }

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

.skill-group h3 iconify-icon {
    color: var(--accent);
    font-size: 1.35rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.skill-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(5, 6, 26, 0.45);
    color: #dadcf8;
    font-size: 0.9rem;
    line-height: 1.3;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.skill-list li:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.skill-list iconify-icon {
    color: var(--accent);
    font-size: 1.1rem;
}

/* ==========================================================================
   Contact / footer
   ========================================================================== */
.contact-card {
    position: relative;
    padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 3rem);
    text-align: center;
    overflow: hidden;
}

.contact-card::before {
    content: "";
    position: absolute;
    inset: -40% -10% auto;
    height: 80%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(161, 120, 255, 0.35), transparent);
    pointer-events: none;
}

.contact-card h2 {
    font-size: clamp(2rem, 5.5vw, 3rem);
    font-weight: 700;
}

.contact-card p {
    max-width: 34rem;
    margin: 1rem auto 1.75rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.contact-card .hero-actions {
    margin-bottom: 1.5rem;
}

.contact-card .socials {
    justify-content: center;
}

.contact-email {
    word-break: break-all;
}

.site-footer {
    padding: 2rem 0 2.5rem;
    color: var(--faint);
    font-size: 0.85rem;
    text-align: center;
}

/* ==========================================================================
   Resume page
   ========================================================================== */
.page-top {
    padding-top: calc(var(--header-h) + clamp(2rem, 6vw, 4rem));
}

.resume-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.resume-head .hero-actions {
    justify-content: flex-start;
}

.resume-viewer {
    overflow: hidden;
    padding: 0;
}

.resume-viewer object {
    display: block;
    width: 100%;
    height: min(85vh, 1150px);
    border: 0;
}

.resume-fallback {
    display: grid;
    place-items: center;
    gap: 1rem;
    min-height: 16rem;
    padding: 2rem;
    color: var(--muted);
    text-align: center;
}

/* Mobile browsers render embedded PDFs poorly; the Open/Download buttons are
   the main path there, so the inline viewer gets out of the way. */
@media (max-width: 720px) {
    .resume-viewer object {
        height: 70vh;
    }
}

/* ==========================================================================
   Motion
   ========================================================================== */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .gallery-track {
        scroll-behavior: auto;
    }

    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
