/* ==========================================================================
   TONINO BICIUSCA — EDITORIAL DESIGN SYSTEM
   ========================================================================== */

:root {
    /* Color Tokens */
    --bg-cream: #faf4f0;                     /* rgb(250, 244, 240) */
    --bg-stone: #ece9e4;                     /* Neutral thumbnail gray */
    --accent-orange: #f6440e;                /* rgb(246, 68, 14) */
    --accent-orange-hover: #ff622e;          /* rgb(255, 98, 46) */
    --accent-orange-tint: rgba(255, 173, 148, 0.3);
    --text-dark: #2d301e;                    /* rgb(45, 48, 30) */
    --text-muted: #63694b;                   /* rgb(99, 105, 75) */
    --border-line: rgba(45, 48, 30, 0.2);    /* #2d301e33 1px divider */
    --white: #ffffff;

    /* Framing Geometry */
    --rail-width: 80px;
    --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);

    /* Typography */
    --font-sans: 'General Sans', 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fragment Mono', monospace;
}

/* --- 1. Base Reset & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-cream);
}

body {
    background-color: var(--bg-cream);
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.38;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-cream);
}
::-webkit-scrollbar-thumb {
    background: rgba(45, 48, 30, 0.35);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-orange);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.text-dark {
    color: var(--text-dark);
}
.text-muted {
    color: var(--text-muted);
}

/* Background Interactive Canvas */
#fluid-bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* --- 2. Fixed 80px Architectural Side Rails --- */
.side-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    width: var(--rail-width);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.side-rail-left {
    left: 0;
    border-right: 1px solid var(--border-line);
    justify-content: flex-end;
    padding-bottom: 48px;
}

.side-rail-right {
    right: 0;
    border-left: 1px solid var(--border-line);
    justify-content: flex-start;
    padding-top: 28px;
    gap: 88px;
}

.rail-vertical-link {
    pointer-events: auto;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-dark);
    white-space: nowrap;
    transition: color 0.2s ease;
}
.rail-vertical-link:hover {
    color: var(--accent-orange);
}

.rail-plus-btn {
    pointer-events: auto;
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    color: var(--text-dark);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s var(--ease-fluid), color 0.2s ease;
}
.rail-plus-btn:hover {
    color: var(--accent-orange);
}
.rail-plus-btn.open {
    transform: rotate(45deg);
    color: var(--accent-orange);
}

/* Invert Side Rail Colors when scrolling over the Orange Footer */
body.footer-in-view .side-rail-left {
    border-right-color: rgba(255, 255, 255, 0.25);
}
body.footer-in-view .side-rail-right {
    border-left-color: rgba(255, 255, 255, 0.25);
}
body.footer-in-view .rail-vertical-link,
body.footer-in-view .rail-plus-btn {
    color: var(--white);
}

/* --- 3. Slide-Out Navigation Drawer --- */
.rail-nav-drawer {
    position: fixed;
    top: 0;
    right: var(--rail-width);
    width: 360px;
    max-width: calc(100vw - var(--rail-width));
    height: 100vh;
    background: var(--bg-cream);
    border-left: 1px solid var(--border-line);
    z-index: 890;
    transform: translateX(calc(100% + var(--rail-width) + 24px));
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s var(--ease-fluid), visibility 0.4s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 36px;
}

.rail-nav-drawer.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.drawer-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.drawer-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.drawer-link {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}
.drawer-link:hover {
    color: var(--accent-orange);
}

.drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-line);
    padding-top: 20px;
    font-size: 15px;
    font-weight: 600;
}

/* --- 4. Main Content Frame --- */
.site-main {
    position: relative;
    z-index: 2;
    padding-left: var(--rail-width);
    padding-right: var(--rail-width);
}

.site-container {
    width: 100%;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 44px;
}

.site-section {
    padding: 96px 0;
}

/* Links & Buttons */
.orange-cta-link,
.orange-link {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--accent-orange);
    transition: color 0.2s ease;
}
.orange-cta-link:hover,
.orange-link:hover {
    color: var(--accent-orange-hover);
}

.dark-cta-link {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}
.dark-cta-link:hover {
    color: var(--accent-orange);
}

.muted-link {
    color: var(--text-muted);
}
.muted-link:hover {
    color: var(--text-dark);
}

