/* ──────────────────────────────────────────────────────────────────────────
   Shared editorial typography
   Mirrors the contact page text style across the rest of the site:
   light-weight display titles in a dim ink, italic emphasis with a small
   weight bump, tracked uppercase eyebrows, and quietly dimmed body text.
   ────────────────────────────────────────────────────────────────────────── */

:root {
    --msf-text: #0e0e0e;
    /* --msf-text-dim was a softer grey; collapsed onto --msf-text for a single ink. */
    --msf-text-dim: var(--msf-text);
    /* Muted ink is kept for eyebrows, education labels, in-bracket notes, etc. */
    --msf-text-muted: rgba(14, 14, 14, 0.42);
    --msf-text-on-dark: #ffffff;
    --msf-text-on-dark-dim: var(--msf-text-on-dark);
    --msf-text-on-dark-muted: rgba(255, 255, 255, 0.5);
}

/* Display title — hero h1 on every page */
.msf-display-title {
    font-family: Inter, sans-serif;
    font-size: clamp(2.4rem, 5.2vw, 4.4rem);
    line-height: 1.08;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--msf-text-dim);
    margin: 0 0 24px;
}

.msf-display-title em {
    font-style: italic;
    font-weight: 500;
    color: var(--msf-text);
}

/* Section title — h2 within page sections */
.msf-section-title {
    font-family: Inter, sans-serif;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.15;
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--msf-text-dim);
    margin: 0 0 16px;
}

.msf-section-title em {
    font-style: italic;
    font-weight: 500;
    color: var(--msf-text);
}

/* Subsection / card-level title */
.msf-subsection-title {
    font-family: Inter, sans-serif;
    font-size: clamp(1.4rem, 2vw, 1.75rem);
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--msf-text-dim);
    margin: 0;
}

.msf-subsection-title em {
    font-style: italic;
    font-weight: 500;
    color: var(--msf-text);
}

/* Lead paragraph — sits under display/section titles */
.msf-lead {
    font-family: Inter, sans-serif;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--msf-text-dim);
    margin: 0;
}

.msf-lead em {
    font-style: italic;
    font-weight: 500;
    color: var(--msf-text);
}

/* Body paragraph — for editorial sections */
.msf-body {
    font-family: Inter, sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--msf-text-dim);
    margin: 0;
}

.msf-body em {
    font-style: italic;
    font-weight: 500;
    color: var(--msf-text);
}

/* Eyebrow / tracked uppercase label */
.msf-eyebrow {
    display: inline-block;
    font-family: Inter, sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--msf-text-muted);
    margin: 0 0 12px;
}

/* Dark-section variants (e.g. works dark stripe, footer) */
.msf-on-dark.msf-display-title,
.msf-on-dark .msf-display-title,
.msf-on-dark.msf-section-title,
.msf-on-dark .msf-section-title,
.msf-on-dark.msf-subsection-title,
.msf-on-dark .msf-subsection-title {
    color: var(--msf-text-on-dark-dim);
}

.msf-on-dark .msf-display-title em,
.msf-on-dark .msf-section-title em,
.msf-on-dark .msf-subsection-title em,
.msf-on-dark.msf-display-title em,
.msf-on-dark.msf-section-title em,
.msf-on-dark.msf-subsection-title em {
    color: var(--msf-text-on-dark);
}

.msf-on-dark.msf-lead,
.msf-on-dark .msf-lead,
.msf-on-dark.msf-body,
.msf-on-dark .msf-body {
    color: var(--msf-text-on-dark-dim);
}

.msf-on-dark.msf-eyebrow,
.msf-on-dark .msf-eyebrow {
    color: var(--msf-text-on-dark-muted);
}

/* Section divider — small tracked label, with a hairline above subsequent dividers */
.msf-section-divider {
    margin-top: 48px;
    margin-bottom: 20px;
    padding-top: 28px;
    border-top: 1px solid rgba(14, 14, 14, 0.12);
}

.msf-section-divider:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.msf-section-divider .msf-eyebrow {
    margin: 0;
}

/* ── Privacy policy page ─────────────────────────────────────────────────── */

.privacy-policy {
    max-width: 760px;
    padding-top: 120px;
    padding-bottom: 140px;
}

.privacy-policy-header {
    margin-bottom: 64px;
}

.privacy-policy-header .msf-eyebrow {
    margin-bottom: 20px;
}

.privacy-policy-header .msf-display-title {
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    margin-bottom: 24px;
    max-width: 580px;
}

.privacy-policy-header .msf-lead {
    max-width: 640px;
}

.privacy-policy-section + .privacy-policy-section {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid rgba(14, 14, 14, 0.08);
}

.privacy-policy-section .msf-section-title {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    margin-bottom: 16px;
}

.privacy-policy-section .msf-body + .msf-body {
    margin-top: 14px;
}

