/* Self-hosted latin subsets. Fetching these from fonts.googleapis.com
   render-blocked first paint on a cross-origin connection, and forced the
   page CSP to carry exceptions for two extra hosts. */
@font-face {
    font-family: "Bebas Neue";
    src: url("fonts/bebas-neue-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
        U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Space Mono";
    src: url("fonts/space-mono-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
        U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Space Mono";
    src: url("fonts/space-mono-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
        U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Syne";
    src: url("fonts/syne-400-800.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
        U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;
    --ink: #11110f;
    --ink-soft: #494740;
    --paper: #f3efe7;
    --paper-deep: #e6dfd3;
    --surface: #fffdf8;
    --gold: #966f1f;
    --gold-dark: #6f5013;
    --line: rgba(17, 17, 15, 0.16);
    --success: #236847;
    --danger: #9f2f24;
    --shadow: 0 24px 70px rgba(31, 26, 18, 0.09);
    --radius: 18px;
    --container: 1180px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 104px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 12% 4%, rgba(150, 111, 31, 0.08), transparent 28rem),
        linear-gradient(115deg, transparent 0 58%, rgba(255, 255, 255, 0.38) 58% 100%);
    content: "";
    pointer-events: none;
}

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

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* The bright gold reaches only 2:1 against paper, short of the 3:1 that a
   focus indicator needs. The darker gold clears it on light ground, and the
   bright one is kept for the dark bands where it is the readable choice. */
:focus-visible {
    outline: 3px solid var(--gold-dark);
    outline-offset: 4px;
}

.section-dark :focus-visible,
.trust-strip :focus-visible,
.site-footer :focus-visible,
.project-card :focus-visible {
    outline-color: var(--gold);
}

:target {
    scroll-margin-top: 104px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 16px;
    transform: translateY(-160%);
    background: var(--ink);
    color: var(--surface);
    font-weight: 800;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(243, 239, 231, 0.94);
    backdrop-filter: blur(18px);
}

.site-nav {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-decoration: none;
}

.brand img {
    width: auto;
    height: 46px;
}

.brand small {
    display: block;
    margin-top: 3px;
    color: var(--ink-soft);
    font-size: 0.69rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-size: 1.45rem;
}

.nav-menu {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-menu a {
    display: inline-flex;
    min-height: 44px;
    padding: 9px 11px;
    align-items: center;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 750;
    text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
    background: var(--paper-deep);
    color: var(--ink);
}

.nav-menu .nav-cta {
    padding-inline: 18px;
    background: var(--ink);
    color: var(--surface);
}

.nav-menu .nav-cta:hover,
.nav-menu .nav-cta[aria-current="page"] {
    background: var(--gold-dark);
    color: white;
}

.hero {
    display: grid;
    min-height: calc(100vh - 78px);
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
    align-items: stretch;
}

.hero-copy {
    display: flex;
    padding: clamp(70px, 10vw, 140px) clamp(24px, 7vw, 100px);
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--gold-dark);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    letter-spacing: -0.045em;
    line-height: 1.06;
}

.hero h1,
.page-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(3rem, 7.2vw, 7.3rem);
}

.hero .lead {
    max-width: 720px;
    margin: 28px 0 0;
    color: var(--ink-soft);
    font-size: clamp(1.08rem, 1.8vw, 1.35rem);
}

.hero-actions,
.button-row {
    display: flex;
    margin-top: 34px;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    padding: 11px 19px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--ink);
    color: white;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        transform 160ms ease,
        background 160ms ease;
}

.button:hover {
    transform: translateY(-2px);
    background: var(--gold-dark);
}

.button-secondary {
    background: transparent;
    color: var(--ink);
}

.button-secondary:hover {
    background: var(--paper-deep);
}

.hero-side {
    display: grid;
    min-height: 600px;
    padding: clamp(28px, 4vw, 60px);
    background: var(--ink);
    color: var(--surface);
    grid-template-rows: minmax(0, 1fr) auto;
}

.portrait-frame {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #2c2a25;
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}

.status-panel {
    display: grid;
    padding-top: 26px;
    gap: 14px;
}

.status-line {
    display: flex;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
}

.status-line span:first-child {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.status-line strong {
    text-align: right;
}

.trust-strip {
    border-block: 1px solid var(--line);
    background: var(--surface);
}

.trust-list {
    display: grid;
    margin: 0;
    padding: 23px 0;
    grid-template-columns: repeat(4, 1fr);
    list-style: none;
}

.trust-list li {
    padding: 4px 24px;
    border-right: 1px solid var(--line);
    text-align: center;
    font-size: 0.83rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trust-list li:last-child {
    border-right: 0;
}

.section {
    padding: clamp(72px, 9vw, 120px) 0;
}

.section-compact {
    padding: clamp(52px, 7vw, 86px) 0;
}

.section-dark {
    background: var(--ink);
    color: var(--surface);
}

.section-muted {
    border-block: 1px solid var(--line);
    background: rgba(230, 223, 211, 0.6);
}

.section-header {
    display: grid;
    margin-bottom: 42px;
    grid-template-columns: minmax(0, 0.75fr) minmax(280px, 0.45fr);
    align-items: end;
    gap: 36px;
}

.section-header h2,
.content-heading {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.7rem);
}

.section-header p,
.section-intro {
    margin: 0;
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.section-dark .section-header p,
.section-dark .section-intro {
    color: rgba(255, 255, 255, 0.7);
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 20px;
}

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

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

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

.card,
.capability-card,
.project-card,
.credential-card,
.process-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 12px 34px rgba(31, 26, 18, 0.045);
}

.section-dark .eyebrow {
    color: #e1c47d;
}

.section-dark .button {
    border-color: white;
    background: white;
    color: var(--ink);
}

.section-dark .button:hover {
    border-color: #e1c47d;
    background: #e1c47d;
}

.card,
.process-card {
    padding: clamp(24px, 3.5vw, 38px);
}

.card h3,
.process-card h3 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.card p,
.process-card p {
    margin: 0;
    color: var(--ink-soft);
}

.metric {
    display: block;
    margin-bottom: 10px;
    color: var(--gold-dark);
    font-size: 2.3rem;
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 1;
}

.capability-card {
    display: flex;
    min-height: 360px;
    padding: clamp(26px, 3vw, 38px);
    flex-direction: column;
}

.capability-number,
.project-type,
.timeline-date {
    color: var(--gold-dark);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.capability-card h3 {
    margin: 55px 0 15px;
    font-size: clamp(1.55rem, 2.2vw, 2.1rem);
}

.capability-card p {
    margin: 0 0 20px;
    color: var(--ink-soft);
}

.text-link {
    display: inline-flex;
    min-height: 44px;
    margin-top: auto;
    align-items: center;
    gap: 7px;
    color: var(--gold-dark);
    font-weight: 850;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.text-link::after {
    content: "\2192";
}

.project-card {
    display: flex;
    min-height: 360px;
    overflow: hidden;
    flex-direction: column;
}

.project-band {
    min-height: 112px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(150, 111, 31, 0.22), transparent 60%), var(--ink);
    color: white;
}

.project-band .project-type {
    color: #e1c47d;
}

.project-body {
    display: flex;
    padding: 26px;
    flex: 1;
    flex-direction: column;
}

.project-body h3 {
    margin: 0 0 13px;
    font-size: 1.45rem;
}

.project-body p {
    margin: 0 0 22px;
    color: var(--ink-soft);
}

.tag-list {
    display: flex;
    margin: 0 0 24px;
    padding: 0;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
}

.tag-list li {
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 750;
}

.project-links {
    display: flex;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 16px;
}

.project-links a {
    color: var(--gold-dark);
    font-weight: 850;
    text-underline-offset: 5px;
}

.experience-preview {
    display: grid;
    grid-template-columns: minmax(250px, 0.55fr) minmax(0, 1fr);
    gap: clamp(32px, 7vw, 96px);
}

.experience-preview h2 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 5rem);
}

.role-summary {
    padding: 28px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.role-summary:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.role-summary h3 {
    margin: 7px 0 9px;
    font-size: 1.35rem;
}

.role-summary p {
    margin: 0;
    color: rgba(255, 255, 255, 0.67);
}

.credential-card {
    display: grid;
    padding: clamp(28px, 5vw, 52px);
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
}

.credential-card h2,
.credential-card h3 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 3.3vw, 3rem);
}

