.role-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 0 0 18px;
}

.hero-title {
    margin: 0 0 8px;
    color: var(--text);
}

.title-line {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: nowrap;
    font-size: clamp(2.05rem, 2.2vw + 1rem, 2.6rem);
    line-height: 1.1;
    font-weight: 700;
}

.title-prefix {
    margin: 0;
    font: inherit;
}

.title-sub {
    font-size: clamp(2.2rem, 3.1vw + 1rem, 3.25rem);
    line-height: 1.1;
    font-weight: 700;
    color: var(--text);
}

.role-prefix {
    margin: 0;
    font-size: clamp(1.6rem, 2.2vw + 0.9rem, 2.2rem);
    line-height: 1.1;
    font-weight: 600;
}

.role-rotate {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    white-space: nowrap;
    font: inherit;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(124, 178, 255, 0.18);
    padding: 10px 0;
    text-transform: lowercase;
}

.role-rotate.plain {
    padding: 10px 0;
    border: none;
    box-shadow: none;
    min-height: auto;
}

:root {
    --bg: #0a0f18;
    --panel: rgba(255, 255, 255, 0.04);
    --panel-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --text: #e7ecf6;
    --muted: rgba(225, 232, 248, 0.7);
    --accent: #7cb2ff;
    --accent-strong: #5a8de0;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --header-height: 0px;
    --footer-height: 0px;
}

* {
    box-sizing: border-box;
}

body {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    margin: 0;
    font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(120% 120% at 20% 20%, rgba(124, 178, 255, 0.08), transparent 45%),
        radial-gradient(80% 80% at 80% 0%, rgba(120, 160, 255, 0.12), transparent 45%),
        var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

.main-view,
.projects-view {
    transition: opacity 220ms ease, transform 220ms ease;
    will-change: opacity, transform;
}

.projects-view {
    position: fixed;
    inset: 0;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    visibility: hidden;
}

.projects-page .projects-view {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.projects-page .main-view {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    visibility: hidden;
}

.projects-page {
    overflow: hidden;
}

@media (max-width: 720px) {
    .projects-page {
        overflow: auto;
    }

    .projects-page .main-view {
        display: none;
    }

    .projects-page .projects-view {
        position: relative;
        inset: auto;
        transform: none;
    }
}

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

.shell {
    width: min(1100px, 92vw);
    margin: 0 auto;
    padding: 0 16px;
}

.snap-page {
    display: block;
    flex: 1 1 auto;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
    scroll-padding-bottom: 0;
    scroll-behavior: smooth;
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

.snap-section {
    scroll-snap-align: center;
    scroll-snap-stop: always;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0;
}

.snap-section.hero {
    display: grid;
    align-items: center;
    justify-items: center;
}

.snap-section > * {
    width: 100%;
}

.snap-section.hero > * {
    width: auto;
}

.snap-section .section-head,
.snap-section .timeline,
.snap-section .dual,
.snap-section .skill-group,
.snap-section .badge-grid,
.snap-section .quick-stats {
    margin-left: auto;
    margin-right: auto;
    max-width: 960px;
    width: 100%;
}

.snap-section.section {
    margin: 0;
    padding: 0;
}

.snap-arrows {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 11;
}

.projects-page .snap-arrows {
    opacity: 0;
    pointer-events: none;
}

.snap-arrow {
    pointer-events: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
    transition: transform 140ms ease, color 140ms ease;
}

.snap-arrow svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.snap-arrow:hover {
    transform: translateX(-50%) translateY(-2px);
    color: var(--text);
}

.snap-arrow-up {
    top: calc(var(--header-height) + 10px);
}

.snap-arrow-down {
    bottom: 14px;
}

.snap-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.site-header {
    display: none;
}

.site-header .shell {
    display: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #a7c8ff);
    color: #0a0f18;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow);
}

.brand-name {
    font-weight: 700;
    letter-spacing: 0.4px;
    font-size: clamp(1.5rem, 2vw + 1.2rem, 1.8rem);
}

.brand-meta {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-location {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.85;
}

.brand-location::before {
    content: "•";
    margin-right: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-link {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    transition: color 150ms ease, background 150ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--panel);
    box-shadow: 0 0 18px rgba(124, 178, 255, 0.26);
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    padding: 0;
    min-height: 100vh;
    position: relative;
    align-items: center;
    justify-items: center;
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.hero-greeting {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: var(--hero-greeting-top, 0px);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    pointer-events: none;
}

.hero-greeting-prefix {
    font-size: clamp(1.2rem, 1.8vw + 0.6rem, 1.6rem);
    letter-spacing: 0.4px;
    color: var(--muted);
    text-transform: lowercase;
}

.hero-greeting-name {
    font-size: clamp(2.6rem, 4vw + 1rem, 3.6rem);
    letter-spacing: 0.5px;
    color: var(--text);
    font-weight: 700;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    max-width: 640px;
    width: 100%;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 12px;
}









.role-word {
    display: inline-block;
    transition: opacity 180ms ease;
}

.role-word.fade-out {
    opacity: 0;
}

.lede {
    color: var(--muted);
    font-size: clamp(1.05rem, 0.7vw + 0.95rem, 1.25rem);
    line-height: 1.6;
    margin: 0 0 22px;
    max-width: 62ch;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 26px;
}

.hero-cta-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 22px;
    margin-top: 8px;
}

.stat-card-link {
    display: block;
    height: 100%;
}

.stat-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.stat-card.stat-card-current {
    position: relative;
    overflow: hidden;
    border-color: var(--accent-strong);
    background: linear-gradient(135deg, rgba(124, 178, 255, 0.12), var(--panel));
    box-shadow: 0 12px 32px rgba(124, 178, 255, 0.18), var(--shadow);
    align-items: flex-start;
    text-align: left;
}

.stat-card.stat-card-current::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: radial-gradient(circle at 20% 20%, rgba(124, 178, 255, 0.18), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(120, 160, 255, 0.14), transparent 45%);
    pointer-events: none;
    opacity: 0.7;
}

.btn-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 18px;
    height: 100%;
    min-height: 100%;
    line-height: 1.2;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    max-width: none;
    width: auto;
}

.btn-text {
    display: inline-block;
}

.js-show-projects.btn-tile {
    font-weight: 600;
}



.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-weight: 600;
    color: var(--text);
    font-family: inherit;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.btn.primary {
    background: linear-gradient(120deg, var(--accent), #a7c8ff);
    color: #09101b;
    border: none;
}

.btn.ghost {
    background: var(--panel);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}


.stat-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(124, 178, 255, 0.14), var(--shadow);
    border-color: var(--accent-strong);
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.stat-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    line-height: 1.6;
    font-size: 1rem;
}

.stat-line-block {
    display: block;
}

.stat-accent {
    color: var(--accent-strong);
    font-weight: 700;
}

.inline-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.inline-link:hover {
    text-decoration: none;
}

.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    height: 100%;
    align-self: stretch;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    display: grid;
    place-items: center;
    color: var(--muted);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.scroll-indicator svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-2px);
    border-color: var(--accent);
    color: var(--text);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(124, 178, 255, 0.22);
}