.privacy-policy-inline-link {
    color: var(--msf-text);
    border-bottom: 1px solid rgba(14, 14, 14, 0.25);
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.privacy-policy-inline-link:hover,
.privacy-policy-inline-link:focus-visible {
    color: var(--msf-text);
    border-bottom-color: var(--msf-text);
    text-decoration: none;
    outline: none;
}

@media (max-width: 767.98px) {
    .privacy-policy {
        padding-top: 100px;
        padding-bottom: 100px;
    }

    .privacy-policy-header {
        margin-bottom: 48px;
    }

    .privacy-policy-section + .privacy-policy-section {
        margin-top: 36px;
        padding-top: 36px;
    }
}

/* ── Works Page: Scroll Snap ── */

.works-snap-container {
    height: 100vh;
    overflow-y: auto;
    /* Proximity (not mandatory) so the user can scroll past the last section
       into the footer without the browser yanking them back to a snap point. */
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

.works-snap-section {
    scroll-snap-align: start;
    min-height: 100vh;
}

/* Footer lives inside the snap container; it doesn't snap and can flow
   naturally once the user scrolls past the last works section. */
.works-snap-container > .works-snap-footer {
    scroll-snap-align: none;
}

/* ── Works Page: Hero ── */

.works-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 120px 0 80px;
}

.works-hero-title {
    margin-bottom: 20px;
}

.works-hero-sub {
    max-width: 640px;
    margin: 0 auto;
}

/* ── Works Page: Dark Section ── */

.works-dark-section {
    background: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

.works-dark-card {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.works-dark-card:last-child {
    border-bottom: none;
}

/* ── Works Page: Light Section (Research) ── */

.works-light-section {
    background: #fff;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

.works-light-card {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.works-light-card:last-child {
    border-bottom: none;
}

/* ── Works Page: CV Call-to-Action ── */

.works-cv-cta {
    justify-content: center;
}

.works-cv-inner {
    max-width: 720px;
    margin: 0 auto;
}

.works-cv-inner .msf-eyebrow {
    margin-bottom: 18px;
}

.works-cv-title {
    margin-bottom: 18px;
    text-wrap: balance;
}

.works-cv-text {
    max-width: 560px;
    margin: 0 auto 40px;
}

.works-cv-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.works-cv-btn {
    min-width: 180px;
    justify-content: center;
}

@media (max-width: 575.98px) {
    .works-cv-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .works-cv-btn {
        width: 100%;
    }
}

/* ── Flip Cards ── */

.card-flip {
    perspective: 800px;
    height: 520px;
    cursor: pointer;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 30px;
    border: 2px solid rgba(0, 0, 0, 0.18);
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-flip:hover .card-flip-front,
.card-flip:hover .card-flip-back {
    border-color: rgba(0, 0, 0, 0.35);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.card-flip-front {
    background: #fff;
}

.card-flip-back {
    background: #1a1a1a;
    color: #fff;
    transform: rotateY(180deg);
}

.card-flip-back p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ── About: Education sub-sections ── */

.edu-details {
    margin: 0;
}

.edu-details dt {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 6px;
}

.edu-details dt + dd {
    margin: 0;
}

.edu-details dt:not(:first-of-type) {
    margin-top: 22px;
}

.edu-details dd {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: inherit;
}

.edu-details-note {
    color: #888;
    font-size: 0.88em;
    margin-left: 4px;
}

/* ── Contact Cards ── */

.contact-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    min-height: 240px;
    padding: 44px 28px 28px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    transition: transform 0.35s ease, border-color 0.3s ease, box-shadow 0.35s ease;
    overflow: hidden;
}

.contact-card:hover,
.contact-card:focus-within {
    transform: translateY(-6px);
    border-color: rgba(0, 0, 0, 0.28);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
}

.contact-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.contact-card-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.contact-card-link:hover,
.contact-card-link:focus,
.contact-card-link:focus-visible {
    color: inherit;
    text-decoration: none;
}

.contact-card-link:focus-visible::before {
    outline: 2px solid rgba(0, 0, 0, 0.6);
    outline-offset: -4px;
}

.contact-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.045);
    color: #1a1a1a;
    transition: transform 0.35s ease, background-color 0.3s ease, color 0.3s ease;
}

.contact-card:hover .contact-card-icon,
.contact-card:focus-within .contact-card-icon {
    transform: translateY(-3px) scale(1.04);
    background: #1a1a1a;
    color: #fff;
}

.contact-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.contact-card-detail {
    display: block;
    font-size: 0.92rem;
    color: #666;
    word-break: break-word;
}

.contact-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #1a1a1a;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-card-cta svg {
    transition: transform 0.3s ease;
}

.contact-card:hover .contact-card-cta,
.contact-card:focus-within .contact-card-cta {
    opacity: 1;
    transform: translateY(0);
}

.contact-card:hover .contact-card-cta svg,
.contact-card:focus-within .contact-card-cta svg {
    transform: translateX(2px);
}

/* Copy-to-clipboard button (sits above the stretched link) */
.contact-card-copy {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1;
    color: #555;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.contact-card-copy:hover,
.contact-card-copy:focus-visible {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.18);
    outline: none;
}

.contact-card-copy:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.contact-card-copy-check {
    display: none;
}

.contact-card-copy.is-copied {
    color: #146c2e;
    background: rgba(20, 108, 46, 0.08);
    border-color: rgba(20, 108, 46, 0.25);
}

.contact-card-copy.is-copied .contact-card-copy-icon {
    display: none;
}

.contact-card-copy.is-copied .contact-card-copy-check {
    display: inline-block;
}

.contact-socials .nav-link {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.25s ease;
}

.contact-socials .nav-link:hover {
    opacity: 0.65;
}

/* ── 404 Full-Screen Hero ── */

.content-wrap-fullscreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.error-shape {
    pointer-events: none;
}

.error-shape-tr {
    top: -140px;
    right: -100px;
    left: auto !important;
}

.error-shape-bl {
    bottom: -120px;
    left: -80px;
    top: auto !important;
}

/* ── Decorative background circles (page-agnostic) ── */

.bg-shape {
    pointer-events: none;
}

.bg-shape-tr {
    top: -140px;
    right: -100px;
    left: auto !important;
}

.bg-shape-bl {
    bottom: -120px;
    left: -80px;
    top: auto !important;
}

/* Full-page network/constellation background (replaces .bg-shape-* on contact) */
.bg-network {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-network svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ──────────────────────────────────────────────────────────────────────────
   Contact Page — AirX-inspired light layout
   Pure white background with subtle off-white "matching" cards.
   ────────────────────────────────────────────────────────────────────────── */

/* Main wrapper */
.contact-airx {
    --airx-bg: #ffffff;
    --airx-surface: #f4f4f4;       /* matching off-white for dark-equivalent cards */
    --airx-surface-2: #ededed;     /* slightly deeper hover/contrast tint */
    --airx-surface-light: #f7f7f7; /* form / profile / connect cards */
    --airx-border: rgba(14, 14, 14, 0.08);
    --airx-border-strong: rgba(14, 14, 14, 0.22);
    --airx-text: #0e0e0e;
    /* Collapsed onto --airx-text so titles/leads/body share one ink. */
    --airx-text-dim: var(--airx-text);
    /* Muted kept for eyebrows / "Replies within 48h" / form disclaimer. */
    --airx-text-muted: rgba(14, 14, 14, 0.42);
    --airx-accent: #0e0e0e;

    background: var(--airx-bg);
    color: var(--airx-text);
    padding: 120px 0 48px;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Subtle radial highlight behind content */
.contact-airx::before {
    content: "";
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 1100px;
    height: 700px;
    background: radial-gradient(ellipse at center, rgba(14, 14, 14, 0.04) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.contact-airx-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.contact-airx-hero {
    text-align: center;
    margin-bottom: 56px;
}

.contact-airx-hero .msf-display-title {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.contact-airx-hero .msf-lead {
    max-width: 600px;
    margin: 0 auto;
}

/* ── Quick-contact strip (editorial, no card boxes) ──────────────────────── */

.contact-airx-quick-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 80px;
    border-top: 1px solid var(--airx-border);
    border-bottom: 1px solid var(--airx-border);
}

.contact-airx-quick-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 32px 32px 36px;
    color: var(--airx-text);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.contact-airx-quick-item + .contact-airx-quick-item {
    border-left: 1px solid var(--airx-border);
}

a.contact-airx-quick-item:hover,
a.contact-airx-quick-item:focus-visible {
    background: rgba(14, 14, 14, 0.025);
    color: var(--airx-text);
    text-decoration: none;
    outline: none;
}

.contact-airx-quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--airx-text);
    margin-bottom: 4px;
}

.contact-airx-quick-title {
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0;
    color: var(--airx-text);
}

.contact-airx-quick-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--airx-text-dim);
    margin: 0;
    flex: 1;
}

.contact-airx-quick-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--airx-text);
    transition: gap 0.25s ease;
}

.contact-airx-quick-cta svg {
    transition: transform 0.25s ease;
}

a.contact-airx-quick-item:hover .contact-airx-quick-cta {
    gap: 10px;
}

a.contact-airx-quick-item:hover .contact-airx-quick-cta svg {
    transform: translateX(2px);
}

.contact-airx-quick-item.is-static {
    justify-content: center;
    gap: 6px;
}

.contact-airx-quick-item .msf-eyebrow {
    margin-bottom: 4px;
}

.contact-airx-quick-detail {
    font-size: 1rem;
    font-weight: 400;
    color: var(--airx-text);
    margin: 0;
    letter-spacing: 0.005em;
}

.contact-airx-quick-meta {
    font-size: 0.8rem;
    color: var(--airx-text-muted);
    margin: 8px 0 0;
    line-height: 1.55;
}

/* ── Main two-column section (borderless) ────────────────────────────────── */

.contact-airx-main {
    display: grid;
    /* Form and poster share equal widths so the message body lines up
       with the poster, and the Submit button sits across from
       "More about me" once both columns are stretched. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
    margin-bottom: 120px;
    align-items: stretch;
}

/* Form block — sits on the page, no enclosing card */
.contact-airx-form-block {
    color: var(--airx-text);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.contact-airx-form-prompt {
    font-size: 0.9rem;
    color: var(--airx-text);
    margin: 0 0 14px;
}

.contact-airx-form-prompt em {
    color: #c33;
    font-style: normal;
    margin-left: 2px;
}

.contact-airx-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.contact-airx-chip {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.25);
    color: #1a1a1a;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.contact-airx-chip:hover {
    border-color: #1a1a1a;
}

.contact-airx-chip.is-selected,
.contact-airx-chip[aria-pressed="true"] {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

/* Floating-label fields */
.contact-airx-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.contact-airx-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.contact-airx-field {
    position: relative;
    display: block;
}

.contact-airx-field input,
.contact-airx-field textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.22);
    padding: 22px 0 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1a1a1a;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.contact-airx-field textarea {
    /* Extend the message body so the form fills out to roughly match
       the poster column on the right (Submit ↔ More-about-me align). */
    min-height: 140px;
}

/* Allow the message field row to flex and grow inside the form column. */
.contact-airx-field-full {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-airx-field-full textarea {
    flex: 1;
}

.contact-airx-field input:focus,
.contact-airx-field textarea:focus {
    border-bottom-color: #1a1a1a;
}

.contact-airx-field-label {
    position: absolute;
    left: 0;
    top: 22px;
    color: rgba(0, 0, 0, 0.55);
    font-size: 0.95rem;
    pointer-events: none;
    transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}

.contact-airx-field-label em {
    color: #c33;
    font-style: normal;
    margin-left: 2px;
}

.contact-airx-field input:focus + .contact-airx-field-label,
.contact-airx-field input:not(:placeholder-shown) + .contact-airx-field-label,
.contact-airx-field textarea:focus + .contact-airx-field-label,
.contact-airx-field textarea:not(:placeholder-shown) + .contact-airx-field-label {
    top: 2px;
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.55);
}

.contact-airx-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 14px;
    flex-wrap: wrap;
}

.contact-airx-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--airx-text);
    cursor: pointer;
    max-width: 360px;
    line-height: 1.5;
}

