/* === PRIMITIVES === */
:root {
    --color-raw-bg: #141210;
    --color-raw-panel: #1B1713;
    --color-raw-panel-2: #211B16;
    --color-raw-ivory: #FFF9F0;
    --color-raw-beige: #E8E0D4;
    --color-raw-grey: #C6BDB1;
    --color-raw-grey-dark: #AAA196;
    --color-raw-forest: #005C50;
    --color-raw-mint: #3E9C8A;
    --color-raw-coral: #E57373;

    --font-display: "Fustat", system-ui, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.125rem;
    --radius-xl: 1.5rem;
    --radius-pill: 999px;

    --shadow-card: 0 28px 70px -42px rgb(20 18 16 / 0.9);
    --shadow-glow: 0 0 34px -22px rgb(62 156 138 / 0.46);
    --panel-light-opacity: 0.5;

    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --duration-fast: 180ms;
    --duration-base: 300ms;
    --duration-slow: 900ms;
}

/* === SEMANTIC === */
:root {
    --color-bg: var(--color-raw-bg);
    --color-surface: var(--color-raw-panel);
    --color-surface-strong: var(--color-raw-panel-2);
    --color-text: var(--color-raw-ivory);
    --color-text-soft: var(--color-raw-beige);
    --color-muted: var(--color-raw-grey);
    --color-muted-strong: var(--color-raw-grey-dark);
    --color-primary: var(--color-raw-forest);
    --color-accent: var(--color-raw-mint);
    --color-warm: var(--color-raw-coral);
    --color-line: rgb(255 249 240 / 0.1);
    --color-line-strong: rgb(255 249 240 / 0.16);

    --page-max: 1280px;
    --page-gutter: clamp(20px, 5vw, 64px);
    --section-space: clamp(64px, 9.5vh, 128px);
    --section-space-compact: clamp(40px, 6vh, 76px);
    --work-media-section-space: clamp(34px, 5vh, 64px);
    --footer-space: clamp(64px, 7.75vw, 98px);
    --footer-space-tight: clamp(24px, 3.4vw, 34px);
    --grid-gap: clamp(16px, 2vw, 28px);
    --type-section-h2: clamp(2.2rem, 5vw, 3.5rem);
    --type-hero-headline: clamp(3.2rem, 4.5vw, 4.2rem);
}

/* === COMPONENT TOKENS === */
:root {
    --button-bg: var(--color-primary);
    --button-fg: var(--color-raw-ivory);
    --button-border: var(--color-line-strong);
    --button-radius: var(--radius-pill);
    --card-bg: var(--color-surface);
    --card-border: var(--color-line);
    --card-radius: var(--radius-xl);
    --card-padding: clamp(22px, 2.4vw, 34px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 50% -20%, rgb(0 92 80 / 0.12), transparent 38rem),
        var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image:
        linear-gradient(rgb(255 249 240 / 0.25) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 249 240 / 0.2) 1px, transparent 1px);
    background-size: 180px 180px;
    mix-blend-mode: overlay;
}

::selection {
    background: var(--color-warm);
    color: var(--color-bg);
}

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

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

button,
input,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

.site-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    overflow-x: hidden;
}

[id] {
    scroll-margin-top: 96px;
}

.container {
    width: min(100%, var(--page-max));
    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    transform: translateY(-160%);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--color-text);
    color: var(--color-bg);
    font-weight: 700;
}

.skip-link:focus {
    transform: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    background: transparent;
    backdrop-filter: none;
    transform: translateY(0);
    transition:
        transform 350ms var(--ease-out),
        background-color 350ms ease,
        border-color 350ms ease,
        backdrop-filter 350ms ease;
    will-change: transform;
}

body.is-at-top .site-header {
    border-bottom-color: transparent;
    background: transparent;
    backdrop-filter: none;
}

body.nav-scrolled .site-header {
    border-bottom-color: var(--color-line);
    background: rgb(20 18 16 / 0.72);
    backdrop-filter: blur(18px);
}

body.nav-hidden .site-header {
    transform: translateY(-100%);
}

body.nav-visible .site-header {
    transform: translateY(0);
}

body.has-open-menu .site-header {
    transform: translateY(0);
}

body.has-open-image-viewer {
    overflow: hidden;
}

.site-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.brand-mark__logo {
    display: block;
    width: clamp(132px, 13vw, 166px);
    height: auto;
    aspect-ratio: 9126 / 2201;
}

@media (min-width: 1101px) {
    .site-header__inner {
        margin-top: 12px;
    }

    body.nav-scrolled .site-header__inner {
        margin-top: 0;
    }

    .site-header .brand-mark__logo {
        width: auto;
        height: 38px;
    }

    .hero--home {
        margin-top: 24px;
    }
}

.brand-mark__symbol {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--color-primary);
    color: var(--color-raw-ivory);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
}

.brand-mark__name {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 24px);
}

.site-nav__link {
    color: var(--color-muted);
    font-size: 0.9rem;
    padding-block: 0.25rem;
    background: linear-gradient(var(--color-accent), var(--color-accent)) no-repeat 0 100% / 0 1.5px;
    transition: color var(--duration-base), background-size var(--duration-base) var(--ease-out);
}

.site-nav__link:hover,
.site-nav__link.is-active {
    color: var(--color-text);
    background-size: 100% 1.5px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--color-line-strong);
    border-radius: 11px;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    margin: 5px auto;
    background: currentColor;
}

.mobile-menu {
    border-top: 1px solid var(--color-line);
    border-bottom: 1px solid var(--color-line);
    background: rgb(20 18 16 / 0.97);
    padding: 1rem var(--page-gutter) 1.5rem;
}

.mobile-menu .site-nav {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1rem;
}

.mobile-menu .site-nav__link {
    border-bottom: 1px solid var(--color-line);
    padding: 0.85rem 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--color-text);
}

.button {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 46px;
    border: 0;
    border-radius: var(--button-radius);
    overflow: hidden;
    color: var(--button-fg);
    font-size: 0.94rem;
    font-weight: 650;
    transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base), border-color var(--duration-base), background var(--duration-base);
}

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

.button__label,
.button__arrow {
    position: relative;
    z-index: 2;
}