/* --- 5. Hero Section (Giant Orange Wordmark + Overlapping Portrait) --- */
.hero-section {
    padding-top: 32px;
    padding-bottom: 80px;
    min-height: 96vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-top-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 56px;
}

.meta-pipe {
    color: var(--text-muted);
    font-weight: 400;
}

.hero-dual-headline {
    font-size: clamp(2.1rem, 3.2vw, 3.1rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
}

/* Giant Orange Wordmark + Overlapping Figure Stage */
.hero-wordmark-stage {
    position: relative;
    width: 100%;
    min-height: clamp(320px, 38vw, 540px);
    display: flex;
    align-items: flex-start;
    margin: 12px 0 20px 0;
}

.giant-wordmark {
    font-family: var(--font-sans);
    font-size: clamp(6.5rem, 23.5vw, 21.5rem);
    font-weight: 700;
    line-height: 0.84;
    letter-spacing: -0.055em;
    color: var(--accent-orange);
    user-select: none;
    pointer-events: none;
    width: 100%;
    margin-left: -0.04em;
    z-index: 1;
}

/* Overlapping Cutout Portrait & Plinth (Right Side over 'tonino') */
.hero-figure-composition {
    position: absolute;
    right: 2%;
    bottom: -36px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(-20px 16px 28px rgba(45, 48, 30, 0.22));
}

/* Cutout Portrait Overlapping 'no' in 'tonino' (Transparent Background) */
.hero-portrait-monolith {
    width: 340px;
    height: 350px;
    overflow: hidden;
    background: transparent;
    border: 0;
    position: relative;
}

.hero-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: contrast(1.05) saturate(1.04);
    display: block;
}

/* Concrete Plinth Base */
.concrete-plinth {
    width: 380px;
    max-width: 100%;
    background: linear-gradient(90deg, #bdb8b0 0%, #eae6df 22%, #e2ddd5 100%);
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.plinth-spec {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-dark);
    letter-spacing: 0.04em;
}

.hero-bottom-intro {
    max-width: 390px;
    margin-top: 24px;
    position: relative;
    z-index: 4;
}

.hero-bottom-intro p {
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.42;
    color: var(--text-dark);
    margin-bottom: 16px;
}

/* --- 6. Dual-Tone Statement & 3 Capability Rows --- */
.dual-statement-h2 {
    font-size: clamp(1.85rem, 3.1vw, 2.75rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    max-width: 820px;
    margin-bottom: 84px;
}

.capability-rows {
    display: flex;
    flex-direction: column;
    max-width: 960px;
    margin-bottom: 96px;
}

.cap-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    align-items: start;
    gap: 32px;
    padding: 36px 0;
    border-bottom: 1px solid var(--border-line);
}

.cap-row:first-child {
    padding-top: 0;
}

.cap-text {
    max-width: 440px;
}

.cap-text h3 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.cap-text p {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.42;
    color: var(--text-muted);
}

.cap-icon-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    color: var(--text-muted);
}

.pixel-icon {
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.cap-row:hover .pixel-icon {
    color: var(--accent-orange);
    transform: scale(1.08);
}

.ascii-matrix {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: rgba(99, 105, 75, 0.45);
}

/* --- 7. Centerpiece 2026 Showreel / Systems Banner --- */
.showreel-banner {
    position: relative;
    width: 100%;
    height: 460px;
    background: #e7e2dc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.showreel-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Top-Left Cutout Badge (20 / 26 SYSTEMS) */
.showreel-corner-top {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--bg-cream);
    padding: 16px 20px 18px 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    line-height: 0.92;
}

.yr-line {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-dark);
}

.yr-sub {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Center Translucent Orange Circle Play Button */
.showreel-center-play {
    position: relative;
    z-index: 3;
    width: 82px;
    height: 82px;
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 50%;
    background: var(--accent-orange-tint);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s var(--ease-fluid), background-color 0.25s ease, opacity 0.35s ease;
}

.showreel-center-play:hover {
    transform: scale(1.1);
    background: rgba(246, 68, 14, 0.25);
}

.showreel-banner.is-playing .showreel-center-play {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.75);
}

