:root {
    --bg: #0b1020;
    --bg-elevated: rgba(13, 18, 36, 0.88);
    --bg-panel: rgba(15, 23, 42, 0.82);
    --bg-panel-strong: rgba(17, 24, 39, 0.96);
    --card-surface: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.7));
    --card-surface-soft: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.74));
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(125, 211, 252, 0.32);
    --text: #e5eefb;
    --text-muted: #a7b6d6;
    --text-soft: #cdd8ee;
    --accent: #67e8f9;
    --accent-strong: #22c55e;
    --accent-glow: rgba(103, 232, 249, 0.18);
    --warning: #fbbf24;
    --shadow: 0 18px 48px rgba(2, 6, 23, 0.38);
    --radius: 24px;
    --radius-sm: 16px;
    --card-padding: 1.4rem 1.45rem;
    --card-padding-compact: 1.35rem;
    --card-padding-mobile: 1.2rem;
    --max-width: 1180px;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 28%),
        linear-gradient(180deg, #060b16 0%, #0b1020 36%, #111827 100%);
    color: var(--text);
    font-family: var(--font-stack);
    line-height: 1.65;
}

body.home-page {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
        repeating-linear-gradient(-28deg,
            rgba(255, 255, 255, 0.035) 0,
            rgba(255, 255, 255, 0.035) 2px,
            transparent 2px,
            transparent 34px),
        radial-gradient(circle at 50% 72%, rgba(17, 188, 155, 0.06), transparent 18%),
        linear-gradient(180deg, #030303 0%, #070707 56%, #030303 100%);
    color: #f5f6f7;
}

body.profile-page,
body.case-studies-page,
body.demos-page,
body.services-page,
body.contact-page {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
        repeating-linear-gradient(-28deg,
            rgba(255, 255, 255, 0.035) 0,
            rgba(255, 255, 255, 0.035) 2px,
            transparent 2px,
            transparent 34px),
        radial-gradient(circle at 50% 72%, rgba(17, 188, 155, 0.06), transparent 18%),
        linear-gradient(180deg, #030303 0%, #070707 56%, #030303 100%);
    color: #f5f6f7;
}

a {
    color: inherit;
}

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

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(6, 11, 22, 0.78);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.page-chrome-header {
    position: relative;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 0;
}

.container {
    width: min(var(--max-width), calc(100% - 2rem));
    margin: 0 auto;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.page-chrome-header .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    width: min(1240px, calc(100% - 3rem));
    padding: 1.85rem 0 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.page-chrome-brand {
    gap: 0.55rem;
    align-self: center;
}

.brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent) 0%, #38bdf8 48%, var(--accent-strong) 100%);
    color: #04111d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.page-chrome-brand-mark {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 6px;
    background: #f8f8f8;
    color: #050505;
    font-size: 0.58rem;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
}

.page-chrome-brand-text {
    display: grid;
    gap: 0.04rem;
    line-height: 1.1;
}

.page-chrome-brand-role {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-chrome-brand-name {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.brand-copy {
    display: grid;
    gap: 0.06rem;
}

.brand-title {
    font-size: 0.98rem;
    font-weight: 700;
}

.brand-subtitle {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.page-chrome-nav {
    justify-content: center;
    gap: 1.35rem;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.page-chrome-nav a {
    padding: 0.45rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.78rem;
    font-weight: 600;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.6);
}

.page-chrome-nav a:hover,
.page-chrome-nav a:focus-visible {
    color: rgba(255, 255, 255, 0.86);
    border-color: transparent;
    background: transparent;
}

.site-nav a.is-active {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(14, 165, 233, 0.12);
}

.page-chrome-nav a.is-active {
    color: #ffffff;
    border: 0;
    background: transparent;
}

.page-chrome-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7.7rem;
    padding: 0.8rem 1.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    color: #f3f4f6;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.page-chrome-contact-link:hover,
.page-chrome-contact-link:focus-visible {
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

main {
    flex: 1;
    padding: 3.5rem 0 4rem;
}

.home-main {
    padding: 0;
}

.hero {
    display: grid;
    gap: 1.5rem;
    padding: 2rem 0 1rem;
}

.home-hero {
    min-height: calc(100vh - 5.5rem);
    place-items: center;
    padding: 4.25rem 0 5.5rem;
}

/* Shared card primitives for the marketing and index pages. */
:is(.hero-card, .panel, .callout, .metric, .timeline-item, .contact-card, .service-card, .case-card, .stack-card, .skill-card) {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-surface);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 2.5rem;
    text-align: center;
}

.home-hero-card {
    width: min(100%, 58rem);
    padding: 1.5rem 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.08);
    color: #d8ffe8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-page .eyebrow {
    margin-bottom: 1.55rem;
    padding: 0.42rem 0.95rem;
    border: 2px solid rgba(240, 240, 234, 0.2);
    background: rgba(200, 158, 158, 0.03);
    color: rgba(236, 253, 245, 0.88);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.eyebrow-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--accent-strong);
}

.home-page .eyebrow-dot {
    width: 0.38rem;
    height: 0.38rem;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.9);
}

.hero-title,
.page-title {
    margin: 0;
    font-size: clamp(2.35rem, 5vw, 3rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.home-hero-title {
    display: grid;
    gap: 0.1em;
    justify-items: center;
    font-size: clamp(2.85rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.035em;
    word-spacing: 0.08em;
}

.hero-title-muted {
    color: rgba(255, 255, 255, 0.62);
}

.hero-subtitle,
.page-intro {
    max-width: 72ch;
    margin: 1rem auto 0;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.page-title-support {
    color: var(--text-muted);
    font-size: 1.02rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.home-hero-subtitle {
    max-width: 40rem;
    margin-top: 1.55rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 1rem;
    line-height: 1.8;
}

.chip-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.home-chip-row {
    justify-content: center;
    margin-top: 1.45rem;
    gap: 0.7rem;
}

.profile-meta .chip-row {
    margin-top: 1.45rem;
    gap: 0.7rem;
}

.chip,
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.9rem;
    border: 1px solid rgba(125, 211, 252, 0.32);
    background: linear-gradient(180deg, rgba(8, 47, 73, 0.64), rgba(15, 23, 42, 0.86));
    color: var(--text-soft);
    font-size: 0.7rem;
    height: 1.7rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(125, 211, 252, 0.24);
}

.teams-logos {
    justify-items: center;
}

.teams-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 0;
}

.teams-logo-image {
    width: min(10rem, 100%);
    height: auto;
    object-fit: contain;
}

.teams-logo-name {
    margin-top: 0.65rem;
    color: var(--text-soft);
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: 0.98rem;
}

.home-page .chip,
.profile-page .chip {
    padding: 0.48rem 0.9rem;
    border: 1px solid rgba(125, 211, 252, 0.32);
    background: linear-gradient(180deg, rgba(8, 47, 73, 0.64), rgba(15, 23, 42, 0.86));
    color: var(--text-soft);
    font-size: 0.7rem;
    height: 1.7rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(125, 211, 252, 0.24);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
    margin-top: 1.75rem;
}

.home-cta-row {
    margin-top: 2.2rem;
    gap: 1rem;
}

.button,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 11rem;
    padding: 0.92rem 1.35rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.button {
    background: linear-gradient(135deg, var(--accent-strong), #14b8a6 54%, #38bdf8 100%);
    color: #03151c;
    box-shadow: 0 14px 32px rgba(20, 184, 166, 0.25);
}

.button-secondary {
    border: 1px solid rgba(125, 211, 252, 0.24);
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
}

.home-button-primary,
.home-button-secondary {
    min-width: 10rem;
    height: 2.75rem;
    padding: 0.95rem 1.55rem;
    font-size: 0.74rem;
    font-weight: 700;
}

.home-button-primary {
    gap: 0.4rem;
    background: linear-gradient(90deg, #27dc84 0%, #33d6b8 46%, #4aa7f2 100%);
    color: #082214;
    box-shadow:
        0 0 0 1px rgba(109, 247, 185, 0.18),
        0 18px 34px rgba(28, 193, 133, 0.22),
        -14px 14px 36px rgba(36, 228, 142, 0.22);
}

.home-button-secondary {
    border: 1px solid rgba(91, 173, 225, 0.28);
    background: linear-gradient(180deg, rgba(19, 62, 88, 0.88), rgba(14, 47, 69, 0.82));
    color: rgba(255, 255, 255, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 22px rgba(8, 17, 28, 0.38);
}

.home-button-primary:hover,
.home-button-secondary:hover,
.home-button-primary:focus-visible,
.home-button-secondary:focus-visible {
    transform: translateY(-2px);
}

.button:hover,
.button-secondary:hover {
    transform: translateY(-2px);
}

.section {
    padding: 1rem 0;
}

.services-cta-section {
    padding-top: 0;
}

.services-cta-section .cta-row {
    justify-content: center;
    margin-top: 0.5rem;
}

/* Case studies grid: outer horizontal inset matches inter-card gap (see .case-grid gap). */
.case-studies-page {
    --case-grid-gap: 1rem;
}

.case-studies-page main .section {
    padding-inline: var(--case-grid-gap);
}

.section-heading {
    max-width: 72ch;
    margin-bottom: 1.35rem;
}

.section-heading h2 {
    margin: 0.3rem 0 0;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    letter-spacing: -0.03em;
}

.section-heading p {
    color: var(--text-muted);
}

.grid {
    display: grid;
    gap: 1rem;
}

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

:is(.panel, .metric, .contact-card, .service-card, .case-card, .stack-card, .skill-card, .timeline-item, .callout) {
    padding: var(--card-padding);
}

:is(.metric, .timeline-item, .service-card, .case-card, .contact-card, .skill-card) {
    border-radius: var(--radius-sm);
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--accent);
}

.metric-label {
    display: block;
    margin-top: 0.55rem;
    color: var(--text-soft);
    font-weight: 500;
}

:is(.metric, .panel, .contact-card, .service-card, .case-card, .stack-card, .skill-card, .timeline-item, .callout) p,
.case-note {
    color: var(--text-muted);
    margin: 0.65rem 0 0;
}

:is(.panel, .service-card, .case-card, .stack-card, .skill-card, .contact-card, .timeline-item, .callout) h3 {
    margin: 0;
    font-size: 1.08rem;
}

.list,
:is(.panel, .service-card, .case-card, .stack-card, .skill-card, .contact-card) ul {
    margin: 0.85rem 0 0;
    padding-left: 1.15rem;
    color: var(--text-soft);
    display: grid;
    gap: 0.42rem;
}

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

.callout {
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(34, 197, 94, 0.08)),
        rgba(15, 23, 42, 0.85);
}

.service-card .tag-row,
.case-card .tag-row {
    margin-top: 1rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.8rem;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: rgba(252, 252, 252, 1);
    transition: text-decoration-color 0.2s ease;
}

.card-link:hover {
    color: #a5f3fc;
}

.timeline {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.14);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.contact-grid,
.services-grid,
.case-grid,
.skills-grid {
    display: grid;
    gap: 1rem;
}

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

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

.case-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--case-grid-gap, 1rem);
}

.case-studies-page .case-card,
.demos-page .case-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.case-card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
    flex-shrink: 0;
}

.case-card-thumb:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.case-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-card-body {
    padding: var(--card-padding);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.case-card-body .card-link {
    /* Keep the "More Details" action aligned right, with consistent spacing above. */
    margin-top: 1.1rem;
    align-self: flex-end;
}

/* On the demos page, keep demo actions aligned left under the title/summary. */
.demos-page .case-card-body .card-link {
    align-self: flex-start;
}

/* "Recording in progress" is a non-clickable link (no href). */
.demos-page .case-card-body .card-link:not([href]) {
    text-decoration: none;
}

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

/* Mini tab navigation (used on profile page "The stack I use most often"). */
.mini-tabs {
    position: relative;
    margin-top: 0.2rem;
}

.mini-tabs-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mini-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.mini-tab {
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mini-tab:hover,
.mini-tab:focus-visible {
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.32);
    transform: translateY(-1px);
}

.tab-panels .tab-panel {
    display: none;
}

/* Profile page: show the active panel + highlight its tab button. */
#skills-tab-programming:checked~.mini-tabs-nav label[for="skills-tab-programming"],
#skills-tab-ai:checked~.mini-tabs-nav label[for="skills-tab-ai"],
#skills-tab-backend:checked~.mini-tabs-nav label[for="skills-tab-backend"],
#skills-tab-frontend:checked~.mini-tabs-nav label[for="skills-tab-frontend"],
#skills-tab-cloud:checked~.mini-tabs-nav label[for="skills-tab-cloud"] {
    color: #eaf7ff;
    border-color: rgba(125, 211, 252, 0.55);
    background: rgba(14, 165, 233, 0.14);
}

#skills-tab-programming:checked~.tab-panels #skills-panel-programming,
#skills-tab-ai:checked~.tab-panels #skills-panel-ai,
#skills-tab-backend:checked~.tab-panels #skills-panel-backend,
#skills-tab-frontend:checked~.tab-panels #skills-panel-frontend,
#skills-tab-cloud:checked~.tab-panels #skills-panel-cloud {
    display: block;
}

.profile-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1rem;
    align-items: stretch;
}

