/* ==========================================================================
   Mikael TOSUN — Architectural Portfolio Design System
   Swiss International Typographic Style · santalarch.com aesthetic + UX craft
   ========================================================================== */

:root {
    --c-error: #9e2a2b;

    /* Semantic tokens (Default: Light Hero/Footer, Dark Editorial Body) */
    --bg-light: #f0f0f0;
    --fg-light: #0f0f0f;
    --fg-light-muted: rgba(15, 15, 15, 0.58);
    --line-light: rgba(15, 15, 15, 0.14);
    --line-light-strong: rgba(15, 15, 15, 0.34);

    --bg-dark: #0f0f0f;
    --fg-dark: #f0f0f0;
    --fg-dark-muted: rgba(240, 240, 240, 0.62);
    --line-dark: rgba(240, 240, 240, 0.12);
    --line-dark-strong: rgba(240, 240, 240, 0.32);

    --font-sans: "Helvetica Neue", Helvetica, "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --ease: cubic-bezier(0.25, 1, 0.5, 1);

    --grid-pad: clamp(1.25rem, 2.5vw, 2.25rem);
    --grid-gap: 1.25rem;
}

/* Theme Inversion (triggered by Invert color control) */
[data-theme="dark"] {
    --bg-light: #0f0f0f;
    --fg-light: #f0f0f0;
    --fg-light-muted: rgba(240, 240, 240, 0.62);
    --line-light: rgba(240, 240, 240, 0.14);
    --line-light-strong: rgba(240, 240, 240, 0.34);

    --bg-dark: #f0f0f0;
    --fg-dark: #0f0f0f;
    --fg-dark-muted: rgba(15, 15, 15, 0.58);
    --line-dark: rgba(15, 15, 15, 0.12);
    --line-dark-strong: rgba(15, 15, 15, 0.32);
}

/* ── Reset & Readable Fluid Root Scaling ────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

html {
    font-size: clamp(14px, calc(16 / 1440 * 100vw), 18px);
    scroll-behavior: smooth;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 1023px) {
    html {
        font-size: 15px;
    }
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-light);
    color: var(--fg-light);
    overflow-x: clip;
    font-weight: 400;
    cursor: auto;
    transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

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

button {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

input,
textarea {
    cursor: text;
}

img {
    display: block;
    max-width: 100%;
    border-radius: 0;
}

ul,
ol {
    list-style: none;
}

::selection {
    background: var(--fg-dark);
    color: var(--bg-dark);
}

/* Crisp Architectural Keyboard Focus */
:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 3px;
}

/* ── Accessibility Skip Link ────────────────────────────────────────────── */
.skip-link {
    position: fixed;
    top: -100%;
    left: var(--grid-pad);
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background: var(--fg-light);
    color: var(--bg-light);
    border: 1px solid var(--fg-light);
}

.skip-link:focus {
    top: 0.75rem;
}

/* ── Typography Scale (WCAG AA Legible + Swiss Architectural Rhythm) ────── */
.h2 {
    font-size: clamp(3.25rem, 6.2vw, 6.125rem);
    font-weight: 400;
    letter-spacing: -0.05em;
    line-height: 88%;
}

.h3 {
    font-size: clamp(1.85rem, 3.2vw, 3.125rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 106%;
}

.p1 {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 145%;
}

.c1 {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 130%;
}

.c2 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 130%;
}

/* ── Grid Master ────────────────────────────────────────────────────────── */
.grid-container {
    width: 100%;
    padding-left: var(--grid-pad);
    padding-right: var(--grid-pad);
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    column-gap: var(--grid-gap);
}

@media (max-width: 1023px) {
    .grid-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ── Persistent Crosshair Hairlines ─────────────────────────────────────── */
.guide-lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    mix-blend-mode: difference;
}

.guide-v {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(242, 240, 240, 0.045);
}

.guide-h {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(242, 240, 240, 0.045);
}

/* ── Micro-Interactions (Roll Text & Clip-Path Underline) ───────────────── */
.roll-text {
    display: grid;
    overflow: hidden;
    line-height: 1.25;
}

.roll-primary,
.roll-clone {
    grid-area: 1 / 1;
    transition: transform 0.6s var(--ease);
}

.roll-clone {
    transform: translateY(105%);
}

a:hover .roll-primary,
button:hover .roll-primary {
    transform: translateY(-105%);
}