/* Top-Right Live Simulation Status / Exit Pill */
.showreel-status-pill {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(45, 48, 30, 0.16);
    background: rgba(250, 244, 240, 0.92);
    backdrop-filter: blur(6px);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    color: var(--text-dark);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s var(--ease-fluid), border-color 0.2s ease;
}

.showreel-status-pill:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.showreel-banner.is-playing .showreel-status-pill {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.showreel-status-pill .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-orange);
    animation: statusPulse 1.4s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.75); }
}

.play-triangle {
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid var(--accent-orange);
    margin-left: 4px;
}

/* Bottom-Right Cutout Badge */
.showreel-corner-bottom {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--bg-cream);
    padding: 10px 0 0 18px;
    z-index: 3;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-orange);
}

/* --- 8. Stack Statement & 2x3 Swiss Bordered Grid --- */
.stack-split-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
    align-items: start;
}

.stack-statement {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 600;
    line-height: 1.16;
    letter-spacing: -0.025em;
    max-width: 380px;
    margin-bottom: 28px;
}

.stack-filter-box {
    position: relative;
    max-width: 340px;
    border-bottom: 1px solid var(--border-line);
    display: flex;
    align-items: center;
}

.stack-filter-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 0;
    font-family: var(--font-sans);
    font-size: 14.5px;
    color: var(--text-dark);
}
.stack-filter-box input::placeholder {
    color: var(--text-muted);
}

#skills-clear-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

/* 2x3 Swiss 1px Border Grid */
.swiss-logo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border-line);
    border-left: 1px solid var(--border-line);
}

.swiss-cell {
    aspect-ratio: 1 / 0.92;
    border-right: 1px solid var(--border-line);
    border-bottom: 1px solid var(--border-line);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    transition: background-color 0.25s ease, opacity 0.25s ease;
}

.swiss-cell:hover {
    background-color: rgba(45, 48, 30, 0.03);
}

.swiss-cell.dimmed {
    opacity: 0.22;
}

.swiss-cell.highlighted {
    background-color: var(--accent-orange-tint);
}

.cell-emblem {
    font-family: var(--font-sans);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-dark);
}

.cell-specs {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-muted);
}

/* --- 9. Recent Work (2-Column Editorial Grid) --- */
.recent-work-header {
    margin-bottom: 36px;
}

.rw-title-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 4px;
}

.rw-title-row h2,
.rw-title-row h1 {
    font-size: clamp(2.4rem, 4.2vw, 3.6rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    color: var(--text-dark);
}

.rw-years {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.recent-work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.rw-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rw-visual-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 0.92;
    background: var(--bg-stone);
    overflow: hidden;
    display: block;
}

.rw-canvas {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.6s var(--ease-fluid);
}

.rw-visual-frame:hover .rw-canvas {
    transform: scale(1.03);
}

.rw-corner-tag {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 5;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--bg-cream);
    background: rgba(45, 48, 30, 0.88);
    padding: 5px 10px;
}

/* 360 Budget Planner Dual-Image Presentation Stage */
.rw-budget-showcase {
    background:
        linear-gradient(rgba(45, 48, 30, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 48, 30, 0.05) 1px, transparent 1px),
        #e5e0d8;
    background-size: 28px 28px;
    position: relative;
}

.rw-budget-Controls {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 6;
    display: inline-flex;
    background: rgba(250, 244, 240, 0.92);
    border: 1px solid rgba(45, 48, 30, 0.16);
    backdrop-filter: blur(6px);
}

