﻿:root {
    --fond-sombre: #22223B;
    --texte-sombre: #F2E9E4;
    --secondaire-sombre: #4A4E69;
    --accent-sombre: #9A8C98;
    --rose-sombre: #C9ADA7;

    --fond-clair: #F2E9E4;
    --texte-clair: #22223B;
    --secondaire-clair: #4A4E69;
    --accent-clair: #9A8C98;
    --beige-clair: #C9ADA7;

    --dark-bg: var(--fond-sombre);
    --dark-text: var(--texte-sombre);
    --dark-secondary: var(--secondaire-sombre);
    --dark-accent: var(--accent-sombre);
    --dark-soft: var(--rose-sombre);

    --light-bg: var(--fond-clair);
    --light-text: var(--texte-clair);
    --light-secondary: var(--secondaire-clair);
    --light-accent: var(--accent-clair);
    --light-soft: var(--beige-clair);

    --radius-lg: 22px;
    --radius-md: 14px;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    transition: background-color 0.25s ease, color 0.25s ease;
    position: relative;
    overflow-x: hidden;
}

body > :not(.background-media):not(.background-overlay):not(.about-modal):not(.project-modal) {
    position: relative;
    z-index: 1;
}

.background-media,
.background-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.background-media {
    z-index: 0;
    overflow: hidden;
}

.background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.04);
}

.background-overlay {
    z-index: 0;
}

body.home-index .background-media,
body.home-index .background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    height: clamp(680px, 92vh, 840px);
}

body.home-index .background-video {
    object-position: center 24%;
}

body.home-index .background-overlay::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -72px;
    height: clamp(170px, 24vh, 280px);
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.home-index.dark .background-overlay::after {
    background: linear-gradient(
        to bottom,
        rgba(34, 34, 59, 0) 0%,
        rgba(34, 34, 59, 0.46) 38%,
        rgba(34, 34, 59, 0.92) 70%,
        rgba(34, 34, 59, 0) 100%
    );
}

body.home-index.light .background-overlay::after {
    background: linear-gradient(
        to bottom,
        rgba(242, 233, 228, 0) 0%,
        rgba(242, 233, 228, 0.5) 38%,
        rgba(242, 233, 228, 0.94) 70%,
        rgba(242, 233, 228, 0) 100%
    );
}

body.dark {
    background:
        radial-gradient(circle at 10% 10%, rgba(201, 173, 167, 0.1), transparent 36%),
        radial-gradient(circle at 92% 12%, rgba(154, 140, 152, 0.12), transparent 34%),
        var(--dark-bg);
    color: var(--dark-text);
    --carousel-cover: url("img/img/carrousel.png");
}

body.light {
    background:
        radial-gradient(circle at 14% 12%, rgba(74, 78, 105, 0.14), transparent 38%),
        radial-gradient(circle at 88% 16%, rgba(154, 140, 152, 0.11), transparent 35%),
        linear-gradient(165deg, rgba(245, 238, 230, 0.78), rgba(230, 236, 243, 0.76));
    color: var(--light-text);
    --carousel-cover: url("img/img/carrousel.png");
}

body.home-index.dark {
    background:
        radial-gradient(circle at 10% 10%, rgba(201, 173, 167, 0.1), transparent 36%),
        radial-gradient(circle at 92% 12%, rgba(154, 140, 152, 0.12), transparent 34%),
        var(--dark-bg);
}

body.home-index.light {
    background:
        radial-gradient(circle at 14% 12%, rgba(74, 78, 105, 0.08), transparent 38%),
        radial-gradient(circle at 88% 16%, rgba(154, 140, 152, 0.08), transparent 35%),
        var(--light-bg);
}

body.dark .background-overlay {
    background: linear-gradient(160deg, rgba(7, 11, 22, 0.45), rgba(19, 16, 32, 0.55));
}

body.light .background-overlay {
    background: linear-gradient(160deg, rgba(247, 242, 236, 0.38), rgba(231, 237, 244, 0.45));
}

a {
    color: inherit;
}

img,
video,
svg {
    max-width: 100%;
    height: auto;
}

.hero {
    padding: 36px 0 28px;
    position: relative;
    z-index: 5;
}

.hero--small {
    padding-bottom: 12px;
}

.nav,
.hero-content {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
}

.home-hero {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    min-height: clamp(420px, 62vh, 700px);
    border-radius: 28px;
    border: 1px solid transparent;
    padding: clamp(24px, 4vw, 48px);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: clamp(24px, 4vw, 42px);
    align-items: center;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: -35% auto auto -15%;
    width: clamp(220px, 35vw, 520px);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    pointer-events: none;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -28% auto;
    width: clamp(220px, 32vw, 500px);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    pointer-events: none;
}

body.dark .home-hero {
    border-color: rgba(153, 210, 255, 0.2);
    background:
        linear-gradient(102deg, rgba(7, 30, 54, 0.94) 0%, rgba(3, 16, 38, 0.95) 58%, rgba(26, 23, 27, 0.92) 100%);
    box-shadow: 0 26px 60px rgba(6, 11, 24, 0.5);
}

body.dark .home-hero::before {
    background: radial-gradient(circle, rgba(68, 204, 255, 0.2), transparent 72%);
}

body.dark .home-hero::after {
    background: radial-gradient(circle, rgba(255, 189, 95, 0.18), transparent 74%);
}

body.light .home-hero {
    border-color: rgba(74, 78, 105, 0.18);
    background:
        linear-gradient(108deg, rgba(232, 241, 251, 0.95) 0%, rgba(216, 231, 246, 0.95) 60%, rgba(248, 236, 219, 0.93) 100%);
    box-shadow: 0 18px 44px rgba(34, 34, 59, 0.16);
}

body.light .home-hero::before {
    background: radial-gradient(circle, rgba(74, 78, 105, 0.14), transparent 72%);
}

body.light .home-hero::after {
    background: radial-gradient(circle, rgba(201, 173, 167, 0.24), transparent 74%);
}

.home-hero-text,
.home-hero-media {
    position: relative;
    z-index: 1;
}

.home-hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 0.84rem;
    margin-bottom: 14px;
}

body.dark .home-hero-eyebrow {
    color: #6bc9ff;
}

body.light .home-hero-eyebrow {
    color: #2f6088;
}

body.home-index.light .home-hero-eyebrow {
    color: var(--light-secondary);
}

.home-hero-text h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 6.6vw, 5.5rem);
    line-height: 1.06;
    margin-bottom: 18px;
}

.home-hero-description {
    max-width: 26ch;
    font-size: clamp(1.05rem, 1.4vw, 1.9rem);
}

body.dark .home-hero-description {
    color: rgba(232, 239, 250, 0.84);
}

body.light .home-hero-description {
    color: rgba(34, 34, 59, 0.86);
}

.home-hero-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.home-hero-btn {
    padding: 13px 28px;
    font-size: 1.02rem;
}

body.dark .home-hero-btn {
    border-color: rgba(159, 206, 255, 0.16);
    background-color: rgba(9, 28, 52, 0.65);
}

