/* Small presentation refinements on top of the original site.
   The original sections, navigation, cards and expanded chat are retained. */
body[data-page] { padding: 0; }
.main-content { border-radius: 0; }
html { scroll-padding-top: 90px; }
section, [id^="project-"] { scroll-margin-top: 90px; }

/* AI is part of the name and the visual signature: one flat gold, used nowhere else. */
.hero-name .name-ai,
.hero-name .name-ai .typewriter-char,
.brand .name-ai {
    color: var(--gold);
    font-weight: inherit;
    background: none;
    text-shadow: none;
    animation: none;
}
.name-surname { white-space: nowrap; }
.hero-name .is-cursor::after { background: #e8c685; }
.hero-name { font-size: clamp(2.4rem, 4.8vw, 3.75rem); margin-bottom: 12px; }
.hero-actions .btn-line { border-radius: 999px; }
.hero-kicker { flex-wrap: nowrap; white-space: nowrap; margin-bottom: 12px; }

/* A shorter photographic opening, with a slow camera drift and subtle depth. */
.hero-photo { --band: clamp(460px, 60svh, 540px); overflow: hidden; position: sticky; top: 0; z-index: 0; }
.hero-photo-inner { padding: 96px 28px 76px; max-width: 650px; }
.home-content {
    position: relative;
    z-index: 3;
    background: var(--surface);
    border-radius: 28px 28px 0 0;
    margin-top: -24px;
    padding-top: 24px;
    box-shadow: 0 -18px 48px rgb(20 34 58 / 14%);
}
.hero-scroll {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    bottom: 30px;
    border: 1px solid #ffffff45;
    border-radius: 50%;
    background: #0a1b2e60;
    color: #fff;
    animation: none;
    transition: background 180ms ease, border-color 180ms ease;
}
.hero-scroll svg { width: 26px; height: 26px; animation: scroll-chevron 2.4s ease-in-out infinite; }
.hero-scroll:is(:hover, :focus-visible) svg { animation-play-state: paused; }
@keyframes scroll-chevron {
    0%, 100% { transform: translateY(-2px); }
    50% { transform: translateY(3px); }
}
.hero-scroll:hover { background: #ffffff25; border-color: #e8c685; }
.hero-scroll:focus-visible { outline: 2px solid #e8c685; outline-offset: 5px; }
.hero-credit { bottom: 40px; }
.hero-photo-img {
    position: absolute;
    inset: -14px;
    width: calc(100% + 28px);
    height: calc(100% + 28px);
    object-position: 72% 0%;
    transform-origin: 70% 32%;
    animation: hero-camera-drift 22s ease-in-out infinite alternate;
    will-change: transform;
}
.hero-photo::before {
    background:
        linear-gradient(90deg, #071626ed 0%, #0e2346b3 38%, #0e234626 75%, #0e234608 100%),
        linear-gradient(180deg, #07162680 0%, transparent 32%, transparent 62%, #07162680 100%);
}
.hero-claim { font-size: clamp(1.15rem, 1.65vw, 1.4rem); margin-bottom: 8px; }
.hero-sub { font-size: 0.94rem; line-height: 1.55; }
.hero-actions { margin-top: 22px; }
@keyframes hero-camera-drift {
    from { transform: translate3d(var(--hero-pan-x, 0px), var(--hero-pan-y, 0px), 0) scale(1.01); }
    to { transform: translate3d(calc(var(--hero-pan-x, 0px) + 6px), calc(var(--hero-pan-y, 0px) - 3px), 0) scale(1.045); }
}
@media (max-width: 820px) {
    .hero-photo { --band: min(74svh, 520px); }
    .hero-photo-inner { padding: 140px 20px 88px; margin-left: 0; }
    .hero-photo-img { object-position: 66% 10%; }
    .hero-photo::before { background: linear-gradient(180deg, #08132188 0%, #08132133 18%, #081321d9 44%, #081321f5 100%); }
    .hero-name { font-size: clamp(2.2rem, 7.5vw, 3.1rem); }
    .hero-scroll { bottom: 30px; }
}
/* The photo is a tight 3:2 frame: stretched to the full width it showed little more than a face.
   Wide screens keep its whole height on the right, fading into the navy under the type;
   narrow ones show it a little smaller, fading into the dark band under the text. */
@media (min-width: 821px) {
    .hero-photo-img {
        left: auto;
        right: -14px;
        width: auto;
        max-width: none;
        aspect-ratio: 1600 / 1067;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 26%);
        mask-image: linear-gradient(90deg, transparent, #000 26%);
    }
}
@media (max-width: 820px) {
    .hero-photo-img {
        height: 80%;
        -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
        mask-image: linear-gradient(180deg, #000 72%, transparent);
    }
}

/* Original text stays accessible; an aria-hidden copy types without reflow. */
.typewriter-source {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.typewriter-word { display: inline-block; white-space: nowrap; }
.typewriter-char { visibility: hidden; position: relative; }
.typewriter-char.is-typed { visibility: visible; }
.typewriter-char.is-cursor::after {
    content: '';
    position: absolute;
    inset-inline-start: 100%;
    top: 0.1em;
    width: 1px;
    height: 1em;
    background: currentColor;
    animation: typewriter-caret 0.65s steps(1) infinite;
}
@keyframes typewriter-caret { 50% { opacity: 0; } }
.highlights-head { flex-wrap: wrap; }
.highlights-head > div:first-child { flex: 1; min-width: 0; }
.highlights-head .section-subtitle { max-width: none; }
@media (min-width: 821px) and (max-width: 1180px) {
    .highlights-head > div:first-child { flex-basis: 100%; }
    .highlights-head .hl-nav { margin-left: auto; }
}
@media (max-width: 820px) {
    .highlights-head > div:first-child { flex: none; width: 100%; }
}

/* The reference's light borders and restrained emphasis fit the existing blue. */
.skill-card, .consulting-card {
    box-shadow: 0 4px 18px rgb(27 46 76 / 4%);
    border-color: #dfe5ee;
}
.skill-card:hover, .consulting-card:hover {
    border-color: #92b6f1;
    box-shadow: 0 10px 28px rgb(49 80 126 / 9%);
}
.skill-card h3, .consulting-card h3 { letter-spacing: -0.025em; }

/* A compact row of projects, using the site's existing rounded cards. */
.selected-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.selected-heading .section-title { margin-bottom: 0; }
.selected-heading > .project-link { flex-shrink: 0; }
.selected-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.selected-project { min-width: 0; }
.selected-project .project-content { padding: 24px; }
.selected-project h3 { font-size: 1.35rem; }
.selected-project p { font-size: 0.92rem; line-height: 1.7; }
.selected-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.selected-actions .project-link { margin: 0; font-size: 0.8rem; }
.selected-chat { cursor: pointer; font-family: inherit; }
.selected-image { display: block; width: 100%; height: 260px; position: relative; overflow: hidden; text-decoration: none; }

/* The cropped recording follows the real Atlantis map from overview to concepts. */
#project-atlantis .project-media,
.selected-project--atlantis .selected-image { background: #080e1c; }
#project-atlantis .project-media { height: 280px; }
#project-atlantis .project-media img,
.selected-project--atlantis .selected-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
}
#project-atlantis:is(:hover, :focus-within) .project-media img,
.selected-project--atlantis:is(:hover, :focus-within) .selected-image img { transform: none; }
.project-card .project-media video.atlantis-demo { object-position: center; }

/* A real recorded conversation, with camera moves baked into the video. */
#project-ai-twin .project-media,
.selected-project--ai-twin .selected-image { display: block; background: #eaf0f8; }
#project-ai-twin .project-media { height: 280px; }
.demo-media-link { display: block; height: 100%; width: 100%; position: relative; overflow: hidden; }
#project-ai-twin .project-media img,
.selected-project--ai-twin .selected-image img {
    width: 100%; height: 100%; max-width: none; margin: 0;
    border: 0; border-radius: 0; box-shadow: none; object-fit: cover; transform: none;
}
#project-ai-twin:hover .project-media img,
.selected-project--ai-twin:hover .selected-image img { transform: none; }
.project-card .project-media video.project-demo {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transform: none; pointer-events: none;
}
.project-card .project-media video.project-demo.is-ready { opacity: 1; }
.demo-toggle {
    position: absolute; bottom: 10px; right: 10px; z-index: 5;
    width: 36px; height: 36px; border: 1px solid #ffffff80; border-radius: 50%;
    background: #102b4de8; color: #fff; font-size: 0.85rem; cursor: pointer;
    display: grid; place-items: center; box-shadow: 0 2px 10px #102b4d26;
}
.demo-toggle:hover { background: #31507e; }
.demo-toggle[hidden], .demo-play-label,
.demo-toggle[aria-pressed="true"] .demo-pause-label { display: none; }
.demo-toggle[aria-pressed="true"] .demo-play-label { display: inline; }
/* ThermoClock keeps the axes and footnotes inside the frame. */
#project-bitcoin .project-media { height: 280px; background: #fff; }
#project-bitcoin .project-media img,
.selected-project--bitcoin .selected-image img { width: 100%; height: 100%; object-fit: contain; transform: none; }
#project-bitcoin:hover .project-media img,
.selected-project--bitcoin:hover .selected-image img { transform: none; }
.project-card .project-media video.bitcoin-demo { object-fit: contain; background: #fff; }
.full-film-button { cursor: pointer; font-family: inherit; margin-top: 10px; }
.full-film-button::after { display: none; }
.full-film-button .film-duration { margin-left: 8px; font-size: 0.72rem; opacity: 0.7; }

/* Data credit and disclaimer, folded under the Bitcoin project. */
.project-card .project-note { margin-top: 14px; font-size: 0.78rem; line-height: 1.55; color: var(--ink-mute); }
.project-note summary { cursor: pointer; width: fit-content; font-weight: 600; }
.project-note summary:hover { color: var(--ink); }
.project-card .project-note p { margin: 8px 0 0; font-size: inherit; line-height: inherit; color: var(--ink-mute); }
.project-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.project-film {
    width: min(1200px, calc(100vw - 40px)); max-width: none;
    max-height: calc(100dvh - 40px); padding: 0; margin: auto;
    border: 1px solid #d8e1ec; border-radius: 16px; overflow: auto;
    background: #22395c; color: #fff; box-shadow: 0 24px 100px #0008;
}
.project-film::backdrop { background: #08111ddd; backdrop-filter: blur(6px); }
.project-film-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.project-film-bar h2 { font-size: 1rem; font-weight: 600; margin: 0; color: #fff; }
.project-film-close { display: grid; place-items: center; flex: none; width: 36px; height: 36px; background: #ffffff15; border: 1px solid #ffffff40; border-radius: 50%; color: #fff; font-size: 1.4rem; cursor: pointer; }
.project-film-close:hover { background: #ffffff30; }
.project-film video { display: block; width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; background: #000; }
@media (max-width: 560px) {
    .project-film { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
    .project-film-bar { padding: 10px 12px; }
    .project-film-bar h2 { font-size: 0.85rem; }
}

/* Original continuous photo rail, with pause on hover, focus or explicit choice. */
.hl-track { scroll-snap-type: none; }
.hl-nav { display: flex; }
.hl-nav button[hidden] { display: none; }
.hl-play-label, #hl-toggle[aria-pressed="true"] .hl-pause-label { display: none; }
#hl-toggle[aria-pressed="true"] .hl-play-label { display: inline; }
#hl-toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: #a8bfe9; }

/* Adjacent columns, each ordered newest first in the source. */
section.profile-columns {
    max-width: 1500px;
    padding: 36px 44px 52px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}
.profile-columns .profile-column { min-width: 0; padding: 0; border: 0; background: none; }
.profile-columns .profile-column + .profile-column { position: relative; }
.profile-columns .profile-column + .profile-column::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 4px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(transparent, #cfd9e6 5%, #cfd9e6 95%, transparent);
    pointer-events: none;
}
.profile-columns .background-grid,
.profile-columns .education-grid { grid-template-columns: 1fr; gap: 16px; }
.profile-columns .column-subtitle { min-height: 3.4em; margin: 18px 0 28px; }
.profile-columns .experience-card,
.profile-columns .education-card { padding: 22px; }
.profile-columns :is(.experience-card, .education-card) {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.profile-columns :is(.experience-card, .education-card):focus-within {
    border-color: var(--accent);
    background: linear-gradient(145deg, #fff 15%, #eaf0f8 100%);
    box-shadow: 0 0 0 1px var(--accent), 0 14px 34px rgb(49 80 126 / 21%);
    transform: translateY(-4px);
}
@media (hover: hover) and (pointer: fine) {
    .profile-columns :is(.experience-card, .education-card):hover {
        border-color: var(--accent);
        background: linear-gradient(145deg, #fff 15%, #eaf0f8 100%);
        box-shadow: 0 0 0 1px var(--accent), 0 14px 34px rgb(49 80 126 / 21%);
        transform: translateY(-4px);
    }
}

/* A brief notice in the conversation; retention and age information on demand. */
.chat-disclaimer { padding: 8px 14px; font-size: 0.7rem; line-height: 1.5; font-weight: 400; flex-shrink: 0; }
.chat-disclaimer > p { margin: 0; }
.chat-privacy-details { margin-top: 3px; }
.chat-privacy-details summary { color: #31507e; font-size: 0.69rem; font-weight: 600; cursor: pointer; width: fit-content; margin: 0 auto; }
.chat-privacy-details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.chat-privacy-copy { max-height: 135px; overflow-y: auto; padding-top: 8px; text-align: left; }
.chat-privacy-copy p { margin-bottom: 5px; }
.chat-privacy-copy a { margin: 0; }

/* Two restrained visual details: a reading line and a pointer-following glow. */
.sitehead::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #a47a2c, var(--gold), #f5e2b8);
    transform: scaleX(var(--reading-progress, 0));
    transform-origin: left;
    pointer-events: none;
}
.has-spotlight { position: relative; isolation: isolate; }
.has-spotlight::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(280px circle at var(--light-x, 50%) var(--light-y, 50%), rgb(72 139 200 / 12%), transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 3;
}
.has-spotlight:hover::after { opacity: 1; }
.has-spotlight:hover { border-color: #9cbdec; }
.selected-work { position: relative; }
.selected-work::before {
    content: '';
    position: absolute;
    inset: 0 44px;
    background-image: radial-gradient(#1550e020 0.7px, transparent 0.7px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(transparent, #0004 20%, transparent 85%);
    mask-image: linear-gradient(transparent, #0004 20%, transparent 85%);
    pointer-events: none;
}
.selected-heading, .selected-grid { position: relative; }

/* Content stays visible; the old reveal effect isn't needed for these refinements. */
.main-content .will-reveal { opacity: 1; transform: none; }

@media (min-width: 1000px) {
    .skills-grid .skill-card:first-child { border-color: #bccbe0; }
}
@media (max-width: 1080px) {
    .selected-grid { gap: 18px; }
    .selected-project .project-content { padding: 20px; }
    .selected-image { height: 230px; }
}
@media (max-width: 820px) {
    .selected-grid { grid-template-columns: 1fr; gap: 26px; }
    .selected-image { height: 280px; }
    .selected-project .project-content { padding: 24px; }
    .selected-project p { max-width: 65ch; }
}
@media (max-width: 900px) {
    section.profile-columns { grid-template-columns: 1fr; padding: 30px 20px; gap: 38px; }
    .profile-columns .column-subtitle { min-height: 0; margin: 16px 0 24px; }
    .profile-columns .profile-column + .profile-column::before {
        top: -19px;
        left: 0;
        right: 0;
        bottom: auto;
        width: auto;
        height: 1px;
        background: linear-gradient(90deg, transparent, #cfd9e6 10%, #cfd9e6 90%, transparent);
    }
}
@media (max-width: 560px) {
    .topbar-inner, .topbar-right { gap: 8px; }
    .topbar-social { gap: 0; }
    .selected-heading { align-items: flex-start; gap: 16px; }
    .selected-heading > .project-link { font-size: 0.75rem; padding: 8px 10px; }
    .selected-image { height: 250px; }
    .hero-actions { gap: 10px; }
    .hero-actions .btn-hot, .hero-actions .btn-line { font-size: 0.8rem; padding: 12px 16px; }
    /* A smaller launcher only; expanded chat geometry remains the original. */
    .chat-container.minimized { width: 48px; height: 48px; max-height: 48px; right: 10px; bottom: 10px; }
    .chat-container.minimized .chat-header-avatar { width: 40px; height: 40px; }
    .chat-container.minimized .chat-header { box-shadow: 0 3px 14px #14203333; }
    .chat-container.minimized::before { display: none; }
    .chat-container.minimized::after { width: 20px; height: 20px; font-size: 0.65rem; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-photo { position: relative; }
    .hero-scroll svg { animation: none; }
    .hero-name .name-ai, .hero-name .name-ai .typewriter-char, .brand .name-ai { animation: none; }
    .has-spotlight::after { display: none; }
    .profile-columns :is(.experience-card, .education-card):is(:hover, :focus-within) { transform: none; }
    .hero-photo-img { animation: none; transform: none; will-change: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Research layer (Oct 2026)
   An editorial, paper-and-ink reading of the site: one serif for display
   (Newsreader), Public Sans for text and UI, IBM Plex Mono only for measures,
   dates and labels. Hairlines instead of shadows, one accent (slate #31507e, palette "slate and honey") for
   actions, and gold reserved for the "ai" in the name. Content and behavior
   are unchanged; this layer only restyles what the sections above built.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --gold: #e0b76c;
    --paper: #f6f3ec;
    --paper-deep: #ece7dd;
    --card: #fbf9f4;
    --ink: #1b2e4c;
    --ink-soft: #46505f;
    --ink-mute: #5b6474;
    --rule: #dfd8cb;
    --rule-soft: #ebe5da;

    --font-display: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --font-text: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --bg: var(--paper);
    --surface: var(--paper);
    --surface-alt: #efeae1;
    --text: var(--ink);
    --muted: var(--ink-mute);
    --line: var(--rule);
    --accent: #31507e;
    --accent-strong: #22395c;
    --accent-soft: #e8eef7;
    --accent-text: #31507e;

    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 14px;
    --shadow-soft: 0 1px 2px rgb(27 46 76 / 5%);
    --shadow-strong: 0 18px 40px -18px rgb(27 46 76 / 36%);

    --container-max: 1280px;
    --gutter: clamp(20px, 4.2vw, 56px);
    --section-y: clamp(64px, 8.5vw, 112px);
}

/* ── Base ─────────────────────────────────────────────────────────────── */
body {
    font-family: var(--font-text);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.14;
    letter-spacing: -0.012em;
    text-wrap: balance;
}
p, li, dd { text-wrap: pretty; }
.period, .year, .talk-meta, .publication-meta, .intro-stats dd, time { font-variant-numeric: lining-nums tabular-nums; }

/* The parts the browser draws still carry the design. */
::selection { background: #31507e; color: #fff; }
html { scrollbar-color: #b6b0a0 var(--paper); }
input, textarea { caret-color: var(--accent); }
a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

/* One visible keyboard ring everywhere. It must win over the many
   component rules that remove the outline and rely on a colour change. */
:is(a, button, summary, input, textarea, select, [tabindex]):focus-visible {
    outline: 2px solid var(--focus-ring, var(--accent)) !important;
    outline-offset: 3px !important;
}
.topbar, .sitehead, .hero-photo, .page-hero, .cta-banner, footer { --focus-ring: var(--gold); }

.skip-link { font-family: var(--font-text); background: var(--ink); border-radius: 6px; box-shadow: none; }

/* ── Utility bar and header ───────────────────────────────────────────── */
.topbar { background: #22395c; }
.topbar-inner, .sitehead-inner { max-width: var(--container-max); padding-inline: var(--gutter); }
.topbar-mail { font-family: var(--font-text); font-size: 0.8125rem; color: rgb(255 255 255 / 88%); }
.topbar-social a { color: rgb(255 255 255 / 88%); }
.sitehead { background: rgb(49 80 126 / 96%); }
.sitehead-inner { min-height: 68px; }
body.has-hero .sitehead {
    background: linear-gradient(180deg, rgb(20 34 58 / 82%) 0%, rgb(20 34 58 / 0%) 100%);
}
body.has-hero .sitehead.is-stuck {
    background: rgb(27 46 76 / 95%);
    box-shadow: 0 1px 0 rgb(255 255 255 / 8%);
}
.brand {
    font-family: var(--font-display);
    font-size: 1.12rem;
    letter-spacing: 0.2em;
}
.brand strong, .brand span { font-weight: 500; }
.main-tabs { gap: 4px 24px; }
.main-tab-btn {
    font-family: var(--font-text);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    color: #fff;
}
.main-tab-btn::after { height: 1px; bottom: 3px; }
.main-tab-btn.active::after { height: 2px; bottom: 2px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero-photo { --band: clamp(540px, 80svh, 780px); }
.hero-photo-inner {
    max-width: 820px;
    padding: 120px var(--gutter) 96px;
    margin: 0 auto 0 max(0px, calc((100% - var(--container-max)) / 2));
}
.hero-kicker {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: rgb(255 255 255 / 92%);
    margin-bottom: 22px;
}
.hero-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.7rem, 6vw, 4.9rem);
    line-height: 1.04;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    margin-bottom: 22px;
}
.hero-claim {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.35rem, 2.3vw, 1.9rem);
    line-height: 1.3;
    letter-spacing: -0.005em;
    margin-bottom: 12px;
}
.hero-sub { font-size: 1.0625rem; line-height: 1.6; color: rgb(255 255 255 / 90%); max-width: 46ch; }
.hero-actions { margin-top: 32px; gap: 14px; }
.hero-credit {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: #fff;
    background: rgb(20 34 58 / 60%);
    padding: 5px 10px;
    border-radius: 4px;
    right: var(--gutter);
    bottom: 22px;
}
.home-content {
    background: var(--paper);
    border-radius: 0;
    margin-top: -1px;
    padding-top: 0;
    box-shadow: 0 -28px 60px -24px rgb(20 34 58 / 45%);
}

/* ── Buttons: two styles, solid and hairline ──────────────────────────── */
.btn-hot, .btn-ghost, .btn-line, .newsletter-submit {
    font-family: var(--font-text);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.005em;
    border-radius: 6px;
    box-shadow: none;
    transform: none;
}
.btn-hot, .newsletter-submit { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-hot:hover, .newsletter-submit:hover { background: #22395c; border-color: #22395c; box-shadow: none; transform: none; }
.hero-actions .btn-hot, .cta-banner .btn-hot { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.hero-actions .btn-hot:hover, .cta-banner .btn-hot:hover { background: #fff; border-color: #fff; }
.btn-line, .btn-ghost { background: transparent; color: #fff; border: 1px solid rgb(255 255 255 / 62%); }
.btn-line:hover, .btn-ghost:hover { background: rgb(255 255 255 / 12%); border-color: #fff; transform: none; }
.btn-hot svg, .btn-ghost svg { width: 16px; height: 16px; }

.project-link, .pub-btn, .talk-links a {
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 0.8125rem;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    border: 1px solid rgb(27 46 76 / 32%);
    box-shadow: none;
}
.project-link:hover, .project-link:focus-visible,
.pub-btn:hover, .pub-btn:focus-visible,
.talk-links a:hover, .talk-links a:focus-visible {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
    transform: none;
}
.pub-btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pub-btn-disabled, .pub-btn-disabled:hover {
    background: transparent; color: var(--ink-mute); border: 1px dashed var(--ink-mute); opacity: 1;
}
.project-private-badge {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    border-radius: 6px;
    background: transparent;
    color: var(--ink-mute);
    border: 1px dashed var(--ink-mute);
}
.full-film-button .film-duration { opacity: 1; color: var(--ink-mute); font-family: var(--font-mono); font-weight: 500; }

/* ── Section system ───────────────────────────────────────────────────── */
section { max-width: var(--container-max); padding: var(--section-y) var(--gutter); }
#experience, #projects, #skills { margin-top: 0; }
.section-alt { background: transparent; }
h1.section-title, h2.section-title, .profile-column h2, .passions-section .section-title {
    font-family: var(--font-display);
    font-weight: 450;
    font-size: clamp(2.1rem, 3.8vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.022em;
    color: var(--ink);
    padding-bottom: 0;
    margin-bottom: 16px;
}
h1.section-title::after, h2.section-title::after,
.profile-column h2::after, .profile-column:nth-child(2) h2::after { content: none; }
.title-accent { font-style: italic; color: inherit; }
.section-subtitle, .column-subtitle {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 60ch;
    margin-bottom: 44px;
}
.page-hero-title, .consulting-step h4, .talks-year-title { font-family: var(--font-display); }
.page-hero-title { font-weight: 450; letter-spacing: -0.02em; }

/* ── Home: introduction ───────────────────────────────────────────────── */
.intro {
    max-width: var(--container-max);
    padding: var(--section-y) var(--gutter) clamp(48px, 6vw, 72px);
    text-align: left;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: clamp(36px, 6vw, 104px);
    align-items: start;
}
.intro-eyebrow, .intro-role, .intro-meta dt, .trackrecord-label {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mute);
}
.intro-eyebrow { color: var(--accent); margin: 0; }
.intro-role { margin: 2px 0 28px; }
.intro-bio {
    max-width: 38em;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 1.9vw, 1.6rem);
    line-height: 1.46;
    letter-spacing: -0.008em;
    color: var(--ink);
}
.intro-side { display: grid; gap: 36px; }
.intro-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    margin: 0;
}
.intro-stats > div {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--ink);
    padding: 14px 0 24px;
}
.intro-stats dd {
    order: -1;
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3.6vw, 3rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.intro-stats dt {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--ink-mute);
}
.intro-meta {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
}
.intro-meta > div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
    border-top: 1px solid var(--rule);
    padding: 12px 0;
}
.intro-meta > div:last-child { border-bottom: 1px solid var(--rule); }
.intro-meta dt { margin: 0; }
.intro-meta dd { font-size: 0.9375rem; font-weight: 500; color: var(--ink); }

.trackrecord {
    max-width: var(--container-max);
    padding: 0 var(--gutter) var(--section-y);
    text-align: left;
}
.trackrecord-label { margin-bottom: 22px; }
.trackrecord-logos { justify-content: flex-start; gap: 22px 56px; margin-bottom: 30px; }
.hero-chips { justify-content: flex-start; margin-top: 0; }
.hero-chips span {
    font-family: var(--font-text);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink-soft);
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 5px 11px;
}
.hero-chips span:hover { border-color: var(--ink); color: var(--ink); }

/* ── Highlights ───────────────────────────────────────────────────────── */
.highlights-section {
    max-width: none;
    padding: var(--section-y) max(var(--gutter), calc((100% - var(--container-max)) / 2 + var(--gutter)));
    background: var(--paper-deep);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.highlights-head { align-items: flex-end; margin-bottom: 36px; }
.highlights-head .section-subtitle { margin-bottom: 0; }
.hl-nav button {
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    transform: none;
}
.hl-nav button:hover, .hl-nav button:focus-visible {
    background: var(--ink) !important;
    color: var(--paper) !important;
    border-color: var(--ink) !important;
    transform: none;
}
.hl-slide {
    border-radius: var(--radius-lg);
    border: 0;
    box-shadow: none;
    transition: none;
}
.hl-slide:hover { transform: none; box-shadow: none; }
.hl-slide--photo::after { background: linear-gradient(180deg, rgb(22 37 62 / 0%) 34%, rgb(22 37 62 / 90%) 100%); }
.hl-caption { padding: 22px 24px 20px; }
.hl-caption h3 { font-size: 1.4rem; font-weight: 500; line-height: 1.2; text-shadow: none; margin-bottom: 4px; }
.hl-caption p { font-size: 0.875rem; color: rgb(255 255 255 / 92%); }
.hl-tag, .hl-tag--warm {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    background: rgb(22 37 62 / 78%);
    border: 1px solid rgb(255 255 255 / 40%);
    border-radius: 4px;
    backdrop-filter: none;
}
.hl-slide-year {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.75rem;
    background: rgb(22 37 62 / 78%);
    border-radius: 4px;
    backdrop-filter: none;
}

/* ── Projects (home row and /projects) ────────────────────────────────── */
.selected-work::before { content: none; }
.project-card, .selected-project {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: none;
}
.project-card:hover, .project-card:focus-within {
    transform: none;
    box-shadow: none;
    border-color: var(--ink);
}
.project-card:hover img, .project-card:focus-within img { transform: scale(1.03); }
.project-card h3, .selected-project h3 {
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-bottom: 12px;
}
.project-card p, .selected-project p { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.6; }
.tag {
    font-family: var(--font-text);
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--ink-soft);
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 4px 9px;
}
.selected-heading { margin-bottom: 36px; }
.has-spotlight::after { content: none; }
.has-spotlight:hover { border-color: var(--ink); }
.demo-toggle { width: 44px; height: 44px; background: rgb(22 37 62 / 82%); border-color: rgb(255 255 255 / 55%); }
.demo-toggle:hover { background: var(--ink); }

/* ── Background and Education: ledger rows ────────────────────────────── */
section.profile-columns {
    max-width: var(--container-max);
    padding: var(--section-y) var(--gutter);
    gap: clamp(40px, 6vw, 96px);
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}
.profile-columns .profile-column + .profile-column::before { content: none; }
.profile-columns .background-grid, .profile-columns .education-grid { gap: 0; }
.profile-columns .column-subtitle { min-height: 0; margin: 0 0 32px; }
@media (min-width: 901px) { .profile-columns .column-subtitle { min-height: 3.2em; } }
.profile-columns .experience-card, .profile-columns .education-card {
    background: none;
    border: 0;
    border-top: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
    padding: 22px 0 26px;
    transform: none;
    transition: border-color 160ms ease;
}
.profile-columns .experience-card:last-child, .profile-columns .education-card:last-of-type { border-bottom: 1px solid var(--rule); }
.profile-columns :is(.experience-card, .education-card):focus-within {
    background: none; box-shadow: none; transform: none; border-top-color: var(--ink);
}
@media (hover: hover) and (pointer: fine) {
    .profile-columns :is(.experience-card, .education-card):hover {
        background: none; box-shadow: none; transform: none; border-top-color: var(--ink);
    }
}
.profile-columns .experience-card {
    display: grid;
    grid-template-columns: minmax(7rem, 8.5rem) minmax(0, 1fr);
    column-gap: 24px;
    align-items: baseline;
}
.experience-card .period {
    grid-column: 1;
    grid-row: 1 / span 3;
    margin: 3px 0 0;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--ink-mute);
}
.experience-card .card-header-brand { grid-column: 2; grid-row: 1; align-items: center; margin: 0; }
.experience-card .company { grid-column: 2; grid-row: 2; margin: 2px 0 0; font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.experience-card p { grid-column: 2; grid-row: 3; margin-top: 12px; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; }
.experience-card h3, .education-card h3 { font-size: 1.3rem; font-weight: 500; line-height: 1.2; color: var(--ink); }
.card-company-link, .card-university-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); }
.card-company-link:hover, .card-university-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.company-logo, .university-logo { filter: grayscale(1) opacity(0.8); max-height: 28px; }
.university-logo { width: 44px; height: 44px; object-fit: contain; filter: grayscale(1) contrast(1.4) opacity(0.9); }
.experience-card:hover .company-logo, .education-card:hover .university-logo { filter: grayscale(0) opacity(1); }
.education-card .university { margin-top: 2px; font-size: 0.9375rem; }
.education-card .year { margin-top: 6px; font-size: 0.875rem; color: var(--ink-soft); }
.education-thesis {
    margin-top: 18px;
    padding-left: 14px;
    border-left: 2px solid var(--accent);
}
.education-thesis-label {
    display: block;
    margin-bottom: 5px;
    color: var(--ink-mute);
    font: 500 0.65rem/1.5 var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.education-thesis strong {
    display: block;
    max-width: 32ch;
    color: var(--ink);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
}
.education-thesis-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 9px; }
.education-thesis-links a {
    padding-block: 4px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-underline-offset: 3px;
}
.education-note {
    background: none;
    border: 0;
    border-top: 1px solid var(--ink);
    border-radius: 0;
    padding: 22px 0 0;
    margin-top: 28px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* ── Inner pages: shared components ───────────────────────────────────── */
.publication-card, .talk-card, .skill-card, .consulting-card, .consulting-step, .talk-video-feature {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: none;
    transform: none;
}
.publication-card:hover, .publication-card:focus-within,
.talk-card:hover, .skill-card:hover, .consulting-card:hover {
    transform: none; box-shadow: none; border-color: var(--ink);
}
.skill-card::before { content: none; }
.skill-icon, .consulting-icon {
    background: transparent;
    border: 0;
    width: auto;
    height: auto;
    color: var(--ink);
}
.publication-kicker, .contact-card-label, .newsletter-label, .consulting-badge {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--accent);
}
.publication-content h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.018em; color: var(--ink); }
.publication-subtitle { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); }
.publication-meta { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-mute); }
.publication-desc { max-width: 70ch; font-size: 0.9375rem; line-height: 1.65; color: var(--ink-soft); }
.pub-read-overlay { background: rgb(27 46 76 / 82%); color: #fff; font-family: var(--font-text); }
.talks-year-title { font-weight: 500; }
.talk-card h4 { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; }
.talk-meta { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-mute); }
.consulting-step h4 { font-weight: 500; font-size: 1.2rem; }
.consulting-step::before { font-family: var(--font-mono); font-weight: 500; background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
.cta-banner { background: var(--ink); border-radius: var(--radius-lg); box-shadow: none; }
.cta-banner::after { content: none; }
.cta-banner h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; }

/* ── Contact ──────────────────────────────────────────────────────────── */
.contact-section { margin-top: 0; padding-block: var(--section-y); border-top: 1px solid var(--rule); }
.contact-grid { gap: clamp(20px, 3vw, 44px); margin-bottom: 44px; }
.contact-card {
    background: none;
    border: 0;
    border-top: 1px solid var(--ink);
    border-radius: 0;
    box-shadow: none;
    padding: 18px 0 0;
    gap: 14px;
    align-items: flex-start;
    transform: none;
}
.contact-card:hover { transform: none; box-shadow: none; background: none; border-top-color: var(--accent); }
.contact-card-icon, .contact-card:hover .contact-card-icon {
    background: none; border: 0; color: var(--ink); width: 28px; height: 28px; border-radius: 0;
}
.contact-card:hover .contact-card-icon { color: var(--accent); }
.contact-card-icon svg { width: 22px; height: 22px; }
.contact-card strong { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; letter-spacing: -0.01em; color: var(--ink); }
.contact-card strong.contact-email { font-size: 1.15rem; }
.contact-card small { color: var(--ink-soft); font-size: 0.875rem; }
.contact-card:hover strong { text-decoration: underline; text-decoration-color: var(--accent); }
.newsletter-block {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: none;
    padding: 28px 32px;
}
.newsletter-copy strong { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; color: var(--ink); }
.newsletter-copy small { color: var(--ink-soft); }
.newsletter-input { background: #fff; border-color: #b9b3a3; border-radius: 6px; font-family: var(--font-text); }
.newsletter-input::placeholder { color: #5f6675; opacity: 1; }
.newsletter-submit { padding: 12px 20px; }
/* Inner pages keep the three ways to get in touch; the waitlist lives on Home only. */
body:not([data-page="home"]) .newsletter-block { display: none; }
body:not([data-page="home"]) .contact-section { padding-block: clamp(48px, 6vw, 72px); }
body:not([data-page="home"]) .contact-section .section-subtitle { margin-bottom: 28px; }
body:not([data-page="home"]) .contact-grid { margin-bottom: 0; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer { background: #22395c; border-radius: 0; padding: 40px var(--gutter); border-top: 0; }
footer p { color: rgb(255 255 255 / 82%); }

/* ── Chat teaser and touch targets ────────────────────────────────────── */
.chat-teaser {
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 8px;
    box-shadow: var(--shadow-strong);
    font-family: var(--font-text);
    font-weight: 500;
    font-size: 0.875rem;
}
.chat-teaser:hover { border-color: var(--accent); }
.chat-teaser-close { position: relative; width: 28px; height: 28px; background: var(--paper-deep); color: var(--ink-soft); }
.chat-teaser-close::after { content: ''; position: absolute; inset: -8px; }
.skip-link, .chat-header-text .chat-header-name, .chat-cta-title { font-family: var(--font-text); }

@media (max-width: 900px) {
    .intro { grid-template-columns: 1fr; row-gap: 48px; }
    section.profile-columns { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .hero-photo { --band: min(86svh, 640px); }
    .hero-photo-inner { padding: 148px var(--gutter) 72px; margin-left: 0; }
    .hero-credit { display: none; }
    .topbar-social a { min-width: 44px; min-height: 40px; align-items: center; justify-content: center; }
    .lang-btn { min-width: 44px; min-height: 40px; }
    .topbar-mail { min-height: 40px; }
}
@media (max-width: 640px) {
    .intro-stats { gap: 0 20px; }
    .intro-meta > div { grid-template-columns: 7rem minmax(0, 1fr); }
    .profile-columns .experience-card { grid-template-columns: 1fr; }
    .experience-card .period { grid-column: 1; grid-row: auto; margin: 0 0 6px; }
    .experience-card .card-header-brand, .experience-card .company, .experience-card p { grid-column: 1; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .project-card:hover img, .project-card:focus-within img { transform: none; }
}

/* Talks timeline: ink and hairline instead of the blue gradient set. */
.talk-video-caption .hl-tag { background: rgb(22 37 62 / 82%); }
.talks-timeline::before { width: 1px; background: var(--ink); opacity: 0.55; border-radius: 0; }
.talks-year::before {
    left: -50px; top: 13px; width: 11px; height: 11px;
    background: var(--ink); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--ink);
    animation: none;
}
.talks-year:first-child::before { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); animation: none; }
.talks-year::after { content: none; }
.talks-year-title,
.talks-year:first-child .talks-year-title {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    color: var(--ink);
    background: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}
.talks-year:first-child .talks-year-title { color: var(--accent); }

/* Consulting and Skills: no side stripe, no gradient numerals, serif titles at one weight. */
.consulting-card::before, .consulting-card:hover::before { content: none; }
.consulting-card { padding: 24px; border-radius: var(--radius-lg); }
.consulting-card:hover, .consulting-step:hover { transform: none; box-shadow: none; border-color: var(--ink); }
.consulting-step::before {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: currentColor;
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
}
.skill-card h3, .consulting-card h3, .skill-card-head h3 { font-weight: 500; font-size: 1.3rem; letter-spacing: -0.012em; color: var(--ink); }
.consulting-badge { background: transparent; border: 1px solid var(--rule); color: var(--ink-soft); }
.consulting-badge::before { animation: none; }

/* Sport and Beyond Work: same cards, tags and heroes as the rest of the site. */
.sport-card, .sport-photo-card, .sport-video-card, .focus-item {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: none;
    transform: none;
}
.sport-card:hover, .focus-item:hover { transform: none; box-shadow: none; border-color: var(--ink); }
.sport-card h3, .focus-item h3 { font-weight: 500; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.012em; color: var(--ink); }
.sport-meta { font-family: var(--font-mono); font-weight: 500; font-size: 0.8125rem; color: var(--ink-mute); }
.focus-label {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: none;
    border-radius: 0;
    padding: 0;
}
.page-hero-inner { padding-inline: var(--gutter); }
.page-hero-title .hero-accent { color: inherit; font-style: italic; }
.page-hero-sub { color: rgb(255 255 255 / 90%); }
.page-hero-title, .focus-item h3, .sport-card h3 { text-wrap: balance; }

/* Reading measure: prose stays under about 75 characters per line. */
.publication-desc { max-width: 58ch; }
.finance-note { max-width: 64ch; }

/* Logos ship on white backgrounds: multiplying with the paper ground makes the white disappear. */
.trackrecord-logos img, .company-logo, .university-logo { mix-blend-mode: multiply; }
.trackrecord-logos img { opacity: 1; }
.intro-stats dd { white-space: nowrap; }
.university-logo, .trackrecord-logos img[alt*="Bicocca"] { filter: grayscale(1) brightness(0.8) contrast(3); opacity: 1; border-radius: 0; }

/* ── Publications and the Home research list: ledger rows ─────────────── */
.publications-grid { gap: 0; }
.publication-card {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    background: none;
    border: 0;
    border-top: 1px solid var(--ink);
    border-radius: 0;
    padding: 40px 0 44px;
}
.publications-grid .publication-card:last-child { border-bottom: 1px solid var(--rule); }
.publication-card:hover, .publication-card:focus-within { border-top-color: var(--accent); transform: none; box-shadow: none; }
.publication-cover { border-radius: 2px; box-shadow: 0 0 0 1px var(--rule), 0 14px 28px -16px rgb(27 46 76 / 40%); }
.publication-card:hover .publication-cover img { transform: none; }
@media (max-width: 700px) {
    .publication-card { grid-template-columns: 1fr; gap: 24px; padding: 32px 0 36px; }
    .publication-cover { max-width: 140px; margin: 0; }
}

.research-home { padding-block: 0 var(--section-y); }
.research-list { list-style: none; margin: 0; padding: 0; }
.research-list li {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr) auto;
    gap: 16px clamp(24px, 4vw, 56px);
    align-items: start;
    border-top: 1px solid var(--rule);
    padding: 28px 0;
}
.research-list li:first-child { border-top-color: var(--ink); }
.research-list li:last-child { border-bottom: 1px solid var(--rule); }
.research-id, .research-kicker {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    color: var(--ink-mute);
    font-variant-numeric: lining-nums tabular-nums;
}
.research-kicker { display: block; margin-bottom: 8px; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--accent); }
.research-list h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 8px; }
.research-list p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; max-width: 60ch; }
@media (max-width: 820px) {
    .research-list li { grid-template-columns: 1fr; gap: 10px; }
    .research-list .project-link { justify-self: start; margin-top: 6px; }
}

/* ── Highlights: the rail runs out to the edge of the window ──────────── */
.hl-track {
    --hl-bleed: max(var(--gutter), calc((100vw - var(--container-max)) / 2 + var(--gutter)));
    margin-right: calc(-1 * var(--hl-bleed));
    padding-right: var(--hl-bleed);
}

/* ── Chat: ink and paper, same as the page ───────────────────────────── */
.chat-container:not(.minimized) {
    background: var(--card);
    border: 1px solid var(--ink);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
}
.chat-container:not(.minimized):hover { transform: none; box-shadow: var(--shadow-strong); }
.chat-container:not(.minimized) .chat-header { background: var(--ink); box-shadow: none; border-bottom: 1px solid rgb(255 255 255 / 12%); }
.chat-header-text .chat-header-name { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; }
.clear-btn, .minimize-btn { border-radius: 6px; background: rgb(255 255 255 / 14%); }
.user-message .message-bubble { background: var(--paper-deep); color: var(--ink); font-weight: 500; }
.suggestion-btn {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 6px;
    color: var(--ink);
    box-shadow: none;
    font-weight: 500;
}
.suggestion-btn:hover { background: #fff; border-color: var(--ink); transform: none; box-shadow: none; }
#chat-send { background: var(--ink); box-shadow: none; }
#chat-send:hover:not(:disabled) { background: #22395c; transform: none; box-shadow: none; }
#chat-send:disabled { background: #cfcabd; }
.chat-cta-card { background: var(--ink); box-shadow: none; border-radius: 8px; }
.chat-cta-title { font-family: var(--font-display); font-weight: 500; }

/* ── Sport and Talks: no dead space ──────────────────────────────────── */
@media (min-width: 901px) {
    .sport-showcase { align-items: stretch; }
    .sport-photo-rail { grid-template-rows: repeat(3, minmax(0, 1fr)); align-items: stretch; }
    .sport-photo-card { display: flex; flex-direction: column; min-height: 0; }
    .sport-photo-card .sport-photo-frame, .sport-photo-card--misano .sport-photo-frame { flex: 1 1 0; aspect-ratio: auto; min-height: 150px; }
    .sport-photo-card .sport-photo-trigger { position: absolute; inset: 0; width: 100%; height: 100%; }
    .sport-photo-card .sport-photo-frame img { width: 100%; height: 100%; }
}
.sport-photo-card { background: var(--card); }
.talks-grid > .talk-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.talk-meta, .sport-meta { font-weight: 500; letter-spacing: 0.02em; color: var(--ink-mute); }
.sport-links a {
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 0.8125rem;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    border: 1px solid rgb(27 46 76 / 32%);
    box-shadow: none;
}
.sport-links a:hover, .sport-links a:focus-visible { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: none; }

/* ── Depth: layered grounds, soft offset shadows, one dark band ───────── */
.main-content {
    background:
        radial-gradient(1100px 520px at 88% 0%, rgb(255 255 255 / 70%), transparent 70%),
        linear-gradient(180deg, var(--paper) 0%, #f1eee6 100%);
}
.home-content {
    /* Opaque on purpose: the logos blend (multiply) against this ground. */
    background:
        radial-gradient(1100px 520px at 88% 0%, rgb(255 255 255 / 70%), transparent 70%),
        linear-gradient(180deg, var(--paper) 0%, #f1eee6 100%);
}
.project-card, .selected-project, .newsletter-block, .skill-card, .consulting-card, .consulting-step,
.sport-card, .focus-item, .talk-card, .talk-video-feature {
    box-shadow: 0 1px 2px rgb(27 46 76 / 6%), 0 14px 28px -20px rgb(27 46 76 / 26%);
}
.project-card:hover, .project-card:focus-within, .talk-card:hover, .skill-card:hover, .consulting-card:hover,
.sport-card:hover, .focus-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgb(27 46 76 / 8%), 0 22px 36px -22px rgb(27 46 76 / 38%);
}
.publication-cover { box-shadow: 0 0 0 1px var(--rule), 0 2px 4px rgb(27 46 76 / 10%), 0 20px 30px -18px rgb(27 46 76 / 45%); }
.intro-stats > div { border-top-width: 2px; }
/* Highlights become the dark chapter of the page. */
.highlights-section {
    background: linear-gradient(180deg, #22395c 0%, #31507e 100%);
    border-color: #31507e;
    --focus-ring: var(--gold);
}
.highlights-section .section-title { color: var(--paper); }
.highlights-section .section-subtitle { color: rgb(246 243 236 / 82%); }
.highlights-section .hl-nav button { border-color: rgb(246 243 236 / 70%); color: var(--paper); }
.highlights-section .hl-nav button:hover, .highlights-section .hl-nav button:focus-visible {
    background: var(--paper) !important; color: var(--ink) !important; border-color: var(--paper) !important;
}
.highlights-section #hl-toggle[aria-pressed="true"] { background: rgb(246 243 236 / 14%); }
.hl-slide { box-shadow: 0 24px 40px -24px rgb(0 0 0 / 70%); }
@media (prefers-reduced-motion: reduce) {
    .project-card:hover, .project-card:focus-within, .talk-card:hover, .skill-card:hover, .consulting-card:hover,
    .sport-card:hover, .focus-item:hover { transform: none; }
}

/* ── Minor fixes ─────────────────────────────────────────────────────── */
/* Consulting nav marker: a dot after the label, not on top of the underline. */
.main-tab-btn[data-tab-target="tab-consulting"]::after {
    content: ''; display: block; position: absolute; left: 0; right: 0; bottom: 3px; width: auto; height: 1px;
    margin: 0; border-radius: 0; vertical-align: baseline; background: currentColor;
}
.main-tab-btn[data-tab-target="tab-consulting"]::before {
    content: ''; order: 2; width: 5px; height: 5px; margin-left: 7px; border-radius: 50%; background: var(--gold);
}
.university-logo { width: 52px; height: 52px; }
@media (max-width: 820px) { .hero-photo-inner { padding-bottom: 104px; } }

/* Consulting: the call booking sits right under the intro, not at the bottom. */
#consulting .section-subtitle { margin-bottom: 28px; }
.consulting-book { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 56px; }
.btn-hot.btn-book-top {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-size: 1.0625rem;
    padding: 16px 30px;
    box-shadow: 0 1px 2px rgb(27 46 76 / 12%), 0 14px 26px -12px rgb(49 80 126 / 65%);
}
.btn-hot.btn-book-top:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-2px); }
.btn-hot.btn-book-top svg { width: 20px; height: 20px; }
.consulting-book-note { margin: 0; font-family: var(--font-mono); font-weight: 500; font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--ink-soft); }
@media (max-width: 560px) { .btn-hot.btn-book-top { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .btn-hot.btn-book-top:hover { transform: none; } }

/* ── Chat launcher: bigger, ringed in gold, hard to miss ──────────────── */
.chat-container.minimized {
    width: 104px; height: 104px; max-height: 104px;
    right: 24px; bottom: 24px;
}
.chat-container.minimized:hover { transform: scale(1.08); }
.chat-container.minimized .chat-header {
    padding: 5px;
    background: var(--ink);
    box-shadow: 0 0 0 3px var(--gold), 0 22px 44px -10px rgb(27 46 76 / 60%);
}
.chat-container.minimized .chat-header:hover { background: #2a4166; }
.chat-container.minimized .chat-header-avatar { width: 94px; height: 94px; }
.chat-container.minimized::before {
    border: 3px solid rgb(224 183 108 / 70%);
    animation: fabPing 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
.chat-container.minimized::after {
    content: '💬';
    right: -6px; bottom: -4px; width: 40px; height: 40px; font-size: 1.15rem;
    background: var(--ink); border: 3px solid var(--gold);
    box-shadow: 0 6px 14px rgb(27 46 76 / 45%);
    animation: badgeWiggle 7s ease-in-out 3s infinite;
}
.chat-container.minimized .chat-header-avatar-wrap::after {
    content: ''; position: absolute; top: 9px; right: 9px; width: 16px; height: 16px;
    border-radius: 50%; background: #25c26e; border: 3px solid var(--ink);
}
.chat-teaser { right: 148px; bottom: 50px; max-width: 320px; padding: 14px 18px; font-size: 1rem; border-width: 2px; }
.chat-teaser-text { line-height: 1.35; }
@media (max-width: 560px) {
    .chat-container.minimized { width: 82px; height: 82px; max-height: 82px; right: 14px; bottom: 14px; }
    .chat-container.minimized .chat-header-avatar { width: 72px; height: 72px; }
    .chat-container.minimized::before { display: block; }
    .chat-container.minimized::after { width: 32px; height: 32px; font-size: 0.95rem; animation: badgeWiggle 7s ease-in-out 3s infinite; }
    .chat-container.minimized .chat-header-avatar-wrap::after { top: 6px; right: 6px; width: 13px; height: 13px; }
    .chat-teaser { right: 106px; bottom: 28px; max-width: calc(100vw - 130px); font-size: 0.9375rem; }
}
@media (prefers-reduced-motion: reduce) {
    .chat-container.minimized::before, .chat-container.minimized::after, .chat-container.minimized { animation: none; }
    .chat-container.minimized:hover { transform: none; }
}

/* ── Chat panel: opens with a small motion, one focus ring, keyboard-safe height ── */
.chat-container:not(.minimized) {
    max-height: min(700px, calc(100dvh - 36px));
    transform-origin: bottom right;
    animation: chat-open 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes chat-open {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
.chat-messages { scroll-padding-block: 12px; overscroll-behavior: contain; }
#chat-input { border: 1.5px solid #b9b3a3; background: #fff; border-radius: 22px; }
#chat-input:focus, #chat-input:focus-visible {
    border-color: var(--accent);
    background: #fff;
    box-shadow: none;
    outline: 2px solid var(--accent) !important;
    outline-offset: 0 !important;
}
.chat-message .message-bubble { line-height: 1.55; }
.assistant-message .message-bubble { background: #fff; border: 1px solid var(--rule); }
.typing-bubble { background: #fff; border: 1px solid var(--rule); }
@media (prefers-reduced-motion: reduce) { .chat-container:not(.minimized) { animation: none; } }

/* ── Chat launcher: slightly smaller, stronger glow ───────────────────── */
.chat-container.minimized { width: 92px; height: 92px; max-height: 92px; }
.chat-container.minimized .chat-header {
    box-shadow:
        0 0 0 3px var(--gold),
        0 0 22px 4px rgb(224 183 108 / 60%),
        0 0 56px 12px rgb(224 183 108 / 30%),
        0 20px 40px -10px rgb(27 46 76 / 60%);
    animation: fab-glow 2.8s ease-in-out infinite;
}
@keyframes fab-glow {
    0%, 100% { box-shadow: 0 0 0 3px var(--gold), 0 0 22px 4px rgb(224 183 108 / 55%), 0 0 56px 12px rgb(224 183 108 / 26%), 0 20px 40px -10px rgb(27 46 76 / 60%); }
    50% { box-shadow: 0 0 0 3px var(--gold), 0 0 32px 8px rgb(224 183 108 / 80%), 0 0 76px 20px rgb(224 183 108 / 42%), 0 20px 40px -10px rgb(27 46 76 / 60%); }
}
.chat-container.minimized .chat-header-avatar { width: 82px; height: 82px; }
.chat-container.minimized::before { border-width: 3px; border-color: rgb(224 183 108 / 85%); }
.chat-container.minimized::after { width: 36px; height: 36px; font-size: 1.05rem; }
.chat-container.minimized .chat-header-avatar-wrap::after { top: 7px; right: 7px; width: 15px; height: 15px; }
.chat-teaser { right: 134px; bottom: 44px; }
@media (max-width: 560px) {
    .chat-container.minimized { width: 60px; height: 60px; max-height: 60px; }
    .chat-container.minimized .chat-header { padding: 4px; }
    .chat-container.minimized .chat-header-avatar { width: 52px; height: 52px; }
    .chat-container.minimized::after { width: 26px; height: 26px; font-size: 0.8rem; border-width: 2px; }
    .chat-container.minimized .chat-header-avatar-wrap::after { top: 3px; right: 3px; width: 11px; height: 11px; border-width: 2px; }
    .chat-teaser { right: 84px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) { .chat-container.minimized .chat-header { animation: none; } }

/* Spacing left by the removed labels and subtitles. */
.intro-eyebrow { margin-bottom: 24px; }
.profile-column h2 { margin-bottom: 32px; }
.profile-columns .column-subtitle { min-height: 0; }
.trackrecord-logos { margin-top: 0; }
@media (min-width: 901px) { .profile-columns .column-subtitle { min-height: 0; } }

/* Talks archive: large year markers and small, softly faded event photographs. */
#talks .talks-year-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 42px 0 48px;
    padding-block: 16px;
    border-block: 1px solid var(--rule);
}
.talks-year-nav > span {
    margin-right: auto;
    color: var(--ink-mute);
    font: 400 0.75rem var(--font-text);
}
.talks-year-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 5px;
    color: var(--ink);
    font: 500 0.75rem var(--font-mono);
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease;
}
.talks-year-nav a:hover,
.talks-year-nav a:focus-visible { background: var(--accent-soft); color: var(--accent); }
#talks .talks-timeline { padding-left: 0; }
#talks .talks-timeline::before,
#talks .talks-year::before,
#talks .talks-year::after { content: none; }
#talks .talks-year {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 28px;
    margin-bottom: 56px;
    scroll-margin-top: 100px;
}
#talks .talks-year:last-child { margin-bottom: 0; }
#talks .talks-year-title {
    position: sticky;
    top: 110px;
    align-self: start;
    display: block;
    margin: 0;
    padding: 13px 0 0;
    border-top: 2px solid var(--rule);
    color: var(--ink-mute);
    font: 500 clamp(2.25rem, 3.6vw, 3rem)/1 var(--font-mono);
    letter-spacing: -0.07em;
}
#talks .talks-year:first-child .talks-year-title { color: var(--accent); border-color: var(--accent); }
#talks .talks-grid { gap: 20px; }
#talks .talk-card {
    --talk-image-position: center;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--card);
}
#talks .talks-grid > .talk-card:last-child:nth-child(odd) { grid-column: auto; }
#talks .talk-card:hover,
#talks .talk-card:focus-within { border-color: #a9b9d0; }
.talk-card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 122px;
    gap: 12px;
    align-items: start;
    margin: -2px -8px 16px 0;
}
.talk-card-titles { position: relative; z-index: 1; padding-top: 4px; }
.talk-event {
    display: block;
    margin-bottom: 9px;
    color: var(--accent);
    font: 500 0.64rem/1.6 var(--font-mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
#talks .talk-card h4 { margin: 0; font-size: 1.4rem; line-height: 1.15; text-wrap: pretty; }
.talk-card-visual {
    position: relative;
    height: 132px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--paper-deep);
    mask-image: linear-gradient(180deg, #000 65%, transparent 100%);
}
.talk-card-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--talk-image-position);
    transition: transform 500ms ease;
}
.talk-card:hover .talk-card-visual img { transform: scale(1.05); }
.talk-card-visual--video { background: #131313; }
.talk-card-visual--video img { object-fit: contain; }
.talk-card-visual--art {
    display: grid;
    place-items: center;
    color: #5d739b;
    background: radial-gradient(circle at 75% 20%, #d6e0ee, transparent 70%), #eef0f2;
}
.talk-card-visual--art svg { width: 75px; height: 75px; }
#talks .talk-meta { margin: 0 0 11px; font-size: 0.69rem; line-height: 1.65; }
#talks .talk-card > p { margin: 0 0 20px; font-size: 0.875rem; line-height: 1.7; color: var(--ink-soft); }
#talks .talk-links {
    margin-top: auto;
    padding-top: 14px;
    gap: 8px 16px;
    border-top: 1px solid var(--rule-soft);
}
#talks .talk-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    color: var(--ink);
    background: transparent;
    font: 600 0.74rem/1.4 var(--font-text);
}
#talks .talk-links a::after { content: '↗'; color: var(--accent); font-size: 0.9rem; }
#talks .talk-links a:hover,
#talks .talk-links a:focus-visible { color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: 4px; }
#talks .talk-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 1100px) {
    #talks .talks-year { grid-template-columns: 1fr; gap: 24px; }
    #talks .talks-year-title { position: static; font-size: 2.75rem; }
}
@media (max-width: 760px) {
    #talks .talks-grid { grid-template-columns: 1fr; }
    #talks .talks-year-nav { margin-block: 30px 36px; gap: 4px; }
    .talks-year-nav > span { flex-basis: 100%; margin: 0 0 6px; }
    .talks-year-nav a { padding-inline: 10px; }
    #talks .talks-year { margin-bottom: 42px; }
    #talks .talk-card { padding: 20px; }
    .talk-card-heading { grid-template-columns: minmax(0, 1fr) 112px; }
}
@media (max-width: 380px) {
    .talk-card-heading { grid-template-columns: minmax(0, 1fr) 86px; gap: 8px; }
    .talk-card-visual { height: 116px; }
    #talks .talk-card h4 { font-size: 1.25rem; }
    .talk-event { font-size: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
    .talk-card-visual img, .talks-year-nav a { transition: none; }
    .talk-card:hover .talk-card-visual img { transform: none; }
}