.rw-view-btn {
    border: none;
    background: transparent;
    padding: 5px 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.rw-view-btn:hover {
    color: var(--text-dark);
}

.rw-view-btn.active {
    background: var(--accent-orange);
    color: var(--bg-cream);
}

.rw-budget-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.rw-budget-img {
    position: absolute;
    border: 1px solid rgba(45, 48, 30, 0.18);
    box-shadow: 0 16px 36px rgba(28, 30, 20, 0.18);
    transition: all 0.55s var(--ease-fluid);
    cursor: pointer;
    object-fit: cover;
}

/* Default Split / Dual Staggered Mode: Both UI_1 and UI_2 clearly visible */
.rw-budget-showcase[data-view="dual"] .rw-budget-dark {
    width: 68%;
    top: 44px;
    right: 18px;
    z-index: 2;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.rw-budget-showcase[data-view="dual"] .rw-budget-light {
    width: 68%;
    bottom: 44px;
    left: 18px;
    z-index: 3;
    transform: translateY(0) scale(1);
    opacity: 1;
}

.rw-budget-showcase[data-view="dual"]:hover .rw-budget-dark {
    transform: translate(4px, -4px) scale(1.02);
}

.rw-budget-showcase[data-view="dual"]:hover .rw-budget-light {
    transform: translate(-4px, 4px) scale(1.02);
}

/* Full Light UI Mode (360_budget_planner_UI_1.png) */
.rw-budget-showcase[data-view="light"] .rw-budget-light {
    width: 88%;
    left: 6%;
    top: 48px;
    bottom: auto;
    z-index: 4;
    opacity: 1;
    transform: scale(1);
}

.rw-budget-showcase[data-view="light"] .rw-budget-dark {
    width: 76%;
    right: 6%;
    top: 28px;
    z-index: 1;
    opacity: 0.22;
    transform: scale(0.94);
}

/* Full Dark UI Mode (360_budget_planner_UI_2.png) */
.rw-budget-showcase[data-view="dark"] .rw-budget-dark {
    width: 88%;
    right: 6%;
    top: 48px;
    z-index: 4;
    opacity: 1;
    transform: scale(1);
}

.rw-budget-showcase[data-view="dark"] .rw-budget-light {
    width: 76%;
    left: 6%;
    bottom: 28px;
    z-index: 1;
    opacity: 0.22;
    transform: scale(0.94);
}

.rw-caption h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.rw-caption p {
    font-size: 14.5px;
    color: var(--text-muted);
    max-width: 46ch;
    line-height: 1.4;
}

/* --- 10. Experience Accordion Table --- */
.exp-heading {
    margin-bottom: 56px;
}

.exp-accordion-list {
    max-width: 960px;
    border-top: 1px solid var(--border-line);
    margin-bottom: 36px;
}

.exp-acc-item {
    border-bottom: 1px solid var(--border-line);
}

.exp-acc-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 28px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    align-items: center;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-sans);
}

.exp-role-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exp-role-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

.exp-company-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-muted);
}

.exp-date-col {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.exp-plus-col {
    font-size: 28px;
    font-weight: 400;
    color: var(--accent-orange);
    line-height: 1;
    transition: transform 0.35s var(--ease-fluid);
}

.exp-acc-item.open .exp-plus-col {
    transform: rotate(45deg);
}

.exp-acc-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s var(--ease-fluid);
}

.exp-acc-item.open .exp-acc-panel {
    max-height: 1100px;
}

.exp-acc-inner {
    padding: 0 0 28px 0;
    max-width: 780px;
}

.exp-subroles {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-orange);
    margin-bottom: 10px;
}

.exp-acc-inner ul + .exp-subroles {
    margin-top: 20px;
}

.exp-acc-inner ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.exp-acc-inner li {
    font-size: 15px;
    line-height: 1.48;
    color: var(--text-muted);
}

.exp-acc-inner li strong {
    color: var(--text-dark);
    font-weight: 600;
}

.exp-tags {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dark);
}

.exp-footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- 11. Technical Focus Slider (Centered Layout) --- */
.highlight-split {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.highlight-left {
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hl-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 28px;
}

.hl-meta strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.hl-meta span {
    font-size: 14px;
    color: var(--text-muted);
}

.hl-quote {
    font-size: clamp(1.75rem, 2.9vw, 2.55rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 40px;
    min-height: 3.4em;
}

.hl-nav-btns {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.orange-square-btn {
    width: 44px;
    height: 44px;
    background: var(--accent-orange);
    color: var(--white);
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.orange-square-btn:hover {
    background: var(--accent-orange-hover);
}

.bw-portrait-frame {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: transparent;
    border-bottom: 1px solid var(--border-line);
    margin-left: auto;
}

.bw-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: grayscale(100%) contrast(1.14) drop-shadow(0 12px 24px rgba(45, 48, 30, 0.12));
    display: block;
}

/* --- 12. Publications Section --- */
.pub-header-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 44px;
}

.pub-header-row h2 {
    font-size: clamp(2rem, 3.4vw, 2.85rem);
    font-weight: 600;
    letter-spacing: -0.035em;
}

.pub-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 780px;
}

.pub-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 28px;
}

