:root {
    --page-bg: #ffffff;
    --panel: #f3f3f3;
    --panel-soft: #e9e9e9;
    --text: #151515;
    --muted: #6f6f6f;
    --border: rgba(21, 21, 21, .12);
    --hero-text: #ffffff;
    --gap: 10px;
    --radius: 10px;
    --home-project-card-height: max(390px, calc(100vh - 390px));
}

:root[data-theme="dark"] {
    --page-bg: #090909;
    --panel: #151515;
    --panel-soft: #1c1c1c;
    --text: #f4f4f4;
    --muted: #aaa;
    --border: rgba(255, 255, 255, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: "Google Sans Flex", "Google Sans", Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

/* Fixed 10px viewport frame. Scrolling content passes underneath it,
   so the page never visually touches the browser edges. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    border: 10px solid var(--page-bg);
    border-radius: 0;
    transition: border-color .2s ease;
}

/* Keep the frame aligned with the website viewport while the WP admin bar is visible. */
body.admin-bar::after {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar::after {
        top: 46px;
    }
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
iframe, video, audio, input, textarea, select, button { border-radius: var(--radius); }
input, textarea, select, button { font: inherit; }

/* 12-column full-width page shell: 10px outer padding, 10px grid gap. */
.split-layout {
    width: calc(100% - 20px);
    margin: 10px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--gap);
    align-items: start;
}

.split-hero {
    grid-column: 1 / span 6;
    position: fixed;
    z-index: 1;
    top: 10px;
    left: 10px;
    width: calc(50vw - 15px);
    height: calc(100vh - 20px);
    min-height: 560px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #111;
}

.split-content {
    grid-column: 7 / span 6;
    min-width: 0;
    display: grid;
    gap: var(--gap);
}

.container,
.content-area {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Compact header over the left 6-column hero. */
.site-header {
    position: fixed;
    z-index: 100;
    top: 40px;
    left: 40px;
    right: auto;
    width: max-content;
    max-width: calc(50vw - 80px);
    border-radius: 20px;
    color: #151515;
    background: #ffffff;
}

.header-inner {
    min-height: 52px;
    width: max-content;
    max-width: 100%;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-branding {
    flex: 0 0 auto;
    min-width: 0;
    margin-right: 20px;
    font-weight: 700;
}

.site-branding a { text-decoration: none; }
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { max-height: 34px; width: auto; border-radius: 0; }

.primary-nav { min-width: 0; }
.primary-nav ul,
.footer-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 32px;
    white-space: nowrap;
}
.primary-nav a {
    font-size: .82rem;
    text-decoration: none;
}

.theme-toggle {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    padding: 2px;
    border: 1px solid rgba(21,21,21,.14);
    border-radius: 999px;
    background: #e9e9e9;
    color: #151515;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.theme-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #151515;
    transition: transform .2s ease, background .2s ease;
}
.theme-toggle[aria-pressed="true"] {
    background: #151515;
    border-color: #151515;
}
.theme-toggle[aria-pressed="true"]::after {
    transform: translateX(18px);
    background: #ffffff;
}
.theme-toggle > span { display: none; }

/* Sticky hero visual. */
.hero-media,
.hero-slides,
.hero-slide,
.hero-image,
.hero-image-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-fit: cover;
    border-radius: 0;
}
.hero-image-placeholder { background: #222; }

.hero-slide {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s ease;
}
.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: linear-gradient(to top, rgba(0,0,0,.68) 0%, rgba(0,0,0,.18) 52%, rgba(0,0,0,.18) 100%);
    pointer-events: none;
}

.hero-copy {
    position: absolute;
    z-index: 10;
    left: 28px;
    right: 28px;
    bottom: 28px;
    color: var(--hero-text);
    max-width: 760px;
}
.hero-copy h1 {
    margin: 0;
    max-width: 10ch;
    font-size: clamp(2.8rem, 5.6vw, 6.5rem);
    line-height: .92;
    letter-spacing: -.05em;
}
.hero-copy .lead {
    margin-top: 18px;
    max-width: 48ch;
    color: rgba(255,255,255,.82);
}
.hero-copy .lead p:last-child { margin-bottom: 0; }
.hero-copy .eyebrow { color: rgba(255,255,255,.72); }

.hero-project-label {
    position: absolute;
    z-index: 12;
    top: 84px;
    right: 18px;
    max-width: calc(100% - 36px);
    padding: 8px 10px;
    border-radius: var(--radius);
    background: rgba(0,0,0,.34);
    color: #fff;
    font-size: .78rem;
    line-height: 1.2;
    backdrop-filter: blur(12px);
}
.hero-project-label span { opacity: .55; margin-right: 6px; }

.hero-dots {
    position: absolute;
    z-index: 15;
    right: 20px;
    bottom: 20px;
    display: flex;
    gap: 6px;
}
.hero-dot {
    width: 32px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.35);
    cursor: pointer;
}
.hero-dot.is-active { background: #fff; }


/* Home: first row inside the scrolling right-hand 6-column area. */
.home-intro-row {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--gap);
    align-items: stretch;
}

.home-intro-card {
    grid-column: span 4;
    min-width: 0;
    min-height: 290px;
    padding: clamp(24px, 2.4vw, 36px);
    border-radius: var(--radius);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.home-intro-card__top {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.home-intro-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--panel-soft);
}
.home-intro-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.home-intro-heading { min-width: 0; }
.home-intro-heading .eyebrow { margin-bottom: 8px; }
.home-intro-heading h1 {
    margin: 0;
    font-size: clamp(1.9rem, 2.15vw, 3rem);
    line-height: .96;
    letter-spacing: -.045em;
    white-space: nowrap;
}
.home-intro-lead {
    margin-top: 34px;
    max-width: 48ch;
    font-size: clamp(.92rem, 1.05vw, 1.08rem);
    line-height: 1.48;
}
.home-intro-lead p { margin-top: 0; }
.home-intro-lead p:last-child { margin-bottom: 0; }

.home-quick-links {
    grid-column: span 2;
    min-width: 0;
    display: grid;
    grid-template-rows: repeat(5, 50px);
    gap: var(--gap);
}

.home-quick-link {
    min-width: 0;
    height: 50px;
    padding: 8px 10px 8px 14px;
    border-radius: var(--radius);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
}
.home-quick-link__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .86rem;
    font-weight: 600;
}
.home-quick-link__icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    overflow: hidden;
}
.home-quick-link__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.home-quick-link--accent {
    background: #111111;
    color: #ffffff;
}
:root[data-theme="dark"] .home-quick-link--accent {
    background: #ffffff;
    color: #111111;
}


