:root {
    --background: #070914;
    --background-deep: #040611;
    --surface: rgba(255, 255, 255, 0.07);
    --surface-strong: rgba(255, 255, 255, 0.11);
    --foreground: #f6f8ff;
    --muted: #a9b2c8;
    --border: rgba(255, 255, 255, 0.14);
    --accent-blue: cornflowerblue;
    --accent-cyan: #22d3ee;
    --accent-pink: #f472b6;
    --accent-sun: #ffb02e;
    --accent-green: #67e8a5;
    --button-text: #06111f;
    --shadow: rgba(0, 0, 0, 0.3);
    --content: 1120px;
    --header-height: 68px;
    --radius: 8px;
}

:root[data-theme="light"] {
    --background: #f7f9ff;
    --background-deep: #ffffff;
    --surface: rgba(15, 23, 42, 0.055);
    --surface-strong: rgba(255, 255, 255, 0.88);
    --foreground: #111827;
    --muted: #526077;
    --border: rgba(15, 23, 42, 0.14);
    --accent-blue: #2563eb;
    --accent-cyan: #0891b2;
    --accent-pink: #db2777;
    --accent-sun: #d97706;
    --accent-green: #15803d;
    --button-text: #ffffff;
    --shadow: rgba(31, 41, 55, 0.12);
}

@media (prefers-color-scheme: light) {
    :root[data-theme="system"] {
        --background: #f7f9ff;
        --background-deep: #ffffff;
        --surface: rgba(15, 23, 42, 0.055);
        --surface-strong: rgba(255, 255, 255, 0.88);
        --foreground: #111827;
        --muted: #526077;
        --border: rgba(15, 23, 42, 0.14);
        --accent-blue: #2563eb;
        --accent-cyan: #0891b2;
        --accent-pink: #db2777;
        --accent-sun: #d97706;
        --accent-green: #15803d;
        --button-text: #ffffff;
        --shadow: rgba(31, 41, 55, 0.12);
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html[data-language="fr"] [data-content-lang="en"],
html[data-language="en"] [data-content-lang="fr"] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(115deg, color-mix(in srgb, var(--accent-blue) 16%, transparent), transparent 35%),
        linear-gradient(245deg, color-mix(in srgb, var(--accent-pink) 10%, transparent), transparent 32%),
        linear-gradient(180deg, var(--background-deep), var(--background) 26rem, var(--background-deep));
    color: var(--foreground);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(color-mix(in srgb, var(--foreground) 5%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--foreground) 5%, transparent) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 82%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-cyan) 8%, transparent), transparent),
        linear-gradient(to bottom, transparent 65%, color-mix(in srgb, var(--background) 80%, transparent));
    opacity: 0.75;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 110;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--foreground);
    color: var(--background);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-sun), var(--accent-cyan));
    pointer-events: none;
}

#emoji-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-emoji {
    position: absolute;
    opacity: 0;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
    animation-name: emoji-drift;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    will-change: transform, opacity;
}

@keyframes emoji-drift {
    0% {
        opacity: 0;
        transform: translate3d(0, 108vh, 0) rotate(0deg) scale(0.9);
    }

    14%,
    72% {
        opacity: var(--emoji-opacity, 0.35);
    }

    52% {
        transform: translate3d(var(--emoji-mid-x, 28px), 48vh, 0) rotate(130deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--emoji-end-x, -28px), -14vh, 0) rotate(280deg) scale(1.04);
    }
}

.site-header {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 90;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 14px;
    width: min(var(--content), calc(100% - 32px));
    min-height: var(--header-height);
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--background) 82%, transparent);
    box-shadow: 0 16px 48px var(--shadow);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--foreground);
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.brand img {
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 0 0 1px var(--border);
}

.site-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: var(--radius);
    color: color-mix(in srgb, var(--foreground) 84%, var(--muted));
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease;
}

.site-nav a:hover {
    background: var(--surface);
    color: var(--foreground);
}

.icon-button,
.theme-toggle,
.language-toggle button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--foreground);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.icon-button:hover,
.theme-toggle:hover,
.language-toggle button:hover {
    background: var(--surface-strong);
    border-color: color-mix(in srgb, var(--accent-blue) 58%, var(--border));
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.theme-toggle {
    gap: 8px;
    padding: 0 12px;
    font-weight: 800;
}

.language-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.language-toggle button {
    min-width: 34px;
    min-height: 34px;
    border-color: transparent;
    background: transparent;
    font-size: 12px;
    font-weight: 900;
}

.language-toggle button[aria-pressed="true"] {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    color: var(--button-text);
}

.theme-toggle-icon {
    min-width: 1.2em;
    text-align: center;
}

.theme-toggle-label {
    font-size: 13px;
}

#back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.page {
    position: relative;
    z-index: 1;
}