.scroll-hint {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    color: var(--muted);
    text-align: center;
}

.scroll-hint svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    opacity: 0.7;
}

.scroll-hint.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.portrait-frame {
    position: relative;
    padding: 14px;
    border-radius: 22px;
    background: var(--panel);
    border: 1px solid rgba(124, 178, 255, 0.26);
    box-shadow: 0 10px 26px rgba(124, 178, 255, 0.12), var(--shadow);
    flex: 1 1 auto;
    width: min(360px, 100%);
    max-width: 360px;
    height: 100%;
    max-height: 520px;
    display: flex;
    align-items: center;
}

.portrait {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
}

@media (min-width: 961px) {
    .hero {
        align-items: center;
    }

    .hero-text {
        align-self: flex-start;
    }

    .hero-visual {
        align-items: center;
        align-self: center;
        padding-top: 22px;
    }

    .portrait-frame {
        width: min(360px, 100%);
        aspect-ratio: 1 / 1;
        height: auto;
        flex: 0 0 auto;
        margin: 0 auto;
    }
}

.portrait-frame::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    pointer-events: none;
}

.portrait-frame::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 26px;
    background: radial-gradient(circle at 30% 30%, rgba(124, 178, 255, 0.14), transparent 45%),
        radial-gradient(circle at 70% 60%, rgba(170, 200, 255, 0.12), transparent 50%);
    filter: blur(12px);
    opacity: 0.7;
    z-index: -1;
}

.portrait {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.hero-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

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

.section {
    margin: 0;
    padding: 0;
    border-top: none;
}

.section-head h2 {
    margin: 0;
    font-size: 1.65rem;
    text-align: center;
    width: 100%;
}

.section-heading-large {
    font-size: 2rem;
    margin-bottom: 14px;
}

.snap-section:not(.hero) .section-head h2 {
    font-size: 2rem;
}

.section-head p {
    margin: 0 0 16px;
    color: var(--muted);
}

.section-head {
    margin-bottom: 14px;
}

.section-title-hero {
    margin: 0 0 20px;
    font-size: clamp(2.1rem, 2vw + 1.4rem, 3rem);
}

.section+.section .section-head {
    margin-top: 6px;
}

.timeline {
    display: grid;
    gap: 18px;
}

.timeline-card {
    position: relative;
    padding: 30px 20px 20px;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-inline: 22px;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon header"
        "icon place"
        "icon meta"
        "icon body";
    column-gap: 14px;
    row-gap: 6px;
}

.timeline-header {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
}

.timeline-date {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    align-self: flex-start;
}

.timeline-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    margin-bottom: 0;
    grid-area: meta;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.project-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    line-height: 1.25;
}

.tech-stack {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    margin: 6px 0 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.95rem;
}

.projects-page .tech-stack {
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.projects-page .project-section {
    position: relative;
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.projects-page .project-section .timeline-card {
    margin-top: 96px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "pill title"
        "tech tech"
        "list list";
    column-gap: 12px;
    row-gap: 10px;
    align-items: center;
}

.projects-page .project-section .project-header {
    grid-area: pill;
    align-self: center;
    margin: 0;
}

.projects-page .project-section .timeline-card h3 {
    grid-area: title;
    margin: 0;
    align-self: center;
    text-align: left;
}

.projects-page .project-section .tech-stack {
    grid-area: tech;
}

.projects-page .project-section .timeline-card ul {
    grid-area: list;
    margin: 0;
    padding-left: 18px;
    width: 100%;
    text-align: left;
}

@media (max-width: 1100px) {
    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .hero-greeting {
        position: static;
        transform: none;
        margin: 0;
        order: 0;
        text-align: center;
        align-self: center;
    }

    .hero-visual {
        order: 1;
        align-self: center;
        margin-top: 6px;
        display: flex;
    }

    .hero-text {
        order: 2;
        align-items: flex-start;
        text-align: left;
        margin-top: 8px;
        width: 100%;
    }

    .hero-cta-row {
        grid-template-columns: 1fr auto;
        width: 100%;
    }

    .hero-cta-row>* {
        width: auto;
    }

    .portrait-frame {
        width: 150px;
        height: 150px;
        max-width: 150px;
        aspect-ratio: 1 / 1;
        padding: 8px;
        margin-top: 10px;
    }
}

.tech-stack .tech-item {
    display: inline-flex;
    align-items: center;
}

.tech-stack .tech-item:not(:first-child)::before {
    content: "|";
    margin: 0 6px;
    opacity: 0.6;
}


.timeline-card h3 {
    order: 0;
    margin: 0;
}

.timeline-meta {
    order: 2;
    margin-bottom: 0;
}

.place {
    margin: 0 0 10px;
    color: var(--muted);
}

.place-heading {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 600;
}

.place-line {
    grid-area: place;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.place-location {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}

.edu-desc {
    margin: 12px 0 0;
    color: var(--text);
    line-height: 1.5;
    grid-area: body;
}

.edu-icon {
    grid-area: icon;
    display: inline-flex;
    align-items: flex-start;
    margin-top: 2px;
}

.edu-icon img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 12px;
    background: #ffffff;
    padding: 8px;
    border: 1px solid var(--border);
}

.timeline-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
    line-height: 1.5;
    grid-area: body;
}

.projects-page .timeline-card ul li+li {
    margin-top: 10px;
}

.timeline-card::before {
    content: none;
}

.dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    column-gap: 32px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    max-width: 100%;
}

