:root {
    --background: #fcfcfb;
    --foreground: #0a0a0a;
    --card: #ffffff;
    --primary: #2563eb;
    --muted: #f0f0ee;
    --muted-foreground: #6b6b6b;
    --border: #e8e8e6;
    --header-height: 73px;
    --container-width: 1600px;
    --page-padding: 2rem;
    --page-padding-wide: 4rem;
}

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

html {
    min-height: 100%;
    font-size: 16px;
    overflow-x: clip;
    overflow-y: scroll;
    scrollbar-gutter: stable both-edges;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--background);
    color: var(--foreground);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

    body.has-open-modal {
        overflow: clip;
    }

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

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

svg {
    display: block;
}

.site-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-right: var(--page-padding);
    padding-left: var(--page-padding);
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    background: rgba(252, 252, 251, 0.95);
    backdrop-filter: blur(8px);
}

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

.site-header__inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: max-content;
}

.brand__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--primary);
    transition: transform 180ms ease;
}

.brand:hover .brand__dot {
    transform: scale(1.5);
}

.brand__name,
.site-nav__link,
.language-switcher__button,
.eyebrow,
.section-kicker,
.detail-label,
.meta-label,
.social-links a,
.tag,
.project-meta,
.panel-label,
.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.brand__name {
    font-weight: 500;
    letter-spacing: 0.2em;
}

.site-nav {
    display: none;
    align-items: center;
    gap: 3rem;
}

.site-nav__link {
    color: var(--muted-foreground);
    transition: color 180ms ease;
}

    .site-nav__link:hover,
    .site-nav__link--active {
        color: var(--foreground);
        font-weight: 500;
    }