.contact-airx-consent input {
    margin-top: 2px;
    accent-color: #1a1a1a;
    flex-shrink: 0;
}

.contact-airx-submit {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #1a1a1a;
    background: transparent;
    color: #1a1a1a;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.contact-airx-submit:hover,
.contact-airx-submit:focus-visible {
    background: #1a1a1a;
    color: #fff;
    outline: none;
}

.contact-airx-submit svg {
    transition: transform 0.2s ease;
}

.contact-airx-submit:hover svg {
    transform: translateX(2px);
}

.contact-airx-form-note {
    margin: 16px 0 0;
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1.55;
}

/* Profile block — image and text only, no enclosing card */
.contact-airx-profile-block {
    color: var(--airx-text);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

.contact-airx-profile-photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: #ddd;
}

.contact-airx-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

.contact-airx-profile-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.contact-airx-profile-body .msf-eyebrow {
    margin-bottom: 0;
}

/* Profile name — sized up to anchor the profile block on its own */
.contact-airx-profile-name {
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    line-height: 1.15;
}

.contact-airx-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    align-self: flex-start;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    padding-bottom: 2px;
    transition: gap 0.2s ease, border-color 0.2s ease;
}

.contact-airx-profile-link:hover,
.contact-airx-profile-link:focus-visible {
    color: #1a1a1a;
    text-decoration: none;
    border-bottom-color: #1a1a1a;
    gap: 10px;
    outline: none;
}

