/*
Theme Name: Jan Drápal
Theme URI: https://example.com/
Author: Jan Drápal
Author URI: https://example.com/
Description: A modern, minimal but colorful personal portfolio theme for a product manager, filmmaker and photographer. Classic PHP theme, translation-ready (Czech/English), no page builder required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jan-drapal
Tags: portfolio, custom-colors, translation-ready, custom-menu, threaded-comments
*/

/* =========================================================================
   1. Design tokens
   ========================================================================= */
:root {
    /* Base palette */
    --paper: #FAF9F6;
    --paper-2: #F2F0E9;
    --ink: #15151A;
    --muted: #6E6E76;
    --line: #E6E4DD;
    --white: #FFFFFF;

    /* Discipline accents.
       `*`      = bright fill (blocks/borders, paired with white text)
       `*-ink`  = darker variant for use AS text on the light background (WCAG-safe)
       `*-soft` = pale tint for pill backgrounds */
    --pm: #2D5BFF;
    --pm-ink: #1F46D8;
    --pm-soft: #E7EDFF;
    --video: #F2853A;
    --video-ink: #C2691E;
    --video-soft: #FCEBDA;
    --photo: #0FA968;
    --photo-ink: #0B8F58;
    --photo-soft: #DFF4EA;

    /* The "current accent" — overridden per discipline page via body class.
       --accent for fills, --accent-ink for accent-colored text on light bg. */
    --accent: var(--ink);
    --accent-ink: var(--ink);
    --accent-soft: var(--paper-2);
    --on-accent: #FFFFFF;

    /* Typography */
    --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Spacing & layout */
    --container: 1180px;
    --container-narrow: 760px;
    --gap: clamp(1rem, 2vw, 1.5rem);
    --section-y: clamp(3.5rem, 8vw, 7rem);
    --radius: 14px;
    --radius-sm: 10px;

    --header-h: 70px;
}

/* Per-discipline accent theming (set on <body> via body_class) */
.discipline-pm    { --accent: var(--pm);    --accent-ink: var(--pm-ink);    --accent-soft: var(--pm-soft); }
.discipline-video { --accent: var(--video); --accent-ink: var(--video-ink); --accent-soft: var(--video-soft); }
.discipline-photo { --accent: var(--photo); --accent-ink: var(--photo-ink); --accent-soft: var(--photo-soft); }

/* =========================================================================
   2. Reset & base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }

p { margin: 0 0 1.2em; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* =========================================================================
   3. Layout helpers
   ========================================================================= */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.container--narrow { max-width: var(--container-narrow); }

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

.eyebrow {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 1rem;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--ink);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    z-index: 1000;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

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

/* =========================================================================
   4. Buttons
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    border: 1.5px solid var(--ink);
    background: var(--ink);
    color: var(--white);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.btn--ghost {
    background: transparent;
    color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--white); }

/* =========================================================================
   5. Site header
   ========================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}

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

.site-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.site-nav { display: flex; align-items: center; gap: 1.75rem; }

.primary-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0; padding: 0;
}
.primary-menu a {
    font-size: 0.95rem;
    color: var(--ink);
    padding-block: 0.35rem;
    position: relative;
}
.primary-menu a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.2s ease;
}
.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after { width: 100%; }

.lang-switcher {
    display: flex;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
}
.lang-switcher a { color: var(--muted); }
.lang-switcher a[aria-current="true"] { color: var(--ink); }
.lang-switcher span[aria-hidden] { opacity: 0.5; }

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
    content: "";
    display: block;
    width: 20px; height: 2px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before { position: absolute; top: -6px; }
.nav-toggle__bar::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================================
   6. Hero
   ========================================================================= */
.hero { padding-block: clamp(3rem, 9vw, 7rem) clamp(2rem, 5vw, 4rem); }

.hero__inner { display: grid; gap: clamp(1.75rem, 4vw, 3rem); }

.hero__portrait { margin: 0; max-width: 340px; }
.hero__portrait img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius);
}

@media (min-width: 820px) {
    .hero--has-photo .hero__inner {
        grid-template-columns: 1.25fr 0.75fr;
        align-items: center;
    }
    .hero--has-photo .hero__portrait { max-width: none; }
}

.hero__title { margin-bottom: 0.4em; }
.hero__title .word { display: block; }
.hero__title .word--pm { color: var(--pm-ink); }
.hero__title .word--video { color: var(--video); } /* full tangerine to match the Video pillar (user choice) */
.hero__title .word--photo { color: var(--photo-ink); }

.hero__lead {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: var(--muted);
    max-width: 42ch;
    margin-bottom: 2rem;
}

/* =========================================================================
   7. Pillars
   ========================================================================= */
.pillars {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
}

.pillar {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: var(--radius);
    color: #fff;
    overflow: hidden;
    transition: transform 0.2s ease;
    isolation: isolate;
}
.pillar:hover { transform: translateY(-4px); }

