:root {
    --bg: #f3f0ea;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --text: #1f2933;
    --muted: #5f6c7a;
    --line: rgba(31, 41, 51, 0.12);
    --accent: #0f766e;
    --accent-strong: #0b5e58;
    --accent-soft: rgba(15, 118, 110, 0.12);
    --accent-contrast: #ffffff;
    --theme-glow: rgba(15, 118, 110, 0.12);
    --theme-glow-strong: rgba(15, 118, 110, 0.2);
    --header-bg: rgba(248, 245, 240, 0.86);
    --button-shadow: 0 12px 24px rgba(11, 94, 88, 0.18);
    --shadow: 0 20px 50px rgba(31, 41, 51, 0.08);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --button-radius: 999px;
    --container: 1160px;
    --header-height: 88px;
    --font-body: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-display: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --body-size: 1rem;
    --body-line-height: 1.7;
    --hero-size: clamp(1.76rem, 4vw, 3.52rem);
    --section-title-size: clamp(1.9rem, 3vw, 3rem);
    --card-title-size: clamp(1.55rem, 2.4vw, 2.25rem);
    --nav-size: 0.98rem;
    --nav-weight: 600;
    --brand-size: 1rem;
    --brand-spacing: 0.04em;
    --header-border: rgba(31, 41, 51, 0.08);
    --nav-pill-bg: rgba(255, 255, 255, 0.78);
    --panel-border: rgba(255, 255, 255, 0.55);
    --panel-border-width: 1px;
    --project-copy-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.92) 100%);
    --placeholder-bg:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, white 84%), rgba(255, 255, 255, 0.78)),
        linear-gradient(180deg, rgba(31, 41, 51, 0.04), rgba(31, 41, 51, 0.08));
    --hero-media-ratio: 1 / 1;
    --hero-media-max-height: 420px;
    --project-media-ratio: 4 / 3;
    --project-media-max-height: 340px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--body-size);
    color: var(--text);
    background:
        radial-gradient(circle at top left, var(--theme-glow-strong), transparent 22%),
        radial-gradient(circle at 85% 12%, var(--theme-glow), transparent 18%),
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, #ffffff 30%) 0%, var(--bg) 100%);
    line-height: var(--body-line-height);
}

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

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 45%, white 55%);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--surface-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.skip-link:focus {
    top: 1rem;
}

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

.section {
    padding: 5rem 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
}

.nav-shell {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-display);
    font-size: var(--brand-size);
    font-weight: 700;
    text-decoration: none;
    letter-spacing: var(--brand-spacing);
    text-transform: uppercase;
}

.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex: 0 0 auto;
}

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

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

.site-nav a {
    font-size: var(--nav-size);
    font-weight: var(--nav-weight);
    text-decoration: none;
    color: var(--muted);
    padding: 0.75rem 1rem;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--text);
    background: var(--nav-pill-bg);
}

.button {
    font-family: var(--font-display);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.8rem 1.3rem;
    border-radius: var(--button-radius);
    border: 1px solid transparent;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, white 15%), var(--accent-strong));
    color: var(--accent-contrast);
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--button-shadow);
}

.site-nav .button,
.site-nav .button:hover,
.site-nav .button.is-active {
    color: var(--accent-contrast);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, white 15%), var(--accent-strong));
    border-color: color-mix(in srgb, var(--accent) 85%, white 15%);
    box-shadow: var(--button-shadow);
}

.button-small {
    min-height: 2.75rem;
    padding-inline: 1.1rem;
}

.button-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
    box-shadow: none;
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
}

.hero {
    padding-top: 4rem;
}

.site-banner {
    padding: 1.6rem 0 0;
}

.site-banner-frame {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: var(--panel-border-width) solid var(--panel-border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.site-banner-frame img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 2rem;
    align-items: stretch;
}

.hero-copy,
.hero-media,
.project-card,
.contact-card {
    background: var(--surface);
    border: var(--panel-border-width) solid var(--panel-border);
    box-shadow: var(--shadow);
}

.hero-copy,
.contact-card {
    border-radius: var(--radius-lg);
    padding: clamp(1.6rem, 3vw, 3rem);
}

.hero-copy h1 {
    font-family: var(--font-display);
    margin: 0 0 1rem;
    font-size: var(--hero-size);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-role {
    margin: 0 0 1.1rem;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.6vw, 1.28rem);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.hero-copy p,
.hero-copy li,
.project-copy p,
.project-copy li,
.contact-card p,
.contact-card li {
    color: var(--muted);
}

.hero-copy ul,
.project-copy ul,
.contact-card ul {
    padding-left: 1.15rem;
}

.hero-actions,
.contact-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.4rem;
}

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

.contact-form-panel.is-open {
    display: block;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-field {
    display: grid;
    gap: 0.42rem;
    padding: 0.85rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field label {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface-strong) 92%, black 8%);
    color: var(--text);
    caret-color: var(--text);
    -webkit-text-fill-color: var(--text);
    font: inherit;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

.form-field textarea {
    min-height: 9.5rem;
    resize: vertical;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 34%, white 66%);
    outline-offset: 2px;
    border-color: color-mix(in srgb, var(--accent) 50%, white 50%);
}

.form-field-error {
    background: #fff1f2;
    border-color: #fda4af;
    box-shadow: inset 0 0 0 1px rgba(190, 24, 93, 0.08);
}

.form-field-error label {
    color: #9f1239;
}

.form-field-error input,
.form-field-error textarea,
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
    background: #fffafb;
    border-color: #fb7185;
    color: #1f2933;
    caret-color: #1f2933;
    -webkit-text-fill-color: #1f2933;
}