.credential-card p {
    max-width: 790px;
    margin: 0;
    color: var(--ink-soft);
}

.page-hero {
    padding: clamp(72px, 11vw, 150px) 0 clamp(58px, 8vw, 100px);
    border-bottom: 1px solid var(--line);
}

.page-hero .lead {
    max-width: 820px;
    margin: 26px 0 0;
    color: var(--ink-soft);
    font-size: clamp(1.08rem, 1.8vw, 1.32rem);
}

.breadcrumb {
    display: flex;
    margin: 0 0 30px;
    padding: 0;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 750;
    list-style: none;
}

.breadcrumb li:not(:last-child)::after {
    margin-left: 8px;
    content: "/";
    color: var(--gold);
}

.breadcrumb a {
    text-underline-offset: 4px;
}

.profile-grid,
.service-intro,
.contact-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(36px, 8vw, 100px);
    align-items: start;
}

.profile-media {
    position: sticky;
    top: 108px;
}

.profile-media img {
    width: 100%;
    max-height: 670px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    object-fit: cover;
    object-position: center 20%;
}

.prose {
    max-width: 780px;
}

.prose h2 {
    margin: 0 0 24px;
    font-size: clamp(2rem, 4.2vw, 3.9rem);
}

.prose h3 {
    margin: 40px 0 12px;
    font-size: 1.4rem;
}

.prose p {
    margin: 0 0 20px;
    color: var(--ink-soft);
    font-size: 1.06rem;
}

.prose strong {
    color: var(--ink);
}

.plain-list,
.check-list,
.detail-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.plain-list li,
.check-list li,
.detail-list li {
    position: relative;
    padding: 11px 0 11px 28px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
}

.plain-list li::before,
.check-list li::before,
.detail-list li::before {
    position: absolute;
    top: 11px;
    left: 0;
    color: var(--gold-dark);
    content: "\2713";
    font-weight: 900;
}

.timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline::before {
    position: absolute;
    top: 8px;
    bottom: 0;
    left: 10px;
    width: 1px;
    background: var(--line);
    content: "";
}

.timeline-item {
    position: relative;
    padding: 0 0 64px 54px;
}

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