a:hover .roll-clone,
button:hover .roll-clone {
    transform: translateY(0);
}

.u-link {
    position: relative;
    display: inline-block;
}

.u-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    transform-origin: left center;
    transition: clip-path 0.55s var(--ease);
    clip-path: inset(-50% 0 -50% 0);
}

.u-link:hover::after {
    clip-path: inset(-50% 0 -50% 100%);
}

/* ── Monumental Wordmark Band ───────────────────────────────────────────── */
.hero-wordmark-band,
.footer-wordmark-band {
    width: 100%;
    background-color: var(--bg-light);
    color: var(--fg-light);
    overflow: hidden;
    line-height: 0;
    transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

.footer-wordmark-band {
    padding-top: 3.5rem;
    padding-bottom: 4.5rem;
}

.wordmark-svg {
    width: 100%;
    height: auto;
    display: block;
}

.wordmark-text {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 278px;
    letter-spacing: -10px;
    fill: currentColor;
}

/* ── Adaptive Sticky Drafting-Ruler Header (Zero Text Overlap) ──────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 45;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.site-header.is-on-light {
    background-color: color-mix(in srgb, var(--bg-light) 94%, transparent);
    color: var(--fg-light);
}

.site-header.is-on-dark {
    background-color: color-mix(in srgb, var(--bg-dark) 94%, transparent);
    color: var(--fg-dark);
}

.header-inner {
    position: relative;
    align-items: center;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    column-gap: 0;
    border-bottom: 1px solid currentColor;
    border-bottom-color: var(--line-light);
}

.site-header.is-on-dark .header-inner {
    border-bottom-color: var(--line-dark);
}

.header-logo {
    grid-column: 1 / 2;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.2rem 0;
    transition: transform 0.6s var(--ease);
}

.header-logo:hover {
    transform: rotate(90deg);
}

.header-nav {
    grid-column: 2 / 9;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: center;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 0.2rem 0;
    color: inherit;
    opacity: 0.68;
    transition: opacity 0.25s var(--ease);
}

.nav-item-span {
    grid-column: span 2;
}

.nav-item::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.8rem;
    width: 1px;
    height: 7px;
    background: currentColor;
    opacity: 0.55;
}

.nav-item:hover,
.nav-item.is-active {
    opacity: 1;
}

.nav-progress-track {
    position: absolute;
    left: var(--grid-pad);
    right: var(--grid-pad);
    bottom: -1px;
    height: 1px;
    pointer-events: none;
}

.nav-progress-bar {
    width: 100%;
    height: 100%;
    background: currentColor;
    transform-origin: left center;
    transform: scaleX(0);
}

.menu-toggle {
    display: none;
    grid-column: 4 / 5;
    justify-self: end;
    padding: 0.2rem 0;
}

@media (max-width: 1023px) {
    .header-nav {
        display: none;
    }
    .menu-toggle {
        display: inline-block;
    }
}

/* ── Mobile Menu Overlay ────────────────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: var(--bg-dark);
    color: var(--fg-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6rem var(--grid-pad) 4.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
}

.mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin-top: 1.5rem;
}

.mobile-link {
    border-bottom: 1px solid var(--line-dark);
    padding-bottom: 0.75rem;
}

.mobile-menu-foot {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--fg-dark-muted);
}

/* ── Non-Overlapping Architectural Utility Dock (Bottom-Right) ──────────── */
.utility-dock {
    position: fixed;
    right: var(--grid-pad);
    bottom: 1.25rem;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line-light-strong);
    background-color: color-mix(in srgb, var(--bg-light) 94%, transparent);
    color: var(--fg-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.utility-dock.is-on-dark {
    border-color: var(--line-dark-strong);
    background-color: color-mix(in srgb, var(--bg-dark) 94%, transparent);
    color: var(--fg-dark);
}

.dock-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    color: inherit;
    transition: opacity 0.25s var(--ease);
}

.dock-btn:hover {
    opacity: 0.72;
}

.back-to-top {
    border-right: 1px solid var(--line-light);
    display: none;
}

.utility-dock.is-on-dark .back-to-top {
    border-right-color: var(--line-dark);
}

.back-to-top.is-visible {
    display: inline-flex;
}

.invert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.75s var(--ease);
}

[data-theme="dark"] .invert-icon {
    transform: rotate(-180deg);
}

