/* ==========================================================================
   Noah Klaholz: portfolio
   Swiss / Basel-school typography: one grotesk, one mono, one red.
   ========================================================================== */

:root {
    --bg: #f3f1ec;
    --surface: #fbfaf7;
    --ink: #121211;
    --ink-2: #3b3a37;
    --muted: #6d6b66;
    --rule: #d8d4cc;
    --rule-strong: #121211;
    --accent: #e2231a;
    --accent-ink: #ffffff;
    --backdrop: rgb(18 18 17 / 0.45);

    --font-sans: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --wrap: 1320px;
    --gutter: clamp(16px, 4vw, 48px);
    --header-h: 64px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0e0e0d;
        --surface: #161615;
        --ink: #edebe6;
        --ink-2: #c4c1ba;
        --muted: #8f8c86;
        --rule: #2b2a28;
        --rule-strong: #edebe6;
        --accent: #ff3b2f;
        --backdrop: rgb(0 0 0 / 0.6);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0e0e0d;
    --surface: #161615;
    --ink: #edebe6;
    --ink-2: #c4c1ba;
    --muted: #8f8c86;
    --rule: #2b2a28;
    --rule-strong: #edebe6;
    --accent: #ff3b2f;
    --backdrop: rgb(0 0 0 / 0.6);
    color-scheme: dark;
}

/* ---------- base ---------- */

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

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