.button__arrow {
    font-family: var(--font-mono);
}

.button--primary {
    padding: 0 1.65rem;
    border: 1px solid transparent;
    background: var(--button-bg);
    box-shadow: 0 16px 40px -22px rgb(0 92 80 / 0.58);
}

.button--primary::before {
    content: "";
    position: absolute;
    inset: 1.5px;
    z-index: 1;
    border-radius: inherit;
    background: var(--button-bg);
}

.button--primary:hover {
    box-shadow: 0 16px 40px -14px rgb(0 92 80 / 0.62), 0 0 24px -10px rgb(62 156 138 / 0.42);
}

.button--primary:focus-visible {
    outline-color: var(--color-raw-ivory);
    box-shadow: 0 0 0 4px rgb(62 156 138 / 0.18), 0 16px 40px -14px rgb(0 92 80 / 0.62);
}

.button__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 240%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 0deg, transparent 0deg, var(--color-primary) 42deg, var(--color-accent) 76deg, var(--color-raw-ivory) 116deg, var(--color-warm) 158deg, transparent 230deg, var(--color-accent) 320deg, transparent 360deg);
    opacity: 0.66;
    animation: button-spin 6s linear infinite;
    transition: opacity var(--duration-base);
}

.button--primary:hover .button__glow {
    opacity: 0.88;
}

.button--secondary {
    padding: 0 1.35rem;
    border: 1px solid var(--button-border);
    background: rgb(27 23 19 / 0.7);
    color: var(--color-text);
}

.button--secondary:hover {
    border-color: var(--color-accent);
    background: rgb(62 156 138 / 0.1);
}

.section {
    position: relative;
    padding-block: var(--section-space);
    /* .about-grid: 1px solid var(--color-line); */
}

.section--compact {
    padding-block: var(--section-space-compact);
}

.section--work-media {
    padding-block: var(--work-media-section-space);
}

.section--after-filter {
    border-top: 0;
    padding-top: clamp(34px, 4.4vw, 56px);
}

.section-heading {
    display: block;
    max-width: min(100%, 980px);
    margin-bottom: var(--space-12);
    text-align: left;
}

.section-heading__meta,
.rule-label,
.page-hero__kicker,
.studio-card__type,
.bento-tile__label,
.back-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.section-heading__meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: var(--space-6);
}

.section-heading__meta span:first-child,
.rule-label span,
.page-hero__kicker,
.bento-tile__label,
.studio-card__type {
    color: var(--color-warm);
}

.section-heading__divider {
    color: var(--color-muted-strong);
}

.section-heading__meta i,
.rule-label i {
    display: block;
    width: 26px;
    height: 1px;
    background: var(--color-line-strong);
}

.section-heading__body {
    width: unset;
}

.section-heading h2,
.cta-panel h2,
.page-hero h1,
.case-hero h1,
.rich-copy h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.025em;
    overflow-wrap: normal;
    text-wrap: pretty;
}

.section-heading h2,
.about-section__title,
.rich-copy h2 {
    font-size: var(--type-section-h2);
}

.section-heading p,
.page-hero p,
.case-hero p,
.cta-panel p {
    color: var(--color-muted);
    line-height: 1.7;
}

.section-heading p {
    max-width: 800px;
    margin: var(--space-5) 0 0;
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero__inner {
    position: relative;
    z-index: 2;
    padding-block: clamp(88px, 14vh, 128px) clamp(58px, 7.75vh, 94px);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.52fr) minmax(0, 0.48fr);
    column-gap: var(--space-6);
    align-items: center;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 var(--space-6);
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
    color: var(--color-text-soft);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.availability span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 4px rgb(62 156 138 / 0.18);
}

.audience-tabs {
    display: flex;
    gap: var(--space-2);
    width: 100%;
    overflow-x: auto;
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-8);
    scroll-padding-inline: var(--page-gutter);
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.audience-tabs::-webkit-scrollbar {
    display: none;
}

.audience-tabs__button,
.filter-button {
    flex: 0 0 auto;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    padding: 0.55rem 1rem;
    transition: color var(--duration-base), background var(--duration-base), border-color var(--duration-base);
    white-space: nowrap;
}

.audience-tabs__button {
    scroll-snap-align: start;
}

.audience-tabs__button:hover,
.audience-tabs__button.is-active,
.filter-button:hover,
.filter-button.is-active {
    border-color: var(--color-accent);
    background: rgb(62 156 138 / 0.12);
    color: var(--color-text);
}

.hero h1 {
    margin: 0 0 var(--space-6);
    font-family: var(--font-display);
    font-size: var(--type-hero-headline);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 0.98;
}

.hero .headline-line {
    display: block;
}

.hero .headline-line__text,
.hero .headline-accent {
    display: inline;
}

.hero .headline-line--accent .headline-line__text,
.hero .headline-accent {
    color: var(--color-accent);
    font-style: italic;
    font-weight: 500;
}

.hero__summary {
    min-height: 3.4em;
    max-width: 32rem;
    margin: 0;
    color: var(--color-muted);
    font-size: clamp(1rem, 1.45vw, 1.2rem);
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-8);
}

.hero-stats {
    display: flex;
    gap: clamp(28px, 4vw, 52px);
    margin: var(--space-12) 0 0;
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-line);
}

.hero-stats div {
    min-width: 0;
}

.hero-stats dt {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    font-weight: 650;
}

.hero-stats dd {
    margin: 0.25rem 0 0;
    color: var(--color-muted-strong);
    font-size: 0.78rem;
}

.hero-collage {
    position: relative;
    width: min(112%, 760px);
    aspect-ratio: 761 / 582;
    justify-self: center;
    margin-inline: auto;
}

.visual-frame {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--color-line);
    background: var(--color-surface);
}

button.visual-frame,
.image-viewer-trigger {
    width: 100%;
    padding: 0;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: zoom-in;
    appearance: none;
}

.visual-frame img,
.studio-card__visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visual-frame img {
    opacity: 1;
    filter: none;
}