.hero {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 100svh;
    padding: 132px 0 88px;
}

.hero-inner,
section:not(.hero),
footer {
    width: min(var(--content), calc(100% - 40px));
    margin: 0 auto;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    align-items: center;
    gap: 52px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 14px;
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 860px;
    margin-bottom: 22px;
    font-size: 52px;
    line-height: 1.02;
    letter-spacing: 0;
}

h2 {
    max-width: 780px;
    margin-bottom: 18px;
    font-size: 36px;
    line-height: 1.12;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.22;
    letter-spacing: 0;
}

.hero-lead,
.section-heading p,
.copy-block p,
.info-card p,
.method-step p,
.timeline-item p,
.contact-block p {
    color: color-mix(in srgb, var(--foreground) 76%, var(--muted));
    line-height: 1.68;
}

.hero-lead {
    max-width: 780px;
    margin-bottom: 30px;
    font-size: 18px;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 850;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

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

.button-primary {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    color: var(--button-text);
    box-shadow: 0 14px 32px color-mix(in srgb, var(--accent-blue) 22%, transparent);
}

.button-secondary {
    border-color: var(--border);
    background: var(--surface);
    color: var(--foreground);
}

.button-secondary:hover {
    border-color: color-mix(in srgb, var(--accent-blue) 58%, var(--border));
    background: var(--surface-strong);
}

.hero-snapshot {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, var(--surface-strong), var(--surface)),
        color-mix(in srgb, var(--background) 88%, transparent);
    box-shadow: 0 24px 70px var(--shadow);
    padding: 24px;
}

.hero-snapshot img {
    display: block;
    width: 88px;
    height: 88px;
    margin-bottom: 22px;
    border-radius: var(--radius);
    box-shadow: 0 0 0 1px var(--border), 0 16px 32px color-mix(in srgb, var(--accent-blue) 16%, transparent);
}

.hero-snapshot dl {
    display: grid;
    gap: 16px;
    margin: 0;
}

.hero-snapshot div {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.hero-snapshot dt {
    margin-bottom: 5px;
    color: var(--accent-sun);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-snapshot dd {
    margin: 0;
    color: color-mix(in srgb, var(--foreground) 84%, var(--muted));
    line-height: 1.45;
}

.scroll-hint {
    position: absolute;
    right: max(20px, calc((100vw - var(--content)) / 2));
    bottom: 28px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.scroll-hint span {
    color: var(--accent-blue);
}

section:not(.hero) {
    padding: 64px 0;
}

.section-heading {
    max-width: 860px;
    margin-bottom: 34px;
}

.card-grid {
    display: grid;
    gap: 16px;
}

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

.info-card,
.stack-panel,
.method-step,
.timeline-item,
.contact-block,
.contact-facts,
.copy-block,
.signature-stack {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.info-card {
    min-height: 230px;
    padding: 22px;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.info-card:hover {
    border-color: color-mix(in srgb, var(--accent-blue) 55%, var(--border));
    background: var(--surface-strong);
    transform: translateY(-2px);
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent-blue) 15%, transparent);
    font-size: 22px;
}

.stack-layout,
.split-layout,
.contact-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
}

.stack-panel,
.copy-block,
.contact-block,
.contact-facts {
    padding: 26px;
}

.token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.token-list li,
.signature-stack span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--background) 60%, transparent);
    color: color-mix(in srgb, var(--foreground) 88%, var(--muted));
    font-weight: 800;
}

.focus-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.focus-list li {
    position: relative;
    padding-left: 24px;
    color: color-mix(in srgb, var(--foreground) 78%, var(--muted));
    line-height: 1.55;
}

.focus-list li::before {
    content: "";
    position: absolute;
    top: 0.7em;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 16px color-mix(in srgb, var(--accent-green) 44%, transparent);
}