body.light .home-hero-btn {
    border-color: rgba(74, 78, 105, 0.16);
    background-color: rgba(242, 233, 228, 0.74);
}

.home-hero-media {
    justify-self: end;
    width: min(420px, 100%);
    aspect-ratio: 4 / 5;
    border-radius: 34px;
    border: 1px solid transparent;
    display: grid;
    place-items: center;
    overflow: hidden;
}

body.dark .home-hero-media {
    border-color: rgba(159, 206, 255, 0.2);
    background: linear-gradient(140deg, rgba(8, 34, 61, 0.8), rgba(13, 24, 44, 0.93));
    box-shadow: 0 18px 34px rgba(4, 10, 24, 0.45);
}

body.light .home-hero-media {
    border-color: rgba(74, 78, 105, 0.2);
    background: linear-gradient(140deg, rgba(215, 229, 241, 0.94), rgba(236, 221, 210, 0.92));
    box-shadow: 0 14px 28px rgba(34, 34, 59, 0.16);
}

.home-hero-image {
    width: 62%;
    max-width: 260px;
    height: auto;
    object-fit: contain;
}

body.home-index .home-hero {
    min-height: unset;
    border: 0;
    padding: 10px 0 12px;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
    gap: 18px;
    align-items: center;
    box-shadow: none;
    background: transparent;
}

body.home-index .home-hero::before,
body.home-index .home-hero::after,
body.home-index .home-hero-media {
    display: none;
}

body.home-index .home-hero-description {
    max-width: 62ch;
}

body.home-index .home-page {
    padding-top: 18px;
}

body.home-index .about-showcase-top {
    margin-top: 10px;
}

body.home-index .about-mini-grid {
    margin-top: 18px;
}

body.home-index .about-showcase-bottom {
    margin-top: 34px;
}

body.home-index .home-hero-photo-frame {
    width: min(220px, 100%);
    aspect-ratio: 4 / 5;
    border-radius: 16px;
    border: 1px dashed;
    display: grid;
    place-items: center;
    justify-self: end;
    padding: 10px;
    backdrop-filter: blur(2px);
}

body.home-index.dark .home-hero-photo-frame {
    border-color: rgba(153, 210, 255, 0.42);
    background-color: rgba(15, 23, 42, 0.42);
}

body.home-index.light .home-hero-photo-frame {
    border-color: rgba(74, 78, 105, 0.35);
    background-color: rgba(242, 233, 228, 0.56);
}

.home-hero-photo-hint {
    font-size: 0.84rem;
    text-align: center;
    letter-spacing: 0.2px;
    opacity: 0.86;
}

.home-hero-photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: none;
}

body.home-index.dark .home-hero-photo--dark {
    display: block;
}

body.home-index.light .home-hero-photo--light {
    display: block;
}

.nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
}

.nav-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: none;
    justify-content: center;
    justify-self: center;
}

.logo {
    justify-self: start;
}

.logo-img {
    width: auto;
    height: 58px;
    display: block;
}