@media (hover: hover) and (pointer: fine) {
    .visual-frame img,
    .studio-card__visual img {
        transition: transform 700ms var(--ease-out);
    }

    .image-viewer-trigger:hover img,
    .image-viewer-trigger:focus-visible img,
    .content-card:hover .visual-frame img,
    .project-card:hover .visual-frame img,
    .product-card:hover .visual-frame img,
    .featured-project:hover .visual-frame img,
    .studio-card:hover .studio-card__visual img {
        transform: scale(1.045);
    }
}

.hero-collage__main {
    position: relative;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 42px 56px rgb(20 18 16 / 0.42));
}

.hero-collage__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-collage__main span {
    position: relative;
    z-index: 3;
    color: var(--color-raw-ivory);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 1px 10px rgb(20 18 16 / 0.52);
}

.hero-collage__main span {
    position: absolute;
    right: 9%;
    bottom: 3%;
}

.page-hero,
.case-hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(56px, 9vh, 120px) clamp(0px, 0vh, 0px);
}

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

.page-hero h1,
.case-hero h1 {
    max-width: min(100%, 26ch);
    margin-top: var(--space-5);
    font-size: clamp(3rem, 5vw, 4rem);
    font-weight: 300;
}

.page-hero .container > h1:first-child {
    margin-top: 0;
}

.page-hero p,
.case-hero p {
    max-width: 60ch;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    margin-bottom: var(--space-1);
}

.case-hero__lead {
    color: var(--color-accent) !important;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2.3rem) !important;
    font-style: italic;
    letter-spacing: -0.01em;
    line-height: 1.2 !important;
}

/* Branded 404 (page-hero variant). Centres the message in the viewport with a
   subtle oversized "404" numeral behind the copy as the decorative element. */
.error-page {
    display: flex;
    align-items: center;
    min-height: clamp(56vh, 68vh, 80vh);
}

.error-page__inner {
    position: relative;
    z-index: 2;
}

.error-page__halo {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(12rem, 38vw, 30rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--color-line);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.error-page__actions {
    flex-wrap: wrap;
}

/* Work-detail header navigation row: "Back to all work" sits left, "Next work"
   right. Pushed below the navbar and separated from the title so the hierarchy
   reads as navbar → nav row → category → title. */
.case-hero__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    margin-top: var(--space-6);
    margin-bottom: var(--space-16);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    color: var(--color-muted);
    text-transform: none;
    letter-spacing: 0.06em;
    transition: color 0.2s ease;
}

.next-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.13em;
    color: var(--color-muted);
    transition: color 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible,
.next-link:hover,
.next-link:focus-visible {
    color: var(--color-text-soft);
}

.back-link__arrow,
.next-link__arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.back-link:hover .back-link__arrow,
.back-link:focus-visible .back-link__arrow {
    transform: translateX(-3px);
}

.next-link:hover .next-link__arrow,
.next-link:focus-visible .next-link__arrow {
    transform: translateX(3px);
}

.filter-bar {
    position: relative;
    top: auto;
    z-index: 30;
    margin-top: clamp(10px, 2vw, 18px);
    border: 0;
    background: transparent;
    backdrop-filter: none;
}

.filter-bar__inner {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-2);
    overflow-x: auto;
    overflow-y: hidden;
    padding-block: 0.25rem;
    scroll-behavior: smooth;
    scroll-padding-inline: var(--page-gutter);
    scrollbar-color: rgb(255 249 240 / 0.22) transparent;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.filter-bar__inner::-webkit-scrollbar {
    height: 4px;
}

.filter-bar__inner::-webkit-scrollbar-track {
    background: transparent;
}

.filter-bar__inner::-webkit-scrollbar-thumb {
    border-radius: var(--radius-pill);
    background: rgb(255 249 240 / 0.2);
}

.filter-bar .filter-button {
    scroll-snap-align: start;
    border-color: transparent;
    background: transparent;
    color: var(--color-muted);
    padding: 0.52rem 0.95rem;
}

.filter-bar .filter-button:hover {
    border-color: rgb(255 249 240 / 0.14);
    background: rgb(255 249 240 / 0.035);
    color: var(--color-text-soft);
}

.filter-bar .filter-button.is-active {
    border-color: rgb(62 156 138 / 0.44);
    background: rgb(62 156 138 / 0.09);
    color: var(--color-text);
}

.card-grid {
    display: grid;
    gap: var(--grid-gap);
}

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

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

.card-grid--products {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.work-page .page-hero {
    padding-block: clamp(136px, 18vh, 216px) clamp(28px, 5vh, 56px);
}

.work-page .page-hero h1 {
    max-width: min(100%, 20ch);
    font-size: clamp(3rem, 7.2vw, 5.8rem);
}

.work-page .page-hero p {
    max-width: 72ch;
}

.featured-projects {
    display: flex;
    flex-direction: column;
    gap: clamp(40px, 6vw, 80px);
}

/* === SURFACE CARDS: soft internal light behind smoked glass (Athos) === */
.surface-card {
    /* Blur scales per card size below; light geometry is percentage-based so
       it scales with the panel automatically (no per-size pixel tuning). */
    --glow-blur: 80px;
    position: relative;
    isolation: isolate;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    overflow: clip;
    border: 1px solid var(--card-border);
    border-radius: clamp(22px, 2.2vw, 32px);
    background-color: rgb(62 156 138 / 0.24);
    background-clip: padding-box;
    box-shadow: 0 24px 80px rgb(20 18 16 / 0.44);
}

/*
 * Soft illumination behind smoked glass: a single broad teal glow whose centre
 * sits OUTSIDE the panel (bottom-right), so only its faint upper falloff bleeds
 * in - never a circle, blob or obvious gradient. A whisper of warmth keeps the
 * palette natural. Heavy blur + low opacity = light, not colour.
 */
.surface-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    clip-path: inset(0 round var(--surface-card-radius));
    opacity: var(--panel-light-opacity);
    border-radius: inherit;
    filter: blur(var(--glow-blur));
    background:
        radial-gradient(120% 136% at 114% 152%, rgb(62 156 138 / 0.85), transparent 66%),
        radial-gradient(112% 128% at 127% -24%, rgba(111, 233, 164, 0.45), transparent 70%);
    background-color: rgb(24, 73, 71);
}

