/* ========================================
   WILLIAM REVAH — PORTFOLIO
   Three-theme system:
   Editorial · Cartography · Échiquier
   ======================================== */

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === TRANSITION SPEED === */
:root {
    --t: 0.4s;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   THEME: EDITORIAL
   Parisian print culture, warm parchment,
   serif elegance, table-of-contents feel
   ======================================== */
.theme-editorial {
    --bg-page: #FAF6F0;
    --bg-card: transparent;
    --bg-card-hover: rgba(184, 148, 79, 0.06);
    --bg-btn-primary: #2C2C2C;
    --bg-btn-secondary: transparent;

    --text-primary: #2C2C2C;
    --text-secondary: #5A5A5A;
    --text-muted: #908A80;
    --text-on-btn: #FAF6F0;

    --accent: #B8944F;
    --accent-soft: rgba(184, 148, 79, 0.10);

    --border-thin: rgba(44, 44, 44, 0.12);
    --border-accent: #B8944F;
    --border-medium: rgba(44, 44, 44, 0.25);

    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Lora', Georgia, serif;
    --font-accent: 'Cormorant Garamond', Georgia, serif;

    --radius: 3px;
    --radius-img: 6px;

    --shadow-hover: 0 2px 12px rgba(0, 0, 0, 0.06);

    --container-max: 640px;

    --name-size: 2.4rem;
    --name-weight: 700;
    --name-tracking: -0.02em;
    --heading-size: 0.72rem;
    --heading-weight: 600;
    --heading-tracking: 0.18em;
    --heading-transform: uppercase;
}

/* ========================================
   THEME: CARTOGRAPHY
   Deep navy, topographic patterns,
   monospace accents, data-forward
   ======================================== */
.theme-cartography {
    --bg-page: #0D1B2A;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(201, 169, 110, 0.08);
    --bg-btn-primary: #C9A96E;
    --bg-btn-secondary: rgba(255, 255, 255, 0.05);

    --text-primary: #E8E0D4;
    --text-secondary: #A09882;
    --text-muted: #6A6458;
    --text-on-btn: #0D1B2A;

    --accent: #C9A96E;
    --accent-soft: rgba(201, 169, 110, 0.12);

    --border-thin: rgba(201, 169, 110, 0.10);
    --border-accent: rgba(201, 169, 110, 0.30);
    --border-medium: rgba(201, 169, 110, 0.20);

    --font-display: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
    --font-accent: 'JetBrains Mono', 'Fira Code', monospace;

    --radius: 10px;
    --radius-img: 50%;

    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.25);

    --container-max: 640px;

    --name-size: 1.8rem;
    --name-weight: 700;
    --name-tracking: -0.01em;
    --heading-size: 0.68rem;
    --heading-weight: 500;
    --heading-tracking: 0.22em;
    --heading-transform: uppercase;
}

/* ========================================
   THEME: ÉCHIQUIER
   Chess-inspired, high contrast,
   geometric precision, bold typography
   ======================================== */
.theme-echiquier {
    --bg-page: #111111;
    --bg-card: transparent;
    --bg-card-hover: #C9A96E;
    --bg-btn-primary: #F5F0EB;
    --bg-btn-secondary: transparent;

    --text-primary: #F5F0EB;
    --text-secondary: #A8A098;
    --text-muted: #6A6460;
    --text-on-btn: #111111;

    --accent: #C9A96E;
    --accent-soft: rgba(201, 169, 110, 0.14);

    --border-thin: rgba(245, 240, 235, 0.10);
    --border-accent: #C9A96E;
    --border-medium: rgba(245, 240, 235, 0.20);

    --font-display: 'Bebas Neue', 'Impact', sans-serif;
    --font-body: 'Libre Baskerville', Georgia, serif;
    --font-accent: 'Bebas Neue', 'Impact', sans-serif;

    --radius: 0;
    --radius-img: 0;

    --shadow-hover: none;

    --container-max: 640px;

    --name-size: 2.8rem;
    --name-weight: 400;
    --name-tracking: 0.10em;
    --heading-size: 1.3rem;
    --heading-weight: 400;
    --heading-tracking: 0.14em;
    --heading-transform: uppercase;
}