/* Home: archive bar below the intro row. */
.home-projects-bar {
    width: 100%;
    min-width: 0;
    height: 60px;
    padding: 0 22px;
    border-radius: var(--radius);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--text);
    text-decoration: none;
}
.home-projects-bar__title {
    font-size: .9rem;
    font-weight: 650;
}
.home-projects-bar__link {
    font-size: .82rem;
    color: var(--muted);
    white-space: nowrap;
}

/* Home: four ACF taxonomy sections in a 2 x 2 grid (3 columns each). */
.home-taxonomy-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--gap);
    grid-auto-rows: var(--home-project-card-height);
}
.home-taxonomy-card {
    grid-column: span 3;
    position: relative;
    min-width: 0;
    height: 100%;
    padding: clamp(22px, 2.2vw, 32px);
    border-radius: var(--radius);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
}
.home-taxonomy-card.has-background-image {
    color: #fff;
    background: #1b1b1b;
}
.home-taxonomy-card__media,
.home-taxonomy-card__overlay {
    position: absolute;
    inset: 0;
}
.home-taxonomy-card__media {
    z-index: -2;
    overflow: hidden;
}
.home-taxonomy-card__media img,
.home-taxonomy-card__image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center;
    border-radius: 0 !important;
}
.home-taxonomy-card__overlay {
    z-index: -1;
    background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.22) 58%, rgba(0,0,0,.10) 100%);
}
.home-taxonomy-card__head {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding-bottom: 20px;
}
.home-taxonomy-card__head .eyebrow {
    margin-bottom: 8px;
}
.home-taxonomy-card.has-background-image .home-taxonomy-card__head .eyebrow {
    color: rgba(255,255,255,.72);
}
.home-taxonomy-projects {
    position: relative;
    z-index: 1;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}