.timeline-item::before {
    position: absolute;
    top: 6px;
    left: 4px;
    width: 13px;
    height: 13px;
    border: 3px solid var(--paper);
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 1px var(--gold);
    content: "";
}

.timeline-item h2 {
    margin: 5px 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.timeline-company {
    margin: 0 0 18px;
    color: var(--ink-soft);
    font-size: 1.03rem;
    font-weight: 750;
}

.timeline-item ul {
    margin: 0;
    padding-left: 20px;
}

.timeline-item li {
    margin-bottom: 10px;
    color: var(--ink-soft);
}

.service-nav {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.service-nav h2 {
    margin: 0 0 14px;
    font-size: 1.25rem;
}

.service-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-nav li + li {
    border-top: 1px solid var(--line);
}

.service-nav a {
    display: block;
    padding: 12px 0;
    color: var(--ink-soft);
    font-weight: 750;
    text-decoration: none;
}

.service-nav a:hover,
.service-nav a[aria-current="page"] {
    color: var(--gold-dark);
}

.process-grid {
    counter-reset: process;
}

.process-card {
    counter-increment: process;
}

.process-card::before {
    display: block;
    margin-bottom: 26px;
    color: var(--gold-dark);
    content: "0" counter(process);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.contact-card {
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.contact-card h2 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.contact-card > p {
    margin: 0 0 26px;
    color: var(--ink-soft);
}

.channel-list {
    margin: 25px 0 36px;
    padding: 0;
    list-style: none;
}

.channel-list a {
    display: flex;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-weight: 800;
    text-decoration: none;
}

.channel-list span {
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 650;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.85rem;
    font-weight: 850;
}

.field input,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: var(--ink);
}

.field textarea {
    min-height: 160px;
    resize: vertical;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
    border-color: var(--danger);
}

.field-error {
    display: block;
    min-height: 1.2em;
    margin-top: 5px;
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 700;
}

.consent {
    display: grid;
    margin: 2px 0 20px;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.consent input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
}

.form-honey {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
}

.form-status {
    min-height: 1.5em;
    margin: 14px 0 0;
    font-size: 0.88rem;
    font-weight: 750;
}

.form-status.is-success {
    color: var(--success);
}

.form-status.is-error {
    color: var(--danger);
}

.cta-panel {
    display: grid;
    padding: clamp(34px, 7vw, 78px);
    border-radius: var(--radius);
    background: var(--gold-dark);
    color: white;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
}

.cta-panel h2 {
    margin: 0;
    font-size: clamp(2rem, 4.7vw, 4.4rem);
}

.cta-panel p {
    max-width: 700px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.75);
}

.cta-panel .button {
    border-color: white;
    background: white;
    color: var(--ink);
}

.site-footer {
    padding: 54px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--ink);
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(200px, 0.8fr) repeat(2, minmax(140px, 0.4fr));
    gap: 42px;
}

.site-footer h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.site-footer p {
    max-width: 430px;
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li + li {
    margin-top: 8px;
}

.footer-links a {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    color: rgba(255, 255, 255, 0.72);
    text-underline-offset: 4px;
}

.footer-bottom {
    display: flex;
    margin-top: 46px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
}

.footer-bottom a {
    color: inherit;
}

.narrow {
    max-width: 820px;
}

.muted {
    color: var(--ink-soft);
}

.spacer-top {
    margin-top: 36px;
}

@media (max-width: 980px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        display: none;
        padding: 20px;
        border-bottom: 1px solid var(--line);
        background: var(--paper);
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 16px;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .hero-side {
        min-height: auto;
        grid-template-columns: minmax(260px, 0.8fr) minmax(260px, 1.2fr);
        grid-template-rows: auto;
        gap: 30px;
    }

    .portrait-frame {
        min-height: 430px;
    }

    .section-header,
    .experience-preview,
    .profile-grid,
    .service-intro,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .profile-media {
        position: static;
        max-width: 600px;
    }

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

    .service-nav {
        order: 2;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(calc(100% - 28px), var(--container));
    }

    .site-nav {
        min-height: 68px;
    }

    .brand img {
        width: 42px;
        height: 42px;
    }

    .brand small {
        display: none;
    }

    .hero-copy {
        padding: 66px 18px;
    }

    .hero-side {
        padding: 18px;
        grid-template-columns: 1fr;
    }

    .portrait-frame {
        min-height: 470px;
    }

    .trust-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-list li:nth-child(2) {
        border-right: 0;
    }

    .trust-list li:nth-child(-n + 2) {
        padding-bottom: 14px;
        border-bottom: 1px solid var(--line);
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .footer-grid,
    .credential-card,
    .cta-panel {
        grid-template-columns: 1fr;
    }

    .capability-card,
    .project-card {
        min-height: auto;
    }

    .capability-card h3 {
        margin-top: 34px;
    }

    .credential-card .button,
    .cta-panel .button {
        justify-self: start;
    }

    .timeline-item {
        padding-left: 42px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   ORIGINAL PORTFOLIO VISUAL SYSTEM
   Restores the editorial typography, palette, geometry, imagery, and motion
   of the original single-page portfolio across the new multi-page structure.
   -------------------------------------------------------------------------- */

:root {
    --ink: #0a0a0a;
    --ink-soft: #4c4740;
    --paper: #f0ece4;
    --paper-deep: #ded6ca;
    --surface: #fbfaf7;
    --gold: #d4a017;
    /* #8a6318 measured 4.56:1 on paper, clearing AA with nothing spare. This
       holds the same hue at 5.6:1, so the small mono labels have some room. */
    --gold-dark: #7d5a15;
    --bronze: #7d5a15;
    --rust: #c0392b;
    --fog: #b8b0a4;
    --line: rgba(10, 10, 10, 0.15);
    --shadow: 0 24px 70px rgba(10, 10, 10, 0.13);
    --radius: 0;
    --container: 1220px;
    --mono: "Space Mono", monospace;
    --display: "Bebas Neue", sans-serif;
    --body: "Syne", sans-serif;
}

html {
    background: var(--paper);
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    line-height: 1.65;
}

h1,
h2,
h3 {
    text-wrap: balance;
}

p,
li {
    text-wrap: pretty;
}

body::before {
    z-index: 9990;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
    opacity: 0.55;
}

::selection {
    background: var(--gold);
    color: var(--ink);
}

#cursor,
#cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

#cursor {
    z-index: 10002;
    width: 11px;
    height: 11px;
    background: var(--gold);
    mix-blend-mode: multiply;
    transition:
        width 180ms ease,
        height 180ms ease,
        background 180ms ease;
}

#cursor-ring {
    z-index: 10001;
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--ink);
    transition:
        width 220ms ease,
        height 220ms ease;
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
    cursor: none;
}

body.has-custom-cursor.cursor-ready #cursor,
body.has-custom-cursor.cursor-ready #cursor-ring {
    display: block;
}

body.cursor-active #cursor {
    width: 24px;
    height: 24px;
    background: var(--rust);
}