.form-field-error input:focus-visible,
.form-field-error textarea:focus-visible,
.form-field input[aria-invalid="true"]:focus-visible,
.form-field textarea[aria-invalid="true"]:focus-visible {
    outline-color: rgba(244, 63, 94, 0.35);
    border-color: #e11d48;
}

.contact-form-submit {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-meta,
.field-error {
    margin: 0;
    color: var(--muted);
}

.field-error {
    color: #b42318;
    font-size: 0.92rem;
    font-weight: 700;
}

.form-status {
    margin: 1.2rem 0 0;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}

.form-status-success {
    background: color-mix(in srgb, var(--accent) 10%, white 90%);
    border-color: color-mix(in srgb, var(--accent) 28%, white 72%);
    color: var(--text);
}

.form-status-error {
    background: #fff1f2;
    border-color: #fda4af;
    color: #9f1239;
    font-weight: 700;
}

.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hero-media,
.project-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-media {
    aspect-ratio: var(--hero-media-ratio);
    max-height: var(--hero-media-max-height);
    align-self: start;
}

.project-media {
    aspect-ratio: var(--project-media-ratio);
    max-height: var(--project-media-max-height);
    align-self: center;
    justify-self: center;
}

.hero-media img,
.project-media img,
.image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-heading {
    max-width: 48rem;
    margin-bottom: 2rem;
}

.eyebrow {
    margin: 0 0 0.65rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.82rem;
    font-weight: 700;
}

.section-heading h2,
.project-copy h2,
.project-copy h3,
.contact-card h2 {
    font-family: var(--font-display);
    margin: 0 0 1rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading h2 {
    font-size: var(--section-title-size);
}

.project-copy h2,
.project-copy h3,
.contact-card h2 {
    font-size: var(--card-title-size);
}

.projects {
    padding-top: 2rem;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
    gap: 0;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.project-card.reverse {
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
}

.project-card.reverse .project-media {
    order: 2;
    justify-self: center;
}

.project-card.reverse .project-copy {
    order: 1;
}

.project-copy {
    padding: clamp(1.4rem, 2.8vw, 2.6rem);
    background: var(--project-copy-bg);
}

.project-copy > :first-child,
.contact-card > :first-child {
    margin-top: 0;
}

.project-copy > :last-child,
.contact-card > :last-child {
    margin-bottom: 0;
}

.image-placeholder {
    display: grid;
    place-items: center;
    padding: 2rem;
    background: var(--placeholder-bg);
    color: var(--text);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.image-placeholder-hero {
    min-height: 100%;
    font-size: 1rem;
    line-height: 1.5;
}

.contact-card {
    max-width: 56rem;
    margin: 0 auto;
}

.site-footer {
    padding: 1.4rem 0 2.6rem;
    color: var(--muted);
}

.footer-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(31, 41, 51, 0.08);
    padding-top: 1.4rem;
}

.site-footer a {
    color: var(--text);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.js .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

@media (min-width: 1400px) {
    .hero-copy h1 {
        font-size: clamp(1.76rem, 3.5vw, 3.1rem);
    }
}

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

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 900px) {
    .hero-layout,
    .project-card,
    .project-card.reverse {
        grid-template-columns: 1fr;
    }

    .project-card.reverse .project-media,
    .project-card.reverse .project-copy {
        order: initial;
    }

    .project-media,
    .project-card.reverse .project-media {
        justify-self: stretch;
    }

    .hero-media,
    .project-media {
        max-height: none;
        min-height: 260px;
    }
}

@media (max-width: 720px) {
    :root {
        --header-height: auto;
    }

    .section {
        padding: 4rem 0;
    }

    .nav-shell,
    .footer-shell {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header {
        top: 0;
    }

    .site-nav,
    .site-nav a {
        padding: 0.7rem 0.9rem;
    }

    .brand {
        gap: 0.65rem;
    }

    .brand-logo {
        width: 46px;
        height: 46px;
    }

    .hero {
        padding-top: 2.4rem;
    }

    .site-banner {
        padding-top: 1rem;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero-copy,
    .contact-card,
    .project-copy {
        padding: 1.3rem;
    }

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

    .site-nav .button {
        width: auto;
    }

    .brand-text {
        max-width: 14rem;
        line-height: 1.2;
    }
}