.pub-thumb {
    width: 140px;
    height: 140px;
    background: var(--bg-stone);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease;
}

.pub-row:hover .pub-thumb {
    background: var(--accent-orange-tint);
}

.pub-cat {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.pub-info h3 {
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.32;
    color: var(--text-dark);
    transition: color 0.2s ease;
}

.pub-row:hover .pub-info h3 {
    color: var(--accent-orange);
}

/* --- 13. Full-Bleed Orange Footer & Contact --- */
.site-orange-footer {
    position: relative;
    background-color: var(--accent-orange);
    color: var(--white);
    margin-left: calc(-1 * var(--rail-width));
    margin-right: calc(-1 * var(--rail-width));
    padding: 140px var(--rail-width) 44px var(--rail-width);
    overflow: hidden;
}

/* Top-Left Dithered Pixel Checkerboard Graphic */
.pixel-dither-corner {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(6, 36px);
    grid-template-rows: repeat(4, 36px);
    pointer-events: none;
}

.pixel-dither-corner .px {
    width: 36px;
    height: 36px;
    display: block;
}
.px.p1 { background: rgba(250, 244, 240, 0.92); }
.px.p2 { background: rgba(250, 244, 240, 0.65); }
.px.p3 { background: rgba(250, 244, 240, 0.82); }
.px.p4 { background: rgba(250, 244, 240, 0.45); }
.px.p5 { background: rgba(250, 244, 240, 0.25); }
.px.p6 { background: rgba(250, 244, 240, 0.12); }
.px.p7 { background: rgba(250, 244, 240, 0.72); }
.px.p8 { background: rgba(250, 244, 240, 0.48); }
.px.p9 { background: rgba(250, 244, 240, 0.22); }
.px.p10 { background: rgba(250, 244, 240, 0.14); }
.px.p11 { background: transparent; }
.px.p12 { background: rgba(250, 244, 240, 0.35); }
.px.p13 { background: rgba(250, 244, 240, 0.18); }
.px.p14 { background: rgba(250, 244, 240, 0.12); }

.footer-role-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 48px;
}
.footer-role-line .meta-pipe {
    color: rgba(255, 255, 255, 0.65);
}

.copyable-inline {
    cursor: pointer;
}

.copy-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    opacity: 0.8;
}

.footer-giant-email-wrap {
    margin-bottom: 64px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.footer-giant-email {
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    font-family: var(--font-sans);
    font-size: clamp(2.1rem, 5.6vw, 5.2rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: var(--white);
    cursor: pointer;
    word-break: break-all;
}
.footer-giant-email:hover {
    opacity: 0.88;
}

.email-copy-feedback {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
}

.footer-grid-bottom {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 48px;
    align-items: end;
    padding-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.footer-nav-cols {
    display: flex;
    gap: 64px;
}

.f-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
}
.f-col a:hover {
    opacity: 0.75;
}

/* Integrated Brutalist White-on-Orange Contact Form */
.site-contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.f-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.f-field {
    display: flex;
    flex-direction: column;
}

.f-field input,
.f-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.38);
    padding: 11px 14px;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
}

.f-field input::placeholder,
.f-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.f-field input:focus,
.f-field textarea:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
}

.f-err {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #fffbeb;
    min-height: 14px;
    margin-top: 2px;
}

.f-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.f-gdpr-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}
.f-gdpr-label a {
    text-decoration: underline;
    font-weight: 600;
}

.site-submit-btn {
    background: var(--white);
    color: var(--accent-orange);
    border: none;
    padding: 11px 22px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.site-submit-btn:hover {
    background: var(--text-dark);
    color: var(--white);
}

.f-alert-box {
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(45, 48, 30, 0.9);
    color: var(--white);
    font-size: 13px;
    display: flex;
    gap: 8px;
}

.footer-copyright-row {
    margin-top: 44px;
    text-align: right;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.9);
}