body.cursor-active #cursor-ring {
    width: 52px;
    height: 52px;
}

.container {
    width: min(calc(100% - clamp(32px, 10vw, 150px)), var(--container));
}

.site-header {
    border-bottom: 1px solid rgba(10, 10, 10, 0.16);
    background: rgba(240, 236, 228, 0.96);
    backdrop-filter: blur(16px);
}

.site-nav {
    min-height: 84px;
}

.brand {
    gap: 13px;
    font-family: var(--body);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand img {
    width: auto;
    height: 48px;
    border: 0;
    border-radius: 0;
    filter: none;
}

.brand small {
    color: var(--bronze);
    font-family: var(--mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.nav-menu {
    gap: 3px;
}

.nav-menu a {
    padding: 10px 12px;
    border-radius: 0;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
    background: transparent;
    box-shadow: inset 0 -2px 0 var(--gold);
}

.nav-menu .nav-cta,
.nav-menu .nav-cta:hover,
.nav-menu .nav-cta[aria-current="page"] {
    padding-inline: 20px;
    background: var(--ink);
    box-shadow: none;
    color: var(--paper);
}

.nav-menu .nav-cta:hover {
    background: var(--gold);
    color: var(--ink);
}

.nav-toggle {
    border: 1px solid var(--ink);
    border-radius: 0;
    font-family: var(--mono);
}

.hero {
    min-height: calc(100vh - 84px);
    background: var(--paper);
    grid-template-columns: minmax(0, 1.28fr) minmax(390px, 1fr);
}

.hero-copy {
    position: relative;
    padding: clamp(78px, 10vw, 146px) clamp(38px, 7.7vw, 118px);
    overflow: hidden;
}

.hero-copy::before {
    display: block;
    width: 78px;
    height: 7px;
    margin-bottom: 34px;
    background: linear-gradient(to right, var(--gold) 0 42%, var(--ink) 42% 100%);
    content: "";
}

.hero-copy::after {
    position: absolute;
    right: -86px;
    bottom: -120px;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(10, 10, 10, 0.14);
    border-radius: 50%;
    content: "";
}

.eyebrow {
    color: var(--bronze);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.17em;
}

.hero h1,
.page-hero h1 {
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: 0.005em;
    line-height: 0.91;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 850px;
    font-size: clamp(4rem, 7.2vw, 7.45rem);
}

.hero .lead {
    max-width: 690px;
    color: #332f2a;
    font-family: var(--body);
    font-size: clamp(1rem, 1.5vw, 1.17rem);
    font-weight: 600;
    line-height: 1.75;
}

.button {
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 0;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.button:hover {
    transform: translateY(-3px);
    background: var(--gold);
    color: var(--ink);
}

.button-secondary {
    background: transparent;
}

.hero-side {
    min-height: 660px;
    padding: clamp(28px, 4vw, 56px);
    background: linear-gradient(160deg, #efe9df 0%, #d8cdbd 100%);
    color: var(--ink);
}

.portrait-frame {
    min-height: 470px;
    border: 1px solid rgba(10, 10, 10, 0.13);
    border-radius: 0;
    background: #d4cabb;
    box-shadow: 18px 18px 0 rgba(10, 10, 10, 0.07);
}

.portrait-frame img {
    filter: saturate(0.92) contrast(1.02);
}

.status-panel {
    display: grid;
    margin-top: 24px;
    padding: 20px 22px;
    border: 1px solid rgba(10, 10, 10, 0.12);
    background: rgba(255, 255, 255, 0.78);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}

.status-line {
    display: block;
    padding: 11px 14px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.status-line:nth-child(2n) {
    border-right: 0;
}

.status-line:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.status-line span:first-child {
    display: block;
    margin-bottom: 3px;
    color: var(--bronze);
    font-family: var(--mono);
    font-size: 0.56rem;
    letter-spacing: 0.08em;
}

.status-line strong {
    display: block;
    color: var(--ink);
    font-size: 0.84rem;
    text-align: left;
}

.trust-strip {
    border: 0;
    background: var(--ink);
    color: var(--paper);
}

.trust-list {
    padding: 22px 0;
}

.trust-list li {
    border-color: rgba(255, 255, 255, 0.17);
    color: #e2c66d;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
}

.section {
    padding: clamp(78px, 9vw, 124px) 0;
}

.section-muted {
    border: 0;
    background: #e3dcd1;
}

.section-dark {
    position: relative;
    overflow: hidden;
    background: var(--ink);
}

.section-dark::after {
    position: absolute;
    right: -80px;
    bottom: -100px;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(212, 160, 23, 0.28);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.section-header {
    margin-bottom: 50px;
    grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.42fr);
    /* Bottom-aligning the supporting copy to a display heading left a void
       above it that changed size with every heading, so the two columns never
       related the same way twice. Hanging both from the first line does. */
    align-items: start;
}

.section-header p,
.section-intro {
    /* Optically seats the copy against the heading's cap height rather than
       its line box, which sits noticeably higher at this display size. */
    padding-top: 0.55em;
}

.section-header h2,
.content-heading,
.experience-preview h2,
.credential-card h2,
.cta-panel h2,
.prose h2 {
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: 0.012em;
    line-height: 0.94;
    text-transform: uppercase;
}

.section-header h2,
.content-heading {
    font-size: clamp(3.3rem, 6vw, 6rem);
}

.section-header p,
.section-intro {
    color: #4b463f;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.8;
}

.card,
.capability-card,
.project-card,
.credential-card,
.process-card {
    border: 1px solid rgba(10, 10, 10, 0.12);
    border-radius: 0;
    background: #fbfaf7;
    box-shadow: none;
}

.card,
.process-card {
    position: relative;
    padding: 34px;
    overflow: hidden;
}

.card::before,
.process-card::after {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, var(--gold) 0 33%, var(--ink) 33% 100%);
    content: "";
}

.card h3,
.process-card h3 {
    font-family: var(--display);
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.card p,
.process-card p {
    color: #4d4841;
    font-size: 0.88rem;
}

.metric {
    color: var(--bronze);
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
}

.capability-card {
    display: flex;
    min-height: 0;
    padding: 0;
    flex-direction: column;
    overflow: hidden;
    transition:
        transform 220ms ease,
        box-shadow 220ms ease;
}

.capability-card:hover {
    transform: translateY(-8px);
    box-shadow: 14px 18px 0 rgba(10, 10, 10, 0.1);
}

.capability-visual {
    height: 235px;
    flex: none;
    margin: 0;
    overflow: hidden;
    background: var(--ink);
}

.capability-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.78) contrast(1.05);
    transition:
        transform 500ms ease,
        filter 300ms ease;
}

.capability-card:hover .capability-visual img {
    transform: scale(1.045);
    filter: saturate(1) contrast(1.03);
}

.capability-number {
    display: block;
    margin: 25px 30px 0;
    color: var(--bronze);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
}

.capability-card h3 {
    margin: 12px 30px 13px;
    font-family: var(--display);
    font-size: clamp(2rem, 3vw, 2.7rem);
    font-weight: 400;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.capability-card > p {
    margin: 0 30px 22px;
    color: #4c4740;
    font-size: 0.86rem;
    line-height: 1.7;
}

.capability-card > .detail-list {
    margin: 0 30px 22px;
}

/* Auto top margin pulls the link to the card floor so the row of cards
   lines up regardless of how many lines the heading and copy take. */
.capability-card > .text-link {
    margin: auto 30px 31px;
    align-self: start;
}

.text-link {
    color: var(--bronze);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-card {
    position: relative;
    min-height: 465px;
    overflow: hidden;
    border: 0;
    background: var(--ink);
}

.project-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.project-media::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 10, 10, 0.96) 0%,
        rgba(10, 10, 10, 0.7) 38%,
        rgba(10, 10, 10, 0.08) 85%
    );
    content: "";
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.76) contrast(1.08);
    transition:
        transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 300ms ease;
}

.project-card:hover .project-media img {
    transform: scale(1.065);
    filter: saturate(1) contrast(1.04);
}

.project-media .project-type {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    padding: 7px 10px;
    background: var(--gold);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.11em;
}

.project-body {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 465px;
    padding: 28px;
    justify-content: flex-end;
    flex-direction: column;
}

.project-body h3 {
    margin: 0 0 10px;
    color: var(--paper);
    font-family: var(--display);
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.015em;
    line-height: 0.95;
    text-transform: uppercase;
}

.project-body p {
    max-width: 560px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.82rem;
    line-height: 1.65;
}

.tag-list {
    margin-bottom: 17px;
}

.tag-list li {
    border-color: rgba(255, 255, 255, 0.35);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--mono);
    font-size: 0.56rem;
}

.project-links {
    margin-top: 0;
}

.project-links a {
    color: #e4bd49;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.experience-preview {
    grid-template-columns: minmax(290px, 0.58fr) minmax(0, 1fr);
}

.experience-preview h2 {
    font-size: clamp(3.6rem, 6vw, 6rem);
}

.role-summary h3 {
    font-family: var(--display);
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.timeline-date,
.project-type {
    color: #e2c66d;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.13em;
}

.credential-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(10, 10, 10, 0.16);
    background: #fbfaf7;
    box-shadow: 16px 16px 0 rgba(10, 10, 10, 0.07);
}

.credential-card::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 7px;
    background: var(--gold);
    content: "";
}