.card {
    padding: 18px;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.card-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.card h3 {
    margin: 0 0 6px;
}

.card-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.stacked .badge-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(540px, 92vw);
}

.stacked .badge-card {
    width: 100%;
    max-width: 520px;
}

.stacked .subsection-head {
    width: 100%;
    text-align: center;
    margin: 28px 0 16px;
}

.stacked .subsection-head h3 {
    margin: 0;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 8px;
}

.badge-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    margin-inline: 22px;
}

.badge-wide {
    grid-column: span 2;
}

.badge-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #0a0f18;
}

.badge-thumb.accent {
    background: #ffffff;
}

.badge-card h4 {
    margin: 0 0 4px;
}

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

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 900px;
}

.stacked .contact-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(540px, 92vw);
}

.stacked .contact-card {
    width: 100%;
    max-width: 520px;
}

.contact-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 14px 32px rgba(124, 178, 255, 0.16), var(--shadow);
}

.back-to-top {
    margin-top: 18px;
    align-self: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    width: auto;
    display: inline-flex;
    justify-content: center;
}

@media (max-width: 720px) {
    .back-to-top {
        display: none;
    }
}

.contact-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: var(--panel-strong);
    display: grid;
    place-items: center;
    color: var(--accent);
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.contact-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 0.9rem;
    color: var(--muted);
    letter-spacing: 0.2px;
}

.contact-value {
    font-weight: 700;
    color: var(--text);
    word-break: break-all;
}

.pill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.pill.tone {
    color: #0a0f18;
    background: linear-gradient(135deg, var(--accent), #a7c8ff);
    border: none;
}

.pill.solid {
    background: var(--panel-strong);
    color: var(--text);
}

.cta {
    border-bottom: 1px solid var(--border);
}

.skill-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    margin-inline: 22px;
}

#skills .skill-group {
    width: calc(100% - 44px);
    max-width: 920px;
    margin-inline: auto;
}

.skill-label {
    display: inline-block;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.3px;
    border: none;
    text-shadow: 0 0 12px rgba(124, 178, 255, 0.18);
}

.cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(120deg, rgba(124, 178, 255, 0.1), rgba(124, 178, 255, 0.04));
    border: 1px solid var(--accent-strong);
    box-shadow: var(--shadow);
}

.cta-card h2 {
    margin: 0 0 6px;
}

.cta-card p {
    margin: 0;
    color: var(--muted);
}

.cta-actions {
    display: flex;
    gap: 12px;
}

.footer {
    background: rgba(8, 11, 20, 0.9);
    backdrop-filter: blur(12px);
    display: none;
}

.footer-inner {
    display: none;
}

.footer-name {
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--muted);
    transition: color 150ms ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-link:hover {
    color: var(--text);
}

.footer-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    opacity: 0.9;
}

.footer-invite {
    color: var(--text);
    font-weight: 600;
    margin-right: 12px;
    opacity: 0.85;
}

.spacer-vertical {
    height: 12px;
}

.projects-page main {
    padding-top: 0;
    width: 100vw;
    max-width: 100vw;
}

.projects-fixed-title {
    position: fixed;
    top: 18px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin: 0;
    font-size: clamp(2.2rem, 4vw + 1rem, 3.2rem);
    letter-spacing: 0.5px;
    color: var(--text);
    text-align: center;
    pointer-events: none;
    z-index: 12;
}

.projects-scroll-hint {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    color: var(--muted);
    text-align: center;
    z-index: 12;
}

.projects-scroll-hint .hint-swipe {
    display: none;
}

@media (max-width: 1100px) {
    .projects-scroll-hint .hint-scroll {
        display: inline;
    }
}

@media (max-width: 720px) {
    .projects-scroll-hint {
        display: none;
    }
}