/* ========================================
   BASE STYLES
   ======================================== */
body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background-color 0.5s var(--ease);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   BACKGROUND EFFECTS
   ======================================== */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Editorial — subtle paper grain */
.theme-editorial .page-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* Cartography — topographic contour lines */
.theme-cartography .page-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 12% 22%,
            transparent 80px, rgba(201,169,110,0.055) 80px, rgba(201,169,110,0.055) 81.5px, transparent 81.5px,
            transparent 135px, rgba(201,169,110,0.045) 135px, rgba(201,169,110,0.045) 136.5px, transparent 136.5px,
            transparent 190px, rgba(201,169,110,0.035) 190px, rgba(201,169,110,0.035) 191.5px, transparent 191.5px,
            transparent 255px, rgba(201,169,110,0.025) 255px, rgba(201,169,110,0.025) 256.5px, transparent 256.5px),
        radial-gradient(ellipse at 82% 68%,
            transparent 55px, rgba(201,169,110,0.055) 55px, rgba(201,169,110,0.055) 56.5px, transparent 56.5px,
            transparent 110px, rgba(201,169,110,0.04) 110px, rgba(201,169,110,0.04) 111.5px, transparent 111.5px,
            transparent 170px, rgba(201,169,110,0.03) 170px, rgba(201,169,110,0.03) 171.5px, transparent 171.5px,
            transparent 230px, rgba(201,169,110,0.02) 230px, rgba(201,169,110,0.02) 231.5px, transparent 231.5px),
        radial-gradient(ellipse at 48% 88%,
            transparent 70px, rgba(201,169,110,0.04) 70px, rgba(201,169,110,0.04) 71.5px, transparent 71.5px,
            transparent 145px, rgba(201,169,110,0.03) 145px, rgba(201,169,110,0.03) 146.5px, transparent 146.5px,
            transparent 210px, rgba(201,169,110,0.02) 210px, rgba(201,169,110,0.02) 211.5px, transparent 211.5px),
        radial-gradient(ellipse at 28% 58%,
            transparent 100px, rgba(201,169,110,0.035) 100px, rgba(201,169,110,0.035) 101.5px, transparent 101.5px,
            transparent 175px, rgba(201,169,110,0.025) 175px, rgba(201,169,110,0.025) 176.5px, transparent 176.5px);
}

/* Cartography — dot grid overlay */
.theme-cartography .page-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: radial-gradient(circle, rgba(201,169,110,0.35) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Échiquier — subtle checkerboard */
.theme-echiquier .page-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image:
        linear-gradient(45deg, #F5F0EB 25%, transparent 25%),
        linear-gradient(-45deg, #F5F0EB 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #F5F0EB 75%),
        linear-gradient(-45deg, transparent 75%, #F5F0EB 75%);
    background-size: 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0;
}

/* Échiquier — gold accent lines top + bottom */
.theme-echiquier .page-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 10%, #C9A96E 30%, #C9A96E 70%, transparent 90%);
}

/* ========================================
   LAYOUT
   ======================================== */
.site-wrapper {
    position: relative;
    z-index: 1;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 50px 40px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: opacity 0.28s ease;
}

.theme-transitioning .site-wrapper {
    opacity: 0;
}

/* ========================================
   HEADER — Theme Switcher + Language Toggle
   ======================================== */
.site-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.site-header .page-nav {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    gap: 5px;
    align-items: center;
    position: relative;
}

.switcher-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-accent);
    margin-right: 2px;
    transition: color var(--t) ease;
    user-select: none;
}