.language-switcher {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.language-switcher__button {
    color: rgba(107, 107, 107, 0.5);
    letter-spacing: 0.08em;
    transition: color 180ms ease;
}

    .language-switcher__button:hover,
    .language-switcher__button--active {
        color: var(--foreground);
        font-weight: 500;
    }

.site-main {
    padding-top: var(--header-height);
}

.page {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

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

.page-aside,
.page-aside--wide,
.page-content,
.page-content--narrow,
.contact-intro,
.contact-content,
.contact-home-copy,
.contact-home-side,
.work-browser,
.works-main {
    min-width: 0;
}

.sticky-intro {
    display: grid;
    gap: 1.35rem;
}

.section-heading {
    margin: 0;
    font-size: 3.25rem;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: 0;
}

.section-heading--xl {
    font-size: 3.75rem;
    line-height: 0.85;
}

.section-kicker,
.eyebrow,
.detail-label,
.meta-label,
.project-meta,
.panel-label,
.stat-label {
    color: var(--muted-foreground);
}

.accent-line {
    width: 4rem;
    height: 1px;
    background: var(--primary);
}

.muted-copy {
    margin: 0;
    color: var(--muted-foreground);
    line-height: 1.7;
}

.lead {
    margin: 0;
    font-size: 1.25rem;
    color: rgba(10, 10, 10, 0.7);
    line-height: 1.65;
}

.aside-lead {
    max-width: 26rem;
    margin: 0;
    color: rgba(10, 10, 10, 0.66);
    font-size: 1rem;
    line-height: 1.75;
}

.text-primary {
    color: var(--primary);
}

.icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.icon-lg {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-xl {
    width: 2rem;
    height: 2rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.button-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

    .button-link .icon,
    .contact-button .icon {
        transition: transform 180ms ease;
    }

    .button-link:hover .icon,
    .contact-button:hover .icon,
    .side-link:hover .icon,
    .project-card:hover .icon,
    .contact-link:hover .icon {
        transform: translate(0.25rem, -0.25rem);
    }

.button-link--primary {
    background: var(--foreground);
    color: var(--background);
}

    .button-link--primary:hover {
        background: rgba(10, 10, 10, 0.9);
    }

.button-link--outline {
    border: 1px solid var(--border);
}

    .button-link--outline:hover {
        border-color: var(--foreground);
    }

.home-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
}

.home-grid {
    display: grid;
    flex: 1;
    align-items: center;
    gap: 3rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.home-copy {
    display: grid;
    gap: 2.5rem;
}

.hero-copy {
    display: grid;
    gap: 2rem;
}

.hero-copy__top {
    display: grid;
    gap: 1.25rem;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: 0.2em;
}

.eyebrow__line {
    width: 3rem;
    height: 1px;
    background: rgba(10, 10, 10, 0.2);
}

.hero-title {
    display: grid;
    gap: 0.5rem;
    margin: 0;
}

.hero-title__line {
    display: block;
    font-size: 3.25rem;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: 0;
}

.intro-block {
    max-width: 48rem;
    display: grid;
    gap: 1.75rem;
}

    .intro-block p {
        margin: 0;
        color: rgba(10, 10, 10, 0.7);
        font-size: 1.125rem;
        line-height: 1.7;
        white-space: pre-line;
    }

.detail-list {
    display: grid;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.detail-row {
    display: flex;
    align-items: baseline;
    gap: 2rem;
}

.detail-label {
    width: 6rem;
    flex: 0 0 6rem;
    letter-spacing: 0.08em;
}

.detail-value {
    font-weight: 500;
}

.status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.5rem;
    border-radius: 999px;
    background: var(--primary);
    animation: pulse 1.6s ease-in-out infinite;
}

.home-side {
    display: grid;
    gap: 2rem;
}

.side-menu {
    display: grid;
    gap: 0.25rem;
}

.side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    transition: border-color 180ms ease;
}

    .side-link:hover {
        border-color: var(--foreground);
    }

.side-link__title {
    display: block;
    font-size: 1.125rem;
    font-weight: 500;
}

.side-link__subtitle {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.side-link .icon {
    color: var(--muted-foreground);
    transition: color 180ms ease, transform 180ms ease;
}

.side-link:hover .icon {
    color: var(--foreground);
}

.social-links {
    display: grid;
    gap: 0.75rem;
    padding-top: 1rem;
}

    .social-links a {
        display: block;
        color: var(--muted-foreground);
        letter-spacing: 0.08em;
        transition: color 180ms ease;
    }

        .social-links a:hover {
            color: var(--foreground);
        }

.home-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.home-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.home-footer__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.about-main,
.resume-main,
.skills-main,
.works-main,
.contact-main {
    display: grid;
    gap: 6rem;
}

.about-story {
    display: grid;
    gap: 6rem;
}

.about-opener {
    display: grid;
    gap: 2rem;
    align-items: start;
}

.large-statement {
    margin: 0;
    color: rgba(10, 10, 10, 0.9);
    font-size: 1.875rem;
    font-weight: 500;
    line-height: 1.25;
}

.profile-photo {
    width: min(100%, 18rem);
    aspect-ratio: 4 / 5;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--muted);
}

.profile-photo__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 42%;
    filter: saturate(0.88) contrast(1.02);
}

.profile-photo--aside {
    width: min(100%, 15.5rem);
}

.profile-photo--opener {
    width: min(100%, 16rem);
}

.career-axis-mini {
    width: min(100%, 25rem);
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

    .career-axis-mini svg {
        display: block;
        width: 100%;
        height: auto;
        overflow: visible;
    }

.axis-line {
    fill: none;
    stroke: #d7dde5;
    stroke-width: 1.4px;
}

.axis-line--active {
    stroke: var(--primary);
    stroke-width: 1.9px;
}

.axis-link {
    fill: none;
    stroke: rgba(10, 10, 10, 0.18);
    stroke-width: 1.1px;
    stroke-dasharray: 4 5;
}

.axis-dot {
    fill: var(--background);
    stroke: #d7dde5;
    stroke-width: 1.7px;
}

.axis-dot--current {
    fill: rgba(37, 99, 235, 0.08);
    stroke: var(--primary);
    stroke-width: 2.2px;
}

.axis-label,
.axis-year {
    fill: var(--muted-foreground);
    font-size: 0.625rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.axis-text {
    fill: var(--foreground);
    font-size: 0.6875rem;
    font-weight: 700;
}

.axis-text--primary {
    fill: var(--primary);
}

.about-transition {
    width: min(100%, 25rem);
    display: grid;
    gap: 1rem;
    padding-top: 0.25rem;
}

.about-transition__label {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

    .about-transition__label::before {
        content: "";
        width: 3rem;
        height: 1px;
        background: rgba(10, 10, 10, 0.2);
    }

.about-transition__steps {
    display: grid;
    gap: 0.7rem;
}

.about-transition__step {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}

    .about-transition__step span {
        color: var(--primary);
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.12em;
    }

    .about-transition__step strong {
        display: block;
        padding: 0.75rem 0 0.75rem 1rem;
        border-left: 1px solid var(--border);
        font-size: 0.9375rem;
        line-height: 1.3;
    }

.about-transition p {
    max-width: 22rem;
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    line-height: 1.65;
}

.two-column {
    display: grid;
    gap: 4rem;
}

.content-block {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1.5rem;
}

.body-copy {
    display: grid;
    gap: 1rem;
    color: rgba(10, 10, 10, 0.8);
    line-height: 1.7;
}

    .body-copy p {
        margin: 0;
    }

.quote-block {
    display: grid;
    gap: 1.5rem;
    border-left: 2px solid var(--primary);
    padding-left: 2rem;
    margin-left: 0;
}

.quote-block__text {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.35;
}

.quote-block__source {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.feature-section {
    display: grid;
    gap: 3rem;
}

.feature-grid {
    display: grid;
    gap: 2rem;
}

.feature-item {
    display: grid;
    grid-template-rows: auto minmax(2.25rem, auto) 1fr;
    gap: 0.75rem;
}

.feature-number,
.project-number,
.skill-number {
    color: rgba(10, 10, 10, 0.1);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 500;
}

.dark-panel {
    display: grid;
    gap: 1.5rem;
    background: var(--foreground);
    color: var(--background);
    padding: 3rem;
}

.dark-panel__copy {
    font-size: 1.875rem;
    font-weight: 500;
    line-height: 1.25;
}

.resume-stats {
    display: grid;
    gap: 2rem;
    padding-top: 2rem;
}

.stat-list {
    display: grid;
    gap: 1.25rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.resume-sections {
    display: grid;
    gap: 4rem;
}

.resume-section {
    display: grid;
    gap: 2rem;
}

.resume-section__title {
    margin: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    color: var(--foreground);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.download-button {
    width: fit-content;
    margin-top: 0.5rem;
}

.timeline {
    display: grid;
}

.timeline-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 3rem;
    margin-bottom: 3rem;
}

    .timeline-item:last-child {
        border-bottom: 0;
        margin-bottom: 0;
    }

.timeline-item__grid {
    display: grid;
    gap: 2rem;
}

.timeline-year {
    color: rgba(10, 10, 10, 0.1);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.timeline-period {
    margin-top: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.timeline-content {
    display: grid;
    gap: 1.5rem;
}

.timeline-title {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.15;
}

.timeline-subtitle {
    color: var(--primary);
    font-size: 1.125rem;
    font-weight: 500;
}

.timeline-location {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

    .timeline-points li {
        display: flex;
        gap: 1rem;
        color: rgba(10, 10, 10, 0.7);
        line-height: 1.7;
    }

    .timeline-points span:first-child {
        color: var(--primary);
    }

.skills-header,
.works-header {
    display: grid;
    gap: 4rem;
    align-items: end;
}

.skill-grid,
.competency-map {
    display: grid;
    gap: 2rem;
}

.competency-map {
    gap: 3.5rem;
}

.skill-group {
    display: grid;
    gap: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.skill-group__head {
    display: grid;
    gap: 1rem;
}

.skills-page .skill-number {
    font-size: 4rem;
}

.skill-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.skill-summary {
    max-width: 42rem;
    margin: 0.75rem 0 0;
    color: rgba(10, 10, 10, 0.62);
    line-height: 1.7;
}

.skill-list {
    display: grid;
}

.skill-list__item {
    display: grid;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    color: rgba(10, 10, 10, 0.8);
    transition: color 180ms ease, border-color 180ms ease;
}

    .skill-list__item:hover {
        border-color: var(--foreground);
        color: var(--foreground);
    }

.skill-list__title {
    color: var(--foreground);
    font-weight: 700;
    line-height: 1.35;
}

.skill-list__text {
    color: rgba(10, 10, 10, 0.66);
    line-height: 1.65;
}

.project-list {
    display: grid;
    gap: 0.25rem;
}

.project-card {
    display: block;
    border-bottom: 1px solid var(--border);
    transition: background 180ms ease;
}

    .project-card:hover {
        background: var(--muted);
    }

.project-card__grid {
    display: grid;
    gap: 2rem;
    padding: 2rem;
}

.project-card:hover .project-number {
    color: rgba(37, 99, 235, 0.2);
}

.project-content {
    display: grid;
    gap: 1rem;
}

.project-title {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.15;
    transition: color 180ms ease;
}

.project-card:hover .project-title,
.project-card:hover .icon {
    color: var(--primary);
}

.project-description {
    max-width: 42rem;
    margin: 0;
    color: rgba(10, 10, 10, 0.7);
    line-height: 1.7;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.tag {
    border: 1px solid var(--border);
    padding: 0.375rem 0.75rem;
    color: var(--muted-foreground);
    letter-spacing: 0.08em;
}

.prototype-switcher {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.75rem;
}

.prototype-switcher__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.75rem;
    border: 1px solid var(--border);
    padding: 0.9rem 1rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 700;
    text-align: left;
    transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

    .prototype-switcher__button span {
        color: var(--primary);
        font-size: 0.75rem;
        letter-spacing: 0.08em;
    }

    .prototype-switcher__button:hover,
    .prototype-switcher__button.is-active {
        border-color: var(--foreground);
        background: var(--foreground);
        color: var(--background);
    }

.prototype-panels {
    display: grid;
}

.prototype-panel {
    display: grid;
    gap: 3rem;
}

    .prototype-panel[hidden] {
        display: none;
    }

.prototype-panel__head {
    display: grid;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.prototype-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
}

.prototype-copy {
    max-width: 44rem;
    margin: 0;
    color: rgba(10, 10, 10, 0.66);
    line-height: 1.7;
}

.work-tab-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    border-bottom: 1px solid var(--border);
}

.work-tab {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 2px solid transparent;
    padding: 1.25rem 0;
    color: var(--muted-foreground);
    font-weight: 700;
    text-align: left;
    transition: border-color 180ms ease, color 180ms ease;
}

    .work-tab span {
        color: rgba(10, 10, 10, 0.28);
        font-size: 1.75rem;
        line-height: 1;
    }

    .work-tab:hover,
    .work-tab.is-active {
        border-color: var(--primary);
        color: var(--foreground);
    }

.work-tab-panel {
    display: none;
    gap: 2rem;
    padding-top: 2rem;
}

    .work-tab-panel.is-active {
        display: grid;
    }

.compact-project-list,
.work-section-list,
.work-accordion,
.project-journey {
    display: grid;
    gap: 1rem;
}

.compact-project-card {
    display: grid;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}

    .compact-project-card h3 {
        margin: 0;
        font-size: 1.375rem;
        line-height: 1.25;
    }

    .compact-project-card p {
        max-width: 42rem;
        margin: 0;
        color: rgba(10, 10, 10, 0.68);
        line-height: 1.7;
    }

.work-direction {
    display: grid;
    gap: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.work-direction__head {
    display: grid;
    gap: 1rem;
}

    .work-direction__head h3,
    .featured-project h3,
    .supporting-projects h3,
    .journey-step h3 {
        margin: 0;
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.2;
    }

    .work-direction__head p,
    .journey-step p,
    .featured-project p {
        max-width: 42rem;
        margin: 0.75rem 0 0;
        color: rgba(10, 10, 10, 0.66);
        line-height: 1.7;
    }

.project-card--static:hover {
    background: transparent;
}

    .project-card--static:hover .project-title {
        color: var(--foreground);
    }

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

    .work-accordion__item summary {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 1.5rem;
        padding: 2rem 0;
        cursor: pointer;
        list-style: none;
    }

        .work-accordion__item summary::-webkit-details-marker {
            display: none;
        }

    .work-accordion__item strong,
    .work-accordion__item small {
        display: block;
    }

    .work-accordion__item strong {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .work-accordion__item small {
        margin-top: 0.5rem;
        color: rgba(10, 10, 10, 0.62);
        font-size: 1rem;
        line-height: 1.6;
    }

.accordion-mark {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
}

.work-accordion__item[open] .accordion-mark {
    transform: rotate(45deg);
}

.work-accordion__item .compact-project-list {
    padding-bottom: 2rem;
}

.journey-step {
    display: grid;
    gap: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.featured-project {
    display: grid;
    gap: 2rem;
    border: 1px solid var(--border);
    padding: 2rem;
}

.featured-project__number {
    color: rgba(37, 99, 235, 0.18);
    font-size: 6rem;
    font-weight: 700;
    line-height: 0.85;
}

.featured-project__meta {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

    .featured-project__meta span {
        border-top: 1px solid var(--border);
        padding-top: 0.75rem;
    }

.supporting-projects {
    display: grid;
    gap: 2rem;
}

    .supporting-projects section {
        display: grid;
        gap: 1.25rem;
    }

.supporting-project {
    display: grid;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

    .supporting-project strong {
        line-height: 1.35;
    }

    .supporting-project span {
        color: rgba(10, 10, 10, 0.62);
        line-height: 1.6;
    }

.work-direction-nav {
    display: grid;
    gap: 0.75rem;
    max-width: 30rem;
}

.work-direction-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    border-bottom: 1px solid transparent;
    padding: 1.25rem 0;
    text-align: left;
    transition: color 180ms ease, border-color 180ms ease;
}

    .work-direction-button:hover {
        border-bottom-color: var(--foreground);
        color: var(--primary);
    }

    .work-direction-button.is-active {
        color: var(--primary);
    }

    .work-direction-button strong,
    .work-direction-button small {
        display: block;
    }

    .work-direction-button strong {
        color: var(--foreground);
        font-size: 1.125rem;
        line-height: 1.25;
    }

    .work-direction-button small {
        margin-top: 0.4rem;
        color: rgba(10, 10, 10, 0.58);
        font-size: 0.875rem;
        line-height: 1.55;
    }

.work-browser {
    display: grid;
    gap: 3rem;
    min-width: 0;
}

    .work-browser[hidden] {
        display: none;
    }

.work-browser__head {
    display: grid;
    gap: 1.25rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

    .work-browser__head p {
        max-width: 43rem;
        margin: 0;
        color: rgba(10, 10, 10, 0.66);
        line-height: 1.7;
    }

.work-browser__title {
    max-width: 42rem;
    margin: 0.75rem 0 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
}

.work-explorer {
    display: grid;
    gap: 2rem;
}

.work-topic-list {
    display: grid;
    align-content: start;
    border-top: 1px solid var(--border);
}

.work-topic-button {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding: 1.1rem 0;
    color: rgba(10, 10, 10, 0.66);
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    transition: border-color 180ms ease, color 180ms ease;
}

    .work-topic-button span {
        color: rgba(10, 10, 10, 0.22);
        font-size: 1.5rem;
        line-height: 1;
    }

    .work-topic-button:hover,
    .work-topic-button.is-active {
        border-color: var(--foreground);
        color: var(--foreground);
    }

        .work-topic-button.is-active span {
            color: var(--primary);
        }

.work-topic-content {
    min-width: 0;
}

.work-topic-panel {
    display: none;
    gap: 1.5rem;
}

    .work-topic-panel.is-active {
        display: grid;
    }

    .work-topic-panel h3 {
        max-width: 40rem;
        margin: 0;
        font-size: 2rem;
        font-weight: 700;
        line-height: 1.15;
    }

    .work-topic-panel p {
        max-width: 43rem;
        margin: 0;
        color: rgba(10, 10, 10, 0.66);
        line-height: 1.7;
    }

.object-list {
    display: grid;
    margin-top: 0.5rem;
}

    .object-list .section-kicker {
        padding-bottom: 1rem;
    }

    .object-list .project-status-label {
        padding-bottom: 1rem;
    }

.object-row {
    display: grid;
    gap: 0.35rem;
    border-top: 1px solid var(--border);
    padding: 1rem 0;
}

    .object-row:last-child {
        border-bottom: 1px solid var(--border);
    }

    .object-row span {
        font-weight: 700;
        line-height: 1.35;
    }

    .object-row small {
        color: var(--muted-foreground);
        font-size: 0.8125rem;
    }

.engineering-case-list {
    display: grid;
    gap: 0;
    padding-top: 0;
}

.engineering-case-list--direct {
    padding-top: 0.25rem;
}

.engineering-case-card {
    display: grid;
    border-top: 1px solid var(--border);
}

    .engineering-case-card:first-child {
        border-top: 0;
    }

.engineering-case-card__panel-inner {
    display: grid;
    gap: 1.35rem;
    padding-bottom: 1.75rem;
}

.engineering-case-card + .engineering-case-card .engineering-case-card__panel-inner {
    padding-top: 1.75rem;
}

.engineering-case-hero {
    display: grid;
    gap: 1.75rem;
    align-items: start;
}

.engineering-case-hero__copy {
    display: grid;
    grid-template-rows: repeat(4, max-content) 1fr max-content;
    gap: 0.95rem;
    align-content: stretch;
}

.engineering-case-hero .project-status-value {
    color: rgba(10, 10, 10, 0.82);
    font-size: 0.95rem;
    font-weight: 600;
}

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

.engineering-case-field {
    display: grid;
    gap: 0.45rem;
}

    .engineering-case-field span {
        color: var(--muted-foreground);
        font-size: 0.72rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .engineering-case-field strong {
        color: rgba(10, 10, 10, 0.82);
        font-size: 0.95rem;
        font-weight: 600;
        line-height: 1.6;
    }

.engineering-case-field--wide strong {
    max-width: 36rem;
    font-size: 1rem;
    line-height: 1.55;
}

.engineering-case-photo {
    margin: 0;
}

    .engineering-case-photo img {
        display: block;
        width: 100%;
        max-height: 16rem;
        aspect-ratio: 4 / 3;
        object-fit: contain;
        object-position: center center;
        background: transparent;
    }

.engineering-case-card .software-more-button {
    grid-row: 6;
    color: var(--foreground);
    font-weight: 500;
    align-self: end;
    margin-bottom: 0.1rem;
}

    .engineering-case-card .software-more-button:hover,
    .engineering-case-card .software-more-button.is-active {
        border-color: var(--foreground);
        color: var(--foreground);
    }

    .engineering-case-card .software-more-button .icon {
        color: var(--primary);
    }

.engineering-case-details > p {
    max-width: 42rem;
    margin: 0;
    color: rgba(10, 10, 10, 0.68);
    line-height: 1.7;
}

.engineering-case-gallery {
    display: grid;
    gap: 0.75rem;
}

.engineering-case-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 10rem));
    gap: 1rem;
    justify-content: start;
}

.engineering-case-gallery__button {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    text-align: left;
}

    .engineering-case-gallery__button img {
        display: block;
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: contain;
        background: transparent;
        transition: opacity 180ms ease, transform 180ms ease;
    }

    .engineering-case-gallery__button:hover img {
        opacity: 0.86;
        transform: scale(1.015);
    }

.software-project-sections {
    display: grid;
    gap: 0;
    min-width: 0;
    border-top: 1px solid var(--border);
}

.software-project-section {
    display: grid;
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.software-project-section__head {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    align-items: start;
    gap: 1.5rem;
    width: 100%;
    padding: 1.5rem 0;
    color: rgba(10, 10, 10, 0.68);
    text-align: left;
    transition: color 180ms ease, border-color 180ms ease;
}

    .software-project-section__head:hover,
    .software-project-section__head.is-active {
        color: var(--foreground);
    }

    .software-project-section__head .icon {
        margin-top: 0.25rem;
        color: var(--muted-foreground);
        transition: color 180ms ease, transform 180ms ease;
    }

    .software-project-section__head:hover .icon,
    .software-project-section__head.is-active .icon {
        color: var(--primary);
        transform: translate(0.25rem, -0.25rem);
    }

.software-section-number {
    color: rgba(10, 10, 10, 0.14);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.software-project-section__head.is-active .software-section-number {
    color: var(--primary);
}

.software-section-copy {
    display: grid;
    gap: 0.5rem;
}

    .software-section-copy strong {
        margin: 0;
        color: var(--foreground);
        font-size: 1.375rem;
        font-weight: 700;
        line-height: 1.2;
    }

    .software-section-copy small {
        max-width: 42rem;
        margin: 0;
        color: rgba(10, 10, 10, 0.62);
        font-size: 1rem;
        line-height: 1.65;
    }

.software-project-section__panel {
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 360ms ease, opacity 220ms ease;
}

.software-project-section__panel-inner {
    display: grid;
    gap: 1.5rem;
    min-height: 0;
    overflow: visible;
    padding-bottom: 0;
    transform: translateY(-0.35rem);
    transition: padding-bottom 300ms ease, transform 300ms ease;
}

.software-project-section__panel.is-open {
    max-height: 240rem;
    opacity: 1;
}

    .software-project-section__panel.is-open .software-project-section__panel-inner {
        padding-bottom: 2rem;
        transform: translateY(0);
    }

.software-project-entry {
    display: grid;
    gap: 1rem;
    border-top: 1px solid rgba(10, 10, 10, 0.08);
    padding-top: 1.5rem;
}

.software-project-entry__body {
    display: grid;
    gap: 1rem;
}

.software-project-entry__meta {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.project-status-group {
    display: grid;
    gap: 0.6rem;
}

.project-status-label {
    color: var(--muted-foreground);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.project-progress {
    display: grid;
    gap: 0.5rem;
}

.project-status-value {
    color: var(--foreground);
    font-weight: 700;
    line-height: 1.45;
}

    .project-status-value span {
        display: block;
    }

        .project-status-value span + span {
            color: var(--primary);
        }

.project-progress__track {
    height: 0.25rem;
    background: var(--border);
}

.project-progress__bar {
    display: block;
    height: 100%;
    background: var(--primary);
}

.project-progress__value {
    color: var(--foreground);
    font-weight: 700;
}

.software-project-entry__body h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
}

.software-project-entry__body > p {
    max-width: 42rem;
    margin: 0;
    color: rgba(10, 10, 10, 0.68);
    line-height: 1.7;
}

.software-detail-list {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.software-detail-columns {
    display: grid;
    gap: 1.5rem;
    padding-top: 0.5rem;
}

.software-detail-block {
    display: grid;
    gap: 0.75rem;
}

.software-detail-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    color: rgba(10, 10, 10, 0.7);
    line-height: 1.65;
}

    .software-detail-row span {
        color: var(--primary);
    }

    .software-detail-row p {
        margin: 0;
    }

.software-more-button {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    border-bottom: 1px solid transparent;
    padding-top: 0.25rem;
    padding-bottom: 0.2rem;
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 700;
    transition: border-color 180ms ease, color 180ms ease;
}

    .software-more-button:hover,
    .software-more-button.is-active {
        border-color: var(--foreground);
        color: var(--primary);
    }

    .software-more-button .icon {
        transition: transform 180ms ease;
    }

    .software-more-button.is-active .icon {
        transform: rotate(180deg);
    }

.software-project-details {
    display: grid;
    gap: 1.5rem;
    border-top: 1px solid var(--border);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-0.35rem);
    transition: max-height 340ms ease, opacity 220ms ease, transform 260ms ease, padding-top 260ms ease;
    padding-top: 0;
}

    .software-project-details.is-open {
        max-height: 180rem;
        opacity: 1;
        transform: translateY(0);
        padding-top: 1.5rem;
    }

.architecture-flow {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.architecture-image-button {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    background: #f8fafc;
    padding: 0;
    cursor: zoom-in;
    overflow: hidden;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

    .architecture-image-button:hover {
        border-color: rgba(37, 99, 235, 0.6);
        box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.1);
    }

    .architecture-image-button:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 0.25rem;
    }

    .architecture-image-button img {
        display: block;
        width: 100%;
        height: auto;
    }

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

.architecture-node {
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    color: rgba(10, 10, 10, 0.72);
    font-size: 0.875rem;
    line-height: 1.35;
}

.project-links {
    display: grid;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.project-address {
    display: grid;
    gap: 0.25rem;
    color: rgba(10, 10, 10, 0.72);
    line-height: 1.5;
}

.diagram-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

    .diagram-modal.is-open {
        opacity: 1;
        pointer-events: auto;
    }

.diagram-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(252, 252, 251, 0.78);
    backdrop-filter: blur(6px);
}

.diagram-modal__panel {
    position: relative;
    z-index: 1;
    width: fit-content;
    max-width: 94vw;
    max-height: 88vh;
    display: block;
    border: 0;
    background: transparent;
    box-shadow: 0 1.25rem 3.5rem rgba(15, 23, 42, 0.16);
    padding: 0;
    transform: translateY(0.75rem) scale(0.98);
    transition: transform 180ms ease;
}

.diagram-modal.is-open .diagram-modal__panel {
    transform: translateY(0) scale(1);
}

.diagram-modal__frame {
    width: fit-content;
    max-width: 94vw;
    max-height: 88vh;
    padding: 0.75rem;
    border: 1px solid var(--border);
    background: #ffffff;
}

.diagram-modal__viewport {
    position: relative;
    width: fit-content;
    max-width: calc(94vw - 1.5rem);
    max-height: calc(88vh - 1.5rem);
}

    .diagram-modal__viewport img {
        display: block;
        max-width: calc(94vw - 1.5rem);
        max-height: calc(88vh - 1.5rem);
        width: auto;
        height: auto;
        border: 1px solid rgba(10, 10, 10, 0.08);
        background: #f8fafc;
    }

.diagram-modal__close {
    position: absolute;
    top: -0.875rem;
    right: -0.875rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--foreground);
    box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.12);
    transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

    .diagram-modal__close:hover {
        border-color: var(--foreground);
        color: var(--primary);
        transform: translateY(-1px);
    }

.diagram-modal__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 22%;
    height: 58%;
    border: 0;
    background: transparent;
    color: #ffffff;
    transform: translateY(-50%);
    transition: color 180ms ease;
}

    .diagram-modal__nav::before {
        content: "";
        display: none;
    }

.diagram-modal__nav-symbol {
    grid-area: 1 / 1;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    opacity: 0;
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 300;
    line-height: 1;
    filter: drop-shadow(0 0.15rem 0.25rem rgba(0, 0, 0, 0.42));
    transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.diagram-modal__nav:hover,
.diagram-modal__nav:focus-visible {
    color: #ffffff;
}

    .diagram-modal__nav:hover .diagram-modal__nav-symbol,
    .diagram-modal__nav:focus-visible .diagram-modal__nav-symbol {
        opacity: 1;
    }

    .diagram-modal__nav:hover .diagram-modal__nav-symbol,
    .diagram-modal__nav:focus-visible .diagram-modal__nav-symbol {
        filter: drop-shadow(0 0.2rem 0.35rem rgba(0, 0, 0, 0.55));
    }

.diagram-modal__nav--prev {
    left: 0;
    justify-items: start;
    padding-left: 0.65rem;
}

.diagram-modal__nav--next {
    right: 0;
    justify-items: end;
    padding-right: 0.65rem;
}

.diagram-modal__nav[hidden] {
    display: none;
}

.github-panel {
    display: grid;
    gap: 2rem;
    border: 1px solid var(--border);
    padding: 3rem;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: gap 180ms ease;
}

    .text-link:hover {
        gap: 1rem;
    }

.contact-home-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
}

.contact-home-grid {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(0, 7fr) minmax(22rem, 5fr);
    align-items: center;
    gap: clamp(3rem, 5vw, 5rem);
    padding-top: clamp(2rem, 5vh, 3.5rem);
    padding-bottom: clamp(2rem, 5vh, 3.5rem);
}

.contact-home-copy {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    gap: 2.5rem;
    max-width: 56rem;
}

.contact-home-page .hero-title__line {
    font-size: clamp(3.25rem, 4.3vw, 4rem);
}

.contact-home-page .intro-block {
    max-width: 51rem;
    gap: 1.5rem;
}

    .contact-home-page .intro-block p {
        font-size: 1rem;
        line-height: 1.65;
    }

.contact-home-page .detail-list {
    gap: 0.65rem;
}

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
}

.contact-list {
    display: grid;
    gap: 0.25rem;
}

.contact-home-side {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    gap: 2rem;
}

.contact-home-page .contact-link,
.contact-home-page .contact-static {
    min-height: 0;
    padding: 1rem 0;
}

.contact-home-page .contact-static {
    cursor: default;
}

.contact-value {
    display: block;
    margin-top: 0.25rem;
    color: var(--foreground);
    overflow-wrap: anywhere;
}

.contact-link:hover .contact-value {
    color: var(--primary);
}

.contact-side-details {
    display: grid;
    gap: 1rem;
    padding-top: 1.25rem;
}

.contact-side-detail {
    display: grid;
    gap: 0.25rem;
    color: var(--foreground);
    font-size: 0.9375rem;
    line-height: 1.45;
}

.contact-details {
    display: grid;
    gap: 1.5rem;
    max-width: none;
    padding-top: 2rem;
}

.contact-detail {
    display: grid;
    gap: 0.55rem;
}

.contact-detail__value {
    font-size: 1rem;
    line-height: 1.45;
}

.contact-cta {
    display: grid;
    gap: 4rem;
    margin-top: 8rem;
    border-top: 1px solid var(--border);
    padding-top: 4rem;
}

.contact-cta__copy {
    display: grid;
    gap: 1.5rem;
}

.contact-cta__title {
    font-size: 1.5rem;
    font-weight: 500;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    background: var(--foreground);
    color: var(--background);
    padding: 1.5rem 3rem;
    font-size: 1.125rem;
    font-weight: 500;
    transition: background 180ms ease;
}

    .contact-button:hover {
        background: rgba(10, 10, 10, 0.9);
    }

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.45;
    }
}

@media (min-width: 768px) {
    .site-container {
        padding-right: var(--page-padding-wide);
        padding-left: var(--page-padding-wide);
    }

    .language-switcher {
        display: flex;
    }

    .section-heading {
        font-size: 4rem;
    }

    .section-heading--xl {
        font-size: 6rem;
    }

    .two-column,
    .timeline-item__grid,
    .contact-cta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column--paired {
        column-gap: 4rem;
        row-gap: 1.5rem;
        align-items: start;
    }

        .two-column--paired .content-block,
        .two-column--paired .body-copy {
            display: contents;
        }

            .two-column--paired .content-block:first-child .meta-label,
            .two-column--paired .content-block:first-child .body-copy p {
                grid-column: 1;
            }

            .two-column--paired .content-block:last-child .meta-label,
            .two-column--paired .content-block:last-child .body-copy p {
                grid-column: 2;
            }

        .two-column--paired .meta-label {
            grid-row: 1;
        }

        .two-column--paired .body-copy p:first-child {
            grid-row: 2;
        }

        .two-column--paired .body-copy p:nth-child(2) {
            grid-row: 3;
        }

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

    .about-opener {
        grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem);
        gap: clamp(2rem, 4vw, 3.5rem);
    }

    .profile-photo--opener {
        justify-self: end;
        width: min(100%, 18rem);
    }

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

    .timeline-time {
        grid-column: span 3;
    }

    .timeline-content {
        grid-column: span 9;
    }

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

    .skill-group__head {
        grid-template-columns: 7rem minmax(0, 1fr);
        align-items: start;
    }

    .skill-list__item {
        grid-template-columns: minmax(9rem, 0.34fr) minmax(0, 1fr);
        gap: 2rem;
    }

    .project-card__grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        padding: 3rem;
    }

    .project-number-cell {
        grid-column: span 2;
    }

    .project-content {
        grid-column: span 7;
    }

    .project-action {
        grid-column: span 3;
        display: flex;
        justify-content: flex-end;
        align-items: flex-start;
    }

    .work-explorer {
        grid-template-columns: minmax(13rem, 0.38fr) minmax(0, 1fr);
        gap: 3rem;
    }

    .object-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: baseline;
        gap: 2rem;
    }

    .engineering-case-card__summary {
        grid-template-columns: minmax(0, 1fr) minmax(11rem, 0.34fr) minmax(11rem, 0.34fr);
    }

    .engineering-case-list--direct {
        padding-left: 5.5rem;
    }

    .engineering-case-hero {
        grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
    }

    .engineering-case-hero__copy {
        min-height: 22rem;
    }

    .software-project-entry {
        grid-template-columns: minmax(8rem, 0.28fr) minmax(0, 1fr);
        gap: 2rem;
    }

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

@media (min-width: 1024px) {
    .site-nav {
        display: flex;
    }

    .home-page {
        height: calc(100vh - var(--header-height));
        overflow: hidden;
    }

    .contact-home-page {
        height: calc(100vh - var(--header-height));
        overflow: hidden;
    }

    .home-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 4rem;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .contact-home-grid {
        grid-template-columns: minmax(0, 7fr) minmax(22rem, 5fr);
        align-items: center;
        gap: 4rem;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .home-copy {
        grid-column: span 7;
        gap: 3rem;
    }

    .contact-home-copy {
        grid-column: 1;
        grid-row: 1;
        gap: 3rem;
    }

    .home-side {
        grid-column: span 5;
    }

    .contact-home-side {
        grid-column: 2;
        grid-row: 1;
    }

    .hero-title__line {
        font-size: 4rem;
    }

    .page {
        padding-top: 6.5rem;
        padding-bottom: 7rem;
    }

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

    .page-aside {
        grid-column: span 4;
    }

    .page-aside--wide,
    .contact-intro {
        grid-column: span 5;
    }

    .page-content {
        grid-column: span 8;
    }

    .page-content--narrow,
    .contact-content {
        grid-column: span 7;
    }

    .sticky-intro {
        position: sticky;
        top: calc(var(--header-height) + 6.5rem);
    }

    .page-sticky-aside {
        position: sticky;
        top: calc(var(--header-height) + 6.5rem);
        align-self: start;
        height: 0;
        overflow: visible;
    }

        .page-sticky-aside .sticky-intro {
            position: static;
            top: auto;
        }

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

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

    .works-title {
        grid-column: span 5;
    }

    .works-copy {
        grid-column: span 7;
        align-self: end;
    }

    .skills-title {
        grid-column: span 6;
    }

    .skills-copy {
        grid-column: span 6;
    }

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

@media (max-width: 900px) {
    .contact-home-page {
        height: auto;
        min-height: calc(100vh - var(--header-height));
        overflow: visible;
    }

    .contact-home-grid {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 3rem;
    }

    .contact-home-copy,
    .contact-home-side {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    :root {
        --page-padding: 1.5rem;
    }

    .brand__name {
        font-size: 0.6875rem;
    }

    .hero-title__line {
        font-size: 2.85rem;
    }

    .section-heading,
    .section-heading--xl {
        font-size: 2.85rem;
    }

    .large-statement {
        font-size: 1.55rem;
    }

    .detail-row {
        gap: 1rem;
    }

    .dark-panel,
    .github-panel {
        padding: 2rem;
    }

    .project-card__grid {
        padding: 2rem 0;
    }

    .diagram-modal {
        padding: 1rem;
    }

    .diagram-modal__panel {
        max-width: 94vw;
        max-height: 84vh;
    }

    .diagram-modal__frame {
        max-width: 94vw;
        max-height: 84vh;
        padding: 0.5rem;
    }

    .diagram-modal__viewport,
    .diagram-modal__viewport img {
        max-width: calc(94vw - 1rem);
        max-height: calc(84vh - 1rem);
    }

    .diagram-modal__close {
        top: 0.5rem;
        right: 0.5rem;
    }

    .diagram-modal__nav {
        width: 2.75rem;
        height: 2.75rem;
    }

        .diagram-modal__nav::before,
        .diagram-modal__nav .diagram-modal__nav-symbol {
            opacity: 1;
        }

    .diagram-modal__nav--prev {
        left: 0.75rem;
    }

    .diagram-modal__nav--next {
        right: 0.75rem;
    }
}

.contact-page-as-home {
    display: block;
    min-height: auto;
}

.contact-page-grid {
    flex: initial;
    align-items: start;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.contact-page-copy {
    display: grid;
    gap: 3rem;
}

.contact-page-side {
    align-self: start;
}

@media (min-width: 1024px) {
    .contact-page-as-home {
        height: auto;
        min-height: calc(100vh - var(--header-height));
        overflow: visible;
    }

    .contact-page-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 4rem;
        padding-top: 8rem;
        padding-bottom: 8rem;
    }

    .contact-page-copy {
        grid-column: span 5;
    }

    .contact-page-side {
        grid-column: span 7;
    }
}

@media (max-width: 900px) {
    .contact-page-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 3rem;
    }

    .contact-page-copy,
    .contact-page-side {
        grid-column: 1;
        grid-row: auto;
    }
}

/* === Mobile overflow safety patch ===
   Fixes horizontal scrolling on phones/tablets.
   Desktop styles are not affected. */
@media (max-width: 900px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

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

    .site-container,
    .site-main,
    .site-header,
    .site-header__bar,
    .site-header__inner,
    .page,
    .home-page,
    .contact-home-page,
    .page-grid,
    .home-grid,
    .contact-home-grid,
    .page-aside,
    .page-aside--wide,
    .page-content,
    .page-content--narrow,
    .contact-intro,
    .contact-content,
    .contact-home-copy,
    .contact-home-side,
    .works-main,
    .work-browser,
    .work-explorer,
    .work-topic-content,
    .work-topic-panel,
    .software-project-sections,
    .software-project-section,
    .software-project-section__head,
    .software-project-section__panel,
    .software-project-section__panel-inner,
    .software-project-entry,
    .software-project-entry__body,
    .software-project-entry__meta,
    .engineering-case-list,
    .engineering-case-card,
    .engineering-case-card__panel-inner,
    .engineering-case-hero,
    .engineering-case-hero__copy,
    .project-card,
    .project-card__grid,
    .project-content,
    .two-column,
    .content-block,
    .body-copy,
    .skill-grid,
    .skill-list,
    .skill-list__item,
    .timeline,
    .timeline-item,
    .timeline-item__grid,
    .timeline-content,
    .contact-details,
    .contact-list,
    .github-panel,
    .dark-panel {
        min-width: 0;
        max-width: 100%;
    }

    img,
    svg,
    video,
    canvas,
    iframe {
        max-width: 100%;
        height: auto;
    }

    .button-row,
    .tag-list,
    .prototype-switcher,
    .work-tab-list,
    .architecture-flow__items,
    .home-footer__inner,
    .home-footer__meta {
        max-width: 100%;
    }

    .hero-title__line,
    .section-heading,
    .section-heading--xl,
    .large-statement,
    .lead,
    .muted-copy,
    .aside-lead,
    .intro-block p,
    .body-copy p,
    .quote-block__text,
    .project-title,
    .project-description,
    .software-section-copy strong,
    .software-section-copy small,
    .software-project-entry__body h4,
    .software-project-entry__body > p,
    .work-topic-panel h3,
    .work-topic-panel p,
    .work-browser__title,
    .work-browser__head p,
    .timeline-title,
    .timeline-points li,
    .skill-title,
    .skill-summary,
    .skill-list__text,
    .contact-value,
    .contact-detail__value {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .software-project-section__head,
    .work-accordion__item summary,
    .software-detail-row,
    .detail-row,
    .object-row,
    .work-topic-button {
        min-width: 0;
    }
}

/* === Documents page cards === */
.document-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    align-items: stretch;
}

.document-card {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 0.75rem;
    height: 100%;
    text-align: center;
}

.document-card__title {
    display: flex;
    min-height: 2.6rem;
    align-items: end;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.document-card__preview {
    display: flex;
    width: 100%;
    aspect-ratio: 3 / 4;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.025);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    cursor: zoom-in;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

    .document-card__preview:hover {
        transform: translateY(-2px);
        border-color: rgba(37, 99, 235, 0.45);
    }

.document-card__file {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.document-card__hint {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.55;
}

.document-card__download {
    justify-self: center;
    width: fit-content;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.document-preview-modal {
    display: grid;
    gap: 1rem;
    width: min(78vw, 36rem);
}

.document-preview-large {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.5rem;
    width: 100%;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.025);
}

.document-preview-modal__title {
    display: block;
    text-align: center;
    font-size: 1rem;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .document-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .document-card__title {
        min-height: auto;
    }
}

/* Documents page: real preview images */
.document-card__preview {
    padding: 0;
}

    .document-card__preview img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.document-preview-modal {
    display: grid;
    gap: 1rem;
    width: min(82vw, 42rem);
}

.document-preview-modal__image {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #f8f8f8;
}

.document-preview-modal__title {
    display: block;
    text-align: center;
    font-size: 1rem;
    line-height: 1.4;
}

/* === Mobile fit patch: no horizontal scroll, no cropped text === */
@media (max-width: 700px) {
    :root {
        --page-padding: 1.25rem;
    }

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .site-container {
        width: 100%;
        max-width: 100%;
        padding-left: var(--page-padding);
        padding-right: var(--page-padding);
    }

    .home-grid,
    .page-grid,
    .contact-home-grid,
    .contact-page-grid,
    .works-header,
    .skills-header {
        width: 100%;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .home-copy,
    .home-side,
    .page-aside,
    .page-aside--wide,
    .page-content,
    .page-content--narrow,
    .contact-home-copy,
    .contact-home-side,
    .contact-page-copy,
    .contact-page-side,
    .works-title,
    .works-copy,
    .skills-title,
    .skills-copy {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        grid-column: auto;
    }

    .hero-title,
    .hero-copy,
    .intro-block,
    .detail-list,
    .button-row,
    .dark-panel,
    .github-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .hero-title__line {
        display: block;
        width: 100%;
        max-width: 100%;
        font-size: clamp(2.25rem, 10vw, 2.85rem);
        line-height: 1.05;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        hyphens: auto;
    }

    .intro-block p,
    .aside-lead,
    .body-copy p,
    .muted-copy,
    .lead {
        width: 100%;
        max-width: 100%;
        font-size: 1.05rem;
        line-height: 1.65;
        overflow-wrap: break-word;
    }

    .detail-row {
        grid-template-columns: minmax(6.5rem, 0.36fr) minmax(0, 1fr);
        gap: 1rem;
        width: 100%;
        max-width: 100%;
    }

    .detail-value {
        min-width: 0;
        overflow-wrap: break-word;
    }

    .button-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .button-link {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .dark-panel {
        overflow: hidden;
        padding: 2rem 1.5rem;
    }

    .large-statement {
        width: 100%;
        max-width: 100%;
        font-size: clamp(1.85rem, 7.8vw, 2.45rem);
        line-height: 1.18;
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: auto;
    }

    .section-heading,
    .section-heading--xl,
    .work-browser__title,
    .work-topic-panel h3,
    .software-section-copy strong,
    .software-project-entry__body h4 {
        width: 100%;
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: auto;
    }
}

@media (max-width: 390px) {
    :root {
        --page-padding: 1rem;
    }

    .hero-title__line {
        font-size: clamp(2rem, 9.4vw, 2.45rem);
    }

    .large-statement {
        font-size: clamp(1.65rem, 7.2vw, 2.1rem);
    }

    .intro-block p,
    .aside-lead,
    .body-copy p,
    .muted-copy,
    .lead {
        font-size: 1rem;
    }
}

/* === Mobile fix for black statement panel === */
@media (max-width: 700px) {
    .dark-panel .large-statement {
        font-size: clamp(1.55rem, 6.6vw, 2rem);
        line-height: 1.22;
        letter-spacing: 0.01em;
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }
}

@media (max-width: 390px) {
    .dark-panel .large-statement {
        font-size: clamp(1.45rem, 6.2vw, 1.85rem);
    }
}

/* === Mobile fix for About dark panel === */
@media (max-width: 700px) {
    .dark-panel {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.75rem 1.25rem !important;
        overflow: hidden !important;
    }

    .dark-panel__copy {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        font-size: 1.35rem !important;
        line-height: 1.25 !important;
        letter-spacing: 0 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }

    .panel-label {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
    }
}

@media (max-width: 390px) {
    .dark-panel__copy {
        font-size: 1.25rem !important;
    }
}

/* === Header navigation: home link + mobile menu === */
.mobile-menu {
    display: block;
}

.mobile-menu__toggle {
    list-style: none;
    cursor: pointer;
    color: var(--foreground);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

    .mobile-menu__toggle::-webkit-details-marker {
        display: none;
    }

.mobile-menu__panel {
    position: absolute;
    top: 100%;
    right: var(--page-padding);
    left: var(--page-padding);
    z-index: 80;
    display: grid;
    gap: 1.5rem;
    border: 1px solid var(--border);
    background: rgba(252, 252, 251, 0.98);
    backdrop-filter: blur(8px);
    padding: 1.25rem;
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.08);
}

.mobile-menu__nav {
    display: grid;
    gap: 0;
}

.mobile-menu__link {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 0.95rem 0;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

    .mobile-menu__link:hover,
    .mobile-menu__link.site-nav__link--active {
        color: var(--foreground);
    }

.mobile-menu__languages {
    display: flex;
    gap: 1rem;
    padding-top: 0.25rem;
}

.mobile-menu__language {
    color: rgba(107, 107, 107, 0.6);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

    .mobile-menu__language:hover,
    .mobile-menu__language--active {
        color: var(--foreground);
    }

.site-header__inner {
    position: relative;
}

@media (max-width: 1023px) {
    .site-header .site-nav,
    .site-header .language-switcher {
        display: none;
    }
}

@media (min-width: 1024px) {
    .mobile-menu {
        display: none;
    }

    .site-nav {
        gap: 2rem;
    }
}

@media (max-width: 390px) {
    .mobile-menu__panel {
        right: 1rem;
        left: 1rem;
        padding: 1rem;
    }

    .mobile-menu__link {
        font-size: 0.82rem;
    }
}

/* === Mobile fix for long German home title === */
@media (max-width: 700px) {
    .home-page .hero-title__line.text-primary {
        font-size: clamp(1.85rem, 7.8vw, 2.25rem) !important;
        line-height: 1.08 !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        hyphens: none !important;
    }
}

@media (max-width: 390px) {
    .home-page .hero-title__line.text-primary {
        font-size: clamp(1.7rem, 7.2vw, 2rem) !important;
    }
}

/* === Skills page diagram image === */
.career-axis-mini--image {
    width: min(100%, 20rem);
}

.career-axis-mini__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.35rem;
}

/* === Works page diagram/photo modal fix === */
.diagram-modal[data-diagram-modal] {
    padding: 0.75rem !important;
    overflow: hidden !important;
}

.diagram-modal[data-diagram-modal] .diagram-modal__panel {
    width: auto !important;
    max-width: 98vw !important;
    max-height: 96vh !important;
    overflow: visible !important;
    box-shadow: 0 1.25rem 3.5rem rgba(15, 23, 42, 0.18) !important;
}

.diagram-modal[data-diagram-modal] .diagram-modal__frame {
    display: grid !important;
    place-items: center !important;
    width: auto !important;
    max-width: 98vw !important;
    max-height: 96vh !important;
    padding: 0.5rem !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

.diagram-modal[data-diagram-modal] .diagram-modal__viewport {
    display: grid !important;
    place-items: center !important;
    width: auto !important;
    max-width: calc(98vw - 1rem) !important;
    max-height: calc(96vh - 1rem) !important;
    overflow: hidden !important;
}

.diagram-modal[data-diagram-modal] .diagram-modal__viewport > img {
    display: block !important;
    width: min(1200px, calc(98vw - 1rem)) !important;
    height: auto !important;
    max-width: calc(98vw - 1rem) !important;
    max-height: calc(96vh - 1rem) !important;
    object-fit: contain !important;
    border: 1px solid rgba(10, 10, 10, 0.08) !important;
    background: #f8fafc !important;
}

.diagram-modal[data-diagram-modal] .diagram-modal__close {
    position: fixed !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    z-index: 250 !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.18) !important;
}

@media (max-width: 700px) {
    .diagram-modal[data-diagram-modal] {
        padding: 0.5rem !important;
    }

    .diagram-modal[data-diagram-modal] .diagram-modal__frame {
        padding: 0.35rem !important;
    }

    .diagram-modal[data-diagram-modal] .diagram-modal__viewport,
    .diagram-modal[data-diagram-modal] .diagram-modal__viewport > img {
        max-width: calc(100vw - 0.7rem) !important;
        max-height: calc(94vh - 0.7rem) !important;
    }

    .diagram-modal[data-diagram-modal] .diagram-modal__viewport > img {
        width: calc(100vw - 0.7rem) !important;
    }

    .diagram-modal[data-diagram-modal] .diagram-modal__close {
        top: 0.5rem !important;
        right: 0.5rem !important;
        width: 2.35rem !important;
        height: 2.35rem !important;
    }
}

/* === Skills page diagram modal: fit image inside screen === */
.skills-diagram-modal {
    padding: 0.75rem !important;
    overflow: hidden !important;
}

.skills-diagram-modal .skills-diagram-modal__panel {
    width: auto !important;
    max-width: 96vw !important;
    max-height: 96vh !important;
    overflow: visible !important;
    box-shadow: 0 1.25rem 3.5rem rgba(15, 23, 42, 0.18) !important;
}

.skills-diagram-modal .skills-diagram-modal__frame {
    display: grid !important;
    place-items: center !important;
    width: auto !important;
    max-width: 96vw !important;
    max-height: 96vh !important;
    padding: 0.5rem !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

.skills-diagram-modal__image {
    display: block !important;
    width: auto !important;
    height: min(92vh, 1100px) !important;
    max-width: calc(96vw - 1rem) !important;
    max-height: calc(96vh - 1rem) !important;
    object-fit: contain !important;
}

.skills-diagram-modal .skills-diagram-modal__close {
    position: fixed !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    z-index: 250 !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.18) !important;
}

@media (max-width: 700px) {
    .skills-diagram-modal {
        padding: 0.5rem !important;
    }

    .skills-diagram-modal .skills-diagram-modal__frame {
        padding: 0.35rem !important;
    }

    .skills-diagram-modal__image {
        height: auto !important;
        max-width: calc(100vw - 0.7rem) !important;
        max-height: calc(94vh - 0.7rem) !important;
    }

    .skills-diagram-modal .skills-diagram-modal__close {
        top: 0.5rem !important;
        right: 0.5rem !important;
        width: 2.35rem !important;
        height: 2.35rem !important;
    }
}

/* === About opener statement visual balance === */
.about-opener .large-statement {
    max-width: 44rem;
    font-size: clamp(1.45rem, 1.55vw, 1.75rem);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
}

@media (max-width: 700px) {
    .about-opener .large-statement {
        font-size: clamp(1.4rem, 6vw, 1.7rem);
        line-height: 1.3;
    }
}

/* === Skills diagram button state === */
.career-axis-mini--button {
    display: block;
    width: min(100%, 20rem);
    border: 0;
    background: transparent;
    padding: 0;
    cursor: zoom-in;
    text-align: left;
}

.career-axis-mini--button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 0.35rem;
}

.career-axis-mini--button:hover .career-axis-mini__image {
    transform: translateY(-1px);
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.10);
}

.career-axis-mini__image {
    transition: transform 180ms ease, box-shadow 180ms ease;
}