.link-preview {
    position: fixed;
    left: 50%;
    top: var(--link-preview-top, auto);
    bottom: var(--link-preview-bottom, 16px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(10, 15, 24, 0.92);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: 0.92rem;
    color: var(--muted);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 12;
    max-width: min(820px, 92vw);
    white-space: nowrap;
}

.link-preview.is-visible {
    opacity: 1;
    transform: translateX(-50%);
    pointer-events: auto;
}

.link-preview.is-hiding {
    opacity: 0;
    transform: translateX(-50%);
    pointer-events: none;
}

.link-preview-url {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(680px, 70vw);
}

body.projects-force-mobile.projects-page .link-preview {
    display: none;
}

@media (max-width: 720px) {
    .link-preview {
        display: none;
        bottom: var(--link-preview-bottom, 10px);
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

.back-pill {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 12;
    text-decoration: none;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.projects-page .project-section .timeline-card {
    opacity: 0;
    pointer-events: none;
}

.projects-deck {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding-top: clamp(120px, 18vh, 220px);
    padding-bottom: 40px;
    pointer-events: auto;
    perspective: 1200px;
    z-index: 1;
}

.projects-deck .deck-card {
    position: absolute;
    width: min(760px, 88vw);
    max-height: 78vh;
    overflow: auto;
    transform: translateX(0) scale(0.84);
    transform-origin: center;
    opacity: 0;
    transition: transform 260ms ease, opacity 260ms ease, filter 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
    box-shadow: var(--shadow);
    background: #141922;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.projects-deck .deck-card.is-current {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 5;
    filter: none;
}

.projects-deck .deck-card.is-current {
    cursor: pointer;
}

.projects-deck .deck-card.is-current.is-ready:hover {
    transform: translateX(0) translateY(-2px) scale(1.005);
    box-shadow: 0 12px 28px rgba(124, 178, 255, 0.16), var(--shadow);
    border-color: rgba(124, 178, 255, 0.35);
}

.projects-deck .deck-card.is-prev {
    opacity: 0.5;
    transform: translateX(-18vw) scale(0.9);
    z-index: 4;
    filter: saturate(0.9) brightness(0.95);
}

.projects-deck .deck-card.is-next {
    opacity: 0.5;
    transform: translateX(18vw) scale(0.9);
    z-index: 4;
    filter: saturate(0.9) brightness(0.95);
}

.projects-deck .deck-card.is-prev2 {
    opacity: 0.22;
    transform: translateX(-26vw) scale(0.82);
    z-index: 3;
    filter: saturate(0.85) brightness(0.9);
}

.projects-deck .deck-card.is-next2 {
    opacity: 0.22;
    transform: translateX(26vw) scale(0.82);
    z-index: 3;
    filter: saturate(0.85) brightness(0.9);
}

.projects-deck .deck-card.is-far {
    opacity: 0;
    z-index: 1;
    filter: none;
}

.projects-deck .project-header {
    cursor: pointer;
}

.projects-deck .deck-card .project-header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0;
}

.projects-deck .deck-card h3 {
    margin: 0;
    text-align: center;
    width: 100%;
}

.projects-deck .deck-card .tech-stack {
    width: 100%;
    justify-content: center;
    text-align: center;
    gap: 0;
}

.projects-deck .deck-card ul {
    margin: 0;
    padding-left: 18px;
    width: 100%;
    text-align: left;
}

@media (max-width: 720px) {
    .shell {
        padding: 0 18px;
    }

    .site-header .shell {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 14px 18px;
    }

    .nav-links {
        width: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 12px;
    }

    .hero {
        gap: 14px;
        padding: 0;
        min-height: calc(100vh - var(--header-height) - var(--footer-height));
    }

    .hero-cta-row {
        grid-template-columns: 1fr auto;
    }

    .hero-cta-row>* {
        width: auto;
    }

    .portrait-frame {
        width: 140px;
        height: 140px;
        max-width: 140px;
        aspect-ratio: 1 / 1;
        padding: 8px;
        margin-top: 8px;
    }

    .hero-text {
        margin-top: 8px;
        text-align: left;
        align-items: flex-start;
    }

    .title-line {
        gap: 8px;
    }

    .role-prefix {
        font-size: clamp(1.25rem, 2.6vw + 0.85rem, 1.7rem);
    }

    .role-rotate {
        font-size: 1em;
        padding: 8px 0;
    }

    .lede {
        font-size: 1.02rem;
        line-height: 1.52;
        margin-bottom: 20px;
    }

    .hero-cta-row {
        gap: 10px;
        margin-bottom: 18px;
    }

    .btn-tile {
        width: 100%;
    }

    .stat-card,
    .btn,
    .btn-tile {
        padding: 12px 14px;
    }

    .section {
        margin: 14px 0 22px;
        padding: 18px 0;
    }

    .section-heading-large {
        font-size: 2rem;
    }

    .section-head h2 {
        font-size: 2rem;
    }

    .snap-section:not(.hero) .section-head h2 {
        font-size: 2rem;
    }

    .timeline-card h3,
    .card h3 {
        font-size: 0.95rem;
    }

    .place,
    .card-note,
    .muted {
        font-size: 0.85rem;
        line-height: 1.45;
    }

    .stacked .subsection-head h3 {
        font-size: 2rem;
        margin-bottom: 6px;
    }

    .timeline-card {
        padding: 22px 14px 16px;
    }

    .card,
    .badge-card {
        padding: 16px 14px;
    }

    .section p,
    .section li {
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .badge-card h4 {
        font-size: 0.95rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .timeline-date {
        font-size: 0.82rem;
    }

    .pill {
        padding: 6px 9px;
        font-size: 0.82rem;
    }

    .cta-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 48px;
    }

    .badge-grid {
        grid-template-columns: 1fr;
    }

    .card,
    .badge-card {
        width: 100%;
        margin: 0 auto;
    }

    .brand-location::before {
        content: "";
        margin-right: 0;
    }

    .brand-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 900px) {
    .dual {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .title-line {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .title-line {
        gap: 8px;
        font-size: clamp(1.22rem, 3vw + 0.82rem, 1.65rem);
    }

    .role-rotate {
        font-size: 0.98em;
    }
}

@media (max-width: 480px) {
    .title-line {
        font-size: clamp(1.15rem, 2.4vw + 0.78rem, 1.55rem);
    }
}

/* Final enforce stacked hero with visible square portrait on tablet/mobile */
@media (max-width: 1100px) {
    .hero {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: left;
        gap: 10px;
        width: 100%;
    }

    .hero-greeting {
        order: 0;
        position: static;
        transform: none;
        margin: 0;
    }

    .hero-visual {
        display: block !important;
        order: 1;
        align-self: center;
        margin: 6px 0 0;
    }

    .portrait-frame {
        width: 140px;
        height: 140px;
        max-width: 140px;
        aspect-ratio: 1 / 1;
        padding: 8px;
        margin: 0;
    }

    .portrait {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-text {
        order: 2;
        align-items: flex-start;
        text-align: left;
        width: 100%;
        margin: 6px 0 0;
    }

    .hero-cta-row {
        grid-template-columns: 1fr auto;
        width: 100%;
    }

    .hero-cta-row>* {
        width: auto;
    }
}

/* Tablet landscape tweaks to keep hero stacked and contained */
@media (max-width: 1100px) and (orientation: landscape) {
    .hero {
        gap: 10px;
        padding: 0;
        align-items: center;
    }

    .hero-greeting {
        font-size: clamp(1.4rem, 2vw + 0.8rem, 2rem);
    }

    .hero-visual {
        margin-top: 4px;
    }

    .portrait-frame {
        width: 120px;
        height: 120px;
        max-width: 120px;
        padding: 6px;
    }

    .hero-text {
        margin-top: 6px;
        width: 100%;
        max-width: 900px;
        align-items: flex-start;
        text-align: left;
        margin-left: auto;
        margin-right: auto;
    }

    .title-line {
        font-size: clamp(1.4rem, 2vw + 0.9rem, 1.9rem);
        width: 100%;
    }

    .lede {
        font-size: 0.92rem;
        line-height: 1.42;
        margin-bottom: 10px;
        width: 100%;
    }

    .hero-cta-row {
        gap: 8px;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .hero-cta-row>* {
        width: 100%;
    }

    .shell {
        width: 100%;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (min-width: 721px) and (max-width: 1100px) {
    .hero {
        --tablet-title-gap: 10px;
        text-align: center !important;
    }

    .hero-visual {
        margin-bottom: var(--tablet-title-gap);
    }

    .hero-text {
        align-items: center !important;
        text-align: center !important;
        margin-top: 0;
    }

    .lede {
        text-align: center;
    }

    .hero-title {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .title-line {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
        gap: var(--tablet-title-gap);
    }

    .title-prefix {
        width: 100%;
        text-align: center;
    }

    .role-rotate {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 1.15em;
    }

    .hero-cta-row {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 620px;
        align-self: center;
    }

    .hero-cta-row > * {
        width: 100% !important;
    }
}
.hero-cta-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 22px;
    margin-top: 8px;
}

.stat-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

/* Final override for tablet/mobile hero stacking with visible portrait */
@media (max-width: 960px) {
    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .hero-greeting {
        order: 0;
        position: static;
        transform: none;
        margin: 0;
        font-size: clamp(1.6rem, 3vw + 0.9rem, 2.2rem);
        text-align: center;
    }

    .hero-visual {
        display: flex !important;
        order: 1;
        align-self: center;
        margin: 0;
    }

    .portrait-frame {
        width: 140px;
        height: 140px;
        max-width: 140px;
        aspect-ratio: 1 / 1;
        padding: 8px;
    }

    .hero-text {
        order: 2;
        align-items: center;
        text-align: center;
        width: 100%;
        margin: 6px 0 0;
    }

    .hero-title {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .title-line {
        font-size: clamp(1.5rem, 2.5vw + 1rem, 2rem);
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
        gap: 4px;
    }

    .role-rotate {
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .lede {
        font-size: 0.95rem;
        line-height: 1.45;
        margin-bottom: 12px;
        text-align: center;
    }

    .hero-cta-row {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 620px;
        align-self: center;
    }

    .hero-cta-row>* {
        width: 100%;
    }
}

/* Mobile: keep tablet layout but shrink to fit */
@media (max-width: 720px) {
    .shell {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero {
        gap: 0;
        padding: 0;
        min-height: 100vh;
        justify-content: space-evenly;
    }

    .hero-greeting {
        font-size: clamp(1.4rem, 3vw + 0.8rem, 1.8rem);
    }

    .hero-visual {
        margin-top: 0;
    }

    .portrait-frame {
        width: clamp(120px, 34vw, 150px);
        height: clamp(120px, 34vw, 150px);
        max-width: 150px;
        padding: 7px;
    }

    .hero-text {
        display: contents;
    }

    .title-line {
        font-size: clamp(1.2rem, 3vw + 0.8rem, 1.6rem);
        flex-direction: column;
        align-items: center;
        gap: 4px;
        width: 100%;
        text-align: center;
    }

    .hero-title {
        width: 100%;
        display: flex;
        justify-content: center;
        order: 2;
        max-width: 620px;
        align-self: center;
    }

    .lede {
        order: 3;
        width: 100%;
        max-width: 620px;
        align-self: center;
    }

    .hero-cta-row {
        order: 4;
        width: 100%;
        max-width: 620px;
        align-self: center;
    }


    .role-rotate {
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .title-prefix {
        width: 100%;
        text-align: center;
        text-transform: lowercase;
        font-size: 0.9em;
        color: var(--muted);
    }

    .role-rotate {
        font-size: 1.05em;
    }

    .lede {
        font-size: 1.08rem;
        line-height: 1.45;
        margin-bottom: 6px;
        text-align: center;
    }

    .hero-cta-row {
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        margin-top: 0;
    }

    .hero-cta-row>* {
        width: 100%;
    }

    .stat-list {
        font-size: 0.94rem;
        line-height: 1.4;
    }

    .scroll-hint {
        display: flex;
        order: 5;
        margin-top: 4px;
    }

    /* Stretch content full width */
    .snap-section .section-head,
    .snap-section .timeline,
    .snap-section .skill-group,
    .snap-section .badge-grid,
    .snap-section .quick-stats {
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .timeline-card,
    .badge-card,
    .skill-group,
    .projects-page .timeline-card {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
    }

    /* Stretch skills items to viewport width */
    #skills .skill-group {
        width: calc(100vw - 24px);
        margin-left: -12px;
        margin-right: -12px;
    }

    /* Stretch contact items to viewport width */
    #contact .contact-grid {
        width: calc(100vw - 24px);
        margin-left: -12px;
        margin-right: -12px;
    }

    #contact .contact-card {
        width: 100%;
        max-width: 100%;
    }

    /* Experience: stack details center-aligned on mobile */
    #experience .timeline-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }

    #experience .edu-icon {
        order: 0;
        margin: 0 0 6px;
    }

    #experience .timeline-header {
        order: 1;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    #experience .timeline-header h3 {
        text-align: center;
    }

    #experience .timeline-date {
        order: 2;
        align-self: center;
    }

    #experience .place-line {
        order: 3;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        width: 100%;
    }

    #experience .place-heading {
        order: 0;
        text-align: center;
    }

    #experience .place-location {
        order: 1;
        text-align: center;
    }

    #experience .timeline-meta {
        order: 4;
        justify-content: center;
        width: 100%;
    }

    /* Education: stack details center-aligned on mobile */
    #education .timeline-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }

    #education .edu-icon {
        order: 0;
        margin: 0 0 6px;
    }

    #education .timeline-header {
        order: 1;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    #education .timeline-header h3 {
        text-align: center;
    }

    #education .timeline-date {
        order: 2;
        align-self: center;
    }

    #education .place-line {
        order: 3;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        width: 100%;
    }

    #education .place-heading {
        order: 0;
        text-align: center;
    }

    #education .place-location {
        order: 1;
        text-align: center;
    }

    #education .edu-desc {
        order: 4;
        text-align: center;
        width: 100%;
    }
}