.theme-toggle {
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
    padding: 8px 13px;
    cursor: pointer;
    background: transparent;
    color: inherit;
    font-size: 0.88rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nav-toggle {
    border: 1px solid transparent;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 12px;
    cursor: pointer;
    background: transparent;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nav-toggle-bar {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    display: block;
    background: currentColor;
}

body.dark .theme-toggle {
    border-color: rgba(153, 210, 255, 0.2);
    background-color: rgba(12, 25, 44, 0.62);
    box-shadow: 0 10px 24px rgba(10, 12, 24, 0.35);
}

body.dark .nav-toggle {
    border-color: rgba(153, 210, 255, 0.2);
    background-color: rgba(12, 25, 44, 0.62);
    box-shadow: 0 10px 24px rgba(10, 12, 24, 0.35);
}

body.light .theme-toggle {
    border-color: rgba(74, 78, 105, 0.22);
    background-color: rgba(248, 242, 236, 0.84);
    box-shadow: 0 10px 22px rgba(34, 34, 59, 0.12);
}

body.light .nav-toggle {
    border-color: rgba(74, 78, 105, 0.22);
    background-color: rgba(248, 242, 236, 0.84);
    box-shadow: 0 10px 22px rgba(34, 34, 59, 0.12);
}

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

.theme-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.nav-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.94rem;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.dark .nav-link {
    background-color: rgba(16, 31, 53, 0.48);
}

body.light .nav-link {
    background-color: rgba(242, 233, 228, 0.74);
}

body.dark .nav-link:hover,
body.dark .nav-link.active {
    background-color: rgba(32, 53, 83, 0.62);
    border-color: rgba(153, 210, 255, 0.2);
}

body.light .nav-link:hover,
body.light .nav-link.active {
    background-color: rgba(228, 216, 208, 0.82);
    border-color: rgba(74, 78, 105, 0.16);
}

.nav-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.container {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    padding-top: 24px;
    padding-bottom: 42px;
    flex: 1;
    display: grid;
    gap: 28px;
}

.home-page > section {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.card {
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    padding: 26px;
}

body.dark .card {
    border-color: rgba(153, 210, 255, 0.16);
    background-color: rgba(21, 26, 46, 0.76);
    box-shadow: 0 16px 36px rgba(10, 12, 24, 0.35);
}

body.light .card {
    border-color: rgba(74, 78, 105, 0.2);
    background-color: rgba(247, 239, 232, 0.84);
    box-shadow: 0 14px 30px rgba(34, 34, 59, 0.12);
}

.eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.72;
    margin-bottom: 6px;
}

h1,
h2,
h3 {
    line-height: 1.2;
    letter-spacing: 0.2px;
}

body.dark h1,
body.dark h2,
body.dark h3 {
    color: var(--rose-sombre);
}

body.light h1,
body.light h2,
body.light h3 {
    color: var(--secondaire-clair);
}

h1 {
    font-size: clamp(2.15rem, 4.4vw, 3.4rem);
    margin-bottom: 12px;
}

h2 {
    font-size: clamp(1.55rem, 2.5vw, 2.35rem);
    margin-bottom: 10px;
}

h3 {
    font-size: clamp(1.1rem, 1.75vw, 1.45rem);
    margin-bottom: 8px;
}

main p,
main li {
    font-size: 1rem;
    line-height: 1.68;
}

.section-title {
    margin-bottom: 14px;
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 24px;
    align-items: center;
    margin-bottom: 28px;
}

.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.hero-subtitle {
    font-size: 1.08rem;
    margin-bottom: 10px;
}

.hero-actions {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-facts {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.cta-buttons {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 10px 18px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    color: inherit;
}

body.dark .btn {
    border-color: transparent;
    background-color: rgba(201, 173, 167, 0.16);
    box-shadow: 0 8px 18px rgba(10, 12, 24, 0.22);
}

body.light .btn {
    border-color: transparent;
    background-color: rgba(74, 78, 105, 0.08);
    box-shadow: 0 8px 18px rgba(34, 34, 59, 0.12);
}

.btn-ghost {
    background: transparent;
}

.cards-grid {
    display: grid;
    gap: 22px;
}

.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card h3,
.project-card h2,
.skill-card h2 {
    margin-bottom: 8px;
}

.page-intro p {
    max-width: 780px;
}

.page-intro h1 {
    font-size: clamp(2.35rem, 5vw, 4rem);
}

.page-intro--plain {
    padding: 6px 0 2px;
}

.parcours-timeline {
    width: min(980px, 100%);
    margin: 0 auto;
}

.timeline-step {
    border-top: 2px dashed;
    margin: 0;
    padding: 20px 22px;
}

body.dark .timeline-step {
    border-color: #5bbcff;
    color: rgba(242, 233, 228, 0.92);
}

body.light .timeline-step {
    border-color: #2f6088;
    color: rgba(34, 34, 59, 0.9);
}

.timeline-step:nth-child(even) {
    border-left: 2px dashed;
    border-top-left-radius: 30px;
    border-bottom-left-radius: 30px;
    margin-right: 30px;
    padding-left: 16px;
}

.timeline-step:nth-child(odd) {
    border-right: 2px dashed;
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
    margin-left: 30px;
    padding-right: 16px;
}

.timeline-step:first-child {
    border-top: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.timeline-step:last-child {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.timeline-date {
    display: block;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
}

body.dark .timeline-date {
    color: #8fd8ff;
}

body.light .timeline-date {
    color: #224d73;
}

.timeline-period {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

body.dark .timeline-period {
    color: rgba(203, 226, 247, 0.84);
}

body.light .timeline-period {
    color: rgba(34, 34, 59, 0.78);
}

.timeline-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 7px;
    line-height: 1.65;
}

.about-showcase {
    width: min(1120px, 100%);
    margin: 8px auto 0;
    display: grid;
    gap: 28px;
}

.about-mini-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.about-mini-card,
.about-large-card,
.about-summary-card {
    border-radius: 18px;
}

.about-mini-card {
    padding: 14px 16px;
}

.about-tag {
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 0.73rem;
    font-weight: 700;
    margin-bottom: 6px;
}

body.dark .about-tag {
    color: #f1b24c;
}

body.light .about-tag {
    color: #8b5a10;
}

.about-mini-text {
    font-size: 1.02rem;
    line-height: 1.58;
}

.about-block {
    display: grid;
    gap: 14px;
}

.about-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.2vw, 3.4rem);
    line-height: 1.1;
}

.about-intro {
    font-size: 1.05rem;
    max-width: 720px;
    line-height: 1.6;
}

body.dark .about-intro {
    color: rgba(232, 239, 250, 0.82);
}

body.light .about-intro {
    color: rgba(34, 34, 59, 0.82);
}

.about-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.about-large-card h3,
.about-summary-card h3 {
    margin-bottom: 10px;
    font-size: 1.45rem;
    line-height: 1.2;
}

.about-large-card > p,
.about-summary-card > p:not(.about-tag) {
    font-size: 1.02rem;
    line-height: 1.65;
}

.about-large-card > p + p,
.about-summary-card > p + p {
    margin-top: 10px;
}

.about-expandable {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-preview {
    position: relative;
    max-height: 190px;
    overflow: hidden;
}

.about-summary-card .about-preview {
    max-height: 140px;
}

.about-preview::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    pointer-events: none;
}

body.dark .about-preview::after {
    background: linear-gradient(180deg, rgba(21, 26, 46, 0) 0%, rgba(21, 26, 46, 0.98) 78%);
}

body.light .about-preview::after {
    background: linear-gradient(180deg, rgba(247, 239, 232, 0) 0%, rgba(247, 239, 232, 0.98) 78%);
}
.about-expandable:hover {
    transform: translateY(-2px);
}

.about-expandable:focus-visible {
    outline: 2px solid rgba(241, 178, 76, 0.9);
    outline-offset: 4px;
}

body.light .about-expandable:focus-visible {
    outline-color: rgba(139, 90, 16, 0.9);
}

.about-more {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.dark .about-more {
    color: rgba(241, 178, 76, 0.95);
}

body.light .about-more {
    color: rgba(139, 90, 16, 0.95);
}

.about-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 80;
}

.about-modal.is-open {
    display: flex;
}

.about-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 20, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.about-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, 94vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(8, 10, 20, 0.45);
}

.about-modal__content > .card {
    width: 100%;
    margin: 0;
    padding-top: 64px;
}

.about-modal__content .about-preview {
    max-height: none;
    overflow: visible;
}

.about-modal__content .about-preview::after {
    display: none;
}

.about-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(10, 12, 24, 0.6);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

body.light .about-modal__close {
    background: rgba(247, 239, 232, 0.9);
    color: #2b2b3a;
    border-color: rgba(74, 78, 105, 0.2);
}

body.modal-open {
    overflow: hidden;
}

.project-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 90;
}

.project-modal.is-open {
    display: flex;
}

.project-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 20, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.project-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, 94vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 24px;
    box-shadow: 0 28px 60px rgba(8, 10, 20, 0.45);
}

.project-modal__content > .project-modal__card {
    width: 100%;
    margin: 0;
    padding-top: 64px;
}

.project-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(10, 12, 24, 0.6);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.project-modal__nav {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: rgba(10, 12, 24, 0.7);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 2;
}

.project-modal__nav--prev { left: 16px; }
.project-modal__nav--next { right: 16px; }

body.light .project-modal__nav {
    background: rgba(247, 239, 232, 0.9);
    color: #2b2b3a;
    border-color: rgba(74, 78, 105, 0.2);
}

.project-modal__nav:focus-visible {
    outline: 2px solid rgba(201, 173, 167, 0.8);
    outline-offset: 3px;
}

body.light .project-modal__close {
    background: rgba(247, 239, 232, 0.9);
    color: #2b2b3a;
    border-color: rgba(74, 78, 105, 0.2);
}

.project-modal__card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 26px;
    align-items: center;
}

.project-modal__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    background-image: var(--project-image);
    background-position: var(--project-position, center);
    background-size: cover;
    background-repeat: no-repeat;
    border: 1px solid transparent;
}

body.dark .project-modal__media {
    border-color: rgba(153, 210, 255, 0.2);
    box-shadow: 0 16px 30px rgba(8, 12, 22, 0.35);
}

body.light .project-modal__media {
    border-color: rgba(74, 78, 105, 0.2);
    box-shadow: 0 14px 26px rgba(34, 34, 59, 0.12);
}

.project-modal__text {
    display: grid;
    gap: 12px;
}

.project-modal__chips {
    margin-top: 6px;
}

.projects-swipe-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 95;
}

.projects-swipe-modal.is-open {
    display: flex;
}

.projects-swipe-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 20, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.projects-swipe-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1000px, 94vw);
    max-height: 90vh;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.projects-swipe-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 0;
}

.projects-swipe-modal__header h2 {
    margin-bottom: 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.projects-swipe-modal__close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(10, 12, 24, 0.6);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.projects-swipe-modal__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 0 22px 22px;
    scroll-snap-type: x mandatory;
    align-items: stretch;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 173, 167, 0.5) transparent;
}