/* ── Where to find me (single, editorial London block) ───────────────────── */

.contact-airx-locations {
    margin-top: 24px;
    padding-top: 64px;
    border-top: 1px solid var(--airx-border);
}

.contact-airx-locations-head {
    margin-bottom: 48px;
    max-width: 720px;
}

.contact-airx-locations-head .msf-lead {
    max-width: 580px;
}

.contact-airx-locations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
}

.contact-airx-location {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.contact-airx-location-map {
    color: rgba(14, 14, 14, 0.55);
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 320px;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.75;
}

.contact-airx-location-map svg,
.contact-airx-location-map img {
    height: 100%;
    width: 100%;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.contact-airx-location-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
}

.contact-airx-location-body .msf-eyebrow {
    margin-bottom: 0;
}

.contact-airx-location-name {
    font-size: clamp(1.5rem, 2.2vw, 1.85rem);
}

.contact-airx-location-detail {
    margin: 0;
}

/* ── Stay-in-touch section (relocated social connect) ────────────────────── */

.contact-airx-stay {
    margin-top: 96px;
    padding: 80px 0 48px;
    border-top: 1px solid var(--airx-border);
    /* Centre the inner block in both axes within the section area. */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.contact-airx-stay-inner {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-airx-stay-inner .msf-eyebrow {
    margin: 0 0 20px;
}

/* Tighter than a normal section title; balance the wrap so the two
   lines read symmetrically beneath the eyebrow. */
.contact-airx-stay-title {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    line-height: 1.2;
    margin: 0 0 18px;
    max-width: 540px;
    text-wrap: balance;
}

.contact-airx-stay-text {
    margin: 0 0 36px;
    max-width: 480px;
}

.contact-airx-stay-socials {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.contact-airx-stay-socials li {
    display: flex;
}

.contact-airx-stay-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #1a1a1a;
    background: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.contact-airx-stay-socials svg {
    width: 22px;
    height: 22px;
}

.contact-airx-stay-socials a:hover,
.contact-airx-stay-socials a:focus-visible {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    transform: translateY(-2px);
    outline: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 991.98px) {
    .contact-airx {
        padding: 110px 0 48px;
    }

    .contact-airx-quick-row {
        grid-template-columns: 1fr;
    }

    .contact-airx-quick-item + .contact-airx-quick-item {
        border-left: 0;
        border-top: 1px solid var(--airx-border);
    }

    .contact-airx-main {
        grid-template-columns: 1fr;
        gap: 56px;
        margin-bottom: 72px;
    }

    .contact-airx-profile-block {
        max-width: 420px;
    }

    .contact-airx-locations-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .contact-airx-location {
        gap: 20px;
    }

    .contact-airx-location-map {
        max-width: 240px;
    }

    .contact-airx-stay {
        margin-top: 72px;
        padding-top: 48px;
    }
}

@media (max-width: 575.98px) {
    .contact-airx {
        padding: 100px 0 80px;
    }

    .contact-airx-quick-item {
        padding: 26px 8px 28px;
    }

    .contact-airx-field-row {
        grid-template-columns: 1fr;
    }

    .contact-airx-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-airx-submit {
        justify-content: center;
    }

    .contact-airx-location {
        gap: 18px;
    }
}

/* ── Experience / Research card rows ── */

.row-tight > [class*="col-"] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.row-tight .card {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.row-tight .card-default {
    margin-bottom: 12px !important;
}

/* ── Works Page: Projects section (grid + footer in one panel) ── */

.works-projects-section {
    padding: 72px 40px 28px;
    align-items: stretch;
    justify-content: flex-start;
}

.works-projects-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.works-projects-heading {
    margin-bottom: 52px;
}

.works-projects-panel {
    width: min(880px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    margin-top: 0;
    display: flex;
    flex-direction: column;
}

.works-projects-grid {
    --projects-gap: 32px;
    margin-left: calc(var(--projects-gap) * -0.5);
    margin-top: calc(var(--projects-gap) * -0.5);
    flex-shrink: 0;
}

.works-projects-grid > [class*="col"] {
    padding-left: calc(var(--projects-gap) * 0.5);
    padding-top: calc(var(--projects-gap) * 0.5);
    display: flex;
    justify-content: center;
}

.works-projects-section .project-card {
    width: min(100%, var(--project-square, 100%));
    height: auto;
    aspect-ratio: 1 / 1;
}

.works-projects-section .project-card-overlay {
    padding: 18px 20px 30px;
}

.works-projects-section .project-card,
.works-projects-section .project-card:hover,
.works-projects-section .project-card:focus,
.works-projects-section .project-card:focus-visible {
    color: #fff;
}

.works-projects-section .project-card-tag,
.works-projects-section .project-card-title,
.works-projects-section .project-card-desc {
    color: #fff;
    opacity: 1;
}

.works-projects-section .project-card-title {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.works-projects-section .project-card-desc {
    font-size: 0.82rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    transform: translateY(10px);
    transition:
        opacity 0.45s ease,
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        max-height 0.45s ease,
        padding 0.45s ease;
}

.works-projects-section .project-card:hover .project-card-desc,
.works-projects-section .project-card:focus-visible .project-card-desc {
    max-height: 3.2em;
    opacity: 1;
    transform: translateY(0);
    padding-bottom: 8px;
    transition-delay: 0.1s;
}

/* Touch devices have no real hover; iOS applies a sticky :hover after a tap
   that lingers once the modal closes. Keep the description hidden there so it
   never re-appears (and overlaps the title) on mobile. */
@media (hover: none) {
    .works-projects-section .project-card:hover .project-card-desc,
    .works-projects-section .project-card:focus .project-card-desc,
    .works-projects-section .project-card:focus-visible .project-card-desc {
        max-height: 0;
        opacity: 0;
        transform: translateY(10px);
        padding-bottom: 0;
    }
}

/* ── Project Cards ── */

.project-card {
    position: relative;
    display: block;
    border-radius: 18px;
    overflow: hidden;
    height: 360px;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    transform: translateY(0) scale(1);
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.show-on-scroll.show-on-scroll-ready .project-card {
    animation: project-card-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.show-on-scroll[data-show-delay="50"].show-on-scroll-ready .project-card { animation-delay: 0.05s; }
.show-on-scroll[data-show-delay="150"].show-on-scroll-ready .project-card { animation-delay: 0.12s; }
.show-on-scroll[data-show-delay="250"].show-on-scroll-ready .project-card { animation-delay: 0.19s; }
.show-on-scroll[data-show-delay="350"].show-on-scroll-ready .project-card { animation-delay: 0.26s; }
.show-on-scroll[data-show-delay="450"].show-on-scroll-ready .project-card { animation-delay: 0.33s; }
.show-on-scroll[data-show-delay="550"].show-on-scroll-ready .project-card { animation-delay: 0.4s; }

@keyframes project-card-enter {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
    transition: box-shadow 0.45s ease;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.015);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.project-card:hover::after {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.project-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #e0e0e0;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.project-card:hover .project-card-img {
    transform: scale(1.08);
    filter: brightness(0.92);
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.42) 45%,
        rgba(0, 0, 0, 0.08) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0.72;
    transform: translateY(6px);
    transition:
        opacity 0.45s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.45s ease;
}

.project-card:hover .project-card-overlay {
    opacity: 1;
    transform: translateY(0);
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.12) 100%
    );
}

.project-card-tag,
.project-card-title,
.project-card-desc {
    transform: translateY(14px);
    opacity: 0.85;
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease;
}

.project-card:hover .project-card-tag {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.04s;
}

.project-card:hover .project-card-title {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.08s;
}

.project-card:hover .project-card-desc {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.12s;
}

.project-card-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.project-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
    .show-on-scroll.show-on-scroll-ready .project-card {
        animation: none;
    }

    .project-card,
    .project-card-img,
    .project-card-overlay,
    .project-card-tag,
    .project-card-title,
    .project-card-desc {
        transition-duration: 0.01ms;
    }
}

/* ── Projects grid: "more to come" footer ── */

.works-projects-more {
    margin-top: 22px;
    padding-top: 0;
}

.works-projects-more-text {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    margin-bottom: 18px !important;
}

.works-projects-more-btn {
    min-width: 180px;
}

@media (min-width: 992px) {
    .works-projects-section {
        min-height: 100vh;
        max-height: 100vh;
        overflow: hidden;
        box-sizing: border-box;
        padding: 80px 64px 32px;
    }

    .works-projects-container {
        flex: 1;
        min-height: 0;
        width: 100%;
        max-width: none;
        display: flex;
        flex-direction: column;
    }

    .works-projects-heading {
        margin-bottom: 120px;
        flex-shrink: 0;
    }

    .works-projects-panel {
        flex: 1;
        min-height: 0;
        width: min(1100px, calc(100% - 48px));
        margin-left: auto;
        margin-right: auto;
        padding: 0;
        /* Largest square that fits 4×2 grid + footer inside the slide.
           The 440px reservation covers section padding, the heading
           (with its 120px margin-bottom), the "More to come" footer
           (with its 35px margin-top) and the "Keep in the loop"
           button so nothing gets clipped by the section's 100vh
           max-height. */
        --project-square: min(
            calc((100% - var(--projects-gap) * 3) / 4),
            calc((100vh - 440px - var(--projects-gap)) / 2)
        );
    }

    .works-projects-more {
        margin-top: 35px;
    }
}

@media (max-width: 991.98px) {
    .works-projects-section {
        padding: 88px 44px 52px;
    }

    .works-projects-heading {
        margin-bottom: 56px;
    }

    .works-projects-panel {
        width: min(720px, calc(100% - 24px));
        margin-left: auto;
        margin-right: auto;
        padding: 0;
        margin-top: 0;
    }

    .works-projects-container {
        min-height: 0;
    }
}

@media (max-width: 575.98px) {
    .works-projects-section {
        padding-left: 32px;
        padding-right: 32px;
    }

    .works-projects-panel {
        width: min(100%, calc(100% - 16px));
        padding: 0;
    }

    .works-projects-grid {
        --projects-gap: 40px;
    }
}

/* ── Project Modal (Fancybox) ── */

/* Frost/dim overlay on the viewport */
.fancybox-container.fancybox-project .fancybox-bg {
    background: rgba(255, 255, 255, 0.42);
    opacity: 1 !important;
    transition: opacity 0.45s ease, background 0.45s ease;
}

/* Keep transition on blur targets so fade-out works when the open class is removed */
body:has(.works-snap-container) header.navbar,
body:has(.works-snap-container) .works-snap-container,
body:has(.works-snap-container) .msf-scroll-controls-works {
    transition: filter 0.45s ease;
}

/* Blur page content behind the modal (reliable vs backdrop-filter on overlay) */
body.fancybox-project-open:has(.works-snap-container) header.navbar,
body.fancybox-project-open:has(.works-snap-container) .works-snap-container,
body.fancybox-project-open:has(.works-snap-container) .msf-scroll-controls-works {
    filter: blur(18px) saturate(1.05);
}

body.fancybox-project-open .msf-scroll-controls-works {
    pointer-events: none;
}

.fancybox-container.fancybox-project .fancybox-slide,
.fancybox-container.fancybox-project .fancybox-slide--html {
    background: transparent;
}

.fancybox-container.fancybox-project .fancybox-slide {
    padding: 48px 24px;
}

.fancybox-container.fancybox-project .fancybox-close-small {
    top: 22px;
    right: 22px;
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(14, 14, 14, 0.07);
    color: #0e0e0e;
    opacity: 1;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.fancybox-container.fancybox-project .fancybox-close-small:hover {
    background: rgba(14, 14, 14, 0.14);
    color: #0e0e0e;
    transform: scale(1.05);
}

.project-modal,
.fancybox-container.fancybox-project .fancybox-content.project-modal {
    display: flex;
    flex-direction: column;
    padding: 84px 32px 48px;
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.project-modal-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.project-modal-desc-label {
    display: block;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(14, 14, 14, 0.12);
}

.project-modal-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid rgba(14, 14, 14, 0.14);
    object-fit: cover;
    display: block;
    background: #f3f3f3;
}

.project-modal-meta {
    margin-top: 4px;
}

.project-modal-tech {
    margin-top: 20px;
    margin-bottom: 0;
}

.project-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 36px;
    justify-content: flex-end;
}

@media (min-width: 992px) {
    .fancybox-container.fancybox-project .fancybox-slide {
        padding: 56px 40px;
    }

    .fancybox-container.fancybox-project .fancybox-close-small {
        top: 28px;
        right: 28px;
    }

    .project-modal {
        padding: 72px 64px;
        min-height: 720px;
    }

    .project-modal-grid {
        flex-direction: row;
        gap: 0;
        align-items: stretch;
    }

    .project-modal-left {
        flex: 0 0 46%;
        max-width: 46%;
        display: flex;
        flex-direction: column;
        padding-right: 48px;
    }

    .project-modal-img {
        width: 100%;
        height: 320px;
        margin-bottom: 28px;
    }

    .project-modal-right {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        padding-left: 48px;
        position: relative;
    }

    /* Short vertical divider between the two halves (inset from top/bottom) */
    .project-modal-right::before {
        content: '';
        position: absolute;
        top: 32px;
        bottom: 32px;
        left: 0;
        width: 1px;
        background: rgba(0, 0, 0, 0.12);
    }

    .project-modal-body {
        flex: 1;
    }

    .project-modal-actions {
        padding-top: 40px;
    }

    .project-modal h2 {
        font-size: 2rem;
    }

    .project-modal .subtitle {
        font-size: 1rem;
    }

    .project-modal p,
    .project-modal li {
        font-size: 1.05rem;
        line-height: 1.7;
    }
}

/* -- Footer CTA -- */

.footer-cta {
    background: #111;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 24px;
    color: #fff;
}

.footer-cta-inner {
    width: 100%;
    max-width: 1800px;
    padding-top: 150px;
}

.footer-cta-heading-wrap {
    position: relative;
    border-bottom: 1px solid #4b5563;
    padding-bottom: 48px;
    margin: 0 100px;
}

.footer-cta-heading {
    display: flex;
    align-items: center;
    gap: 32px;
}

.footer-cta-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(160deg, #6d7c96 0%, #3c455a 100%);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.footer-cta-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-cta-title {
    font-size: 5vh;
    line-height: 1.15;
    font-weight: 500;
    color: #fff;
    margin: 0;
}

.footer-cta-circle {
    position: absolute;
    right: 0;
    top: 100%;
    transform: translateY(-50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #1b82ff;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    z-index: 2;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.footer-cta-circle:hover,
.footer-cta-circle:focus {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-50%) scale(1.05);
    filter: brightness(1.08);
}

.footer-cta-email-row {
    margin: 24px 100px 0;
    display: flex;
    gap: 20px;
}

.footer-cta-email-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.footer-cta-email-pill:hover,
.footer-cta-email-pill:focus {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    text-decoration: none;
}

/* Centered nav strip that sits below the pill row and above the meta block. */
.footer-cta-nav {
    margin: 56px 100px 0;
    padding-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 36px;
}

.footer-cta-nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.footer-cta-nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 1px;
    background: #fff;
    transform: translateX(-50%);
    transition: width 0.2s ease;
}

.footer-cta-nav-link:hover,
.footer-cta-nav-link:focus-visible {
    color: #ffffff;
    text-decoration: none;
    outline: none;
}

.footer-cta-nav-link:hover::after,
.footer-cta-nav-link:focus-visible::after {
    width: 100%;
}

.footer-cta-nav-link.is-active {
    color: #ffffff;
}

.footer-cta-nav-link.is-active::after {
    width: 100%;
}

.footer-cta-meta {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 96px 100px 0;
    padding: 20px 0;
    gap: 24px;
}

.footer-cta-summary {
    max-width: 320px;
    line-height: 1.7;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.footer-cta-col {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.footer-cta-col-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-cta-label {
    font-size: 1rem;
    font-weight: 300;
    color: #6b7280;
    cursor: default;
    margin: 0;
    padding: 4px;
}

.footer-cta-value {
    font-size: 1rem;
    color: #ffffff;
    margin: 0;
    padding: 4px;
    position: relative;
}

/* Legal row — slim "Privacy policy" link sitting below Version/Timezone */
.footer-cta-legal {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
}

.footer-cta-legal-link {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-cta-legal-link:hover,
.footer-cta-legal-link:focus-visible {
    color: #ffffff;
    text-decoration: none;
    outline: none;
}

.footer-cta-socials {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.footer-cta-socials-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-cta-socials a {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    position: relative;
    padding: 0;
}

.footer-cta-socials a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: #fff;
    transform: translateX(-50%);
    transition: width 0.2s ease;
}

.footer-cta-socials a:hover::after {
    width: 100%;
}

.footer-cta-socials a:hover {
    color: #fff;
    text-decoration: none;
}

/* Circle scale-in animation (absolute-positioned, so slide-up won't work) */
.footer-circle-anim {
    transform: translateY(-50%) scale(0);
    opacity: 0;
    transition-property: transform, opacity;
    transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-circle-anim.show-on-scroll-ready {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* Mobile/tablet footer: stacked, centered layout (≤ 991.98px) */
@media (max-width: 991.98px) {
    .footer-circle-anim {
        transform: scale(0);
    }

    .footer-circle-anim.show-on-scroll-ready {
        transform: scale(1);
    }

    .footer-cta {
        padding: 40px 20px 24px;
    }

    .footer-cta-inner {
        padding-top: 0;
    }

    .footer-cta-heading-wrap {
        margin: 0;
        padding-bottom: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .footer-cta-heading {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .footer-cta-avatar {
        width: 140px;
        height: 140px;
        font-size: 0.95rem;
    }

    .footer-cta-title {
        font-size: 2.1rem;
        font-weight: 500;
        line-height: 1.2;
    }

    .footer-cta-circle {
        display: none;
    }

    .footer-cta-email-row {
        margin: 20px 0 0;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .footer-cta-email-pill {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .footer-cta-nav {
        margin: 36px 0 0;
        padding-top: 28px;
        gap: 18px 24px;
    }

    .footer-cta-meta {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin: 48px 0 0;
        padding: 16px 0;
        gap: 28px;
    }

    .footer-cta-summary {
        max-width: 100%;
        padding: 0 20px;
    }

    .footer-cta-col {
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: center;
        gap: 32px 48px;
        width: 100%;
    }

    .footer-cta-col-inner {
        align-items: center;
        text-align: center;
    }

    .footer-cta-legal {
        margin-top: 24px;
        padding-top: 16px;
        justify-content: center;
    }
}

/* Phone-specific tightening */
@media (max-width: 575.98px) {
    .footer-cta {
        padding: 32px 16px 20px;
    }

    .footer-cta-heading-wrap {
        padding-bottom: 16px;
    }

    .footer-cta-heading {
        gap: 18px;
    }

    .footer-cta-avatar {
        width: 130px;
        height: 130px;
    }

    .footer-cta-title {
        font-size: 2rem;
    }

    .footer-cta-email-row {
        margin: 16px 0 0;
        gap: 10px;
    }

    .footer-cta-email-pill {
        padding: 10px 18px;
        font-size: 0.8rem;
    }

    .footer-cta-nav {
        margin: 32px 0 0;
        padding-top: 24px;
        gap: 14px 20px;
    }

    .footer-cta-nav-link {
        font-size: 0.9rem;
    }

    .footer-cta-meta {
        margin: 40px 0 0;
        gap: 24px;
    }

    .footer-cta-col {
        gap: 24px 36px;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   Bio paragraph that sits under the About page portrait.
   ────────────────────────────────────────────────────────────────────────── */

.about-photo-bio {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.about-photo-bio-wrap {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.about-photo-bio-label {
    margin-bottom: 14px;
}

@media (min-width: 992px) {
    .about-photo-bio,
    .about-photo-bio-wrap {
        margin-left: 0;
        margin-right: 0;
    }
}

/* About page: fill the viewport so the footer stays below the fold */
.about-page {
    min-height: 100vh;
}

.about-page-container {
    padding-top: 160px;
    padding-bottom: 160px;
    min-height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-page-container > .row {
    width: 100%;
}

.about-page-intro {
    display: block;
    margin-bottom: clamp(36px, 4.5vw, 56px);
}

.about-page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 40px);
}

.about-page-title-row .msf-display-title {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.about-page-social-wrap {
    flex: 0 0 auto;
}

.about-page-social {
    margin: 0;
}

@media (min-width: 992px) {
    .about-page-social {
        flex-direction: column;
        align-items: center;
    }
}

/* About page tabs: keep all four on one row */
.about-page-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: clamp(8px, 1.8vw, 20px);
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.about-page-tabs::-webkit-scrollbar {
    display: none;
}

.about-page-tabs .nav-item {
    flex: 0 0 auto;
}

.about-page-tabs .nav-link {
    white-space: nowrap;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    color: inherit;
    opacity: 1;
}

.about-page-tabs .nav-link:hover,
.about-page-tabs .nav-link:focus,
.about-page-tabs .nav-link.active {
    background: transparent !important;
    border: 0 !important;
    color: inherit;
    opacity: 1;
    isolation: auto;
}

.about-page-tabs .nav-link-name {
    position: relative;
    z-index: 0;
    display: inline-block;
    padding: 0.4em 0.95em;
    font-size: clamp(0.82rem, 1.35vw, 1rem);
    line-height: 1.25;
    border-radius: 999px;
    overflow: hidden;
}

/* Rounded pill behind the label (replaces theme underline) */
.about-page-tabs .nav-link-name::before {
    content: "";
    position: absolute;
    inset: 0;
    border: none;
    border-bottom: none;
    border-radius: inherit;
    background: rgba(14, 14, 14, 0.1);
    will-change: transform;
    transition: transform 0.25s ease-in-out;
    transform: scaleX(0);
    transform-origin: center left;
    z-index: -1;
}

.about-page-tabs .nav-link:hover .nav-link-name::before,
.about-page-tabs .nav-link:focus-visible .nav-link-name::before,
.about-page-tabs .nav-link.active .nav-link-name::before {
    transform: scaleX(1);
}

.about-page-tabs .nav-link.active .nav-link-name::before {
    background: rgba(14, 14, 14, 0.14);
}

/* Line through the selected tab label */
.about-page-tabs .nav-link.active .nav-link-name::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0.65em;
    right: 0.65em;
    height: 1.5px;
    background-color: currentColor;
    transform: translateY(-50%);
    opacity: 1;
    pointer-events: none;
}

/* Keep tab labels readable when hovering anywhere on the tab row */
.about-page-tabs:hover .nav-link {
    opacity: 1;
}

@media (max-width: 991.98px) {
    .about-page-container {
        padding-top: 130px;
        padding-bottom: 120px;
        min-height: auto;
        justify-content: flex-start;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   Navbar adaptive surface.
   When the top navbar overlays a section flagged with data-bg="dark",
   a script adds `.is-on-dark` and the existing white ::before bar slides
   into view so the dark links/icons remain legible on dark stripes.
   ────────────────────────────────────────────────────────────────────────── */

.navbar-top.is-on-dark::before {
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(14, 14, 14, 0.08);
}

.navbar-top.is-on-dark .navbar-brand,
.navbar-top.is-on-dark .navbar-nav .nav-link,
.navbar-top.is-on-dark .navbar-toggle {
    color: #0e0e0e;
}

/* Projects page: hide navbar off the hero unless scrolling up */
body:has(.works-snap-container) .navbar-top {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

body:has(.works-snap-container) .navbar-top.is-navbar-hidden {
    transform: translateY(-100%);
    pointer-events: none;
}

/* ──────────────────────────────────────────────────────────────────────────
   Scroll controls (projects page only).
   ────────────────────────────────────────────────────────────────────────── */

.msf-scroll-btn-works {
    width: 46px;
    height: 46px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.msf-scroll-btn-works svg {
    display: block;
}

/* ──────────────────────────────────────────────────────────────────────────
   Projects page scroll control stack.
   Hero: centred along the bottom (down only). After the first section the
   stack swipes to the bottom-right corner and the up button appears above
   the down button. Colours follow the active section data-bg.
   ────────────────────────────────────────────────────────────────────────── */

.msf-scroll-controls-works {
    position: fixed;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    left: 50%;
    right: auto;
    bottom: 36px;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    transition:
        left 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        right 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        bottom 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        -webkit-transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease;
}

.msf-scroll-controls-works.is-scrolled {
    left: auto;
    right: 28px;
    bottom: 28px;
    -webkit-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0);
}

/* Up arrow: hidden on the hero, visible once scrolled */
.msf-scroll-controls-works [data-scroll-up] {
    opacity: 0;
    max-height: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
    border-width: 0;
    transition:
        opacity 0.4s ease,
        max-height 0.4s ease,
        margin 0.4s ease,
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.msf-scroll-controls-works.is-scrolled [data-scroll-up] {
    opacity: 1;
    max-height: 46px;
    margin: 0;
    pointer-events: auto;
    border-width: 1px;
}

/* Down arrow: hidden at the bottom of the page */
.msf-scroll-controls-works.is-at-bottom [data-scroll-down] {
    opacity: 0;
    max-height: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
    border-width: 0;
}

.msf-scroll-controls-works.is-on-light .msf-scroll-btn-works {
    color: #ffffff;
    background-color: rgba(14, 14, 14, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.msf-scroll-controls-works.is-on-light .msf-scroll-btn-works:hover,
.msf-scroll-controls-works.is-on-light .msf-scroll-btn-works:focus-visible {
    background-color: #0e0e0e;
    color: #ffffff;
    outline: none;
}

.msf-scroll-controls-works.is-on-light .msf-scroll-btn-works:focus-visible {
    outline: 2px solid #0e0e0e;
    outline-offset: 3px;
}

.msf-scroll-controls-works.is-on-dark .msf-scroll-btn-works {
    color: #0e0e0e;
    background-color: rgba(255, 255, 255, 0.94);
    border-color: rgba(14, 14, 14, 0.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.msf-scroll-controls-works.is-on-dark .msf-scroll-btn-works:hover,
.msf-scroll-controls-works.is-on-dark .msf-scroll-btn-works:focus-visible {
    background-color: #ffffff;
    color: #0e0e0e;
    outline: none;
}

.msf-scroll-controls-works.is-on-dark .msf-scroll-btn-works:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.msf-scroll-controls-works.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.msf-scroll-controls-works.is-on-hero [data-scroll-down] {
    animation: msf-scroll-bob-works 2.4s ease-in-out infinite;
}

.msf-scroll-controls-works.is-scrolled [data-scroll-down] {
    animation: none;
}

.msf-scroll-controls-works [data-scroll-down] {
    transition:
        opacity 0.35s ease,
        max-height 0.35s ease,
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

@keyframes msf-scroll-bob-works {
    0%, 100% {
        -webkit-transform: translateY(0);
        -ms-transform: translateY(0);
        transform: translateY(0);
    }
    50% {
        -webkit-transform: translateY(6px);
        -ms-transform: translateY(6px);
        transform: translateY(6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .msf-scroll-controls-works {
        transition-duration: 0.01ms;
    }

    .msf-scroll-controls-works.is-on-hero [data-scroll-down] {
        animation: none;
    }
}