/* Mobile: even vertical spacing between main sections (match clearance→cert gap) */
@media (max-width: 720px) {
    body:not(.projects-page) .snap-section.section {
        padding-top: 0;
        padding-bottom: 0;
    }

    body:not(.projects-page) .snap-section.section + .snap-section.section {
        margin-top: 42px;
    }

    /* Tighten section-to-section gaps */
    .hero-cta-row {
        margin-bottom: 8px;
    }

    #skills .skill-group:last-of-type {
        margin-bottom: 0;
    }

    #certifications .subsection-head:first-of-type {
        margin-top: 0;
    }

    /* Consistent header-to-first-item spacing */
    .section-head {
        margin-bottom: 12px;
    }

    .stacked .subsection-head {
        margin: 42px 0 12px;
    }

    .spacer-vertical {
        height: 0;
    }

    body:not(.projects-page) .snap-page {
        height: auto;
        min-height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
    }

    body:not(.projects-page) .snap-section {
        min-height: auto;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
        padding: 24px 0;
    }

    body:not(.projects-page) .snap-section.hero {
        min-height: 100vh;
        padding: 0;
    }

    body:not(.projects-page) .snap-arrows {
        display: none;
    }

    body:not(.projects-page) {
        padding-bottom: 48px;
    }
}

/* Mobile projects: disable snap/rolodex and show full list */
@media (max-width: 720px) {
    .projects-page .snap-page {
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
        scroll-snap-type: none;
    }

    .projects-page .snap-section {
        min-height: auto;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
        padding: 0 0;
    }

    .projects-page .snap-arrows {
        display: none;
    }

    .projects-page .projects-deck {
        display: none;
    }

    .projects-page .project-section .timeline-card {
        opacity: 1;
        pointer-events: auto;
        margin-top: 0;
        margin-bottom: 24px;
    }

    .projects-fixed-title {
        position: static;
        transform: none;
        left: auto;
        right: auto;
        top: auto;
        text-align: center;
        margin: 60px 0 16px;
        pointer-events: auto;
    }

    /* Mobile project card layout */
    .projects-page .project-section .timeline-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 32px 20px 24px;
    }

    .projects-page .project-section .project-header {
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    .projects-page .project-section .project-header .pill {
        width: 100%;
        text-align: center;
        display: inline-flex;
        justify-content: center;
    }

    .projects-page .project-section .timeline-card h3 {
        width: 100%;
        text-align: center;
        align-self: center;
    }

    .projects-page .project-section h3 {
        width: 100%;
        text-align: center;
    }

    .projects-page .project-section .tech-stack {
        width: 100%;
        justify-content: center;
        text-align: center;
        gap: 0;
    }

    .projects-page .project-section .tech-stack .tech-item:not(:first-child)::before {
        margin: 0 6px;
        padding: 0;
    }

    .projects-page .project-section ul {
        width: 100%;
        text-align: left;
        align-self: stretch;
    }

    .projects-page .project-section .project-header .pill {
        font-size: 1.3rem;
        font-weight: 700;
    }

    .projects-page .project-section h3 {
        font-size: 1.15rem;
    }

    .projects-page .project-section .tech-stack {
        font-size: 1rem;
    }

    .projects-page .project-section h3,
    .projects-page .project-section .tech-stack {
        margin-top: 6px;
    }

    .projects-page .project-section .project-header {
        margin-bottom: 10px;
    }

    .projects-page .project-section ul {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Small mobile: disable snap on main site (keep on projects page) */
@media (max-width: 540px) {
    body:not(.projects-page) .snap-page {
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
        scroll-snap-type: none;
    }

    body:not(.projects-page) .snap-section {
        min-height: auto;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
        padding: 32px 0;
    }

    body:not(.projects-page) .snap-section.hero {
        min-height: 100vh;
        padding: 0;
    }

    body:not(.projects-page) .snap-arrows {
        display: none;
    }

    /* Extra-tight hero for very small devices */
    body:not(.projects-page) .hero {
        gap: 4px;
    }

    body:not(.projects-page) .hero-greeting {
        font-size: clamp(1.2rem, 3vw + 0.6rem, 1.5rem);
    }

    body:not(.projects-page) .portrait-frame {
        width: clamp(100px, 28vw, 122px);
        height: clamp(100px, 28vw, 122px);
        max-width: 122px;
        padding: 6px;
    }

    body:not(.projects-page) .title-line {
        font-size: clamp(1.05rem, 2.6vw + 0.7rem, 1.4rem);
        gap: 3px;
    }

    body:not(.projects-page) .title-prefix {
        font-size: 0.85em;
    }

    body:not(.projects-page) .role-rotate {
        font-size: 1em;
    }

    body:not(.projects-page) .lede {
        font-size: 0.98rem;
        line-height: 1.4;
    }

    body:not(.projects-page) .hero-cta-row {
        gap: 8px;
    }

    body:not(.projects-page) .stat-list {
        font-size: 0.9rem;
    }

    body:not(.projects-page) .scroll-hint {
        font-size: 0.72rem;
        gap: 4px;
        margin-top: 2px;
    }
}

@media (max-width: 720px) and (orientation: landscape) {
    .scroll-hint {
        display: none;
    }

    #experience.snap-section.section {
        padding-top: 16px;
    }
}

@media (min-width: 721px) {
    .scroll-hint-desktop {
        display: flex;
        position: fixed;
        left: 50%;
        bottom: 54px;
        transform: translateX(-50%);
        z-index: 12;
    }
}

/* Disable snap for tiny landscape devices on main site */
@media (max-width: 700px) and (max-height: 540px) and (orientation: landscape) {
    body:not(.projects-page) .snap-page {
        height: auto !important;
        min-height: 100vh;
        overflow-y: visible;
        scroll-snap-type: none !important;
    }

    body:not(.projects-page) .snap-section {
        min-height: auto !important;
        scroll-snap-align: none !important;
        scroll-snap-stop: normal !important;
        padding: 24px 0;
    }

    body:not(.projects-page) .snap-section.hero {
        min-height: 100vh !important;
        padding: 0 !important;
    }

    body:not(.projects-page) .snap-arrows {
        display: none !important;
    }
}

/* Fallback: disable snap whenever the viewport height is very small in landscape */
@media (max-height: 500px) and (orientation: landscape) {
    body:not(.projects-page) .snap-page {
        height: auto !important;
        min-height: 100vh;
        overflow-y: visible !important;
        scroll-snap-type: none !important;
    }

    body:not(.projects-page) .snap-section {
        min-height: auto !important;
        scroll-snap-align: none !important;
        scroll-snap-stop: normal !important;
        padding: 24px 0;
    }

    body:not(.projects-page) .snap-section.hero {
        min-height: 100vh !important;
        padding: 0 !important;
    }

    body:not(.projects-page) .snap-arrows {
        display: none !important;
    }
}

body.force-mobile:not(.projects-page) .snap-page {
    height: auto;
    min-height: auto;
    overflow-y: visible;
    scroll-snap-type: none;
}

body.force-mobile:not(.projects-page) .snap-section {
    min-height: auto;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    padding: 24px 0;
}

body.force-mobile:not(.projects-page) .snap-section.hero {
    min-height: 100vh;
    padding: 0;
}

body.force-mobile:not(.projects-page) .snap-arrows {
    display: none;
}

body.force-mobile:not(.projects-page) {
    padding-bottom: 48px;
}

body.force-mobile:not(.projects-page) .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 0;
    justify-content: space-evenly;
}