.home-taxonomy-project {
    min-width: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
}
.home-taxonomy-project__title {
    display: inline-block;
    min-width: 0;
    font-size: clamp(1.25rem, 1.65vw, 1.75rem);
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -.025em;
    text-shadow: 0 1px 16px rgba(0,0,0,.35);
}
.home-taxonomy-card.has-background-image .home-taxonomy-project__title {
    color: #fff;
}
.home-taxonomy-empty {
    position: relative;
    z-index: 1;
    margin: auto 0 0;
    color: var(--muted);
    font-size: .9rem;
}
.home-taxonomy-card.has-background-image .home-taxonomy-empty {
    color: rgba(255,255,255,.75);
}

/* Right-column content panels. */
.section {
    min-width: 0;
    padding: clamp(24px, 3.2vw, 48px);
    border-radius: var(--radius);
    background: var(--panel);
    overflow: hidden;
}
.section-media { padding: 0; }
.section-media > img {
    width: 100%;
    min-height: 420px;
    max-height: 88vh;
    object-fit: cover;
}

/* Home contact CTA: compact strip, identical height to the "Najważniejsze projekty" bar. */
.contact-panel {
    min-height: 60px;
    height: 60px;
    padding: 0 22px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: #111111;
    color: #ffffff;
    overflow: hidden;
}
.section.contact-panel h2 {
    margin: 0;
    font-size: .95rem;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -.015em;
    white-space: nowrap;
}
.contact-panel .eyebrow,
.contact-panel .lead {
    margin: 0;
    font-size: .78rem;
    line-height: 1.2;
    color: rgba(255,255,255,.72);
}
.contact-panel .lead p { margin: 0; }
.contact-panel .button-link {
    flex: 0 0 auto;
    align-self: center;
    border-color: rgba(255,255,255,.22);
    color: #ffffff;
}
:root[data-theme="dark"] .contact-panel {
    background: #ffffff;
    color: #111111;
}
:root[data-theme="dark"] .contact-panel .eyebrow,
:root[data-theme="dark"] .contact-panel .lead { color: rgba(17,17,17,.65); }
:root[data-theme="dark"] .contact-panel .button-link {
    border-color: rgba(17,17,17,.18);
    color: #111111;
}

.eyebrow {
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .72rem;
    color: var(--muted);
}
.lead {
    font-size: clamp(1.05rem, 1.7vw, 1.35rem);
    color: var(--muted);
}

/* Home intro: deliberately smaller than generic lead text. */
.lead.home-intro-lead {
    font-size: clamp(.88rem, .92vw, .98rem);
    line-height: 1.46;
}

/* Taxonomy cards: keep only the small taxonomy eyebrow at the top.
   These selectors also neutralize markup from an older cached template. */
.home-taxonomy-card__head h1,
.home-taxonomy-card__head h2,
.home-taxonomy-card__head h3,
.home-taxonomy-card__head .home-taxonomy-card__title {
    display: none !important;
}
.section h2 {
    margin: 0 0 24px;
    font-size: clamp(2rem, 3.2vw, 4rem);
    line-height: .98;
    letter-spacing: -.04em;
}
.section h3 { margin-top: 0; }

.grid { display: grid; gap: var(--gap); }
.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 {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-soft);
    overflow: hidden;
}
.card a { text-decoration: none; }

.project-card { padding: 0; }
.project-card > a { display: block; }
.project-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--panel-soft);
}
.project-card h3 {
    margin: 0;
    padding: 16px 16px 8px;
}
.project-card > .eyebrow { padding: 0 16px 14px; margin: 0; }

.internal-link-card {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
}
.internal-link-card img { width: 38px; height: 38px; object-fit: contain; }

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
}
.project-meta > div {
    min-width: 0;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--panel-soft);
}
.project-meta-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.timeline-list { display: grid; gap: var(--gap); }

.project-media { display: grid; gap: var(--gap); padding: var(--gap); }
.project-media img { width: 100%; }
.project-gallery img { width: 100%; max-width: 100%; height: auto; aspect-ratio: auto; object-fit: initial; }

.logo-slider {
    display: flex;
    gap: var(--gap);
    overflow-x: auto;
    padding-bottom: 4px;
}
.logo-slider img {
    flex: 0 0 180px;
    width: 180px;
    height: 110px;
    padding: 18px;
    object-fit: contain;
    background: var(--panel-soft);
}

.media-frame { padding: 0; }
.media-frame iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}
.audio-player audio { width: 100%; }