/* First-visit tooltip */
.theme-hint {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    padding: 5px 12px;
    background: var(--accent);
    color: var(--bg-page);
    font-family: var(--font-accent);
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.theme-hint.visible {
    opacity: 1;
    transform: translateY(0);
}

.theme-hint::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 18px;
    border: 5px solid transparent;
    border-bottom-color: var(--accent);
}

.theme-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.3s ease;
    color: var(--text-muted);
}

.theme-btn:hover {
    color: var(--accent);
}

.theme-btn.active {
    color: var(--accent);
}

.theme-btn svg {
    width: 14px;
    height: 14px;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-accent);
    transition: color var(--t) ease;
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--border-medium);
    transition: background-color 0.3s ease;
    border-radius: 24px;
}

.slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--accent);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--border-medium);
}

input:checked + .slider::before {
    transform: translateX(18px);
}

/* ========================================
   HERO SECTION — La Lettre layout
   ======================================== */
.hero {
    margin-bottom: 8px;
}

.hero-byline {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.hero-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: var(--radius-img);
    border: 2px solid var(--accent);
    transition: all 0.4s ease;
    display: block;
    flex-shrink: 0;
}

.hero-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-name {
    font-family: var(--font-display);
    font-size: var(--name-size);
    font-weight: var(--name-weight);
    letter-spacing: var(--name-tracking);
    color: var(--text-primary);
    line-height: 1.1;
    transition: color var(--t) ease;
}

.hero-location {
    font-family: var(--font-accent);
    color: var(--text-muted);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    transition: color var(--t) ease;
}

.hero-title {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 1.6rem;
    font-weight: var(--name-weight);
    margin-bottom: 28px;
    letter-spacing: var(--name-tracking);
    line-height: 1.2;
    white-space: nowrap;
    transition: color var(--t) ease;
}

.hero-bio {
    margin-bottom: 36px;
}

.hero-bio p {
    color: var(--text-secondary);
    font-size: 0.90rem;
    line-height: 1.78;
    transition: color var(--t) ease;
}

.hero-bio p + p {
    margin-top: 16px;
}

.hero-cta-question {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    transition: color var(--t) ease;
}

.hero-cta-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cta-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s ease;
    flex-wrap: nowrap;
    min-width: 0;
}

.cta-item:hover {
    background: var(--bg-card-hover);
}

.cta-item .icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--accent);
    position: relative;
    top: 2px;
    align-self: flex-start;
}

.cta-item strong {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.90rem;
    white-space: nowrap;
}

.cta-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ========================================
   PAGE NAV — Breadcrumb navigation
   ======================================== */
.page-nav {
    font-family: var(--font-accent);
    font-size: var(--heading-size);
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-tracking);
    text-transform: var(--heading-transform);
    color: var(--text-muted);
    margin-bottom: 32px;
    transition: color var(--t) ease;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-separator {
    margin: 0 0.5em;
    color: var(--border-medium);
}

.nav-current {
    color: var(--text-secondary);
}

/* ========================================
   APPS PAGE
   ======================================== */
.apps-title {
    font-family: var(--font-display);
    font-size: var(--name-size);
    font-weight: var(--name-weight);
    letter-spacing: var(--name-tracking);
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 10px;
    transition: color var(--t) ease;
}

.apps-subtitle {
    color: var(--text-secondary);
    font-size: 0.90rem;
    line-height: 1.6;
    margin-bottom: 36px;
    transition: color var(--t) ease;
}

.projects-section {
    margin-top: 36px;
}

.projects-section:first-child {
    margin-top: 0;
}

.section-heading {
    font-family: var(--font-accent);
    font-size: var(--heading-size);
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-tracking);
    text-transform: var(--heading-transform);
    color: var(--text-muted);
    margin-bottom: 12px;
    transition: color var(--t) ease;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Tile — default card */
.app-tile {
    border: 1px solid var(--border-thin);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.4s var(--ease);
    overflow: hidden;
}

.app-tile:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-hover);
}

.app-tile-header {
    position: relative;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: padding 0.4s var(--ease);
}