/* ── Sections Base ──────────────────────────────────────────────────────── */
.sec-light {
    background-color: var(--bg-light);
    color: var(--fg-light);
    transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

.sec-dark {
    background-color: var(--bg-dark);
    color: var(--fg-dark);
    transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

/* ── Hero Stage ─────────────────────────────────────────────────────────── */
.hero-stage {
    position: relative;
    min-height: calc(100vh - 17vw);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 6.5rem;
    padding-bottom: 2.25rem;
    overflow: hidden;
}

.hero-drafting-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    color: var(--line-light);
}

.draft-v {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line-light);
}

.draft-v-1 { left: 12.5%; }
.draft-v-2 { left: 62.5%; }

.draft-diag {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-grid {
    position: relative;
    z-index: 2;
    align-items: start;
    margin-top: 1.5rem;
    margin-bottom: 5rem;
}

.hero-meta {
    grid-column: 2 / 5;
    padding-right: 1.5rem;
}

.hero-name {
    color: var(--fg-light);
    margin-bottom: 0.35rem;
}

.hero-kicker {
    color: var(--fg-light);
}

.hero-subkicker {
    color: var(--fg-light-muted);
    margin-top: 0.25rem;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-light);
    color: var(--fg-light-muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.hero-statement {
    grid-column: 5 / 9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 2rem;
    margin-top: 2.5rem;
}

.btn-solid {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: var(--fg-light);
    color: var(--bg-light);
    border: 1px solid var(--fg-light);
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-solid:hover {
    background: transparent;
    color: var(--fg-light);
}

.hero-bottom {
    position: relative;
    z-index: 2;
    align-items: end;
    padding-top: 1.5rem;
}

.hero-scroll-cue {
    grid-column: 5 / 7;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--fg-light);
}

.scroll-tick {
    width: 1px;
    height: 22px;
    background: currentColor;
}

.hero-location-cue {
    grid-column: 7 / 8;
    justify-self: start;
    color: var(--fg-light-muted);
}

@media (max-width: 1023px) {
    .hero-stage {
        min-height: calc(100svh - 6.5rem);
        padding-top: 3rem;
        padding-bottom: 4.5rem;
    }
    .draft-v {
        display: none;
    }
    .hero-meta {
        grid-column: 1 / 5;
        padding-right: 0;
        margin-bottom: 2.25rem;
    }
    .hero-statement {
        grid-column: 1 / 5;
    }
    .hero-scroll-cue {
        grid-column: 1 / 3;
    }
    .hero-location-cue {
        grid-column: 3 / 5;
        justify-self: end;
    }
}

/* ── Section 01: Philosophy Isometric Lattice ───────────────────────────── */
.sec-philosophy,
.sec-experience,
.sec-expertise,
.sec-profil,
.sec-formation,
.sec-contact {
    scroll-margin-top: 3.5rem;
}

.lattice-track {
    position: relative;
    height: 115vh;
}

.lattice-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5.5rem 0 2.5rem;
    border-top: 1px solid var(--line-dark);
}

.lattice-caption {
    position: relative;
    z-index: 3;
    color: var(--fg-dark-muted);
}

.lattice-caption > span:first-child {
    grid-column: 1 / 4;
}

.lattice-caption-right {
    grid-column: 5 / 9;
    justify-self: end;
}

.lattice-viewport {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1100px;
    overflow: hidden;
    pointer-events: none;
}

.lattice-plane {
    display: grid;
    grid-template-columns: repeat(4, 17rem);
    grid-auto-rows: 17rem;
    transform: rotateX(56deg) rotateZ(-42deg) translate3d(0, 0, 0);
    transform-style: preserve-3d;
    will-change: transform;
}

.lattice-cell {
    border: 1px solid var(--line-dark);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1.5rem;
    position: relative;
}

.lattice-cell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-right: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    transform: translateZ(-28px);
    opacity: 0.45;
}

.lattice-cell span {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.03em;
    color: var(--fg-dark-muted);
}

.lattice-cell-bright {
    border-color: var(--line-dark-strong);
}

.lattice-cell-bright span {
    color: var(--fg-dark);
}