/* Soft inner edge: top ivory catch-light, bottom forest grounding. */
.surface-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    border: 1px solid rgb(255 249 240 / 0.08);
    box-shadow:
        inset 0 1px 0 rgb(255 249 240 / 0.07),
        inset 0 -1px 0 rgb(0 92 80 / 0.12);
}

.surface-card > * {
    position: relative;
    z-index: 2;
}

/* Larger panels: softer, more diffuse light. */
.featured-project.surface-card,
.bento-tile.surface-card,
.studio-card--featured.surface-card {
    --glow-blur: 110px;
}

/* Small panels: tighter, lower-blur light. */
.process-card.surface-card {
    --glow-blur: 60px;
}

.featured-project > .content-card__shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
    padding: clamp(24px, 3vw, 40px);
}

.featured-project--reverse .content-card__visual {
    order: 1;
}

@media (hover: hover) and (pointer: fine) {
    .surface-card {
        transition: transform var(--duration-base) var(--ease-out), border-color var(--duration-base), box-shadow var(--duration-base);
    }

    .surface-card:hover {
        --panel-light-opacity: 0.8;
        transform: translateY(-6px);
        border-color: var(--color-line-strong);
        box-shadow:
            0 28px 86px rgb(20 18 16 / 0.5),
            0 0 42px -28px rgb(62 156 138 / 0.55);
    }
}

@media (hover: none), (pointer: coarse) {
    .surface-card::before {
        filter: blur(min(var(--glow-blur), 28px));
    }
}

.featured-project h3,
.content-card h3,
.project-card h3,
.product-card h3,
.article-card h3,
.process-card h3,
.studio-card h3,
.bento-tile h3,
.contact-panel h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.08;
}

.content-card h3,
.project-card h3,
.product-card h3,
.article-card h3,
.process-card h3,
.studio-card h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.featured-project h3 {
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
    margin-bottom: 0.75rem;
}

.project-facts {
    display: grid;
    gap: 0.7rem;
    margin: 0 0 1.5rem;
}

.project-facts div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: var(--space-4);
}

.project-facts dt {
    color: var(--color-muted-strong);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.project-facts dd {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.55;
}

.rule-label {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
}

.visual-frame {
    min-height: 220px;
    border-radius: var(--radius-lg);
    aspect-ratio: auto;
}

.visual-frame--feature {
    aspect-ratio: 4 / 3;
}

.content-card__cover-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
}

.content-card__cover-link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -6px;
}

.content-card__shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: inherit;
    z-index: auto;
}

.featured-project.content-card > .content-card__shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
    padding: clamp(24px, 3vw, 40px);
}

.content-card__body {
    display: flex;
    min-width: 0;
}

.content-card__content {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    padding: var(--card-padding);
}

.content-card h3,
.project-card h3,
.product-card h3,
.article-card h3 {
    font-size: clamp(1.35rem, 1.9vw, 1.7rem);
}

.content-card:not(.featured-project) h3 {
    margin-bottom: var(--space-2);
}

.featured-project.content-card h3 {
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
}

.content-card p,
.project-card p,
.product-card p,
.article-card p,
.process-card p,
.studio-card p,
.bento-tile p,
.contact-panel p {
    color: var(--color-muted);
    line-height: 1.65;
}

.content-card p,
.project-card p,
.product-card p,
.article-card p,
.process-card p,
.studio-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.content-card p {
    margin: 0 0 var(--space-5);
}

.tag-row {
    display: flex;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
    white-space: nowrap;
}

.content-card__meta {
    position: relative;
    z-index: 5;
    width: 100%;
}

.content-card__meta > span:not(.tag-overflow),
.content-card h3,
.content-card p,
.content-card .text-link,
.content-card__visual {
    pointer-events: none;
}

.tag-row > span:not(.tag-overflow),
.tag-overflow__button,
.status {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    width: fit-content;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgb(62 156 138 / 0.42);
    border-radius: var(--radius-pill);
    color: #4eb3a0;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-overflow {
    display: inline-flex;
    max-width: 100%;
    flex: 0 0 auto;
    pointer-events: auto;
}

.tag-overflow[hidden],
[data-tag-item][hidden] {
    display: none !important;
}

.content-card__meta:not(.is-measured) [data-tag-item]:nth-of-type(n+4) {
    display: none;
}

.surface-card.is-tag-hovered {
    transform: none;
}

.tag-overflow__button {
    appearance: none;
    cursor: pointer;
    background: rgb(62 156 138 / 0.08);
}

.tag-overflow__button:focus-visible,
.tag-overflow.is-open .tag-overflow__button {
    border-color: var(--color-accent);
    background: rgb(62 156 138 / 0.18);
    color: var(--color-raw-ivory);
}

.tag-overflow__button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.tag-overflow.is-touch-static .tag-overflow__button {
    cursor: default;
}

.tag-overflow-layer {
    position: fixed;
    inset: 0;
    z-index: 1500;
    pointer-events: none;
}

.tag-overflow__tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1501;
    box-sizing: border-box;
    width: max-content;
    max-width: min(calc(100vw - 1.5rem), 360px);
    max-height: min(var(--tag-overflow-max-height, 320px), calc(100vh - 1.5rem));
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.7rem;
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-md);
    background: rgb(25 22 19 / 0.98);
    box-shadow: 0 18px 48px rgb(20 18 16 / 0.45);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
    visibility: hidden;
}

.tag-overflow.is-open .tag-overflow__tooltip,
.tag-overflow__tooltip.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.tag-overflow.is-touch-static .tag-overflow__tooltip:not(.is-visible) {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .tag-overflow__button:hover {
        border-color: var(--color-accent);
        background: rgb(62 156 138 / 0.18);
        color: var(--color-raw-ivory);
    }

    .tag-overflow:hover .tag-overflow__tooltip,
    .tag-overflow:focus-within .tag-overflow__tooltip,
    .tag-overflow__button:hover + .tag-overflow__tooltip,
    .tag-overflow.is-hovered .tag-overflow__tooltip {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }
}

.tag-overflow__tooltip-item {
    display: inline-flex;
    width: fit-content;
    border: 1px solid rgb(255 249 240 / 0.14);
    border-radius: var(--radius-pill);
    color: var(--color-muted-strong);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    line-height: 1.2;
    padding: 0.28rem 0.56rem;
}