.content-area > *:first-child { margin-top: 0; }
.content-area > *:last-child { margin-bottom: 0; }

/* Contact Form 7 baseline. */
.wpcf7-form { display: grid; gap: 14px; }
.wpcf7-form p { margin: 0; }
.wpcf7-form input:not([type="submit"]),
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
}
.wpcf7-form input[type="submit"] {
    padding: 13px 18px;
    border: 1px solid var(--border);
    background: var(--text);
    color: var(--panel);
    cursor: pointer;
}

.navigation.pagination { margin-top: 10px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: var(--radius);
    background: var(--panel-soft);
    text-decoration: none;
}

/* Footer is part of the scrolling right 6-column side. */
.site-footer {
    width: calc(50vw - 15px);
    margin: 0 10px 10px calc(50vw + 5px);
    padding: clamp(32px, 3.2vw, 48px);
    border-radius: var(--radius);
    background: #111111;
    color: #ffffff;
    overflow: hidden;
}
.footer-top { display: grid; gap: 38px; }
.footer-person {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
}
.footer-person .eyebrow,
.footer-person .lead { color: rgba(255,255,255,.66); }
/* Dark mode: invert the entire footer card to a light surface. */
:root[data-theme="dark"] .site-footer {
    background: #ffffff;
    color: #111111;
}
:root[data-theme="dark"] .footer-person,
:root[data-theme="dark"] .footer-menu {
    background: transparent;
    color: #111111;
}
:root[data-theme="dark"] .footer-person-copy h2,
:root[data-theme="dark"] .footer-menu a {
    color: #111111;
}
:root[data-theme="dark"] .footer-person .eyebrow,
:root[data-theme="dark"] .footer-person .lead,
:root[data-theme="dark"] .footer-menu__title,
:root[data-theme="dark"] .footer-bottom {
    color: rgba(17,17,17,.58);
}
:root[data-theme="dark"] .footer-person-image {
    background: rgba(17,17,17,.08);
}
.footer-person-image {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255,255,255,.08);
}
.footer-person-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
}
.footer-person-copy h2 { margin: 0 0 10px; color: #ffffff; }
.footer-person-copy .lead { font-size: 1rem; }
.footer-menus {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}
.footer-menu {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
}
.footer-menu__title {
    margin: 0 0 16px;
    font-size: .72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255,255,255,.55);
}
.footer-menu li { border: 0; }
.footer-menu li + li { margin-top: 8px; }
.footer-menu a {
    text-decoration: none;
    font-size: .9rem;
    border: 0;
    color: #ffffff;
}
.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: .82rem;
    color: rgba(255,255,255,.55);
}