html.dialog-open { overflow: hidden; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.55;
    font-feature-settings: 'ss01', 'cv11';
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

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

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

.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 14px;
    background: var(--ink);
    color: var(--bg);
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon {
    width: 1em;
    height: 1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-mark {
    width: 14px;
    height: 14px;
    background: var(--accent);
    transition: transform 0.4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(90deg); }

.nav {
    display: flex;
    align-items: center;
    gap: clamp(14px, 3vw, 32px);
    font-size: 15px;
}

.nav a {
    text-decoration: none;
    color: var(--ink-2);
    transition: color 0.15s;
}
.nav a:hover { color: var(--accent); }

.theme-toggle {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.15s;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.theme-toggle .icon-moon { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- hero ---------- */

.hero {
    padding-top: clamp(40px, 9vh, 110px);
    padding-bottom: clamp(56px, 10vh, 120px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rule-strong);
    color: var(--ink-2);
}

.hero-clock time { font-variant-numeric: tabular-nums; }

.availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: var(--ink);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
    animation: pulse 2.4s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
    70%, 100% { box-shadow: 0 0 0 10px transparent; }
}

.hero-title {
    margin-top: clamp(28px, 6vh, 64px);
    font-size: clamp(48px, 10.4vw, 156px);
    line-height: 0.92;
    font-weight: 700;
    letter-spacing: -0.045em;
}

.hero-title .line {
    display: block;
    animation: rise 0.9s var(--ease) both;
}
.hero-title .line:nth-child(2) { animation-delay: 0.08s; }
.hero-title .line:nth-child(3) { animation-delay: 0.16s; }

.hero-title em {
    font-style: normal;
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.035em;
}

.hero-title .accent { color: var(--accent); }

@keyframes rise {
    from { opacity: 0; transform: translateY(0.25em); }
    to { opacity: 1; transform: none; }
}

.hero-foot {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px var(--gutter);
    margin-top: clamp(36px, 7vh, 72px);
    align-items: end;
}

.hero-lede {
    grid-column: 1 / span 6;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.45;
    color: var(--ink-2);
    max-width: 34em;
}

.latest {
    grid-column: 9 / span 4;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
    padding: 18px 20px;
    border: 1px solid var(--rule-strong);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.latest:hover { background: var(--ink); color: var(--bg); }
.latest-label { grid-column: 1; color: var(--accent); }
.latest-title { grid-column: 1; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.latest-sub { grid-column: 1; font-size: 14px; opacity: 0.75; }
.latest .arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    transition: transform 0.25s var(--ease);
}
.latest:hover .arrow { transform: translateX(4px); }

/* ---------- sections ---------- */

.section {
    padding: clamp(64px, 11vh, 128px) 0;
    scroll-margin-top: var(--header-h);
}

.section-head {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 var(--gutter);
    align-items: baseline;
    padding-top: 14px;
    border-top: 1px solid var(--rule-strong);
    margin-bottom: clamp(32px, 6vh, 64px);
}

.section-num { grid-column: 1 / span 2; color: var(--accent); }

.section-head h2 {
    grid-column: 3 / span 7;
    font-size: clamp(36px, 5.2vw, 72px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.section-note {
    grid-column: 10 / span 3;
    justify-self: end;
    color: var(--muted);
}

/* ---------- feature ---------- */

.feature {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px var(--gutter);
    margin-bottom: clamp(56px, 9vh, 96px);
}

.feature-media {
    grid-column: 1 / span 7;
    display: block;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--rule);
    align-self: start;
}

.feature-media img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}
.feature-media:hover img { transform: scale(1.02); }

.feature-body {
    grid-column: 8 / span 5;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-self: center;
}

.feature-meta { color: var(--muted); }
.feature-kicker { color: var(--accent); }

.feature-title {
    font-size: clamp(36px, 4.6vw, 64px);
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.feature-text {
    font-size: 18px;
    color: var(--ink-2);
}

.awards { display: flex; flex-wrap: wrap; gap: 8px; }

.award {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 8px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.award-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}

.award-sm {
    padding: 2px 7px 2px 6px;
    font-size: 10.5px;
    gap: 6px;
    border: 0;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.award-sm .award-dot { width: 5px; height: 5px; }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tags li {
    padding: 3px 9px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-size: 13px;
    color: var(--ink-2);
}

.feature-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--ink);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn .icon { font-size: 16px; }
.btn-solid .icon { transition: transform 0.25s var(--ease); }
.btn-solid:hover .icon { transform: translateX(3px); }

/* ---------- filters + index ---------- */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-bottom: 12px;
}

.filter {
    padding: 6px 0;
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s;
}
.filter sup { display: inline-block; margin-left: 3px; font-size: 9px; }
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.index { border-top: 1px solid var(--rule-strong); }

.index-status {
    padding: 28px 0;
    color: var(--muted);
}

.index-item { border-bottom: 1px solid var(--rule); }

.index-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px var(--gutter);
    align-items: baseline;
    padding: 22px 0;
    text-decoration: none;
    position: relative;
}

.index-num { grid-column: 1 / span 1; color: var(--muted); transition: color 0.2s; }

.index-main {
    grid-column: 2 / span 6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.index-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: clamp(22px, 2.4vw, 32px);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.025em;
    transition: transform 0.35s var(--ease), color 0.2s;
}

.index-desc {
    color: var(--muted);
    font-size: 15px;
    max-width: 40em;
}

.index-cat { grid-column: 8 / span 2; color: var(--ink-2); }
.index-when { grid-column: 10 / span 2; color: var(--muted); }

.index-arrow {
    grid-column: 12;
    justify-self: end;
    align-self: center;
    font-size: 22px;
    color: var(--muted);
    transition: transform 0.3s var(--ease), color 0.2s;
}

.index-row:hover .index-title { transform: translateX(8px); }
.index-row:hover .index-num,
.index-row:hover .index-arrow { color: var(--accent); }
.index-row:hover .index-arrow { transform: translateX(4px); }

.pill {
    padding: 2px 8px;
    border: 1px dashed var(--muted);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted);
}

.show-all {
    margin-top: 24px;
    padding: 12px 18px;
    border: 1px solid var(--rule-strong);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.show-all:hover { background: var(--ink); color: var(--bg); }

.preview {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 15;
    width: 280px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    will-change: transform;
}
.preview.is-visible { opacity: 1; }
.preview img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--surface);
    box-shadow: 0 20px 50px -20px rgb(0 0 0 / 0.45);
}

/* ---------- about ---------- */

.about {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px var(--gutter);
}

.about-photo { grid-column: 1 / span 4; }

.about-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
    transition: filter 0.6s var(--ease);
}
.about-photo:hover img { filter: none; }