.tag-row--muted > span {
    border-color: var(--color-line);
    color: var(--color-muted-strong);
}

.content-card__type {
    border-color: rgb(229 115 115 / 0.42) !important;
    color: var(--color-warm) !important;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.products-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-8);
    margin-bottom: var(--space-10);
}

.products-section__header .section-heading {
    margin-bottom: 0;
}

.products-section__all {
    flex: 0 0 auto;
    margin-bottom: var(--space-2);
    white-space: nowrap;
}

.products-section .card-grid {
    gap: clamp(18px, 2vw, 28px);
}

.products-section .visual-frame--product {
    min-height: clamp(150px, 14vw, 190px);
    aspect-ratio: 16 / 8.8;
}

.products-section .content-card__content {
    padding: clamp(18px, 2vw, 24px);
}

.products-section .product-card p {
    margin: 0 0 var(--space-5);
    line-height: 1.55;
}

.process-card-grid {
    align-items: stretch;
    grid-auto-rows: 1fr;
}

.process-card {
    position: relative;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding: clamp(26px, 2.5vw, 36px);
}

.process-heading .section-header__title {
    max-width: unset;
}

.process-card__index {
    display: block;
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1;
}

.process-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
}

.process-card__accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 38%;
    max-width: 150px;
    height: auto;
    color: var(--color-line-strong);
    opacity: 0.7;
    pointer-events: none;
}

.process-card__accent path,
.process-card__accent circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.process-card__accent circle {
    fill: rgb(229 115 115 / 0.18);
    stroke: none;
}

.process-card__accent--corner,
.process-card__accent--grid {
    color: var(--color-line-strong);
}

.process-card__accent--arcs {
    color: rgb(229 115 115 / 0.45);
}

.process-card__accent--lines {
    color: var(--color-accent);
}

.process-card h3 {
    margin: clamp(18px, 2vw, 24px) 0 var(--space-2);
    font-size: 1.45rem;
    min-height: calc(1.45rem * 1.08);
}

.process-card p {
    margin: 0;
}

.timeline {
    border-top: 1px solid var(--color-line);
}

.timeline__item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: clamp(16px, 3vw, 48px);
    padding: clamp(26px, 3vw, 40px) 0;
    border-bottom: 1px solid var(--color-line);
}

.timeline time {
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.timeline h3 {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

.timeline p {
    max-width: 64ch;
    margin: 0;
    color: var(--color-muted);
    line-height: 1.7;
}

.timeline__company {
    color: var(--color-text-soft) !important;
    margin-bottom: 0.85rem !important;
}

.experience-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.58fr) minmax(300px, 0.42fr);
    gap: clamp(36px, 6vw, 88px);
    align-items: start;
}

.experience-section .timeline__item {
    grid-template-columns: minmax(0, 1fr);
    padding: clamp(18px, 2.2vw, 28px) 0;
}

.experience-section .timeline time {
    white-space: nowrap;
}

.experience-section .timeline h3 {
    font-size: clamp(1.22rem, 1.8vw, 1.58rem);
}

.experience-accordion__body {
    min-width: 0;
}

.experience-accordion__header {
    display: flex;
    align-items: flex-start;
    gap: clamp(14px, 2vw, 28px);
    cursor: pointer;
}

.experience-accordion__heading {
    flex: 1 1 auto;
    min-width: 0;
}

.experience-accordion__meta {
    display: flex;
    flex: 0 0 auto;
    gap: var(--space-4);
    align-items: center;
    margin-left: auto;
    padding-top: 0.1rem;
}

.experience-accordion__toggle {
    display: inline-grid;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.experience-accordion__icon {
    display: inline-grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border: 1px solid var(--color-line-strong);
    border-radius: 50%;
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1;
    transition:
        transform var(--duration-base) var(--ease-out),
        border-color var(--duration-base) ease,
        background-color var(--duration-base) ease,
        color var(--duration-base) ease;
}

.experience-accordion__icon::before {
    content: "+";
}

.experience-accordion__toggle[aria-expanded="true"] .experience-accordion__icon {
    transform: rotate(180deg);
    border-color: rgb(62 156 138 / 0.54);
    background: rgb(62 156 138 / 0.1);
    color: var(--color-text);
}

.experience-accordion__toggle[aria-expanded="true"] .experience-accordion__icon::before {
    content: "-";
}

.experience-accordion__header:hover .experience-accordion__icon,
.experience-accordion__toggle:focus-visible .experience-accordion__icon {
    border-color: rgb(62 156 138 / 0.54);
    color: var(--color-text);
}

.experience-accordion__panel {
    max-height: calc(1em * 1.58 * 2);
    overflow: hidden;
    transition:
        max-height var(--duration-base) var(--ease-out),
        opacity var(--duration-base) ease;
}

.experience-accordion__item.is-open .experience-accordion__panel {
    max-height: var(--experience-panel-height, 32rem);
}

.experience-section .timeline p {
    max-width: 52ch;
    line-height: 1.58;
}

.experience-accordion__summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.experience-accordion__item.is-open .experience-accordion__summary {
    display: block;
    -webkit-line-clamp: initial;
    overflow: visible;
}

.experience-section .timeline__company {
    margin-bottom: 0.48rem !important;
}

.experience-cta {
    display: flex;
    justify-content: flex-start;
    margin-top: clamp(20px, 2.8vw, 34px);
}

.experience-cta__link {
    margin-top: 0;
    padding: 0.72rem 1rem;
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-pill);
    background: rgb(27 23 19 / 0.52);
    color: var(--color-text-soft);
    transition:
        transform var(--duration-base) var(--ease-out),
        border-color var(--duration-base) ease,
        background-color var(--duration-base) ease,
        color var(--duration-base) ease;
}

.experience-cta__link:hover {
    transform: translateY(-2px);
    border-color: rgb(62 156 138 / 0.54);
    background: rgb(62 156 138 / 0.1);
    color: var(--color-text);
}

.experience-cta__link:focus,
.experience-cta__link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
    color: var(--color-text);
}