.projects-swipe-card {
    flex: 0 0 min(80vw, 320px);
    scroll-snap-align: center;
    border-radius: 18px;
    border: 1px solid transparent;
    padding: 16px;
    display: grid;
    gap: 10px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.projects-swipe-card__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    background-image: var(--card-image);
    background-size: cover;
    background-position: var(--card-position, center);
    background-repeat: no-repeat;
    border: 1px solid transparent;
}

.projects-swipe-card__title {
    margin: 0;
    font-size: 1.1rem;
}

.projects-swipe-card__desc {
    font-size: 0.95rem;
}

body.dark .projects-swipe-modal__dialog {
    background: rgba(21, 26, 46, 0.9);
    border-color: rgba(153, 210, 255, 0.18);
    box-shadow: 0 28px 60px rgba(8, 12, 22, 0.45);
}

body.light .projects-swipe-modal__dialog {
    background: rgba(247, 239, 232, 0.95);
    border-color: rgba(74, 78, 105, 0.2);
    box-shadow: 0 20px 44px rgba(34, 34, 59, 0.18);
}

body.dark .projects-swipe-card {
    border-color: rgba(153, 210, 255, 0.16);
    background-color: rgba(17, 24, 40, 0.72);
    box-shadow: 0 14px 28px rgba(8, 12, 22, 0.35);
}

body.light .projects-swipe-card {
    border-color: rgba(74, 78, 105, 0.16);
    background-color: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 26px rgba(34, 34, 59, 0.12);
}

body.dark .projects-swipe-card__media {
    border-color: rgba(153, 210, 255, 0.18);
}

body.light .projects-swipe-card__media {
    border-color: rgba(74, 78, 105, 0.16);
}

body.light .projects-swipe-modal__close {
    background: rgba(247, 239, 232, 0.9);
    color: #2b2b3a;
    border-color: rgba(74, 78, 105, 0.2);
}

.about-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    line-height: 1.6;
}

.project-meta {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.projects-flow {
    width: min(980px, 100%);
    margin: 0 auto;
}

.project-line {
    padding: 24px 0 26px;
    border-top: 1px solid transparent;
}

.project-line:first-child {
    padding-top: 6px;
    border-top: 0;
}

.project-line h2 {
    margin-bottom: 6px;
}

.project-line p {
    max-width: 68ch;
}

body.dark .project-line {
    border-top-color: rgba(153, 210, 255, 0.18);
}

body.light .project-line {
    border-top-color: rgba(74, 78, 105, 0.2);
}

.projects-section-intro {
    width: min(980px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 6px;
}

.projects-cover,
.skills-cover {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: clamp(10px, 2.2vw, 22px) 0 clamp(32px, 5vw, 64px);
    display: grid;
    align-items: center;
    overflow: visible;
    z-index: 1;
}

.projects-cover::after,
.skills-cover::after {
    content: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -72px;
    height: clamp(170px, 24vh, 280px);
    pointer-events: none;
    z-index: 1;
}

body.dark .projects-cover::after {
    background: linear-gradient(
        to bottom,
        rgba(34, 34, 59, 0) 0%,
        rgba(34, 34, 59, 0.46) 38%,
        rgba(34, 34, 59, 0.92) 70%,
        rgba(34, 34, 59, 0) 100%
    );
}

body.light .projects-cover::after {
    background: linear-gradient(
        to bottom,
        rgba(242, 233, 228, 0) 0%,
        rgba(242, 233, 228, 0.5) 38%,
        rgba(242, 233, 228, 0.94) 70%,
        rgba(242, 233, 228, 0) 100%
    );
}

.projects-cover-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: visible;
    display: grid;
    place-items: center;
}

.projects-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.projects-cover-bg::after,
.projects-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body.dark .projects-cover-bg::after,
body.dark .projects-hero-bg::after {
    background: linear-gradient(120deg, rgba(12, 16, 28, 0.92), rgba(12, 16, 28, 0.12), rgba(12, 16, 28, 0.92));
}

body.light .projects-cover-bg::after,
body.light .projects-hero-bg::after {
    background: linear-gradient(120deg, rgba(247, 239, 232, 0.9), rgba(247, 239, 232, 0.2), rgba(247, 239, 232, 0.9));
}

.projects-cover-inner,
.skills-cover-inner {
    position: relative;
    z-index: 2;
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 28px;
    align-content: center;
}

.projects-hero-content,
.skills-hero-content {
    width: min(520px, 92vw);
    margin-left: 0;
}

.projects-gallery {
    --index: calc(1vw + 1vh);
    --transition: cubic-bezier(.1,.7,0,1);
    --gap-base: 0.2rem;
    --shift: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.projects-gallery-section {
    width: 100%;
    margin: 8px auto 36px;
    display: grid;
    place-items: center;
}

.projects-gallery-section .projects-gallery {
    width: min(1120px, 100%);
    min-height: clamp(320px, 40vh, 520px);
}

.projects-gallery-mobile {
    width: min(1120px, 100%);
    margin: 6px auto 32px;
    display: none;
    place-items: center;
}

.projects-gallery-trigger {
    width: min(520px, 100%);
    min-height: 150px;
    border-radius: 24px;
    border: 1px solid transparent;
    background-image: var(--carousel-cover);
    background-size: cover;
    background-position: center;
    position: relative;
    display: grid;
    place-items: center;
    padding: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: inherit;
    cursor: pointer;
    overflow: hidden;
}

.projects-gallery-trigger::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(10, 14, 28, 0.6), rgba(10, 14, 28, 0.25));
    pointer-events: none;
}

body.light .projects-gallery-trigger::after {
    background: linear-gradient(140deg, rgba(247, 239, 232, 0.75), rgba(247, 239, 232, 0.35));
}

.projects-gallery-trigger__text {
    position: relative;
    z-index: 1;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
}

body.dark .projects-gallery-trigger {
    border-color: rgba(153, 210, 255, 0.2);
    box-shadow: 0 16px 30px rgba(8, 12, 22, 0.35);
}

body.dark .projects-gallery-trigger__text {
    border-color: rgba(153, 210, 255, 0.28);
    background-color: rgba(8, 18, 36, 0.7);
}

body.light .projects-gallery-trigger {
    border-color: rgba(74, 78, 105, 0.2);
    box-shadow: 0 14px 28px rgba(34, 34, 59, 0.14);
}

body.light .projects-gallery-trigger__text {
    border-color: rgba(74, 78, 105, 0.24);
    background-color: rgba(248, 242, 236, 0.8);
}

.projects-scene {
    width: min(1120px, 100%);
    margin: 10px auto 40px;
    display: grid;
    place-items: center;
}


.scene {
    --menu-width: 320px;
    --scene-width: min(1000px, 100%);
    --scene-height: clamp(600px, 78vh, 780px);
    position: relative;
    width: var(--scene-width);
    height: var(--scene-height);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid transparent;
}