@media (max-width: 1100px) {
    .primary-nav ul { gap: 24px; }
    .primary-nav a { font-size: .76rem; }
    .header-inner { gap: 20px; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
    .split-hero,
    .split-content {
        grid-column: 1;
    }
    .split-hero {
        position: relative;
        z-index: auto;
        top: auto;
        left: auto;
        width: auto;
        height: min(78vh, 760px);
        min-height: 520px;
    }
    .site-header {
        top: 20px;
        left: 20px;
        right: auto;
        width: max-content;
        max-width: calc(100vw - 40px);
        border-radius: 20px;
    }
    .site-footer {
        width: auto;
        margin: 0 10px 10px;
    }
    .hero-copy h1 { font-size: clamp(2.8rem, 10vw, 5.5rem); }
    .home-intro-heading h1 { white-space: normal; }
    .home-intro-row { grid-template-columns: 1fr; }
    .home-intro-card, .home-quick-links { grid-column: 1; }
    .home-quick-links { grid-template-rows: none; grid-auto-rows: 50px; }
    .home-taxonomy-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .home-taxonomy-card { grid-column: 1; min-height: 420px; }
    .contact-panel { min-height: 60px; height: 60px; }
}

@media (max-width: 680px) {
    .site-header { background: #ffffff; color: #151515; }
    .header-inner { flex-wrap: wrap; }
    .primary-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .primary-nav ul { width: max-content; }
    .hero-project-label { top: 120px; }
    .hero-copy { left: 20px; right: 20px; bottom: 20px; }
    .hero-dots { bottom: 14px; right: 14px; }
    .grid-2, .grid-3, .grid-4,
    .project-meta, .project-meta-3,
    .footer-person, .footer-menus {
        grid-template-columns: 1fr;
    }
    .home-intro-card { min-height: 0; padding: 24px 20px; }
    .home-intro-card__top { grid-template-columns: 58px minmax(0, 1fr); gap: 14px; }
    .home-intro-avatar { width: 58px; height: 58px; }
    .footer-person { grid-template-columns: 58px minmax(0, 1fr); }
    .footer-person-image { width: 58px; height: 58px; }
    .home-intro-lead { margin-top: 24px; }
    .home-projects-bar { padding: 0 16px; }
    .home-taxonomy-card { min-height: 360px; padding: 22px 20px; }
    .contact-panel { min-height: 60px; height: 60px; padding: 0 16px; }
    .section { padding: 24px 20px; }
    .section-media, .media-frame, .project-media { padding: 0; }
    .footer-bottom { flex-direction: column; }
}

/* =========================================================
   v0.2.18 — Single project layout + global contact CTA
   ========================================================= */

.single-project-content {
    align-content: start;
}

/* Single Project first row: 4/6 intro card + 2/6 metadata stack. */
.project-intro-row {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--gap);
    align-items: stretch;
}

.project-intro-card {
    grid-column: span 4;
    min-width: 0;
    height: 230px;
    padding: clamp(24px, 2.4vw, 36px);
    border-radius: var(--radius);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.project-intro-card .eyebrow {
    margin: 0 0 8px;
}

.project-intro-card h1 {
    margin: 0;
    font-size: clamp(1.9rem, 2.15vw, 3rem);
    line-height: .96;
    letter-spacing: -.045em;
}

.project-intro-lead {
    margin-top: auto;
    max-width: 48ch;
    font-size: clamp(.9rem, .98vw, 1.02rem);
    line-height: 1.45;
    color: var(--muted);
}

.project-intro-lead p {
    margin-top: 0;
}

.project-intro-lead p:last-child {
    margin-bottom: 0;
}

.project-meta-stack {
    grid-column: span 2;
    min-width: 0;
    display: grid;
    grid-template-rows: repeat(4, 50px);
    gap: var(--gap);
}

.project-meta-tile {
    min-width: 0;
    height: 50px;
    padding: 0 14px;
    border-radius: var(--radius);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.project-meta-tile__label {
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 650;
    color: var(--text);
}

.project-meta-tile__value {
    min-width: 0;
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-size: .78rem;
    color: var(--muted);
}

.project-gutenberg-content {
    background: var(--panel);
}

.project-gallery-section {
    padding: 0;
    background: transparent;
    overflow: visible;
}

.project-gallery-section .project-gallery {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--gap);
    width: 100%;
    min-width: 0;
}

/* Gallery images always fill the 6-column content width, while their height
   is calculated from the source image's real aspect ratio. */
.project-gallery-section .project-gallery .project-gallery-image {
    display: block;
    flex: none;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    margin: 0 !important;
    border-radius: var(--radius);
}

.project-youtube-section,
.project-audio-section {
    background: var(--panel);
}

/* Shared CTA before the footer on every public page/template. */
.global-contact-cta {
    width: calc(50vw - 15px);
    min-width: 0;
    height: 60px;
    margin: 0 10px 10px calc(50vw + 5px);
    padding: 0 20px;
    border-radius: var(--radius);
    background: #111111;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    text-decoration: none;
    overflow: hidden;
    transition: background .2s ease, color .2s ease;
}

.global-contact-cta__title {
    min-width: 0;
    font-size: .9rem;
    font-weight: 650;
    line-height: 1;
}

.global-contact-cta__icon {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
}

.global-contact-cta__icon svg {
    position: absolute;
    inset: 3px;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    border-radius: 0;
    transition: opacity .22s ease, transform .22s ease;
}

.global-contact-cta__envelope {
    opacity: 1;
    transform: translateX(0);
}

.global-contact-cta__arrow {
    opacity: 0;
    transform: translateX(-8px);
}

.global-contact-cta:hover .global-contact-cta__envelope,
.global-contact-cta:focus-visible .global-contact-cta__envelope {
    opacity: 0;
    transform: translateX(8px);
}

.global-contact-cta:hover .global-contact-cta__arrow,
.global-contact-cta:focus-visible .global-contact-cta__arrow {
    opacity: 1;
    transform: translateX(0);
}

:root[data-theme="dark"] .global-contact-cta {
    background: #ffffff;
    color: #111111;
}

@media (max-width: 900px) {
    .project-intro-row {
        grid-template-columns: 1fr;
    }

    .project-intro-card,
    .project-meta-stack {
        grid-column: 1;
    }

    .project-intro-card {
        height: auto;
        min-height: 230px;
    }

    .global-contact-cta {
        width: auto;
        margin: 0 10px 10px;
    }
}

@media (max-width: 680px) {
    .project-intro-card {
        min-height: 0;
        padding: 24px 20px;
    }

    .project-intro-card h1 {
        font-size: clamp(1.8rem, 9vw, 2.8rem);
    }

    .project-intro-lead {
        margin-top: 20px;
    }

    .project-meta-tile {
        padding: 0 14px;
    }

    .global-contact-cta {
        padding: 0 16px;
    }
}

/* v0.2.20 — Single Project: show the left hero image without any darkening overlay. */
.single-project-layout .hero-scrim {
    display: none;
}

/* v0.2.20 — Single Project H1 uses regular weight. */
.single-project-layout .project-intro-card h1 {
    font-weight: 400;
}

/* =========================================================
   v0.2.21 — Project archive
   ========================================================= */

.archive-project-content {
    align-content: start;
}

/* Full-width 6/6 archive introduction tile.
   v0.2.23: twice the previous visual height, with content vertically centred. */
.archive-intro-card {
    min-width: 0;
    min-height: 320px;
    padding: clamp(24px, 2.4vw, 36px);
    border-radius: var(--radius);
    background: var(--panel);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.archive-intro-card .eyebrow {
    margin: 0 0 8px;
}

.archive-intro-card h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 4rem);
    line-height: .96;
    letter-spacing: -.045em;
    font-weight: 500;
}

.archive-intro-lead {
    max-width: 58ch;
    margin-top: 22px;
    font-size: clamp(.9rem, .98vw, 1.02rem);
    line-height: 1.45;
    color: var(--muted);
}

.archive-intro-lead p {
    margin-top: 0;
}

.archive-intro-lead p:last-child {
    margin-bottom: 0;
}

/* Left hero: two stacked layers cross-faded by archive-projects.js. */
.archive-project-hero__media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    background: #111111;
}