.about-photo figcaption {
    margin-top: 10px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
}
.about-photo figcaption::after { content: 'Basel, CH'; }

.about-text {
    grid-column: 6 / span 7;
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: var(--ink-2);
    font-size: 18px;
}

.about-lead {
    font-size: clamp(26px, 2.8vw, 38px);
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin-bottom: 8px;
}

.facts {
    margin-top: 20px;
    border-top: 1px solid var(--rule-strong);
}

.facts > div {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
}

.facts dt { color: var(--muted); padding-top: 3px; }
.facts dd { color: var(--ink); font-size: 16px; }

/* ---------- toolkit ---------- */

.toolkit {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px var(--gutter);
}

.toolkit h3 {
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--rule-strong);
    color: var(--accent);
    font-weight: 500;
}

.toolkit li {
    font-size: clamp(20px, 1.9vw, 26px);
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* ---------- contact ---------- */

.contact-lead {
    max-width: 22em;
    font-size: clamp(22px, 2.4vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink-2);
}

.contact-email {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: clamp(28px, 5vh, 48px);
}

.email-link {
    font-size: clamp(34px, 7.4vw, 112px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.045em;
    text-decoration: none;
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 0% 0.08em;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.5s var(--ease), color 0.2s;
    overflow-wrap: anywhere;
}
.email-link:hover { background-size: 100% 0.08em; }

.copy-btn {
    padding: 10px 16px;
    border: 1px solid var(--rule-strong);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.copy-btn:hover { background: var(--ink); color: var(--bg); }

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 36px;
    margin-top: clamp(32px, 6vh, 56px);
    padding-top: 20px;
    border-top: 1px solid var(--rule);
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.contact-links a:hover { color: var(--accent); }
.contact-links svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.contact-links svg.icon-fill { fill: currentColor; stroke: none; }

/* ---------- footer ---------- */

.site-footer { padding: 28px 0 36px; }

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 32px;
    padding-top: 16px;
    border-top: 1px solid var(--rule-strong);
    color: var(--muted);
}

.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }

/* ---------- project dialog ---------- */

.project-dialog {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(980px, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--rule-strong);
    background: var(--bg);
    color: var(--ink);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.project-dialog[open] { animation: slide-in 0.45s var(--ease); }
.project-dialog::backdrop {
    background: var(--backdrop);
    animation: fade-in 0.3s ease;
}

@keyframes slide-in {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: none; opacity: 1; }
}
@keyframes fade-in { from { opacity: 0; } }

.dialog-bar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--header-h);
    padding: 0 clamp(16px, 4vw, 48px);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}

.dialog-crumb {
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dialog-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.3s var(--ease);
}
.dialog-close:hover { border-color: var(--ink); transform: rotate(90deg); }
.dialog-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.dialog-body {
    padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 48px) 48px;
}

.detail-head {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-meta { color: var(--accent); }

.detail-title {
    font-size: clamp(44px, 7vw, 96px);
    line-height: 0.92;
    font-weight: 700;
    letter-spacing: -0.045em;
}

.detail-tagline {
    max-width: 22em;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ink-2);
}

.detail-awards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    font-size: 15px;
}
.detail-awards li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.detail-awards .award-dot { align-self: center; }
.detail-awards strong { color: var(--accent); }

.detail-cover {
    margin: clamp(28px, 4vw, 44px) 0;
    border: 1px solid var(--rule);
    background: var(--surface);
}
.detail-cover img { width: 100%; max-height: 60vh; object-fit: contain; }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 40px clamp(24px, 4vw, 56px);
}

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