body.force-mobile:not(.projects-page) .hero-greeting {
    order: 0;
    position: static;
    transform: none;
    margin: 0;
    margin-top: 12px;
}

body.force-mobile:not(.projects-page) .hero-visual {
    order: 1;
    align-self: center;
    margin-top: 6px;
    margin-bottom: 16px;
}

body.force-mobile:not(.projects-page) .hero-text {
    order: 2;
    display: contents;
    width: 100%;
    margin-top: 8px;
}

body.force-mobile:not(.projects-page) .hero-cta-row {
    order: 4;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 620px;
    align-self: center;
}

body.force-mobile:not(.projects-page) .hero-cta-row > * {
    width: 100%;
}

body.projects-force-mobile.projects-page .snap-page {
    height: auto;
    min-height: 100vh;
    overflow-y: visible;
    scroll-snap-type: none;
}

body.projects-force-mobile.projects-page {
    overflow: auto;
}

body.projects-force-mobile.projects-page .main-view {
    display: none;
}

body.projects-force-mobile.projects-page .projects-view {
    position: relative;
    inset: auto;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

body.projects-force-mobile.projects-page .snap-section {
    min-height: auto;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    padding: 0 0;
}

body.projects-force-mobile.projects-page .snap-arrows {
    display: none;
}

body.projects-force-mobile.projects-page .projects-deck {
    display: none;
}

body.projects-force-mobile.projects-page .project-section .timeline-card {
    opacity: 1;
    pointer-events: auto;
    margin-top: 0;
    margin-bottom: 24px;
}

body.projects-force-mobile.projects-page .projects-fixed-title {
    position: static;
    transform: none;
    left: auto;
    right: auto;
    top: auto;
    text-align: center;
    margin: 60px 0 16px;
    pointer-events: auto;
}

body.projects-force-mobile.projects-page .projects-scroll-hint {
    display: none;
}

body.projects-force-mobile.projects-page .project-section .timeline-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 32px 20px 24px;
}