.experience-visual {
    position: relative;
}

.experience-visual__media {
    width: 100%;
}

.experience-visual__media img {
    display: block;
    width: 100%;
    height: auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: clamp(150px, 18vw, 220px);
    gap: clamp(14px, 1.6vw, 22px);
}

.studio-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-8);
    margin-bottom: var(--space-10);
}

.studio-section__header .section-heading {
    margin-bottom: 0;
}

.studio-section__all {
    flex: 0 0 auto;
    margin-bottom: var(--space-2);
    white-space: nowrap;
}

.studio-section .bento-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: clamp(18px, 2vw, 28px);
}

.studio-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
}

.studio-section .studio-card,
.studio-section .studio-card:nth-child(1),
.studio-section .studio-card:nth-child(2),
.studio-section .studio-card:nth-child(3),
.studio-section .studio-card:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
}

.studio-card:nth-child(1) {
    grid-column: span 4;
    grid-row: span 2;
}

.studio-card:nth-child(2) {
    grid-column: span 2;
    grid-row: span 2;
}

.studio-card:nth-child(3),
.studio-card:nth-child(4) {
    grid-column: span 3;
}

.studio-card > a {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
}

.studio-section .studio-card > a {
    min-height: 100%;
}

.studio-card__visual {
    position: relative;
    min-height: clamp(150px, 14vw, 190px);
    border-bottom: 1px solid var(--color-line);
    background: var(--color-surface-strong);
}

.studio-section .studio-card__visual {
    min-height: clamp(150px, 14vw, 190px);
}

@media (hover: hover) and (pointer: fine) {
    .studio-card__visual {
        transition: transform 700ms var(--ease-out);
    }

    .studio-card:hover .studio-card__visual {
        transform: scale(1.05);
    }
}

.studio-card__content {
    position: relative;
    z-index: 2;
    max-width: 44ch;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: clamp(18px, 2vw, 24px);
    color: var(--color-text);
}

.studio-card__content p {
    margin: 0 0 var(--space-5);
    color: var(--color-muted);
    line-height: 1.55;
}

.studio-section .studio-card__content {
    padding: clamp(18px, 2vw, 24px);
}

.studio-card h3 {
    margin-top: 0.75rem;
    margin-bottom: var(--space-2);
    font-size: clamp(1.4rem, 2.8vw, 2.8rem);
}

.studio-section .studio-card h3 {
    margin: 0 0 var(--space-2);
    font-size: clamp(1.35rem, 1.9vw, 1.7rem);
}

.ghost-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.6rem;
    padding: 0.65rem 1.1rem;
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-pill);
    background: rgb(255 249 240 / 0.14);
    color: var(--color-raw-ivory);
    font-size: 0.84rem;
    font-weight: 650;
    backdrop-filter: blur(8px);
}

.studio-section .ghost-pill {
    width: fit-content;
    margin-top: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text);
    font-size: 0.78rem;
    backdrop-filter: none;
}

.visual-frame--article {
    min-height: 220px;
    background:
        radial-gradient(circle at 70% 22%, rgb(62 156 138 / 0.18), transparent 32%),
        linear-gradient(135deg, rgb(33 27 22 / 0.94), rgb(20 18 16 / 0.94)),
        linear-gradient(var(--color-line) 1px, transparent 1px);
    background-size: auto, auto, 100% 26px;
}

.articles-section .card-grid {
    gap: clamp(18px, 2vw, 28px);
}

.articles-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-8);
    margin-bottom: var(--space-10);
}

.articles-section__header .section-heading {
    margin-bottom: 0;
}

.articles-section__all {
    flex: 0 0 auto;
    margin-bottom: var(--space-2);
    white-space: nowrap;
}

.articles-section .visual-frame--article {
    min-height: clamp(150px, 14vw, 190px);
    aspect-ratio: 16 / 8.8;
}

.articles-section .content-card__content {
    padding: clamp(18px, 2vw, 24px);
}

.articles-section .content-card__meta {
    margin-bottom: var(--space-3);
}

.articles-section .article-card p {
    margin: 0 0 var(--space-5);
    line-height: 1.55;
}

.article-list {
    display: grid;
    gap: var(--grid-gap);
}

.article-list .content-card > .content-card__shell {
    display: flex;
    flex-direction: column;
}

.section-action {
    display: flex;
    justify-content: center;
    margin-top: clamp(36px, 5vw, 64px);
}

.cta-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    padding: clamp(34px, 4vw, 56px);
}

.cta-panel h2 {
    font-size: clamp(1.8rem, 3.4vw, 3rem);
}

.case-cover {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-auto-rows: clamp(150px, 19vw, 236px);
    /* One value = identical horizontal and vertical gaps for an even grid
       rhythm. The main image spans both rows plus this single gap, so its
       height matches the two stacked right-column cards exactly. */
    gap: clamp(12px, 1.4vw, 20px);
}

.case-cover__main {
    grid-row: span 2;
}

.case-full-image {
    width: 100%;
}

.case-full-image__frame {
    min-height: clamp(320px, 48vw, 680px);
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xl);
    box-shadow: 0 42px 90px -58px rgb(0 0 0 / 0.86);
}

.case-full-image__frame img {
    opacity: 1;
    filter: none;
}

.case-image-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    margin: 0;
}

.case-image-card__caption {
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    line-height: 1.5;
    text-transform: uppercase;
    text-align: center;
}

/* Full-width image work block: show the whole image at full height, never
   crop, preserve aspect ratio. Supports tall full-page screenshots. The
   image-viewer trigger is reused for markup parity, but the lightbox is
   disabled on desktop/tablet (pointer-events: none) and only re-enabled on
   mobile in responsive.css. */
.case-block-image {
    width: 100%;
    margin: 0;
}

.case-block-image__media {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: default;
    pointer-events: none;
}

.case-block-image__media img {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 1;
    filter: none;
    transform: none;
}

.case-block-image__caption {
    margin-top: 0.85rem;
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 3000;
    /* The toolbar and stage are both positioned independently (toolbar pinned to
       the top, stage covering the full viewport) so the controls no longer
       reserve a grid row above the image. This lets the image centre against the
       true viewport centre instead of being pushed below the toolbar. */
    color: var(--color-text);
}