.pillar--pm    { background: var(--pm); }
.pillar--video { background: var(--video); }
.pillar--photo { background: var(--photo); }

.pillar__index {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    opacity: 0.75;
}
.pillar__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #fff;
    margin: 0 0 0.4rem;
}
.pillar__desc { font-size: 0.98rem; opacity: 0.92; margin: 0; }
.pillar__cta {
    margin-top: 1.1rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    gap: 0.4rem;
}
.pillar__cta .arrow { transition: transform 0.2s ease; }
.pillar:hover .pillar__cta .arrow { transform: translateX(4px); }

/* Make the whole card clickable */
.pillar__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

/* =========================================================================
   8. Recent work teaser
   ========================================================================= */
.work-teaser__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--gap);
}

.work-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-2);
    aspect-ratio: 4 / 3;
}
.work-card__media {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.work-card:hover .work-card__media { transform: scale(1.04); }

.work-card__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1rem 1.1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    color: #fff;
}
.work-card__title { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; }

.tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}
.tag--pm    { background: var(--pm-soft);    color: var(--pm-ink); }
.tag--video { background: var(--video-soft); color: var(--video-ink); }
.tag--photo { background: var(--photo-soft); color: var(--photo-ink); }

.work-empty {
    grid-column: 1 / -1;
    padding: 2.5rem;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

/* =========================================================================
   9. Contact CTA band
   ========================================================================= */
.cta-band {
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--radius);
    padding: clamp(2rem, 5vw, 3.5rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.cta-band__title { color: var(--paper); margin: 0; }
.cta-band__links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.cta-band__links a { color: #a8a8b0; font-size: 0.95rem; }
.cta-band__links a:hover { color: var(--paper); }

/* =========================================================================
   9b. Discipline / content pages
   ========================================================================= */
.page-hero {
    padding-block: clamp(3rem, 8vw, 5.5rem) clamp(1.5rem, 4vw, 3rem);
}
.page-hero h1 { margin-bottom: 0.3em; }
.page-hero__intro {
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    color: var(--muted);
    max-width: 56ch;
}

/* Shared prose styling for editor content */
.prose { font-size: 1.0625rem; }
.prose > :last-child { margin-bottom: 0; }
.prose a {
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}
.prose h3 { margin-top: 1.8rem; }
.prose strong { font-weight: 500; }
.prose ul {
    list-style: none;
    margin: 1.2rem 0;
    padding: 0;
}
.prose ul li {
    position: relative;
    padding-left: 1.9rem;
    margin-bottom: 0.7rem;
}
.prose ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 3px;
    background: var(--accent);
}
.prose ol { padding-left: 1.2rem; }

/* Case study list */
.case-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: case;
}
.case-study {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem 2rem;
    padding-block: clamp(2rem, 5vw, 3rem);
    border-top: 1px solid var(--line);
}
.case-study:first-child { border-top: 0; padding-top: 0; }

.case-study__index {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-ink);
    letter-spacing: 0.04em;
}
/* Cap text-only case studies for readability; image case studies use the
   full width via the two-column grid below. */
.case-study__main { max-width: 760px; }
.case-study__main.has-media { max-width: none; }

.case-study__title { margin-bottom: 0.4rem; }
.case-study__summary {
    font-size: 1.15rem;
    color: var(--muted);
    margin-bottom: 1rem;
}
.case-study__cta { margin-top: 1.2rem; margin-bottom: 0; }
.case-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--accent-ink);
}
.case-link .arrow { transition: transform 0.15s ease; }
.case-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.case-link:hover .arrow { transform: translateX(4px); }
.case-study__media {
    margin: 1.2rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-2);
}
.case-study__media img { display: block; width: 100%; height: auto; }

@media (min-width: 720px) {
    .case-study {
        grid-template-columns: 64px 1fr;
        align-items: start;
    }
    .case-study__index { padding-top: 0.35rem; }
}

/* Featured image beside the text on wider screens */
@media (min-width: 860px) {
    .case-study__main.has-media {
        display: grid;
        grid-template-columns: 1fr 0.85fr;
        grid-template-areas:
            "title   media"
            "summary media"
            "body    media"
            "cta     media";
        column-gap: 2rem;
        align-items: start;
    }
    .case-study__main.has-media .case-study__title   { grid-area: title; }
    .case-study__main.has-media .case-study__summary { grid-area: summary; }
    .case-study__main.has-media .case-study__media   { grid-area: media; margin: 0.35rem 0 0; }
    .case-study__main.has-media .case-study__body    { grid-area: body; }
    .case-study__main.has-media .case-study__cta     { grid-area: cta; }
}

/* =========================================================================
   9c. Video grid & lightbox
   ========================================================================= */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap);
}

.video-card {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.video-card__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-2);
}
.video-card__thumb img,
.video-card__placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.video-card:hover .video-card__thumb img { transform: scale(1.04); }