body.dark .scene {
    background: rgba(21, 26, 46, 0.85);
    border-color: rgba(74, 78, 105, 0.55);
    box-shadow: 0 18px 42px rgba(10, 12, 24, 0.35);
}

body.light .scene {
    background: rgba(247, 239, 232, 0.9);
    border-color: rgba(201, 173, 167, 0.75);
    box-shadow: 0 16px 34px rgba(34, 34, 59, 0.12);
}

.scene-left {
    width: var(--menu-width);
    height: 100%;
    display: flex;
    align-items: flex-start;
    padding: 20px 10px 20px 12px;
    flex: 0 0 auto;
    overflow-y: auto;
}

.scene-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    width: 100%;
    height: 100%;
    align-content: center;
}

.scene-item {
    position: static;
}

.scene-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.scene-label {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 14px 0 56px;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
    position: relative;
    cursor: pointer;
}

.scene-label::before {
    content: "";
    position: absolute;
    left: 12px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--scene-picto, var(--accent-sombre));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.scene-label-network { --scene-picto: #9a8c98; }
.scene-label-security { --scene-picto: #c9ada7; }
.scene-label-web { --scene-picto: #4a4e69; }
.scene-label-visual { --scene-picto: #9a8c98; }

.scene-content {
    position: absolute;
    left: var(--menu-width);
    top: 20px;
    width: calc(100% - var(--menu-width));
    height: calc(100% - 40px);
    padding: 56px 36px 48px;
    display: grid;
    align-content: start;
    gap: 14px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 173, 167, 0.5) transparent;
}

.scene-content::-webkit-scrollbar {
    width: 8px;
}

.scene-content::-webkit-scrollbar-track {
    background: transparent;
}

.scene-content::-webkit-scrollbar-thumb {
    background: rgba(201, 173, 167, 0.45);
    border-radius: 999px;
}

.scene-content::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 173, 167, 0.7);
}

body.dark .scene-content {
    scrollbar-color: rgba(74, 78, 105, 0.55) transparent;
}

body.dark .scene-content::-webkit-scrollbar-thumb {
    background: rgba(74, 78, 105, 0.5);
}

body.dark .scene-content::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 78, 105, 0.75);
}

.scene-content h3 {
    margin: 0;
}

.scene-content p {
    max-width: 100%;
}

.scene-media {
    --scene-fade: rgba(21, 26, 46, 0.95);
    position: relative;
    width: min(360px, 100%);
    height: 140px;
    border-radius: 18px;
    justify-self: center;
    margin-bottom: 8px;
    background-image: var(--scene-image, none);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(8, 10, 20, 0.35);
}

.scene-media::after {
    content: "";
    position: absolute;
    display: none;
}

.scene-media::before {
    content: "";
    position: absolute;
    display: none;
}

body.light .scene-media {
    --scene-fade: rgba(247, 239, 232, 0.95);
    box-shadow: 0 12px 24px rgba(34, 34, 59, 0.2);
}

.scene-content-network { --scene-accent: #9a8c98; }
.scene-content-security { --scene-accent: #c9ada7; }
.scene-content-web { --scene-accent: #4a4e69; }
.scene-content-visual { --scene-accent: #9a8c98; }

.scene-border {
    width: 2px;
    height: 75%;
    background: rgba(201, 173, 167, 0.4);
    flex: 0 0 auto;
}

body.dark .scene-border {
    background: rgba(74, 78, 105, 0.6);
}

body.light .scene-border {
    background: rgba(201, 173, 167, 0.7);
}

.scene-right {
    flex: 1 1 auto;
    height: 100%;
}

.scene-status-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--scene-status, #8a8a98);
    color: #0b0f1a;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04), 0 8px 16px rgba(8, 12, 22, 0.18);
}

body.dark .scene-status-badge {
    box-shadow: 0 0 0 3px rgba(10, 12, 24, 0.35), 0 8px 16px rgba(8, 12, 22, 0.28);
}

.scene-item[data-status="pas-commence"] { --scene-status: #8a8a98; }
.scene-item[data-status="commence"] { --scene-status: #6bc9ff; }
.scene-item[data-status="en-cours"] { --scene-status: #f1b24c; }
.scene-item[data-status="prochainement"] { --scene-status: #9aa9ff; }
.scene-item[data-status="attente-materiel"] { --scene-status: #cba8ff; }
.scene-item[data-status="non-commence"] { --scene-status: #6f6f7a; }
.scene-item[data-status="presque-fini"] { --scene-status: #7be3a8; }

.scene-item input:checked ~ .scene-label {
    opacity: 1;
    transform: translateX(4px);
}

body.dark .scene-item input:checked ~ .scene-label {
    color: var(--rose-sombre);
    border-color: rgba(201, 173, 167, 0.5);
}

body.light .scene-item input:checked ~ .scene-label {
    color: var(--secondaire-clair);
    border-color: rgba(74, 78, 105, 0.35);
}

.scene-item input:checked ~ .scene-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 980px) {
    .scene {
        --menu-width: 280px;
        --scene-height: clamp(600px, 78vh, 780px);
    }

    .scene-content {
        padding: 28px;
    }
}

@media (max-width: 760px) {
    .scene {
        height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        gap: 16px;
    }

    .scene-left {
        width: 100%;
        height: auto;
        padding: 0;
    }

    .scene-border,
    .scene-right {
        display: none;
    }

    .scene-content {
        position: relative;
        width: 100%;
        height: auto;
        padding: 42px 6px 6px;
        opacity: 0;
        transform: none;
    }

    .scene-item input:checked ~ .scene-content {
        opacity: 1;
    }

    .scene-label {
        padding-left: 52px;
    }
}

.projects-gallery .items,
#futureGallery,
#gallery {
    display: flex;
    gap: var(--gap, var(--gap-base));
    perspective: calc(var(--index) * 35);
    perspective-origin: 50% 50%;
    transform: translateX(var(--shift));
    transform-style: preserve-3d;
    will-change: transform;
    overflow: visible;
    transition: transform 0.6s var(--transition);
    padding-inline: clamp(12px, 4vw, 56px);
    margin-inline: 0;
}

.projects-gallery .items.is-resetting,
#futureGallery.is-resetting,
#gallery.is-resetting {
    transition: none;
}

.projects-gallery .items.is-resetting .item,
#futureGallery.is-resetting .item,
#gallery.is-resetting .item {
    transition: none;
}

.projects-gallery .items.hovering,
#futureGallery.hovering,
#gallery.hovering {
    --gap: calc(var(--gap-base) / 2);
}

.projects-gallery .item,
#futureGallery .item,
#gallery .item {
    position: relative;
    width: clamp(84px, calc(var(--index) * 4.2), 180px);
    height: calc(var(--index) * 18);
    background-color: #222;
    background-image: var(--carousel-cover);
    background-position: var(--carousel-cover-pos, center);
    background-size: var(--carousel-cover-size, cover);
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 1.25s var(--transition), width 0.5s var(--transition);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform, width;
    outline: none;
    border-radius: 100px;
    flex: 0 0 auto;
    user-select: none;
}

.projects-gallery .item.is-hover-main,
#futureGallery .item.is-hover-main,
#gallery .item.is-hover-main {
    transform: translateZ(calc(var(--index) * 10));
    z-index: 10;
}

.projects-gallery .item.is-right-1,
#futureGallery .item.is-right-1,
#gallery .item.is-right-1 {
    transform: translateZ(calc(var(--index) * 8.5)) rotateY(35deg);
    z-index: 9;
}

.projects-gallery .item.is-right-2,
#futureGallery .item.is-right-2,
#gallery .item.is-right-2 {
    transform: translateZ(calc(var(--index) * 5.6)) rotateY(40deg);
    z-index: 8;
}

.projects-gallery .item.is-right-3,
#futureGallery .item.is-right-3,
#gallery .item.is-right-3 {
    transform: translateZ(calc(var(--index) * 2.5)) rotateY(30deg);
    z-index: 7;
}