.method-rail {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.method-step {
    min-height: 230px;
    padding: 22px;
}

.method-step span {
    display: inline-flex;
    margin-bottom: 26px;
    color: var(--accent-cyan);
    font-weight: 950;
}

.copy-block p:last-child,
.info-card p:last-child,
.method-step p:last-child,
.timeline-item p:last-child,
.contact-block p:last-child {
    margin-bottom: 0;
}

.timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 31px;
    right: 10%;
    left: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), var(--accent-sun), transparent);
}

.timeline-item {
    position: relative;
    min-height: 250px;
    padding: 60px 22px 22px;
}

.timeline-dot {
    position: absolute;
    top: 24px;
    left: 22px;
    width: 16px;
    height: 16px;
    border: 3px solid var(--background);
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow: 0 0 0 1px var(--border), 0 0 20px color-mix(in srgb, var(--accent-blue) 45%, transparent);
}

.timeline-label {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--accent-sun);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.signature-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 26px;
}

.signature-stack span {
    justify-content: center;
}

.contact-layout {
    align-items: stretch;
}

.contact-block h3,
.contact-facts h3 {
    max-width: 620px;
}

.blog-actions {
    margin-top: 18px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.post-list {
    display: grid;
    gap: 16px;
}

.post-card,
.article-panel,
.metadata-panel,
.archive-panel,
.cv-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.post-card {
    display: grid;
    gap: 12px;
    min-height: 230px;
    padding: 22px;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.post-card:hover {
    border-color: color-mix(in srgb, var(--accent-blue) 55%, var(--border));
    background: var(--surface-strong);
    transform: translateY(-2px);
}

.post-card h3,
.archive-panel h3,
.cv-panel h3 {
    margin-bottom: 0;
}

.post-card p {
    margin-bottom: 0;
    color: color-mix(in srgb, var(--foreground) 76%, var(--muted));
    line-height: 1.62;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--accent-sun);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.post-lang,
.post-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--background) 60%, transparent);
    color: color-mix(in srgb, var(--foreground) 82%, var(--muted));
    font-size: 11px;
    font-weight: 900;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.content-hero {
    min-height: auto;
    padding: 104px 0 30px;
}

.content-hero .hero-inner {
    grid-template-columns: 1fr;
}

.content-hero .hero-lead {
    margin-bottom: 0;
}

.content-section {
    padding-top: 24px;
}

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 18px;
    align-items: start;
}

.article-panel {
    padding: 32px;
}

.metadata-panel,
.archive-panel,
.cv-panel {
    padding: 24px;
}

.metadata-panel {
    position: sticky;
    top: calc(var(--header-height) + 36px);
}

.article-body {
    color: color-mix(in srgb, var(--foreground) 82%, var(--muted));
    font-size: 17px;
    line-height: 1.75;
}

.article-body h2,
.article-body h3 {
    margin-top: 34px;
    color: var(--foreground);
}

.article-body h2:first-child,
.article-body h3:first-child {
    margin-top: 0;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre {
    margin-bottom: 22px;
}

.article-body ul,
.article-body ol {
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body a {
    color: var(--accent-cyan);
    font-weight: 800;
}

.article-body code {
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: color-mix(in srgb, var(--background) 62%, transparent);
    color: var(--foreground);
    font-size: 0.92em;
}

.article-body pre {
    overflow-x: auto;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--background-deep) 88%, transparent);
}

.article-body pre code {
    padding: 0;
    border: 0;
    background: transparent;
}

.article-body blockquote {
    margin-left: 0;
    padding: 14px 18px;
    border-left: 3px solid var(--accent-blue);
    background: color-mix(in srgb, var(--accent-blue) 10%, transparent);
}

.archive-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.archive-list a {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    text-decoration: none;
}

.archive-list li:first-child a {
    border-top: 0;
}

.archive-date {
    color: var(--accent-sun);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.cv-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 14px;
}

.cv-snapshot {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.cv-snapshot > div {
    display: grid;
    gap: 6px;
    min-height: 116px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-blue) 14%, transparent), transparent 58%),
        color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: 0 18px 34px color-mix(in srgb, var(--background) 44%, transparent);
}

.cv-snapshot span,
.cv-snapshot small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.cv-snapshot strong {
    color: var(--foreground);
    font-size: 19px;
    line-height: 1.2;
}

.cv-feature {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 18px;
    align-items: start;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--accent-blue) 38%, var(--border));
    border-radius: 8px;
    background:
        linear-gradient(115deg, color-mix(in srgb, var(--accent-blue) 16%, transparent), transparent 52%),
        linear-gradient(245deg, color-mix(in srgb, var(--accent-sun) 10%, transparent), transparent 46%),
        var(--surface);
}