.image-viewer[hidden] {
    display: none;
}

.image-viewer__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 18%, rgb(62 156 138 / 0.18), transparent 34rem),
        rgb(6 5 5 / 0.92);
}

.image-viewer__toolbar {
    /* Pinned to the top and lifted out of flow so it never pushes the image
       down — the stage below spans the full viewport and centres the image. */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    /* Zoom controls [-] [100%] [+] stay grouped in the center; the close
       button is lifted out of this row and pinned to the top-right corner. */
    justify-content: center;
    gap: 0.6rem;
    padding: max(18px, env(safe-area-inset-top)) max(18px, var(--page-gutter)) 0;
}

.image-viewer__control {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding-inline: 0.85rem;
    border: 1px solid rgb(255 249 240 / 0.22);
    border-radius: var(--radius-pill);
    background: rgb(20 18 16 / 0.72);
    color: var(--color-text);
    cursor: pointer;
    backdrop-filter: blur(16px);
    transition:
        transform var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) ease,
        background-color var(--duration-fast) ease;
}

.image-viewer__control:hover,
.image-viewer__control:focus-visible {
    border-color: rgb(255 249 240 / 0.44);
    background: rgb(33 27 22 / 0.92);
}

.image-viewer__control:active {
    transform: translateY(1px);
}

.image-viewer__control--close {
    /* Always immediately visible in the top-right corner, clear of device
       notches / Dynamic Island via safe-area insets. */
    position: fixed;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, var(--page-gutter), env(safe-area-inset-right));
    z-index: 3;
    min-width: 48px;
}

.image-viewer__stage {
    /* Cover the whole viewport and centre the image within it. The symmetric
       vertical padding reserves equal space top and bottom: the top reserve
       clears the pinned controls, and the bottom reserve respects the safe area
       — so a full-height image stays centred and never slides under the
       toolbar. The zoom script reads this padding when fitting the image. */
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(64px, 8vh, 84px) var(--page-gutter)
        max(clamp(64px, 8vh, 84px), calc(env(safe-area-inset-bottom) + 24px));
}

.image-viewer__figure {
    display: grid;
    place-items: center;
    gap: var(--space-4);
    margin: auto;
    min-width: min-content;
}

.image-viewer__image {
    width: auto;
    max-width: calc(100vw - (var(--page-gutter) * 2));
    /* Symmetric vertical reserve (≈84px top + bottom) so the initial, pre-zoom
       image is centred in the viewport and clears the controls. The zoom script
       overrides this with an exact fit once the image loads. dvh tracks the
       real visible height when mobile browser chrome shows/hides. */
    max-height: calc(100vh - 168px);
    max-height: calc(100dvh - 168px);
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow:
        0 34px 110px rgb(0 0 0 / 0.72),
        0 0 0 1px rgb(255 249 240 / 0.14);
}

.image-viewer__caption {
    max-width: min(68ch, calc(100vw - (var(--page-gutter) * 2)));
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
}

/* No author caption: remove the caption node entirely so the figure's grid gap
   collapses and the image stays centred with no reserved/empty space. */
.image-viewer__caption:empty {
    display: none;
}

.case-meta {
    overflow: hidden;
}

.case-meta dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 0;
    border-bottom: 1px solid var(--color-line);
}

.case-meta dl div {
    padding: clamp(24px, 3vw, 38px);
    border-right: 1px solid var(--color-line);
}

.case-meta dl div:last-child {
    border-right: 0;
}

.case-meta dt,
.case-meta h3 {
    margin: 0 0 0.75rem;
    color: var(--color-muted-strong);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.case-meta dd {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 1.7vw, 1.45rem);
    font-weight: 500;
}

.case-meta__story {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.case-meta__story div {
    padding: clamp(24px, 3vw, 38px);
    border-right: 1px solid var(--color-line);
}

.case-meta__story div:last-child {
    border-right: 0;
}

.case-meta__story p {
    margin: 0;
    color: var(--color-text-soft);
    line-height: 1.65;
}

.case-bento {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--grid-gap);
}

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

.bento-tile {
    padding: clamp(28px, 3.4vw, 48px);
}

.bento-tile--large {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-tile h3 {
    max-width: 16ch;
    margin-top: 1rem;
    font-size: clamp(1.5rem, 2.6vw, 2.3rem);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

.metric-card {
    padding: clamp(28px, 3vw, 40px);
}

.metric-card strong {
    display: block;
    color: var(--color-accent);
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.metric-card span {
    display: block;
    margin-top: 0.9rem;
    color: var(--color-muted);
}

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(40px, 7vw, 100px);
    align-items: start;
}

.about-portrait {
    aspect-ratio: 1;
    min-height: auto;
}

.about-section .about-grid {
    grid-template-areas:
        "media heading"
        "media copy";
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px) clamp(40px, 5vw, 80px);
}

.about-section__media {
    grid-area: media;
}

.about-section__heading {
    grid-area: heading;
}

.about-section__copy {
    grid-area: copy;
    max-width: 58ch;
}

.about-section__title {
    max-width: unset;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.06;
    text-wrap: pretty;
}

.about-section .about-portrait {
    position: relative;
    overflow: hidden;
    width: min(100%, 540px);
    aspect-ratio: 1;
    border-radius: 28px;
}

.about-section .about-portrait img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.about-section__copy .tag-row {
    margin-top: var(--space-8);
}

.about-section .about-section__copy p {
    margin: 0;
    font-size: clamp(1rem, 1.05vw, 1.08rem);
    line-height: 1.72;
}

.about-section .about-section__copy p + p {
    margin-top: var(--space-6);
}

.rich-copy h2 {
    max-width: 18ch;
    margin-bottom: var(--space-6);
    text-wrap: pretty;
}

.rich-copy p {
    color: var(--color-muted);
    font-size: clamp(1rem, 1.3vw, 1.16rem);
    line-height: 1.8;
}

.about-section .about-section__intro {
    color: var(--color-text-soft);
    font-size: clamp(1.03rem, 1.12vw, 1.14rem);
    line-height: 1.74;
}

.skills-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.75rem, 3vw, 3rem);
    margin-top: clamp(3rem, 6vw, 5.25rem);
}