.credential-card h2,
.credential-card h3 {
    font-size: clamp(2.7rem, 5vw, 4.6rem);
}

.page-hero {
    position: relative;
    padding: clamp(64px, 7vw, 104px) 0 clamp(64px, 7vw, 104px);
    overflow: hidden;
    border: 0;
    background: var(--paper);
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(4.2rem, 8.3vw, 8.2rem);
}

.page-hero .lead {
    max-width: 740px;
    color: #433e37;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 600;
    line-height: 1.75;
}

.breadcrumb {
    color: #5c554b;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-media img {
    border: 0;
    border-radius: 0;
    box-shadow: 18px 18px 0 rgba(10, 10, 10, 0.11);
    filter: saturate(0.9) contrast(1.02);
}

.prose h2 {
    font-size: clamp(3.2rem, 6vw, 5.8rem);
}

.prose h3 {
    color: var(--ink);
    font-family: var(--display);
    font-size: 1.8rem;
    font-weight: 400;
    text-transform: uppercase;
}

.prose p {
    color: #49443d;
    font-size: 1rem;
    line-height: 1.85;
}

.plain-list li,
.check-list li,
.detail-list li {
    border-color: rgba(10, 10, 10, 0.12);
    color: #48433c;
    font-size: 0.87rem;
}