body.projects-force-mobile.projects-page .project-section .project-header {
    width: 100%;
    justify-content: center;
    align-items: center;
}

body.projects-force-mobile.projects-page .project-section .project-header .pill {
    width: 100%;
    text-align: center;
    display: inline-flex;
    justify-content: center;
}

body.projects-force-mobile.projects-page .project-section .timeline-card h3 {
    width: 100%;
    text-align: center;
    align-self: center;
}

body.projects-force-mobile.projects-page .project-section h3 {
    width: 100%;
    text-align: center;
}

body.projects-force-mobile.projects-page .project-section .tech-stack {
    width: 100%;
    justify-content: center;
    text-align: center;
    gap: 0;
}

body.projects-force-mobile.projects-page .project-section .tech-stack .tech-item:not(:first-child)::before {
    margin: 0 6px;
    padding: 0;
}

body.projects-force-mobile.projects-page .project-section ul {
    width: 100%;
    text-align: left;
    align-self: stretch;
}

body.projects-force-mobile.projects-page .project-section .project-header .pill {
    font-size: 1.3rem;
    font-weight: 700;
}

body.projects-force-mobile.projects-page .project-section h3 {
    font-size: 1.15rem;
}

body.projects-force-mobile.projects-page .project-section .tech-stack {
    font-size: 1rem;
}