.projects-gallery .item.is-right-4,
#futureGallery .item.is-right-4,
#gallery .item.is-right-4 {
    transform: translateZ(calc(var(--index) * 0.6)) rotateY(15deg);
    z-index: 6;
}

.projects-gallery .item.is-left-1,
#futureGallery .item.is-left-1,
#gallery .item.is-left-1 {
    transform: translateZ(calc(var(--index) * 8.5)) rotateY(-35deg);
    z-index: 9;
}

.projects-gallery .item.is-left-2,
#futureGallery .item.is-left-2,
#gallery .item.is-left-2 {
    transform: translateZ(calc(var(--index) * 5.6)) rotateY(-40deg);
    z-index: 8;
}

.projects-gallery .item.is-left-3,
#futureGallery .item.is-left-3,
#gallery .item.is-left-3 {
    transform: translateZ(calc(var(--index) * 2.5)) rotateY(-30deg);
    z-index: 7;
}

.projects-gallery .item.is-left-4,
#futureGallery .item.is-left-4,
#gallery .item.is-left-4 {
    transform: translateZ(calc(var(--index) * 0.6)) rotateY(-15deg);
    z-index: 6;
}

.projects-gallery .items.is-open .item,
#futureGallery.is-open .item,
#gallery.is-open .item {
    transition: transform 0.8s var(--transition), width 0.6s var(--transition);
}

.projects-gallery .item.is-open,
#futureGallery .item.is-open,
#gallery .item.is-open {
    width: 20vw;
    z-index: 100;
    transform: translateZ(calc(var(--index) * 10));
}

.focus-showcase {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.focus-showcase-heading p {
    max-width: 720px;
}

.focus-scene {
    border: 1px solid transparent;
    border-radius: 28px;
    overflow: hidden;
}

body.dark .focus-scene {
    border-color: rgba(153, 210, 255, 0.18);
    background: linear-gradient(125deg, rgba(8, 27, 48, 0.96), rgba(15, 21, 39, 0.94));
    box-shadow: 0 22px 48px rgba(6, 11, 24, 0.38);
}

body.light .focus-scene {
    border-color: rgba(74, 78, 105, 0.18);
    background: linear-gradient(125deg, rgba(231, 239, 248, 0.96), rgba(244, 234, 224, 0.95));
    box-shadow: 0 18px 38px rgba(34, 34, 59, 0.14);
}

.focus-list {
    list-style: none;
    margin: 0;
    padding: 28px;
    min-height: 430px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.focus-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.focus-label {
    width: min(320px, calc(100% - 32px));
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}

body.dark .focus-label {
    background-color: rgba(17, 33, 54, 0.64);
    opacity: 0.72;
}

body.light .focus-label {
    background-color: rgba(255, 255, 255, 0.56);
    opacity: 0.78;
}

.focus-label:hover {
    opacity: 0.94;
}

.focus-label-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    flex: none;
    font-weight: 800;
    font-size: 0.98rem;
}

.focus-label-text {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.focus-panel {
    position: absolute;
    top: 28px;
    right: 28px;
    bottom: 28px;
    left: 382px;
    border-radius: 24px;
    padding: 30px 32px;
    border: 1px solid transparent;
    display: grid;
    align-content: center;
    gap: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(22px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    overflow: hidden;
}

.focus-panel::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    opacity: 0.22;
}

body.dark .focus-panel {
    background: linear-gradient(145deg, rgba(9, 23, 42, 0.92), rgba(19, 27, 46, 0.9));
    border-color: rgba(153, 210, 255, 0.14);
}

body.light .focus-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(239, 228, 218, 0.72));
    border-color: rgba(74, 78, 105, 0.14);
}

.focus-kicker {
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-size: 0.78rem;
    font-weight: 700;
}