.archive-project-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 0;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity .5s cubic-bezier(.2,.65,.25,1), transform .7s cubic-bezier(.2,.65,.25,1);
    will-change: opacity, transform;
}

.archive-project-hero__image.is-active {
    opacity: 1;
    transform: scale(1);
}

/* 60px project rows across the full right column. */
.archive-project-list {
    display: grid;
    gap: var(--gap);
}

.archive-project-row {
    width: 100%;
    min-width: 0;
    height: 60px;
    padding: 0 20px;
    border-radius: var(--radius);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--text);
    text-decoration: none;
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
}

.archive-project-row:hover,
.archive-project-row:focus-visible {
    background: color-mix(in srgb, var(--panel) 88%, #000000 12%);
}

.archive-project-row:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.archive-project-row__title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .92rem;
    font-weight: 650;
}

.archive-project-row__meta {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    color: var(--muted);
    font-size: .78rem;
}

.archive-project-row__taxonomy {
    max-width: 28ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.archive-project-row__year {
    min-width: 4ch;
    text-align: right;
    color: var(--text);
}

.archive-project-empty {
    background: var(--panel);
}

.archive-project-layout .navigation.pagination {
    margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
    .archive-project-hero__image,
    .archive-project-row {
        transition: none;
    }
}

@media (max-width: 900px) {
    .archive-project-hero__media {
        position: absolute;
    }
}

@media (max-width: 680px) {
    .archive-intro-card {
        min-height: 240px;
        padding: 24px 20px;
    }

    .archive-intro-card h1 {
        font-size: clamp(2rem, 10vw, 3.2rem);
    }

    .archive-project-row {
        height: auto;
        min-height: 60px;
        padding: 12px 16px;
        align-items: flex-start;
    }

    .archive-project-row__meta {
        gap: 12px;
        font-size: .72rem;
    }

    .archive-project-row__taxonomy {
        max-width: 14ch;
    }
}