body.projects-force-mobile.projects-page .project-section h3,
body.projects-force-mobile.projects-page .project-section .tech-stack {
    margin-top: 6px;
}

body.projects-force-mobile.projects-page .project-section .project-header {
    margin-bottom: 10px;
}

body.projects-force-mobile.projects-page .project-section ul {
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-height: 880px) and (min-width: 721px) {
    body.projects-page {
        overflow: auto;
    }

    body.projects-page .main-view {
        display: none;
    }

    body.projects-page .projects-view {
        position: relative;
        inset: auto;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    body.projects-page .snap-page {
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
        scroll-snap-type: none;
    }

    body.projects-page .snap-section {
        min-height: auto;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
        padding: 0 0;
    }

    body.projects-page .snap-arrows {
        display: none;
    }

    body.projects-page .projects-deck {
        display: none;
    }

    body.projects-page .project-section .timeline-card {
        opacity: 1;
        pointer-events: auto;
        margin-top: 0;
        margin-bottom: 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 32px 20px 24px;
    }

    body.projects-page .projects-fixed-title {
        position: static;
        transform: none;
        left: auto;
        right: auto;
        top: auto;
        text-align: center;
        margin: 60px 0 16px;
        pointer-events: auto;
    }

    body.projects-page .projects-scroll-hint {
        display: none;
    }

    body.projects-page .project-section .project-header {
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    body.projects-page .project-section .project-header .pill {
        width: 100%;
        text-align: center;
        display: inline-flex;
        justify-content: center;
        font-size: 1.3rem;
        font-weight: 700;
    }

    body.projects-page .project-section .timeline-card h3 {
        width: 100%;
        text-align: center;
        align-self: center;
        font-size: 1.15rem;
    }

    body.projects-page .project-section h3 {
        width: 100%;
        text-align: center;
    }

    body.projects-page .project-section .tech-stack {
        width: 100%;
        justify-content: center;
        text-align: center;
        gap: 0;
        font-size: 1rem;
    }

    body.projects-page .project-section .tech-stack .tech-item:not(:first-child)::before {
        margin: 0 6px;
        padding: 0;
    }

    body.projects-page .project-section ul {
        width: 100%;
        text-align: left;
        align-self: stretch;
        font-size: 0.95rem;
        line-height: 1.5;
    }

    body.projects-page .project-section h3,
    body.projects-page .project-section .tech-stack {
        margin-top: 6px;
    }

    body.projects-page .project-section .project-header {
        margin-bottom: 10px;
    }
}

@media (min-width: 961px) and (max-width: 1100px) {
    body:not(.projects-page) .hero {
        text-align: center !important;
    }

    body:not(.projects-page) .hero-text {
        align-items: center !important;
        text-align: center !important;
        align-self: center;
    }

    body:not(.projects-page) .hero-title {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    body:not(.projects-page) .title-line {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
        gap: 4px;
    }

    body:not(.projects-page) .role-rotate {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    body:not(.projects-page) .lede {
        text-align: center;
    }

    body:not(.projects-page) .hero-cta-row {
        grid-template-columns: 1fr !important;
        justify-items: center;
        width: 100% !important;
        max-width: 620px;
        align-self: center;
        margin-left: auto;
        margin-right: auto;
    }

    body:not(.projects-page) .hero-cta-row > * {
        width: 100% !important;
    }

    body:not(.projects-page) .stat-card.stat-card-current {
        align-items: center;
        text-align: center;
    }
}

body.force-mobile:not(.projects-page) .hero-title {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    max-width: 620px;
    align-self: center;
}

body.force-mobile:not(.projects-page) .title-line {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    text-align: center;
}

body.force-mobile:not(.projects-page) .title-prefix {
    width: 100%;
    text-align: center;
    text-transform: lowercase;
    font-size: 0.9em;
    color: var(--muted);
}

body.force-mobile:not(.projects-page) .role-rotate {
    justify-content: center;
    width: 100%;
    text-align: center;
    font-size: 1.05em;
}

body.force-mobile:not(.projects-page) .lede {
    order: 3;
    width: 100%;
    max-width: 620px;
    align-self: center;
    text-align: center;
}

body.force-mobile:not(.projects-page) .scroll-hint {
    display: flex;
    order: 5;
    margin-top: 4px;
}

/* Ensure mobile projects bullet sizing wins over broader breakpoints */
@media (max-width: 720px) {
    .projects-page .project-section ul {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .projects-page .project-section ul li {
        font-size: 1.1rem;
        line-height: 1.6;
    }
}