.focus-panel h3 {
    margin-bottom: 0;
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.focus-panel p {
    max-width: 58ch;
}

.focus-points {
    margin: 2px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 7px;
}

.focus-label-network .focus-label-icon,
.focus-panel-network::after {
    background: linear-gradient(135deg, rgba(91, 188, 255, 0.92), rgba(43, 101, 255, 0.88));
}

.focus-label-web .focus-label-icon,
.focus-panel-web::after {
    background: linear-gradient(135deg, rgba(245, 178, 76, 0.95), rgba(214, 69, 65, 0.88));
}

.focus-label-media .focus-label-icon,
.focus-panel-media::after {
    background: linear-gradient(135deg, rgba(88, 214, 141, 0.95), rgba(0, 177, 106, 0.88));
}

.focus-label-security .focus-label-icon,
.focus-panel-security::after {
    background: linear-gradient(135deg, rgba(196, 147, 255, 0.94), rgba(106, 76, 255, 0.88));
}

body.dark .focus-label-network .focus-label-icon,
body.dark .focus-label-web .focus-label-icon,
body.dark .focus-label-media .focus-label-icon,
body.dark .focus-label-security .focus-label-icon {
    color: #07121f;
}

body.light .focus-label-network .focus-label-icon,
body.light .focus-label-web .focus-label-icon,
body.light .focus-label-media .focus-label-icon,
body.light .focus-label-security .focus-label-icon {
    color: #ffffff;
}

.focus-item input:checked ~ .focus-label {
    opacity: 1;
    transform: translateX(6px);
}

.focus-item input:checked ~ .focus-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

body.dark .focus-item input:checked ~ .focus-label-network,
body.dark .focus-panel-network .focus-kicker,
body.dark .focus-panel-network h3 {
    color: #86d7ff;
}

body.dark .focus-item input:checked ~ .focus-label-web,
body.dark .focus-panel-web .focus-kicker,
body.dark .focus-panel-web h3 {
    color: #ffc56b;
}

body.dark .focus-item input:checked ~ .focus-label-media,
body.dark .focus-panel-media .focus-kicker,
body.dark .focus-panel-media h3 {
    color: #7be3a8;
}

body.dark .focus-item input:checked ~ .focus-label-security,
body.dark .focus-panel-security .focus-kicker,
body.dark .focus-panel-security h3 {
    color: #cba8ff;
}

body.light .focus-item input:checked ~ .focus-label-network,
body.light .focus-panel-network .focus-kicker,
body.light .focus-panel-network h3 {
    color: #1f5d96;
}

body.light .focus-item input:checked ~ .focus-label-web,
body.light .focus-panel-web .focus-kicker,
body.light .focus-panel-web h3 {
    color: #9a4f10;
}

body.light .focus-item input:checked ~ .focus-label-media,
body.light .focus-panel-media .focus-kicker,
body.light .focus-panel-media h3 {
    color: #0f6b4c;
}

body.light .focus-item input:checked ~ .focus-label-security,
body.light .focus-panel-security .focus-kicker,
body.light .focus-panel-security h3 {
    color: #5b3ea5;
}

body.dark .focus-item input:checked ~ .focus-label {
    border-color: rgba(153, 210, 255, 0.22);
    background-color: rgba(24, 44, 72, 0.82);
}

body.light .focus-item input:checked ~ .focus-label {
    border-color: rgba(74, 78, 105, 0.18);
    background-color: rgba(255, 255, 255, 0.84);
}

.project-link {
    margin-top: 10px;
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
}

.skill-item {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.skill-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.progress-track {
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
}

body.dark .progress-track {
    background-color: rgba(201, 173, 167, 0.2);
}

body.light .progress-track {
    background-color: rgba(74, 78, 105, 0.15);
}

.progress-fill {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    transition: width 0.7s ease;
}

body.dark .progress-fill {
    background-color: var(--dark-soft);
}

body.light .progress-fill {
    background-color: var(--light-secondary);
}

.chips {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    border-radius: 999px;
    padding: 8px 14px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    text-decoration: none;
}

body.dark .chip {
    border-color: transparent;
    background-color: rgba(201, 173, 167, 0.12);
}

body.light .chip {
    border-color: transparent;
    background-color: rgba(74, 78, 105, 0.08);
}

.logo-banner {
    display: grid;
    justify-items: center;
}

.slider {
    --slide-width: 250px;
    --slide-height: 100px;
    --logo-speed: 40s;
    --slide-count: 16;
    --loop-count: 8;
    position: relative;
    width: min(960px, 100%);
    height: var(--slide-height);
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid transparent;
}

body.dark .slider {
    background-color: rgba(21, 26, 46, 0.78);
    border-color: rgba(153, 210, 255, 0.18);
    box-shadow: 0 16px 32px rgba(10, 12, 24, 0.35);
}

body.light .slider {
    background-color: rgba(255, 255, 255, 0.82);
    border-color: rgba(74, 78, 105, 0.2);
    box-shadow: 0 14px 28px rgba(34, 34, 59, 0.12);
}

.slider::before,
.slider::after {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    width: clamp(60px, 12vw, 180px);
    z-index: 2;
    pointer-events: none;
}

body.dark .slider::before,
body.dark .slider::after {
    background: linear-gradient(to right, rgba(21, 26, 46, 0.95) 0%, rgba(21, 26, 46, 0) 100%);
}

body.light .slider::before,
body.light .slider::after {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0) 100%);
}

.slider::after {
    right: 0;
    transform: rotateZ(180deg);
}

.slider::before {
    left: 0;
}

.slide-track {
    animation: logo-scroll var(--logo-speed) linear infinite;
    display: flex;
    width: calc(var(--slide-width) * var(--slide-count));
}

.slide {
    height: var(--slide-height);
    width: var(--slide-width);
    display: grid;
    place-items: center;
}

.slide img {
    max-height: calc(var(--slide-height) - 26px);
    width: auto;
    height: auto;
    opacity: 0.88;
    filter: saturate(1.05);
}

body.dark .slide img {
    filter: saturate(1.1) brightness(0.95);
    opacity: 0.9;
}

body.light .slide img {
    filter: saturate(1.05) brightness(0.98);
}

.banner-icon--light {
    display: none;
}

body.light .banner-icon--light {
    display: block;
}

body.light .banner-icon--dark {
    display: none;
}

@keyframes logo-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(var(--slide-width) * -1 * var(--loop-count)));
    }
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-list {
    list-style: none;
    display: grid;
    gap: 8px;
    margin: 10px 0 18px;
}

.contact-form {
    display: grid;
    gap: 10px;
}

.contact-form label {
    font-size: 0.94rem;
}

.contact-form input,
.contact-form textarea {
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    padding: 10px 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    resize: vertical;
}

body.dark .contact-form input,
body.dark .contact-form textarea {
    border-color: rgba(201, 173, 167, 0.12);
    background-color: rgba(34, 34, 59, 0.35);
}

body.light .contact-form input,
body.light .contact-form textarea {
    border-color: rgba(74, 78, 105, 0.1);
    background-color: rgba(242, 233, 228, 0.7);
}

.contact-page--single {
    place-items: center;
    padding-top: 48px;
    padding-bottom: 64px;
}

.contact-card {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 36px;
    align-items: center;
    padding: clamp(28px, 4vw, 40px);
    margin: 0 auto;
}

.contact-card-text h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 12px;
}

.contact-photo-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    border: 1px dashed;
    display: grid;
    place-items: center;
    padding: 12px;
    text-align: center;
}

body.dark .contact-photo-frame {
    border-color: rgba(153, 210, 255, 0.42);
    background-color: rgba(15, 23, 42, 0.35);
}

body.light .contact-photo-frame {
    border-color: rgba(74, 78, 105, 0.35);
    background-color: rgba(242, 233, 228, 0.5);
}

.contact-photo-hint {
    font-size: 0.9rem;
    opacity: 0.85;
}

.contact-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: none;
}

body.dark .contact-photo--dark {
    display: block;
}

body.light .contact-photo--light {
    display: block;
}

footer {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto 18px;
    padding-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    border-top: 1px solid transparent;
}

body.dark footer {
    border-top-color: rgba(201, 173, 167, 0.25);
}

body.light footer {
    border-top-color: rgba(74, 78, 105, 0.2);
}

.home-footer {
    display: grid;
    gap: 14px;
    padding-top: 22px;
}

.home-footer-inner {
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    padding: 24px;
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
}

.home-footer-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    line-height: 1.15;
}

.home-footer-text {
    max-width: 62ch;
    font-size: 1rem;
}

.home-footer-btn {
    padding: 11px 24px;
    transition: transform 0.2s ease;
}

.home-footer-btn:hover,
.home-footer-btn:focus-visible {
    transform: translateY(-1px);
}

.home-footer-copy {
    font-size: 0.9rem;
    opacity: 0.78;
}

body.dark .home-footer-inner {
    border-color: rgba(153, 210, 255, 0.2);
    background: linear-gradient(104deg, rgba(7, 30, 54, 0.9), rgba(22, 19, 35, 0.9));
    box-shadow: 0 16px 34px rgba(6, 11, 24, 0.4);
}

body.dark .home-footer-text {
    color: rgba(232, 239, 250, 0.82);
}

body.light .home-footer-inner {
    border-color: rgba(74, 78, 105, 0.2);
    background: linear-gradient(108deg, rgba(225, 236, 248, 0.9), rgba(244, 232, 221, 0.9));
    box-shadow: 0 14px 30px rgba(34, 34, 59, 0.14);
}