@media (max-width: 1023px) {
    .lattice-track {
        height: 92vh;
    }
    .lattice-plane {
        grid-template-columns: repeat(4, 9.5rem);
        grid-auto-rows: 9.5rem;
    }
    .lattice-cell span {
        font-size: 1.2rem;
    }
    .lattice-caption-right {
        display: none;
    }
}

/* ── Section 01B: Vision / 3 Operational Pillars ────────────────────────── */
.vision-section {
    position: relative;
    min-height: 68vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 0 4rem;
    border-top: 1px solid var(--line-dark);
    overflow: hidden;
}

.vision-texture {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        radial-gradient(circle at 1px 1px, var(--line-dark-strong) 1.5px, transparent 0);
    background-size: 28px 28px;
}

.vision-inner {
    position: relative;
    z-index: 2;
    align-items: center;
    padding-top: 3rem;
    padding-bottom: 3rem;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
}

.vision-word-col {
    grid-column: 1 / 5;
}

.vision-copy-col {
    grid-column: 5 / 9;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.vision-statement {
    max-width: 34rem;
    color: var(--fg-dark);
}

.vision-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vision-tab {
    padding: 0.55rem 1rem;
    border: 1px solid var(--line-dark);
    color: var(--fg-dark-muted);
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.vision-tab:hover,
.vision-tab.is-active {
    border-color: var(--fg-dark);
    color: var(--fg-dark);
    background: rgba(242, 240, 240, 0.06);
}

[data-theme="dark"] .vision-tab:hover,
[data-theme="dark"] .vision-tab.is-active {
    background: rgba(15, 15, 15, 0.06);
}

.vision-footer {
    position: relative;
    z-index: 2;
    margin-top: 2.5rem;
}

.vision-counter {
    grid-column: 7 / 9;
    justify-self: end;
    display: flex;
    gap: 1.5rem;
    color: var(--fg-dark-muted);
}

@media (max-width: 1023px) {
    .vision-word-col {
        grid-column: 1 / 5;
        margin-bottom: 1.5rem;
    }
    .vision-copy-col {
        grid-column: 1 / 5;
    }
    .vision-counter {
        grid-column: 1 / 5;
        justify-self: start;
    }
}

/* ── Section 02: Expériences (50/50 Split Accordion) ────────────────────── */
.sec-experience {
    padding: 8.5rem 0;
    border-top: 1px solid var(--line-dark);
}

.experience-layout {
    align-items: start;
}

.experience-aside {
    grid-column: 1 / 5;
    position: sticky;
    top: 5.5rem;
    padding-right: 3rem;
}

.section-kicker {
    display: block;
    color: var(--fg-dark-muted);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.experience-lead {
    max-width: 24rem;
    margin-bottom: 1.25rem;
}

.experience-meta {
    color: var(--fg-dark-muted);
}

.aside-actions {
    margin-top: 2rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--line-dark-strong);
    color: var(--fg-dark);
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn-outline:hover {
    background: var(--fg-dark);
    color: var(--bg-dark);
    border-color: var(--fg-dark);
}

.experience-main {
    grid-column: 5 / 9;
}

.accordion-item {
    border-top: 1px solid var(--line-dark);
}

.accordion-item:last-child {
    border-bottom: 1px solid var(--line-dark);
}

.accordion-trigger {
    width: 100%;
    padding: 2.25rem 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    text-align: left;
}

.accordion-head {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.accordion-period {
    color: var(--fg-dark-muted);
}

.accordion-title {
    color: var(--fg-dark);
    transition: color 0.3s var(--ease);
}

.accordion-item:not(.is-open) .accordion-title {
    color: var(--fg-dark-muted);
}

.accordion-item:not(.is-open) .accordion-trigger:hover .accordion-title {
    color: var(--fg-dark);
}

.accordion-org {
    color: var(--fg-dark-muted);
}

.accordion-sign {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 0.75rem;
}

.accordion-sign::before,
.accordion-sign::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--fg-dark);
    transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}

.accordion-sign::after {
    transform: rotate(90deg);
}

.accordion-item.is-open .accordion-sign::after {
    transform: rotate(0deg);
    opacity: 0;
}

.accordion-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s var(--ease);
}

.accordion-item.is-open .accordion-panel {
    grid-template-rows: 1fr;
}

.accordion-panel-inner {
    overflow: hidden;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 2.5rem;
    padding-bottom: 0;
    transition: padding-bottom 0.45s var(--ease);
}

.accordion-item.is-open .accordion-panel-inner {
    padding-bottom: 2.75rem;
}

.sub-axes {
    margin-top: 1.4rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--line-dark);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: var(--fg-dark-muted);
}