.app-icon {
    font-size: 1.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    border-radius: var(--radius);
    margin-bottom: 4px;
    transition: all 0.4s var(--ease);
    flex-shrink: 0;
}

.app-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.app-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.app-tagline {
    font-size: 0.80rem;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: all 0.4s var(--ease);
}


/* Detail — hidden by default, animated with grid rows */
.app-tile-detail {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s var(--ease);
}

.app-tile-detail-inner {
    overflow: hidden;
}

.app-tile.active .app-tile-detail {
    grid-template-rows: 1fr;
}

.app-tile.active .app-tile-detail-inner {
    padding: 4px 16px 18px;
}

/* Close icon — visible only on active tile */
.app-tile-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.25s ease;
}

.app-tile-close .icon {
    width: 14px;
    height: 14px;
}

.app-tile.active .app-tile-close {
    display: flex;
}

.app-tile-close:hover {
    color: var(--accent);
}

.app-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.app-stack {
    font-family: var(--font-accent);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.app-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-family: var(--font-accent);
    color: var(--text-muted);
    opacity: 0.7;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid var(--border-thin);
    border-radius: 3px;
    padding: 1px 6px;
    margin-top: 2px;
    align-self: flex-start;
}

.apps-fallback {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 3rem 0;
}

.app-link {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.25s ease;
}

.app-link:hover {
    opacity: 0.75;
}

/* Spotlight — active tile spans full width */
.app-tile.active {
    grid-column: 1 / -1;
}

/* Spotlight — collapsed tiles become compact pills */
.apps-grid.has-active .app-tile:not(.active) {
    border: none;
    background: transparent;
    box-shadow: none;
}

.apps-grid.has-active .app-tile:not(.active) .app-tile-header {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}

.apps-grid.has-active .app-tile:not(.active) .app-icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    margin-bottom: 0;
}

.apps-grid.has-active .app-tile:not(.active) .app-icon img {
    width: 20px;
    height: 20px;
}

.apps-grid.has-active .app-tile:not(.active) .app-tagline {
    display: none;
}

.apps-grid.has-active .app-tile:not(.active):hover {
    background: var(--bg-card-hover);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    font-family: var(--font-accent);
    transition: color var(--t) ease;
}


/* ========================================
   EDITORIAL — THEME OVERRIDES
   ======================================== */

/* Editorial: hero byline refinements */
.theme-editorial .hero-title {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 400;
}

.theme-editorial .hero-location {
    font-style: italic;
    font-size: 0.85rem;
}

.theme-editorial .hero-bio p {
    font-size: 0.88rem;
}

/* Editorial: CTAs */
.theme-editorial .cta-desc {
    font-style: italic;
}

.theme-editorial .cta-item .icon {
    color: var(--accent);
}

/* Editorial: page nav */
.theme-editorial .page-nav {
    font-style: italic;
}

/* Editorial: apps page */
.theme-editorial .app-desc {
    font-style: italic;
}

/* Editorial: footer */
.theme-editorial .site-footer {
    border-top: 1px solid var(--border-thin);
    padding-top: 24px;
    font-style: italic;
}


/* ========================================
   CARTOGRAPHY — THEME OVERRIDES
   ======================================== */

/* Cartography: hero refinements */
.theme-cartography .hero-image {
    box-shadow: 0 0 40px rgba(201, 169, 110, 0.12);
}

.theme-cartography .hero-title {
    font-family: var(--font-accent);
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 400;
}