.cv-feature h2 {
    max-width: 10ch;
    margin-bottom: 0;
}

.cv-feature p {
    color: color-mix(in srgb, var(--foreground) 78%, var(--muted));
    line-height: 1.66;
}

.cv-timeline {
    position: relative;
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding-left: 28px;
}

.cv-timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 8px;
    width: 2px;
    background: linear-gradient(var(--accent-blue), var(--accent-sun), var(--accent-cyan));
    border-radius: 999px;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 24px;
    left: -26px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-sun);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-sun) 18%, transparent), 0 0 18px color-mix(in srgb, var(--accent-sun) 46%, transparent);
}

.timeline-date {
    color: var(--accent-cyan);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.timeline-item h3 {
    margin-bottom: 8px;
}

.timeline-item p {
    margin-bottom: 0;
    color: color-mix(in srgb, var(--foreground) 76%, var(--muted));
    line-height: 1.62;
}

.cv-panel {
    display: grid;
    gap: 10px;
}

.cv-panel p {
    margin-bottom: 0;
    color: color-mix(in srgb, var(--foreground) 76%, var(--muted));
    line-height: 1.62;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 38px 0 56px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
}

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.error-hero {
    min-height: 100svh;
}

.error-hero .hero-inner {
    grid-template-columns: 1fr;
}

.error-panel {
    max-width: 720px;
}

@media (max-width: 1040px) {
    .site-header {
        grid-template-columns: auto 1fr auto auto;
    }

    .nav-toggle {
        display: inline-flex;
        grid-column: 2;
        justify-self: end;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: color-mix(in srgb, var(--background) 98%, #000000);
        box-shadow: 0 18px 54px var(--shadow);
        backdrop-filter: blur(18px);
    }

    .site-header.nav-open .site-nav {
        display: flex;
    }

    .site-nav a {
        justify-content: center;
        min-height: 48px;
    }

    .hero-inner,
    .stack-layout,
    .split-layout,
    .contact-layout,
    .post-layout,
    .cv-layout {
        grid-template-columns: 1fr;
    }

    .cv-snapshot,
    .cv-feature {
        grid-template-columns: 1fr;
    }

    .four-cols,
    .method-rail,
    .timeline,
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline::before {
        display: none;
    }
}

@media (max-width: 720px) {
    :root {
        --header-height: 62px;
    }

    .site-header {
        top: 10px;
        width: calc(100% - 20px);
        gap: 8px;
        padding: 9px;
    }

    .brand {
        gap: 8px;
        font-size: 14px;
    }

    .theme-toggle-label {
        display: none;
    }

    .language-toggle button {
        min-width: 31px;
        padding: 0 7px;
    }

    .hero {
        min-height: auto;
        padding: 120px 0 72px;
    }

    .hero-inner,
    section:not(.hero),
    footer {
        width: min(var(--content), calc(100% - 28px));
    }

    h1 {
        font-size: 38px;
        line-height: 1.06;
    }

    h2 {
        font-size: 28px;
    }

    .hero-lead {
        font-size: 16px;
    }

    .hero-actions,
    .section-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    section:not(.hero) {
        padding: 48px 0;
    }

    .four-cols,
    .method-rail,
    .timeline,
    .signature-stack,
    .post-grid {
        grid-template-columns: 1fr;
    }

    .info-card,
    .method-step,
    .timeline-item {
        min-height: auto;
    }

    .cv-snapshot {
        grid-template-columns: 1fr;
    }

    .cv-snapshot > div,
    .cv-feature {
        padding: 16px;
    }

    .cv-feature h2 {
        max-width: none;
    }

    .cv-timeline {
        padding-left: 22px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .timeline-item::before {
        left: -24px;
    }

    .scroll-hint {
        position: static;
        width: min(var(--content), calc(100% - 28px));
        margin: 24px auto 0;
    }

    .content-hero {
        padding: 90px 0 22px;
    }

    .article-panel,
    .metadata-panel,
    .archive-panel,
    .cv-panel {
        padding: 16px;
    }

    .archive-list a {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    footer {
        flex-direction: column;
        padding-bottom: 42px;
    }

    #back-to-top {
        right: 16px;
        bottom: 16px;
    }
}

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

    #emoji-layer {
        display: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