/* --- 14. GDPR Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 48, 30, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 24px;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    max-width: 500px;
    width: 100%;
    background: var(--bg-cream);
    border: 1px solid var(--border-line);
    padding: 32px;
    color: var(--text-dark);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-line);
}

.modal-close {
    background: none;
    border: none;
    font-size: 26px;
    color: var(--text-dark);
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

/* --- 15. Scroll Reveal Animation --- */
.reveal-up {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.32s var(--ease-fluid), transform 0.32s var(--ease-fluid);
}
.reveal-up.revealed,
.hero-section .reveal-up {
    opacity: 1;
    transform: translateY(0);
}

/* --- 16. Responsive Breakpoints --- */
@media (max-width: 1100px) {
    :root {
        --rail-width: 56px;
    }
    .site-container {
        padding: 0 28px;
    }
    .hero-figure-composition {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: -28px;
        margin-left: auto;
    }
    .hero-wordmark-stage {
        flex-direction: column;
        min-height: auto;
    }
    .stack-split-layout,
    .footer-grid-bottom {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .stack-statement {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --rail-width: 0px;
    }

    /* Hide full-height vertical side rails on phone; keep floating '+' menu trigger top-right */
    .side-rail-left {
        display: none;
    }
    .side-rail-right {
        width: auto;
        height: auto;
        top: 14px;
        right: 14px;
        bottom: auto;
        padding: 0;
        border-left: none;
        z-index: 950;
    }
    .side-rail-right .rail-vertical-link,
    .side-rail-right .rail-top,
    .side-rail-right .rail-brand {
        display: none;
    }
    .rail-plus-btn {
        width: 44px;
        height: 44px;
        background: rgba(250, 244, 240, 0.92);
        border: 1px solid var(--border-line);
        backdrop-filter: blur(6px);
    }
    body.footer-in-view .rail-plus-btn {
        background: rgba(246, 68, 14, 0.92);
        border-color: rgba(255, 255, 255, 0.35);
        color: var(--white);
    }

    /* Full-width slide-out menu drawer on mobile */
    .rail-nav-drawer {
        right: 0;
        width: 100vw;
        max-width: 100vw;
        padding: 64px 24px 32px 24px;
        transform: translateX(105%);
    }
    .rail-nav-drawer.open {
        transform: translateX(0);
    }

    .site-main {
        padding-left: 0;
        padding-right: 0;
    }
    .site-container {
        padding: 0 20px;
    }
    .site-section {
        padding: 64px 0;
    }

    /* Hero Mobile Adaptation */
    .hero-section {
        min-height: auto;
        padding-top: 22px;
        padding-bottom: 52px;
    }
    .hero-top-meta {
        font-size: 13px;
        gap: 8px;
        margin-bottom: 28px;
        padding-right: 52px;
        flex-wrap: wrap;
    }
    .hero-dual-headline {
        font-size: clamp(1.75rem, 7vw, 2.35rem);
        line-height: 1.12;
        margin-bottom: 16px;
    }
    .giant-wordmark {
        font-size: clamp(4.5rem, 25vw, 8.2rem);
        line-height: 0.88;
        margin-left: -0.03em;
    }
    .hero-wordmark-stage {
        margin: 8px 0 16px 0;
        align-items: center;
    }
    .hero-figure-composition {
        width: 100%;
        max-width: 310px;
        margin: -22px auto 0 auto;
    }
    .hero-portrait-monolith {
        width: 240px;
        height: 250px;
        margin: 0 auto;
    }
    .concrete-plinth {
        width: 100%;
        height: 46px;
        padding: 0 12px;
    }
    .plinth-spec {
        font-size: 9.5px;
        text-align: center;
    }
    .hero-bottom-intro {
        max-width: 100%;
        margin-top: 20px;
    }
    .hero-bottom-intro p {
        font-size: 15px;
    }

    /* Domains & Showreel Mobile Adaptation */
    .dual-statement-h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 44px;
    }
    .capability-rows {
        margin-bottom: 56px;
    }
    .cap-row {
        grid-template-columns: 1fr auto;
        gap: 16px;
        padding: 24px 0;
    }
    .cap-text h3 {
        font-size: 19px;
        margin-bottom: 8px;
    }
    .cap-text p {
        font-size: 14.5px;
    }
    .showreel-banner {
        height: 260px;
        transition: height 0.3s var(--ease-fluid);
    }
    .showreel-banner.is-playing {
        height: 360px;
    }
    .showreel-status-pill {
        top: 10px;
        right: 10px;
        padding: 5px 8px;
        font-size: 8.5px;
        gap: 6px;
    }
    .showreel-corner-top {
        padding: 10px 14px 12px 0;
    }
    .yr-line {
        font-size: 22px;
    }
    .showreel-center-play {
        width: 58px;
        height: 58px;
    }
    .showreel-corner-bottom {
        font-size: 12px;
        padding: 8px 0 0 12px;
    }

    /* Tech Stack Swiss Grid Mobile Adaptation */
    .stack-filter-box {
        max-width: 100%;
    }
    .swiss-logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .swiss-cell {
        aspect-ratio: auto;
        min-height: 132px;
        padding: 20px 12px;
    }
    .cell-emblem {
        font-size: 18px;
    }
    .cell-specs {
        font-size: 10.5px;
    }

    /* Recent Work Mobile Adaptation */
    .recent-work-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .rw-title-row {
        flex-wrap: wrap;
        gap: 12px;
    }
    .rw-visual-frame {
        aspect-ratio: 1 / 0.85;
    }

    /* Experience Accordion Mobile Adaptation */
    .exp-heading {
        margin-bottom: 36px;
    }
    .exp-acc-trigger {
        grid-template-columns: 1fr auto;
        row-gap: 6px;
        column-gap: 12px;
        padding: 20px 0;
    }
    .exp-role-title {
        font-size: 17.5px;
    }
    .exp-company-name {
        font-size: 15.5px;
    }
    .exp-date-col {
        grid-column: 1;
        font-size: 13px;
    }
    .exp-plus-col {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
    .exp-acc-item.open .exp-acc-panel {
        max-height: 1500px;
    }
    .exp-acc-inner li {
        font-size: 14.5px;
    }

    /* Centered Highlight Slider Mobile Adaptation */
    .hl-quote {
        font-size: clamp(1.35rem, 5.6vw, 1.85rem);
        min-height: 4.8em;
        margin-bottom: 28px;
    }

    /* Publications Mobile Adaptation */
    .pub-header-row {
        margin-bottom: 28px;
    }
    .pub-row {
        grid-template-columns: 76px 1fr;
        gap: 16px;
        align-items: start;
    }
    .pub-thumb {
        width: 76px;
        height: 76px;
    }
    .pub-thumb svg {
        width: 44px;
        height: 44px;
    }
    .pub-cat {
        font-size: 12px;
    }
    .pub-info h3 {
        font-size: 15px;
    }

    /* Full-Bleed Orange Footer Mobile Adaptation */
    .site-orange-footer {
        margin-left: 0;
        margin-right: 0;
        padding: 92px 0 36px 0;
    }
    .pixel-dither-corner {
        grid-template-columns: repeat(6, 22px);
        grid-template-rows: repeat(4, 22px);
    }
    .pixel-dither-corner .px {
        width: 22px;
        height: 22px;
    }
    .footer-role-line {
        font-size: 13.5px;
        gap: 8px;
        margin-bottom: 28px;
    }
    .footer-giant-email-wrap {
        margin-bottom: 40px;
    }
    .footer-giant-email {
        font-size: clamp(1.3rem, 6.2vw, 2.2rem);
        line-height: 1.12;
    }
    .footer-nav-cols {
        gap: 40px;
        flex-wrap: wrap;
    }
    .f-form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .f-form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .f-submit-btn {
        width: 100%;
        text-align: center;
    }
    .modal-card {
        padding: 22px 18px;
    }
}

@media (max-width: 400px) {
    .site-container {
        padding: 0 16px;
    }
    .swiss-logo-grid {
        grid-template-columns: 1fr;
    }
    .swiss-cell {
        min-height: 108px;
    }
    .hero-portrait-monolith {
        width: 210px;
        height: 220px;
    }
}

/* --- 17. CSP-Safe State & Layout Utilities (Zero Inline Styles) --- */
.is-hidden,
.honeypot {
    display: none !important;
}

.hl-quote.is-fading {
    opacity: 0.25;
}

.portfolio-page-section {
    padding-top: 72px;
}

.portfolio-page-header {
    margin-top: 32px;
}