.exp-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1.5rem;
}

.exp-tools span {
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--line-dark);
    color: var(--fg-dark-muted);
}

.scope-label {
    display: block;
    color: var(--fg-dark-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.scope-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.scope-list li {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 0.65rem;
    align-items: start;
    color: var(--fg-dark);
}

.scope-list svg {
    margin-top: 0.28rem;
    color: var(--fg-dark-muted);
}

@media (max-width: 1023px) {
    .sec-experience {
        padding: 5.5rem 0;
    }
    .experience-aside {
        grid-column: 1 / 5;
        position: static;
        padding-right: 0;
        margin-bottom: 2.5rem;
    }
    .experience-main {
        grid-column: 1 / 5;
    }
    .accordion-panel-inner {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

/* ── Section 03: Expertise & Stack (WE DO Pattern) ──────────────────────── */
.sec-expertise {
    padding: 8rem 0 7rem;
    border-top: 1px solid var(--line-dark);
}

.expertise-top {
    align-items: baseline;
    margin-bottom: 4rem;
}

.expertise-display {
    grid-column: 1 / 6;
}

.expertise-sublabel {
    grid-column: 6 / 9;
    justify-self: end;
    color: var(--fg-dark-muted);
    text-transform: uppercase;
}

.expertise-band-wrap {
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    padding: 2rem 0;
    margin-bottom: 3.25rem;
}

.expertise-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.exp-tab {
    font-size: clamp(1.2rem, 1.55vw, 1.65rem);
    color: var(--fg-dark-muted);
    transition: color 0.3s var(--ease);
    text-align: left;
    white-space: nowrap;
}

.exp-tab:hover,
.exp-tab.is-active {
    color: var(--fg-dark);
}

.expertise-detail {
    align-items: start;
    margin-bottom: 5.5rem;
}

.expertise-desc-col {
    grid-column: 1 / 5;
}

.expertise-desc-col .p1 {
    max-width: 28rem;
}

.expertise-stack-col {
    grid-column: 5 / 8;
}

.stack-label {
    display: block;
    color: var(--fg-dark-muted);
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.5rem;
}

.stack-list span {
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--line-dark-strong);
}

.expertise-counter {
    grid-column: 8 / 9;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    color: var(--fg-dark-muted);
}

.skills-index-wrap {
    padding-top: 3rem;
    border-top: 1px solid var(--line-dark);
}

.skills-index-head {
    grid-column: 1 / 9;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--fg-dark-muted);
    margin-bottom: 1.75rem;
    text-transform: uppercase;
}

.skills-index-grid {
    grid-column: 1 / 9;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line-dark);
    border-left: 1px solid var(--line-dark);
}

.skills-index-grid li {
    padding: 1.15rem 1.25rem;
    border-right: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    color: var(--fg-dark-muted);
    cursor: pointer;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.skills-index-grid li:hover {
    color: var(--fg-dark);
    background-color: rgba(240, 240, 240, 0.04);
}

.skills-index-grid li.is-highlighted {
    color: var(--fg-dark);
    background-color: rgba(240, 240, 240, 0.08);
}

[data-theme="dark"] .skills-index-grid li:hover {
    background-color: rgba(15, 15, 15, 0.04);
}

[data-theme="dark"] .skills-index-grid li.is-highlighted {
    background-color: rgba(15, 15, 15, 0.08);
}

@media (max-width: 1023px) {
    .sec-expertise {
        padding: 5.5rem 0;
    }
    .expertise-tabs {
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
    }
    .expertise-display {
        grid-column: 1 / 5;
    }
    .expertise-sublabel {
        grid-column: 1 / 5;
        justify-self: start;
        margin-top: 0.75rem;
    }
    .exp-tab {
        font-size: 1.3rem;
    }
    .expertise-desc-col {
        grid-column: 1 / 5;
        margin-bottom: 2rem;
    }
    .expertise-stack-col {
        grid-column: 1 / 5;
        margin-bottom: 2rem;
    }
    .expertise-counter {
        grid-column: 1 / 5;
        justify-self: start;
        align-items: flex-start;
    }
    .skills-index-head,
    .skills-index-grid {
        grid-column: 1 / 5;
    }
    .skills-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .skills-index-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Section 04: Profil & Portrait ──────────────────────────────────────── */
.sec-profil {
    padding: 8rem 0;
    border-top: 1px solid var(--line-dark);
}

.profil-mission {
    margin-bottom: 4.5rem;
}

.profil-kicker {
    grid-column: 1 / 9;
    text-align: center;
    color: var(--fg-dark-muted);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.profil-mission-text {
    grid-column: 3 / 7;
    text-align: center;
}

.profil-divider {
    width: 100%;
    height: 1px;
    background: var(--line-dark);
    margin-bottom: 4.5rem;
}

.profil-editorial {
    align-items: start;
    margin-bottom: 6.5rem;
}

.profil-portrait-col {
    grid-column: 2 / 5;
}

.portrait-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #171717;
    border: 1px solid var(--line-dark);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%) contrast(1.06);
    transition: transform 0.8s var(--ease), filter 0.6s var(--ease);
}

.portrait-frame:hover img {
    transform: scale(1.02);
}

.portrait-caption {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 1rem;
}

.portrait-caption .c2 {
    color: var(--fg-dark-muted);
}

.profil-specs-col {
    grid-column: 5 / 8;
    padding-left: 2rem;
}

.spec-row {
    padding: 1.45rem 0;
    border-top: 1px solid var(--line-dark);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.spec-row:last-child {
    border-bottom: 1px solid var(--line-dark);
}

.spec-row dt {
    color: var(--fg-dark-muted);
    text-transform: uppercase;
}

.spec-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1.25rem;
}

.copy-inline {
    color: var(--fg-dark-muted);
}

.sec-light .copy-inline {
    color: var(--fg-light-muted);
}

.globe-band {
    align-items: center;
    padding-top: 4rem;
    border-top: 1px solid var(--line-dark);
}

.globe-left {
    grid-column: 1 / 3;
}

.globe-svg-wrap {
    grid-column: 3 / 7;
    color: var(--line-dark-strong);
    display: flex;
    justify-content: center;
}

.globe-svg-wrap svg {
    width: 100%;
    max-width: 340px;
    height: auto;
}

.globe-right {
    grid-column: 7 / 9;
    justify-self: end;
}

@media (max-width: 1023px) {
    .sec-profil {
        padding: 5.5rem 0;
    }
    .profil-kicker,
    .profil-mission-text {
        grid-column: 1 / 5;
        text-align: left;
    }
    .profil-portrait-col {
        grid-column: 1 / 5;
        margin-bottom: 3rem;
    }
    .profil-specs-col {
        grid-column: 1 / 5;
        padding-left: 0;
    }
    .globe-left {
        grid-column: 1 / 3;
    }
    .globe-svg-wrap {
        display: none;
    }
    .globe-right {
        grid-column: 3 / 5;
    }
}

/* ── Section 05: Formation & RNCP35078 ──────────────────────────────────── */
.sec-formation {
    padding: 8rem 0;
    border-top: 1px solid var(--line-dark);
}

.formation-layout {
    align-items: start;
}

.formation-left {
    grid-column: 1 / 5;
    padding-right: 3rem;
}

.formation-title {
    margin-bottom: 0.75rem;
}

.formation-sub {
    color: var(--fg-dark);
    margin-bottom: 0.45rem;
}

.formation-org {
    color: var(--fg-dark-muted);
    margin-bottom: 2.25rem;
}

.rncp-meta-list {
    margin-top: 1rem;
}

.rncp-meta-row {
    padding: 1rem 0;
    border-top: 1px solid var(--line-dark);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rncp-meta-row:last-child {
    border-bottom: 1px solid var(--line-dark);
}

.rncp-meta-row dt {
    color: var(--fg-dark-muted);
    text-transform: uppercase;
}

.formation-right {
    grid-column: 5 / 9;
}

.rncp-blocks-head {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    color: var(--fg-dark-muted);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.rncp-trigger {
    padding: 1.5rem 0;
}

.rncp-block-title {
    color: var(--fg-dark);
    font-weight: 500;
}

.rncp-accordion .accordion-item:not(.is-open) .rncp-block-title {
    color: var(--fg-dark-muted);
}

.rncp-accordion .accordion-item:not(.is-open) .rncp-trigger:hover .rncp-block-title {
    color: var(--fg-dark);
}

.rncp-panel-inner {
    overflow: hidden;
    min-height: 0;
    padding-bottom: 0;
    transition: padding-bottom 0.45s var(--ease);
}

.accordion-item.is-open .rncp-panel-inner {
    padding-bottom: 1.75rem;
}

@media (max-width: 1023px) {
    .sec-formation {
        padding: 5.5rem 0;
    }
    .formation-left {
        grid-column: 1 / 5;
        padding-right: 0;
        margin-bottom: 3rem;
    }
    .formation-right {
        grid-column: 1 / 5;
    }
}

/* ── Section 06: Contact & Footer (Light Ground) ────────────────────────── */
.sec-contact {
    padding-top: 8rem;
}

.contact-top-rule {
    width: 100%;
    height: 1px;
    background: var(--line-light);
    margin-bottom: 3.5rem;
}

.contact-grid {
    align-items: start;
    margin-bottom: 5.5rem;
}

.contact-left {
    grid-column: 1 / 5;
    padding-right: 3rem;
}

.contact-heading {
    display: inline-block;
    border-bottom: 2px solid var(--fg-light);
    padding-bottom: 0.15rem;
    margin-bottom: 2.75rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    max-width: 30rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-row label {
    color: var(--fg-light-muted);
    text-transform: uppercase;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 0.65rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line-light);
    color: var(--fg-light);
    font-family: var(--font-sans);
    font-size: 1rem;
    letter-spacing: -0.015em;
    outline: none;
    resize: vertical;
    transition: border-color 0.3s var(--ease);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--fg-light-muted);
}

.form-row input:focus,
.form-row textarea:focus {
    border-bottom-color: var(--fg-light);
}

.form-row input[aria-invalid="true"],
.form-row textarea[aria-invalid="true"] {
    border-bottom-color: var(--c-error);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    padding-top: 0.5rem;
}

.btn-submit {
    padding: 0.85rem 1.75rem;
    background: var(--fg-light);
    color: var(--bg-light);
    border: 1px solid var(--fg-light);
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-submit:hover {
    background: transparent;
    color: var(--fg-light);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-feedback.is-error {
    color: var(--c-error);
}

.contact-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-direct { grid-column: 5 / 7; }
.contact-location { grid-column: 7 / 8; }
.contact-socials { grid-column: 8 / 9; }

.col-label {
    color: var(--fg-light-muted);
    text-transform: uppercase;
}

.contact-entry {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.contact-inline-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
}

.entry-sub {
    color: var(--fg-light-muted);
}

.footer-legal {
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-top: 1px solid var(--line-light);
    color: var(--fg-light-muted);
}

.legal-left {
    grid-column: 1 / 5;
}

.legal-right {
    grid-column: 5 / 7;
    justify-self: start;
}

@media (max-width: 1023px) {
    .sec-contact {
        padding-top: 4.5rem;
        padding-bottom: 4rem;
    }
    .contact-left {
        grid-column: 1 / 5;
        padding-right: 0;
        margin-bottom: 3rem;
    }
    .contact-direct,
    .contact-location,
    .contact-socials {
        grid-column: 1 / 5;
        margin-bottom: 1.75rem;
    }
    .legal-left,
    .legal-right {
        grid-column: 1 / 5;
        justify-self: start;
    }
    .legal-right {
        margin-top: 0.5rem;
    }
}

/* ── Subtle Architectural Scroll Reveal ─────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .roll-primary,
    .roll-clone,
    .u-link::after {
        transition: none;
    }
}

/* ── Clean Swiss Print / Save-as-PDF Stylesheet ─────────────────────────── */
@media print {
    body,
    .sec-light,
    .sec-dark {
        background: #ffffff !important;
        color: #111111 !important;
    }

    .site-header,
    .utility-dock,
    .guide-lines,
    .mobile-menu,
    .lattice-track,
    .vision-texture,
    .globe-band,
    .contact-form,
    .hero-actions,
    .hero-bottom,
    .aside-actions,
    .copy-inline,
    .footer-wordmark-band {
        display: none !important;
    }

    .accordion-panel {
        grid-template-rows: 1fr !important;
    }

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

    .sec-experience,
    .sec-expertise,
    .sec-profil,
    .sec-formation,
    .sec-contact {
        padding: 2rem 0 !important;
    }
}