.video-card__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px; /* optical centering of the triangle */
    color: #fff;
    background: var(--video);
    border-radius: 50%;
    transition: transform 0.15s ease;
}
.video-card:hover .video-card__play,
.video-card:focus-visible .video-card__play { transform: scale(1.08); }

.video-card__title {
    display: block;
    margin-top: 0.8rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.05rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(10, 10, 12, 0.82);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.lightbox__dialog {
    position: relative;
    width: min(1040px, 100%);
}

.lightbox__player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}
.lightbox__player iframe,
.lightbox__player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.lightbox__close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.15); }

@media (max-width: 600px) {
    .lightbox__close { top: auto; bottom: -3.2rem; right: 50%; transform: translateX(50%); }
}

/* =========================================================================
   9d. Photography gallery
   ========================================================================= */
.photo-grid {
    column-width: 280px;
    column-gap: var(--gap);
}

.photo-item {
    display: block;
    width: 100%;
    margin: 0 0 var(--gap);
    padding: 0;
    border: 0;
    background: var(--paper-2);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: zoom-in;
    break-inside: avoid;
    line-height: 0;
}
.photo-item__img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease, opacity 0.3s ease;
}
.photo-item:hover .photo-item__img { transform: scale(1.03); }
.photo-item:focus-visible { outline: 3px solid var(--photo); outline-offset: 3px; }

/* Photo lightbox extras (reuses the .lightbox base) */
.lightbox--photo { flex-direction: column; }

.lightbox__figure {
    position: relative;
    margin: 0;
    max-width: min(1100px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}
.lightbox__figure img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: var(--radius-sm);
    object-fit: contain;
}
.lightbox__caption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
}
.lightbox__counter {
    color: var(--photo);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.85rem;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox__nav--prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox__nav--next { right: clamp(0.5rem, 2vw, 1.5rem); }

/* =========================================================================
   9e. About page
   ========================================================================= */
.about__grid { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); }
.about__photo { margin: 0; }
.about__photo img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}
.about__body h1 { margin-bottom: 0.5em; }
.about__links { margin-top: 2rem; }

@media (min-width: 820px) {
    .about__grid.has-photo {
        grid-template-columns: 0.8fr 1fr;
        align-items: start;
    }
    .about__photo { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* =========================================================================
   9f. Contact page & forms
   ========================================================================= */
.contact-layout { display: grid; gap: clamp(2rem, 5vw, 4rem); max-width: 940px; }

@media (min-width: 820px) {
    .contact-layout { grid-template-columns: 1.4fr 0.8fr; align-items: start; }
}

.contact-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.4rem;
}
.contact-form label {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form [aria-invalid="true"] { border-color: #c0392b; }

.field-error { color: #c0392b; font-size: 0.85rem; }

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

.form-notice {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.98rem;
}
.form-notice--success { background: var(--photo-soft); color: var(--photo-ink); }
.form-notice--error { background: #fdecea; color: #a3271f; }

.contact-aside__title { font-size: 1.2rem; margin-bottom: 1rem; }
.contact-links { list-style: none; margin: 0; padding: 0; }
.contact-links li { margin-bottom: 0.6rem; }
.contact-links a {
    font-size: 1.05rem;
    border-bottom: 1.5px solid var(--accent);
    padding-bottom: 1px;
}
.contact-links a:hover { color: var(--accent-ink); }

/* =========================================================================
   9g. Single Work item (case study / project detail)
   ========================================================================= */
.single-back { color: var(--accent-ink); }
.single-back:hover { text-decoration: underline; text-underline-offset: 3px; }

.single-work__media {
    margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
    max-width: 920px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-2);
}
.single-work__media img { width: 100%; height: auto; display: block; }

.single-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}
.single-embed iframe,
.single-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.single-content { max-width: 760px; }
.single-work__back { margin-top: clamp(2rem, 5vw, 3rem); }

/* =========================================================================
   10. Site footer
   ========================================================================= */
.site-footer {
    border-top: 1px solid var(--line);
    padding-block: 2.5rem;
}
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-footer__brand { font-family: var(--font-display); font-weight: 700; }
.social-links { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.social-links a { font-size: 0.92rem; color: var(--muted); }
.social-links a:hover { color: var(--ink); }
.site-footer__legal { font-size: 0.85rem; color: var(--muted); }

/* =========================================================================
   11. Responsive
   ========================================================================= */
@media (min-width: 640px) {
    .pillars { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }

    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem clamp(1.25rem, 5vw, 3rem) 2rem;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        transform: translateY(-120%);
        transition: transform 0.25s ease;
    }
    .site-nav[data-open="true"] { transform: translateY(0); }

    .primary-menu { flex-direction: column; align-items: flex-start; gap: 1rem; width: 100%; }
    .primary-menu a { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