.profile-page .profile-hero {
    grid-template-columns: minmax(14rem, 16.5rem) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.profile-avatar {
    display: grid;
    place-items: center;
    min-height: 18rem;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(14, 165, 233, 0.14), rgba(15, 23, 42, 0.86));
    box-shadow: var(--shadow);
}

.profile-avatar::after {
    content: "";
    position: absolute;
    inset: -1px;
    background:
        radial-gradient(circle at center, rgba(15, 23, 42, 0) 50%, rgba(15, 23, 42, 0.42) 80%, rgba(15, 23, 42, 0.7) 100%);
    pointer-events: none;
}

.profile-avatar {
    position: relative;
}

.profile-page .profile-avatar {
    width: min(100%, 16.5rem);
    min-height: auto;
    aspect-ratio: 4 / 4.85;
    justify-self: center;
}

.profile-avatar-image {
    width: 100%;
    height: 100%;
    min-height: 18rem;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.profile-page .profile-avatar-image {
    min-height: 0;
}

.profile-meta {
    display: grid;
    gap: 1rem;
}

.profile-page .page-title {
    font-size: clamp(1.95rem, 3.6vw, 1.5rem);
    line-height: 0.8;
}

.profile-page .page-intro {
    font-size: 0.96rem;
}

.profile-page :is(.panel, .stack-card, .skill-card) h3 {
    font-size: 0.98rem;
}

.profile-page :is(.panel, .stack-card, .skill-card) p,
.profile-page :is(.panel, .stack-card, .skill-card) ul,
.profile-page :is(.panel, .stack-card, .skill-card) li {
    font-size: 0.94rem;
    line-height: 1.65;
}

.footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 1.6rem 0 2rem;
}

.footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumbs {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

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

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs li+li::before {
    content: "/";
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--text);
}

.breadcrumbs [aria-current="page"] {
    color: var(--text-soft);
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state p {
    max-width: 48rem;
    margin: 0.85rem auto 0;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .site-header .container {
        flex-direction: column;
        align-items: stretch;
    }

    .page-chrome-header .container {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 1rem;
        width: min(100%, calc(100% - 2rem));
    }

    .site-nav {
        justify-content: center;
    }

    .split,
    .profile-hero,
    .contact-grid,
    .services-grid,
    .skills-grid,
    .grid-3 {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    main {
        padding-top: 2.25rem;
    }

    :is(.hero-card, .panel, .metric, .contact-card, .service-card, .case-card, .stack-card, .skill-card, .timeline-item, .callout) {
        padding: var(--card-padding-mobile);
    }

    .hero-title,
    .page-title {
        font-size: 2.35rem;
    }

    .cta-row {
        justify-content: stretch;
    }

    .button,
    .button-secondary {
        width: 100%;
    }

    .footer .container {
        flex-direction: column;
    }

    .home-hero {
        min-height: auto;
        padding: 2.5rem 0 4rem;
    }

    .home-hero-card {
        padding-top: 0.75rem;
    }

    .home-hero-title {
        font-size: clamp(2.45rem, 11.5vw, 3.15rem);
        line-height: 0.98;
        word-spacing: 0.06em;
    }

    .home-hero-subtitle {
        font-size: 0.94rem;
    }

    .page-chrome-nav {
        gap: 0.9rem 1.15rem;
    }

    .page-chrome-nav a,
    .page-chrome-contact-link,
    .page-chrome-brand-role {
        font-size: 0.74rem;
    }

    .page-chrome-brand-name {
        display: none;
    }

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