body.light .home-footer-text {
    color: rgba(34, 34, 59, 0.86);
}

@media (prefers-reduced-motion: reduce) {
    .slide-track {
        animation: none;
    }
}

@media (max-width: 980px) {
    body.home-index .background-media,
    body.home-index .background-overlay {
        height: clamp(860px, 130vh, 1120px);
    }

    body.home-index .home-hero {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    body.home-index .home-hero-photo-frame {
        justify-self: start;
        width: min(200px, 48vw);
    }

    body.home-index .about-showcase-bottom {
        margin-top: 28px;
    }

    .projects-hero-content,
    .skills-hero-content {
        margin-left: 0;
        margin-inline: auto;
    }

    .three-cols {
        grid-template-columns: 1fr 1fr;
    }

    .home-hero {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .home-hero-media {
        justify-self: start;
    }

    .hero-grid,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .about-mini-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .focus-list {
        min-height: 500px;
        padding: 22px;
    }

    .focus-label {
        width: min(280px, calc(100% - 24px));
    }

    .focus-panel {
        top: 22px;
        right: 22px;
        bottom: 22px;
        left: 326px;
        padding: 24px 26px;
    }
}

@media (max-width: 900px) {
    .nav {
        grid-template-columns: 1fr auto;
        row-gap: 14px;
    }

    .nav-links {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: flex-start;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
        border-radius: 16px;
        border: 1px solid transparent;
    }

    body.dark .nav-links {
        background-color: rgba(16, 31, 53, 0.72);
        border-color: rgba(153, 210, 255, 0.18);
    }

    body.light .nav-links {
        background-color: rgba(242, 233, 228, 0.88);
        border-color: rgba(74, 78, 105, 0.16);
    }

    .nav.nav--open .nav-links {
        display: flex;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .projects-gallery-section {
        display: none;
    }

    .projects-gallery-mobile {
        display: grid;
    }
}

@media (max-width: 760px) {
    body.home-index .background-media,
    body.home-index .background-overlay {
        height: clamp(980px, 160vh, 1400px);
    }

    body.home-index .home-hero-photo-frame {
        width: min(170px, 62vw);
    }

    body.home-index .about-showcase-top {
        margin-top: 4px;
    }

    body.home-index .about-showcase-bottom {
        margin-top: 20px;
    }

    .projects-cover,
    .skills-cover {
        padding: 18px 0 30px;
    }

    .projects-cover-inner,
    .skills-cover-inner {
        width: calc(100% - 18px);
    }

    .projects-hero-content,
    .skills-hero-content {
        width: 100%;
    }

    .hero {
        padding: 28px 0 20px;
    }

    .home-hero {
        width: calc(100% - 18px);
        border-radius: 22px;
        padding: 20px;
    }

    .home-hero-eyebrow {
        letter-spacing: 3px;
    }

    .home-hero-actions {
        margin-top: 22px;
        gap: 10px;
    }

    .home-hero-btn {
        width: 100%;
        text-align: center;
    }

    .home-hero-media {
        justify-self: stretch;
        width: 100%;
        max-width: 340px;
    }

    .nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 24px;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .logo-img {
        height: 48px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .container {
        width: calc(100% - 18px);
        padding-top: 18px;
    }

    .about-showcase {
        gap: 20px;
    }

    .about-preview {
        max-height: 240px;
    }

    .about-summary-card .about-preview {
        max-height: 180px;
    }

    .about-mini-grid,
    .about-split-grid,
    .about-summary-grid {
        grid-template-columns: 1fr;
    }

    .focus-scene {
        overflow: visible;
    }

    .focus-list {
        min-height: unset;
        padding: 16px;
        gap: 14px;
    }

    .focus-label {
        width: 100%;
    }

    .focus-item input:checked ~ .focus-label {
        transform: none;
    }

    .focus-panel {
        position: static;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        max-height: 0;
        padding: 0 22px;
        margin-top: 0;
        border-width: 0;
        opacity: 0;
        overflow: hidden;
        transform: none;
        transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
    }

    .focus-item input:checked ~ .focus-panel {
        max-height: 640px;
        padding: 22px;
        margin-top: 10px;
        border-width: 1px;
        opacity: 1;
    }

    .project-modal__card {
        grid-template-columns: 1fr;
    }

    .timeline-step:nth-child(even) {
        margin-right: 16px;
    }

    .timeline-step:nth-child(odd) {
        margin-left: 16px;
    }

    .card {
        padding: 20px;
    }

    .three-cols {
        grid-template-columns: 1fr;
    }

    .contact-card {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .contact-photo-frame {
        width: min(240px, 80%);
        justify-self: start;
    }

    .slider {
        --slide-width: 200px;
        --slide-height: 80px;
        --logo-speed: 32s;
        border-radius: 16px;
    }
}

@media (max-width: 600px) {
    .nav-links {
        gap: 8px;
    }

    .theme-toggle {
        align-self: stretch;
        justify-content: center;
    }

    .home-hero-description {
        max-width: 100%;
    }

    .projects-gallery-section {
        margin-bottom: 28px;
    }

    .projects-gallery-section .projects-gallery {
        min-height: 280px;
    }

    .scene {
        border-radius: 16px;
    }

    .scene-label {
        height: 44px;
        font-size: 0.95rem;
    }

    .scene-status-badge {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .project-modal__nav {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
}

@media (max-width: 520px) {
    .nav-link,
    .theme-toggle {
        width: 100%;
    }

    .projects-gallery .items,
    #futureGallery,
    #gallery {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 12px;
        padding-inline: 12px;
        perspective: none;
        transform: none;
        gap: 12px;
    }

    .projects-gallery .item,
    #futureGallery .item,
    #gallery .item {
        width: min(72vw, 240px);
        height: clamp(170px, 44vw, 240px);
        border-radius: 28px;
        transform: none !important;
        scroll-snap-align: center;
    }

    .projects-gallery .items.is-open .item,
    #futureGallery.is-open .item,
    #gallery.is-open .item {
        width: min(78vw, 280px);
        transform: none !important;
    }

    .about-modal,
    .project-modal,
    .projects-swipe-modal {
        padding: 16px;
    }

    .about-modal__dialog,
    .project-modal__dialog,
    .projects-swipe-modal__dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 18px;
    }

    .about-modal__close,
    .project-modal__close,
    .projects-swipe-modal__close {
        top: 10px;
        right: 10px;
    }

    .projects-swipe-modal__header {
        padding: 14px 16px 0;
    }

    .projects-swipe-modal__track {
        padding: 0 16px 16px;
        gap: 12px;
    }

    .projects-swipe-card {
        flex-basis: min(82vw, 280px);
        max-height: 68vh;
    }

    .project-modal__nav {
        top: auto;
        bottom: 16px;
        transform: none;
    }

    .slider {
        --slide-width: 160px;
        --slide-height: 70px;
        --logo-speed: 30s;
    }
}