.skills-columns > div {
    min-width: 0;
}

.skills-columns h3 {
    margin: 0;
    color: var(--color-text-soft);
    font-family: var(--font-display);
    font-size: clamp(1.48rem, 1.85vw, 1.9rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.skills-section .section-heading {
    max-width: none;
}

.skills-section .tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.78rem;
    max-width: 100%;
    min-width: 0;
    margin-top: clamp(1.15rem, 2vw, 1.65rem);
    margin-bottom: 0;
    overflow: visible;
    white-space: normal;
}

.skills-section .tag-row span {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    min-height: 2.8rem;
    overflow: visible;
    border-color: rgb(255 249 240 / 0.14);
    background: rgb(255 249 240 / 0.025);
    color: var(--color-muted);
    font-size: clamp(0.88rem, 1vw, 0.98rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.01em;
    padding: 0.74rem 1.08rem;
    text-overflow: clip;
    overflow-wrap: anywhere;
    white-space: normal;
}

.faq-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.34fr) minmax(0, 0.66fr);
    gap: clamp(44px, 7vw, 120px);
    align-items: start;
}

.faq-heading {
    position: sticky;
    top: 112px;
    margin-bottom: 0;
}

.faq-list {
    border-top: 1px solid var(--color-line);
}

.faq-item {
    border-bottom: 1px solid var(--color-line);
}

.faq-item h3 {
    margin: 0;
}

.faq-question {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding: clamp(24px, 3vw, 36px) 0;
    border: 0;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.faq-question span:first-child {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.18;
}

.faq-question__icon {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: var(--color-accent);
}

.faq-question__icon::before,
.faq-question__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: translateY(-50%);
    transition: transform var(--duration-base) var(--ease-out);
}

.faq-question__icon::after {
    transform: translateY(-50%) rotate(90deg);
}

.faq-question[aria-expanded="true"] .faq-question__icon::after {
    transform: translateY(-50%) rotate(0deg);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--duration-base) var(--ease-out);
}

.faq-item.is-open .faq-answer {
    grid-template-rows: 1fr;
}

.faq-answer__inner {
    overflow: hidden;
}

.faq-answer p {
    max-width: 64ch;
    margin: 0;
    padding: 0 0 clamp(24px, 3vw, 36px);
    color: var(--color-muted);
    line-height: 1.7;
}

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

.contact-panel {
    padding: clamp(28px, 4vw, 56px);
}

.contact-panel h2 {
    margin-bottom: var(--space-4);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.contact-panel .button {
    margin-top: var(--space-4);
}

.contact-panel--quiet {
    background:
        linear-gradient(135deg, rgb(33 27 22 / 0.94), rgb(27 23 19 / 0.84)),
        radial-gradient(circle at 80% 12%, rgb(0 92 80 / 0.14), transparent 34%),
        var(--color-surface-strong);
}

.contact-section {
    overflow: hidden;
}

.contact-section__inner {
    max-width: min(100%, 1180px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    gap: 0;
    align-items: center;
}

.contact-section__content,
.contact-section__visual {
    min-width: 0;
}

.contact-section__meta {
    margin-bottom: var(--space-8);
}

.contact-section__title {
    max-width: 14ch;
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--type-hero-headline);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.035em;
    text-wrap: pretty;
}

.contact-section__title em {
    color: var(--color-accent);
    font-style: italic;
}

.contact-section__copy {
    display: grid;
    gap: var(--space-2);
    max-width: 620px;
    margin-top: var(--space-6);
}

.contact-section__copy p {
    margin: 0;
    color: var(--color-muted);
    font-size: clamp(1.1rem, 1.8vw, 1.45rem);
    line-height: 1.55;
}

.contact-section__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.contact-section__actions .button {
    min-height: 56px;
    padding-inline: clamp(1.7rem, 3vw, 2.3rem);
}

.contact-section__visual {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.contact-section__visual img {
    display: block;
    width: min(100%, 640px);
    height: auto;
    object-fit: contain;
}

.clean-list {
    display: grid;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--color-muted);
}

.clean-list li {
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-line);
}

.empty-state {
    margin: var(--space-12) 0 0;
    color: var(--color-muted-strong);
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    text-align: center;
}

.site-footer {
    border-top: 1px solid var(--color-line);
}

.site-footer__inner {
    padding-block: var(--footer-space) var(--footer-space-tight);
}

.site-footer__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(128px, max-content));
    gap: var(--space-10) clamp(36px, 5vw, 72px);
    align-items: start;
}

.site-footer__brand {
    max-width: 680px;
}

.site-footer__brand .brand-mark {
    margin-bottom: var(--space-8);
}

.site-footer__brand .brand-mark__logo {
    width: clamp(150px, 15vw, 190px);
}

.site-footer__brand p {
    max-width: 58ch;
    margin: 0;
    color: var(--color-muted);
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    line-height: 1.6;
}

@media (min-width: 981px) {
    .site-footer__brand p {
        max-width: min(56ch, 660px);
    }
}

.footer-nav {
    display: grid;
    gap: var(--space-4);
    align-content: start;
    min-width: 128px;
    color: var(--color-muted);
}

.footer-nav h2 {
    margin: 0 0 var(--space-2);
    color: var(--color-muted-strong);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.footer-nav a {
    width: fit-content;
    color: var(--color-muted);
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    line-height: 1.25;
    transition: color var(--duration-base) var(--ease-out);
}

.footer-nav a:hover,
.site-footer__bottom a:hover {
    color: var(--color-text);
}

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    margin-top: var(--footer-space);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-line);
    color: var(--color-muted-strong);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.site-footer__bottom p {
    margin: 0;
}

.site-footer__bottom a {
    color: var(--color-muted);
    transition: color var(--duration-base) var(--ease-out);
}

/* Draft preview banner (moved from inline style for CSP compliance). */
.draft-preview-banner {
    position: sticky;
    top: 0;
    z-index: 9999;
    padding: 0.6rem 1rem;
    text-align: center;
    font: 600 0.85rem/1.4 system-ui, sans-serif;
    color: #141210;
    background: #E8C46A;
}