.plain-list li::before,
.check-list li::before,
.detail-list li::before {
    color: var(--bronze);
}

.timeline::before {
    background: rgba(10, 10, 10, 0.28);
}

.timeline-item::before {
    border-radius: 0;
    background: var(--gold);
    transform: rotate(45deg);
}

.timeline-item h2 {
    font-family: var(--display);
    font-size: clamp(2.6rem, 4vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.timeline-company {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.035em;
}

.timeline-item li {
    color: #4a453e;
    font-size: 0.91rem;
    line-height: 1.75;
}

.service-nav {
    border-radius: 0;
    background: var(--ink);
    color: var(--paper);
    box-shadow: 13px 13px 0 rgba(212, 160, 23, 0.45);
}

.service-nav h2 {
    color: var(--paper);
    font-family: var(--display);
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.service-nav li + li {
    border-color: rgba(255, 255, 255, 0.16);
}

.service-nav a {
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.service-nav a:hover,
.service-nav a[aria-current="page"] {
    color: #e1bb4d;
}

.process-card::before {
    color: var(--bronze);
    font-family: var(--mono);
    font-size: 0.68rem;
}

.contact-card {
    border-radius: 0;
    background: #fbfaf7;
    box-shadow: 16px 18px 0 rgba(10, 10, 10, 0.08);
}

.contact-card h2 {
    font-family: var(--display);
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.contact-card > p,
.field-error,
.consent,
.form-status {
    font-family: var(--mono);
}

.channel-list a {
    font-family: var(--body);
    transition:
        padding 180ms ease,
        border-color 180ms ease;
}

.channel-list a:hover {
    padding-left: 10px;
    border-color: var(--gold);
}

.channel-list span {
    font-family: var(--mono);
    font-size: 0.66rem;
}

.field label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.field input,
.field textarea {
    border-radius: 0;
    background: #f7f4ee;
    font-family: var(--body);
}

.field input:focus,
.field textarea:focus {
    border-color: var(--gold);
    background: white;
}

.cta-panel {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: var(--gold);
    color: var(--ink);
}

.cta-panel::after {
    position: absolute;
    top: -50%;
    right: -5%;
    width: 280px;
    height: 280px;
    border: 46px solid rgba(10, 10, 10, 0.12);
    border-radius: 50%;
    content: "";
}

.cta-panel > * {
    position: relative;
    z-index: 2;
}

.cta-panel h2 {
    font-size: clamp(3.2rem, 6vw, 5.8rem);
}

.cta-panel p {
    color: rgba(10, 10, 10, 0.72);
    font-weight: 700;
}

.cta-panel .button {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.site-footer {
    padding-top: 66px;
    background: var(--ink);
}

.site-footer h2 {
    color: var(--paper);
    font-family: var(--display);
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.site-footer p,
.footer-links a,
.footer-bottom {
    font-family: var(--mono);
    font-size: 0.68rem;
    line-height: 1.8;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 650ms ease,
        transform 650ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .nav-menu {
        border-bottom: 1px solid var(--ink);
        background: var(--paper);
    }

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

    .hero-side {
        grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1.2fr);
    }

    .section-header,
    .experience-preview,
    .profile-grid,
    .service-intro,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .service-nav {
        box-shadow: 8px 8px 0 rgba(212, 160, 23, 0.42);
    }
}

@media (max-width: 700px) {
    .container {
        width: min(calc(100% - 30px), var(--container));
    }

    .site-nav {
        min-height: 70px;
    }

    .hero-copy {
        padding: 70px 22px 76px;
    }

    .hero h1 {
        font-size: clamp(3.55rem, 17vw, 5.4rem);
    }

    .hero-side {
        padding: 20px;
        grid-template-columns: 1fr;
    }

    .portrait-frame {
        min-height: 510px;
        box-shadow: 10px 10px 0 rgba(10, 10, 10, 0.08);
    }

    .status-panel {
        margin-top: 14px;
        padding: 12px;
    }

    .trust-list li {
        font-size: 0.56rem;
    }

    .section-header h2,
    .content-heading,
    .experience-preview h2,
    .prose h2,
    .cta-panel h2 {
        font-size: clamp(3.15rem, 16vw, 4.8rem);
    }

    .page-hero {
        padding: 56px 0 64px;
    }

    .page-hero h1 {
        font-size: clamp(3.7rem, 18vw, 5.8rem);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .capability-visual {
        height: 240px;
    }

    .project-card,
    .project-body {
        min-height: 490px;
    }

    .credential-card {
        box-shadow: 9px 9px 0 rgba(10, 10, 10, 0.07);
    }

    .cta-panel {
        padding: 40px 28px;
    }
}

/* ==========================================================================
   Focus strip

   The strip used a fixed four-column grid with dividers pinned to specific
   child positions, so it broke as soon as the practice grew past four areas.
   A wrapping row with its own separators takes any number of entries and
   reflows at every width without per-item rules.
   ========================================================================== */

.trust-list {
    display: flex;
    padding: 20px 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 28px;
    grid-template-columns: none;
}

.trust-list li {
    display: flex;
    padding: 0;
    align-items: center;
    gap: 28px;
    border: 0;
    text-align: left;
}

.trust-list li:not(:last-child)::after {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    content: "";
    opacity: 0.85;
}

/* ==========================================================================
   Page hero system

   Every inner page opened on a single oversized headline stranded on an empty
   field, with a decorative diagonal floating off the right margin that touched
   nothing. Each hero now pairs the headline with a panel carrying that page's
   own subject matter, so the type has something to sit against on arrival and
   the geometry reads as one composition instead of a stuck-on ornament.
   ========================================================================== */

:root {
    /* G2-continuous corners. border-radius alone jumps from a straight edge
       straight into a circular arc; corner-shape ramps the curvature through
       the corner instead, which is what keeps a large radius from reading as
       a circle glued to a box. border-radius stays as the arc fallback. */
    --g2: 24px;
    --g2-sm: 13px;
}

.page-hero-media,
.page-hero-card,
.profile-media img {
    border-radius: var(--g2);
}

.capability-visual,
.project-card {
    border-radius: var(--g2-sm);
}

@supports (corner-shape: squircle) {
    .page-hero-media,
    .page-hero-card,
    .profile-media img {
        /* A squircle reads optically tighter than an arc of equal radius, so
           the radius grows to hold the same visual corner. */
        border-radius: calc(var(--g2) * 1.6);
        corner-shape: squircle;
    }

    .capability-visual,
    .project-card {
        border-radius: calc(var(--g2-sm) * 1.6);
        corner-shape: squircle;
    }
}

.page-hero-grid {
    display: grid;
    align-items: center;
    gap: clamp(34px, 5vw, 66px);
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
}

.page-hero-copy {
    min-width: 0;
}

.page-hero-grid .page-hero-copy h1 {
    max-width: 16ch;
    font-size: clamp(2.9rem, 4.5vw, 4.85rem);
}

/* Splitting the headline stops a long all-caps line reading as one
   undifferentiated block the eye has to climb. gold-dark rather than gold:
   the brighter token only clears 2:1 on paper, which fails even the
   large-text threshold. */
.page-hero h1 .accent,
.hero h1 .accent {
    color: var(--gold-dark);
}

.hero-rule {
    width: 88px;
    height: 6px;
    margin: 24px 0 0;
    border: 0;
    background: var(--gold);
}

.page-hero .lead {
    margin-top: 22px;
}

.page-hero .button-row {
    margin-top: 30px;
}

.button--gold {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--ink);
}

.button--gold:hover,
.button--gold:focus-visible {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

/* --- Panel: shared stage for whatever a page puts beside its headline --- */

.page-hero-panel {
    position: relative;
    min-width: 0;
}

/* The blade sits behind the photo and overhangs it on every side, so it reads
   as the ground the image rests on rather than a slab parked at the page edge.
   One element carries both colours: the gradient's hard stop puts gold under
   the top-left overhang and ink under the bottom-right one. */
.page-hero-panel::before {
    position: absolute;
    z-index: 0;
    top: -11%;
    right: -8%;
    bottom: -9%;
    left: -13%;
    background: linear-gradient(135deg, var(--gold) 0 57%, var(--ink) 57% 100%);
    clip-path: polygon(0 22%, 66% 0, 100% 34%, 100% 70%, 36% 100%, 0 76%);
    content: "";
}

/* A card panel is shorter than a 4:3 photo, so the same percentage overhang
   turns into a spike below it. Pull the blade in behind the card instead. */
.page-hero-panel:has(.page-hero-card)::before {
    top: -9%;
    bottom: -1%;
    clip-path: polygon(0 22%, 66% 0, 100% 34%, 100% 74%, 46% 96%, 0 76%);
}

.page-hero-media {
    position: relative;
    z-index: 1;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--ink);
    box-shadow: 0 26px 58px rgba(10, 10, 10, 0.24);
}

.page-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.82) contrast(1.04);
}

/* The portraits were shot against a cool studio grey, which reads as a cold
   rectangle dropped into a warm paper palette. A light warm grade pulls the
   backdrop into the page without pushing the skin tones. */
.portrait-frame img,
.profile-media img {
    filter: sepia(0.16) saturate(1.12) contrast(1.02);
}

/* Keeps the hero's status panel on the first screen at laptop heights instead
   of letting the portrait absorb the whole column. */
.portrait-frame {
    max-height: 620px;
}

.page-hero-card {
    position: relative;
    z-index: 1;
    padding: clamp(26px, 3vw, 36px);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 26px 58px rgba(10, 10, 10, 0.14);
}

.page-hero-card h2 {
    margin: 0 0 16px;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* --- Panel contents: one list component, one figures component --- */

.hero-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-list li + li {
    border-top: 1px solid var(--line);
}

.hero-list a,
.hero-list > li > span {
    display: flex;
    padding: 14px 0;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: var(--ink);
    text-decoration: none;
}

.hero-list li:first-child :is(a, span) {
    padding-top: 0;
}

.hero-list li:last-child :is(a, span) {
    padding-bottom: 0;
}

.hero-list-label {
    font-family: var(--display);
    font-size: clamp(1.3rem, 1.9vw, 1.68rem);
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.hero-list-meta {
    flex: none;
    color: var(--gold-dark);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero-list a:hover .hero-list-label,
.hero-list a:focus-visible .hero-list-label {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.hero-metrics {
    display: grid;
    margin: 0;
    gap: 20px 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-metrics dt {
    color: var(--gold-dark);
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero-metrics dd {
    margin: 5px 0 0;
    font-family: var(--display);
    font-size: clamp(2.2rem, 3.2vw, 3rem);
    line-height: 1;
}

/* --- Plain variant: pages with too little content to earn a panel --- */

.page-hero--plain h1 {
    font-size: clamp(3.4rem, 7vw, 6.4rem);
}

@media (max-width: 980px) {
    .page-hero-grid {
        gap: 42px;
        grid-template-columns: minmax(0, 1fr);
    }

    .page-hero-grid .page-hero-copy h1 {
        max-width: 18ch;
        font-size: clamp(3rem, 9vw, 4.4rem);
    }

    .page-hero-panel::before {
        right: 6%;
        left: -5%;
    }

    .page-hero-media {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 700px) {
    .page-hero-media {
        aspect-ratio: 3 / 2;
    }

    .hero-metrics {
        gap: 18px;
    }
}

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

    .reveal,
    .reveal.is-visible {
        opacity: 1;
        transform: none;
    }

    #cursor,
    #cursor-ring {
        display: none !important;
    }
}

@media (forced-colors: active) {
    :focus-visible {
        outline: 3px solid CanvasText;
    }

    .button,
    .nav-menu .nav-cta {
        border: 1px solid ButtonText;
    }
}

/* --------------------------------------------------------------------------
   HOMEPAGE TECHNOLOGY STRIP
   A partner-strip style logo row of the working stack, sitting between the
   capability cards and the project grid. Markup is generated by
   scripts/build_tech_strip.mjs; the brand marks come from `simple-icons`.
   -------------------------------------------------------------------------- */

.tech-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.tech-strip-header {
    margin-bottom: clamp(40px, 5vw, 64px);
}

.tech-marquee {
    --tech-gap: clamp(54px, 7vw, 104px);
    position: relative;
    overflow: hidden;
    /* Marks dissolve into the page at both edges instead of being cut off, so
       the row reads as continuous rather than clipped by a box. */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.tech-track {
    display: flex;
    width: max-content;
    gap: var(--tech-gap);
    /* The track slides leftward, so the marks read right-to-left; the two
       identical copies make the loop seamless. */
    animation: tech-scroll 62s linear infinite;
}

.tech-marquee:hover .tech-track,
.tech-marquee:focus-within .tech-track {
    animation-play-state: paused;
}

/* The track holds two identical lists, so travelling one full list plus one
   gap lands the copy exactly where the original started. Half the track width
   is short by half a gap, hence the correction. */
@keyframes tech-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - var(--tech-gap) / 2));
    }
}

.tech-list {
    display: flex;
    margin: 0;
    padding: 0;
    gap: var(--tech-gap);
    align-items: center;
    list-style: none;
}

.tech-chip {
    display: flex;
    gap: 16px;
    align-items: center;
    white-space: nowrap;
}

.tech-chip-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
}

/* Each mark plus its name reads as one lockup, so the name keeps the brand's
   own casing (pandas, scikit-learn) rather than being forced to uppercase. */
.tech-chip-label {
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

@media (max-width: 700px) {
    .tech-marquee {
        --tech-gap: 44px;
    }

    .tech-chip-mark {
        width: 38px;
        height: 38px;
    }

    .tech-chip-label {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tech-marquee {
        padding-inline: max(24px, calc((100vw - var(--container)) / 2));
        -webkit-mask-image: none;
        mask-image: none;
    }

    .tech-track {
        width: auto;
        animation: none;
    }

    /* The duplicate exists only to make the loop seamless; with the animation
       off it would just repeat every logo on screen. */
    .tech-track > .tech-list[aria-hidden="true"] {
        display: none;
    }

    .tech-list {
        flex-wrap: wrap;
        row-gap: 34px;
    }
}