.theme-cartography .hero-location {
    font-family: var(--font-accent);
    font-size: 0.70rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.theme-cartography .hero-bio p {
    font-size: 0.86rem;
    line-height: 1.75;
}

/* Cartography: CTAs */
.theme-cartography .cta-item strong {
    font-family: var(--font-accent);
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.theme-cartography .cta-item:hover {
    box-shadow: 0 4px 24px rgba(201, 169, 110, 0.08);
}

/* Cartography: apps page */
.theme-cartography .app-tile {
    border: 1px solid var(--border-thin);
    background: rgba(255, 255, 255, 0.02);
}

.theme-cartography .app-tile:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 24px rgba(201, 169, 110, 0.08);
}

.theme-cartography .apps-grid.has-active .app-tile:not(.active) {
    border: none;
    background: transparent;
}

.theme-cartography .app-name {
    font-family: var(--font-accent);
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Cartography: footer */
.theme-cartography .site-footer {
    border-top: 1px solid var(--border-thin);
    padding-top: 24px;
    font-family: var(--font-accent);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
}


/* ========================================
   ÉCHIQUIER — THEME OVERRIDES
   ======================================== */

/* Échiquier: hero refinements */
.theme-echiquier .hero-image {
    border-width: 3px;
}

.theme-echiquier .hero-name {
    text-transform: uppercase;
    line-height: 0.95;
}

.theme-echiquier .hero-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    font-weight: 400;
}

.theme-echiquier .hero-location {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-echiquier .hero-bio p {
    font-size: 0.86rem;
    line-height: 1.8;
}

/* Échiquier: CTAs */
.theme-echiquier .cta-item strong {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-echiquier .cta-item:hover {
    background: var(--accent);
}

.theme-echiquier .cta-item:hover strong,
.theme-echiquier .cta-item:hover .cta-desc {
    color: #111111;
}

.theme-echiquier .cta-item:hover .icon {
    color: #111111;
}

/* Échiquier: apps page */
.theme-echiquier .app-tile {
    border: 1.5px solid var(--border-thin);
}

.theme-echiquier .app-tile:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.theme-echiquier .app-tile:hover .app-name,
.theme-echiquier .app-tile:hover .app-tagline {
    color: #111111;
}

.theme-echiquier .app-tile.active:hover {
    background: var(--bg-card);
    border-color: var(--accent);
}

.theme-echiquier .app-tile.active:hover .app-name,
.theme-echiquier .app-tile.active:hover .app-tagline {
    color: var(--text-primary);
}

.theme-echiquier .apps-grid.has-active .app-tile:not(.active) {
    border: none;
    background: transparent;
}

.theme-echiquier .apps-grid.has-active .app-tile:not(.active):hover {
    background: var(--accent);
}

.theme-echiquier .apps-grid.has-active .app-tile:not(.active):hover .app-name {
    color: #111111;
}

.theme-echiquier .app-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 400;
}

.theme-echiquier .apps-title {
    text-transform: uppercase;
    line-height: 0.95;
}

/* Échiquier: footer */
.theme-echiquier .site-footer {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero { animation: fadeUp 0.6s ease-out both; }
.apps-grid { animation: fadeUp 0.6s ease-out 0.15s both; }

.theme-echiquier .hero { animation: slideIn 0.45s ease-out both; }
.theme-echiquier .apps-grid { animation: slideIn 0.45s ease-out 0.12s both; }


/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 600px) {
    .site-wrapper {
        padding: 30px 20px;
    }

    .site-header {
        margin-bottom: 36px;
    }

    .hero-name {
        font-size: calc(var(--name-size) * 0.82);
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-bio p {
        font-size: 0.85rem;
    }

    .theme-switcher {
        gap: 3px;
    }

    .theme-btn {
        width: 22px;
        height: 22px;
    }

    .theme-btn svg {
        width: 12px;
        height: 12px;
    }

    .apps-title {
        font-size: calc(var(--name-size) * 0.82);
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .toggle-label {
        font-size: 0.7rem;
    }

    .switch {
        width: 32px;
        height: 16px;
    }

    .slider::before {
        height: 12px;
        width: 12px;
    }

    input:checked + .slider::before {
        transform: translateX(16px);
    }

    .hero-name {
        font-size: calc(var(--name-size) * 0.7);
    }

    .hero-title {
        font-size: 1.15rem;
    }
}