.detail-lead {
    font-size: clamp(20px, 1.9vw, 24px);
    line-height: 1.4;
    letter-spacing: -0.015em;
}

.highlights {
    counter-reset: hl;
    border-top: 1px solid var(--rule-strong);
}
.highlights li {
    counter-increment: hl;
    display: grid;
    grid-template-columns: 40px 1fr;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 16px;
}
.highlights li::before {
    content: counter(hl, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    padding-top: 3px;
}

.story h3 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.story p { color: var(--ink-2); max-width: 38em; }
.story p + p { margin-top: 12px; }

.gallery-item {
    border: 1px solid var(--rule);
    background: var(--surface);
}
.gallery-item img { width: 100%; max-height: 80vh; object-fit: contain; margin: 0 auto; }
.gallery-item figcaption {
    padding: 10px 12px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    text-transform: none;
}

.detail-aside dl {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    border-top: 1px solid var(--rule-strong);
}
.detail-aside dl > div {
    padding: 12px 0 14px;
    border-bottom: 1px solid var(--rule);
}
.detail-aside dt { color: var(--muted); margin-bottom: 6px; }
.detail-aside dd { font-size: 15px; }
.detail-aside .tags li { font-size: 12.5px; }
.team li + li { margin-top: 2px; }
.team a { text-decoration-color: var(--rule); text-underline-offset: 3px; }
.team a:hover { color: var(--accent); text-decoration-color: currentColor; }

.next-project {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 56px;
    padding-top: 18px;
    border-top: 1px solid var(--rule-strong);
    text-decoration: none;
}
.next-project .mono { color: var(--muted); }
.next-title {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -0.035em;
    transition: color 0.2s;
}
.next-title .icon { transition: transform 0.3s var(--ease); }
.next-project:hover .next-title { color: var(--accent); }
.next-project:hover .icon { transform: translateX(6px); }

/* ---------- toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 50;
    max-width: calc(100vw - 32px);
    padding: 12px 16px;
    background: var(--ink);
    color: var(--bg);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.35s var(--ease);
    text-transform: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
    .hero-lede { grid-column: 1 / -1; }
    .latest { grid-column: 1 / span 8; }

    .feature-media, .feature-body { grid-column: 1 / -1; }

    .index-main { grid-column: 2 / span 7; }
    .index-cat { grid-column: 9 / span 3; }
    .index-when { display: none; }

    .about-photo { grid-column: 1 / span 5; }
    .about-text { grid-column: 6 / span 7; }

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

    .detail-grid { grid-template-columns: 1fr; }
    .detail-aside dl { position: static; }
}

@media (max-width: 680px) {
    body { font-size: 16px; }

    .nav { gap: 16px; font-size: 14px; }
    .nav a[href="#about"] { display: none; }

    .hero-meta { flex-direction: column; gap: 6px; }
    .availability { margin-left: 0; }
    .latest { grid-column: 1 / -1; }

    .section-head { grid-template-columns: 1fr auto; gap: 8px; }
    .section-num { grid-column: 1; grid-row: 1; }
    .section-head h2 { grid-column: 1 / -1; grid-row: 2; }
    .section-note { grid-column: 2; grid-row: 1; }

    .index-row {
        grid-template-columns: 32px 1fr auto;
        padding: 18px 0;
    }
    .index-num { grid-column: 1; }
    .index-main { grid-column: 2; }
    .index-cat { display: none; }
    .index-arrow { grid-column: 3; font-size: 18px; }
    .index-row:hover .index-title { transform: none; }

    .about-photo, .about-text { grid-column: 1 / -1; }
    .about-photo { max-width: 320px; }
    .facts > div { grid-template-columns: 1fr; gap: 4px; }

    .toolkit { grid-template-columns: 1fr 1fr; gap: 32px 20px; }

    .project-dialog { border-left: 0; }
    .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
