/*
FEATURES : sections ajoutees au portfolio (chargees apres style.css).
1. Badge de disponibilite (accueil)
2. Globe reseau 3D (accueil)
3. Terminal interactif (accueil)
4. Parcours de formation en diagramme (a propos)
5. Grille de projets avec filtres et apercus (projets)
6. Cartes "Explorer le site" (accueil)
7. Page contact : formulaire, liens directs et retour d'experience
9. Page competences : ce que j'apporte a une equipe, puis competences par domaine
8. Animations : cartes qui s'inclinent vers le curseur, sections qui se redressent au defilement
Les couleurs reprennent les variables de style.css pour suivre les modes clair et sombre.
*/
:root {
    --threat: rgb(255, 117, 135);
    --globe-dot: #63ead3;
    --globe-node: #edf3ff;
    --globe-arc: #63ead3;
    --globe-packet: #edf3ff;
    --globe-threat: #ff7587;
    --globe-ring: #b0a0ff;
    --globe-ocean-light: #173a55;
    --globe-ocean-dark: #070c19;
    --globe-shade: rgba(3, 6, 14, 0.82);
    --globe-atmosphere: rgba(99, 234, 211, 0.3);
    --globe-grid: rgba(170, 225, 240, 0.085);
    --globe-glow: rgba(99, 234, 211, 0.1);
    --accent-soft: rgba(99, 234, 211, 0.3);
    --accent-glow: rgba(99, 234, 211, 0.45);
}

:root[data-theme="light"] {
    --threat: #c02a47;
    --globe-dot: #087c6b;
    --globe-node: #192b40;
    --globe-arc: #087c6b;
    --globe-packet: #192b40;
    --globe-threat: #c02a47;
    --globe-ring: #7051ba;
    --globe-ocean-light: #ffffff;
    --globe-ocean-dark: #cfe2ee;
    --globe-shade: rgba(70, 100, 135, 0.34);
    --globe-atmosphere: rgba(8, 124, 107, 0.2);
    --globe-grid: rgba(25, 43, 64, 0.075);
    --globe-glow: rgba(8, 124, 107, 0.1);
    --accent-soft: rgba(8, 124, 107, 0.35);
    --accent-glow: rgba(8, 124, 107, 0.3);
}

/* 1. BADGE DE DISPONIBILITE */
.availability {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    margin: 0px 0px 22px;
    padding: 6px 14px;
    border: 1px solid var(--accent-soft);
    border-radius: 999px;
    background: var(--theme-color-4);
    color: var(--theme-color-15);
    font: 500 14px / 1.6 var(--font-mono);
    text-decoration: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.availability:hover {
    border-color: var(--theme-color-17);
    box-shadow: 0px 0px 18px var(--globe-glow);
}

.availability-dot {
    position: relative;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--theme-color-17);
}

.availability-dot::after {
    content: "";
    position: absolute;
    inset: 0px;
    border-radius: 50%;
    background: var(--theme-color-17);
    animation: availability-ping 1.8s ease-out infinite;
}

@keyframes availability-ping {
    from { transform: scale(1); opacity: 0.6; }
    to { transform: scale(3); opacity: 0; }
}

/* 2. GLOBE RESEAU */
.network {
    display: grid;
    grid-template-columns: minmax(0px, 1fr) minmax(0px, 1fr);
    align-items: center;
    gap: 40px;
    padding: 30px 0px 34px;
    border-bottom: 1px solid var(--theme-color-21);
}

.network .panel-label {
    margin: 0px 0px 10px;
    font-family: var(--font-mono);
}

.network h2 {
    margin: 0px 0px 16px;
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.network h2 span {
    color: var(--theme-color-17);
}

.network-intro {
    max-width: 520px;
    margin: 0px;
    color: var(--theme-color-16);
    font-size: 18px;
    line-height: 1.8;
}

.network-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0px, 1fr));
    gap: 12px;
    max-width: 520px;
    margin: 26px 0px 0px;
}

.network-stats > div {
    min-width: 0px;
    padding: 14px 16px;
    background: var(--theme-color-12);
    border: 1px solid var(--theme-color-20);
    border-radius: 8px;
}

.network-stats dt {
    color: var(--theme-color-16);
    font: 500 12px / 1.5 var(--font-mono);
    letter-spacing: 1px;
}

.network-stats dd {
    margin: 6px 0px 0px;
    color: var(--theme-color-17);
    font: 600 26px / 1.2 var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.network-stats .is-threat dd {
    color: var(--threat);
}

.network-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 20px 0px 0px;
    padding: 0px;
    list-style: none;
    color: var(--theme-color-16);
    font: 14px / 1.6 var(--font-mono);
}

.network-legend li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.network-legend li::before {
    content: "";
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--globe-node);
}

.network-legend .legend-traffic::before {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--globe-arc);
}

.network-legend .legend-shield::before {
    width: 12px;
    height: 12px;
    background: transparent;
    border: 2px solid var(--globe-ring);
}

.network-legend .legend-threat::before {
    background: var(--globe-threat);
}

.network-stage {
    position: relative;
    justify-self: center;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1 / 1;
}

#globe {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

#globe.is-dragging {
    cursor: grabbing;
}

.network-hint {
    position: absolute;
    right: 0px;
    bottom: -6px;
    left: 0px;
    margin: 0px;
    color: var(--theme-color-23);
    font: 13px / 1.6 var(--font-mono);
    text-align: center;
    pointer-events: none;
}

@media (max-width: 1100px) {
    .network {
        grid-template-columns: minmax(0px, 1fr);
        gap: 12px;
    }

    .network-stage {
        max-width: 420px;
    }

    .network-intro, .network-stats {
        max-width: none;
    }
}

@media (max-width: 600px) {
    .network {
        padding: 26px 0px 30px;
    }

    .network-intro {
        font-size: 16px;
    }

    .network-stats {
        gap: 8px;
    }

    .network-stats > div {
        padding: 12px 10px;
    }

    .network-stats dt {
        font-size: 10.5px;
        letter-spacing: 0.4px;
    }

    .network-stats dd {
        font-size: 21px;
    }

    .availability {
        font-size: 13px;
    }
}

/* 3. TERMINAL INTERACTIF */
.terminal.is-interactive .terminal-content {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-color-20) transparent;
    cursor: text;
}

.terminal [hidden] {
    display: none !important;
}

.home-layout .terminal-content .terminal-line {
    margin: 0px 0px 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.terminal-line.is-output {
    color: var(--theme-color-24);
}

.terminal-line.is-error {
    color: var(--threat);
}

.terminal-log:not(:empty) {
    margin-bottom: 8px;
}

.terminal-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-input {
    flex: 1;
    min-width: 0px;
    padding: 0px;
    background: transparent;
    border: 0px;
    outline: 0px;
    color: inherit;
    font: inherit;
    caret-color: var(--theme-color-17);
}

.terminal-input::placeholder {
    color: var(--theme-color-23);
    opacity: 0.75;
}

.terminal.is-interactive:focus-within {
    border-color: var(--theme-color-17);
    box-shadow: 0px 0px 0px 1px var(--theme-color-17), 0px 0px 28px var(--globe-glow);
}

.terminal-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--theme-color-21);
    color: var(--theme-color-23);
    font: 13px / 1.6 var(--font-mono);
}

.terminal-hint {
    margin-right: 4px;
}

.terminal-footer button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: var(--theme-color-12);
    border: 1px solid var(--theme-color-20);
    border-radius: 999px;
    color: var(--theme-color-17);
    font: 600 14px / 1.6 var(--font-mono);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.terminal-footer button::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
}

.terminal-footer button:hover {
    background: var(--theme-color-11);
    border-color: var(--theme-color-17);
}

:root[data-theme="light"] .terminal-footer button {
    background: #e3f5f0;
    border-color: rgba(8, 124, 107, 0.28);
    color: #0b5c50;
}

:root[data-theme="light"] .terminal-footer button:hover {
    background: #d2eee6;
    border-color: #0c8a74;
}

.terminal-footer button:focus-visible {
    outline: var(--theme-color-17) solid 2px;
    outline-offset: 2px;
}

@media (max-width: 600px) {
    /* 16px evite le zoom automatique d'iOS quand on touche le champ. */
    .terminal-input {
        font-size: 16px;
    }

    .terminal-footer {
        padding: 10px 16px;
    }
}

/* 4. PARCOURS DE FORMATION */
.about-page .journey-section {
    text-align: left;
    background: radial-gradient(ellipse at 100% 0, var(--globe-glow), transparent 55%), var(--theme-color-18);
}

.journey-section > .panel-label {
    font-family: var(--font-mono);
}

.about-page .journey-section > h2 {
    margin-bottom: 8px;
    font-size: clamp(24px, 2.3vw, 30px);
}

.about-page .journey-section > .journey-lead {
    margin: 0px;
    color: var(--theme-color-16);
}

.journey {
    position: relative;
    margin-top: 38px;
}

.journey-svg {
    position: absolute;
    inset: 0px;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.journey-track {
    fill: none;
    stroke: var(--theme-color-20);
    stroke-width: 2;
    stroke-dasharray: 4 8;
}

.journey-line {
    fill: none;
    stroke: var(--theme-color-17);
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0px 0px 7px var(--accent-glow));
}

.journey-list {
    position: relative;
    display: grid;
    gap: 46px;
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.journey-step {
    display: flex;
    align-items: center;
    gap: 22px;
    width: 58%;
}

.journey-step:nth-child(even) {
    flex-direction: row-reverse;
    margin-left: auto;
    text-align: right;
}

.journey-node {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: var(--theme-color-18);
    border: 1px solid var(--theme-color-20);
    border-radius: 50%;
    box-shadow: 0px 0px 0px 6px var(--theme-color-18);
    color: var(--theme-color-17);
    font: 600 14px / 1 var(--font-mono);
    transition: background-color 0.45s, border-color 0.45s, color 0.45s, box-shadow 0.45s;
}

.journey-card {
    flex: 1;
    min-width: 0px;
    padding: 20px 22px;
    background: var(--theme-color-12);
    border: 1px solid var(--theme-color-20);
    border-radius: 12px;
    transition: border-color 0.25s, box-shadow 0.25s, opacity 0.6s;
}

.journey-card:hover {
    border-color: var(--theme-color-17);
    box-shadow: 0px 0px 22px var(--globe-glow);
}

.about-page .journey-card .journey-date {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    margin: 0px;
    font: 14px / 1.6 var(--font-mono);
}

.journey-step:nth-child(even) .journey-date {
    justify-content: flex-end;
}

.journey-year {
    color: var(--theme-color-17);
    font-weight: 600;
}

.journey-place {
    color: var(--theme-color-23);
}

.journey-card h3 {
    margin: 6px 0px 8px;
    font-size: 19px;
    line-height: 1.45;
}

.about-page .journey-card > p:last-child {
    margin: 0px;
    color: var(--theme-color-16);
    font-size: 16px;
    line-height: 1.75;
}

/* Avec JavaScript, chaque etape s'allume quand la ligne l'atteint. */
.journey.is-live .journey-card {
    opacity: 0.5;
}

.journey.is-live .is-reached .journey-card {
    opacity: 1;
}

.journey.is-live .is-reached .journey-node {
    background: var(--theme-color-17);
    border-color: var(--theme-color-17);
    color: var(--theme-color-18);
    box-shadow: 0px 0px 0px 6px var(--theme-color-18), 0px 0px 26px var(--accent-glow);
}

@media (max-width: 1000px) {
    .journey-step {
        width: 74%;
    }
}

@media (max-width: 760px) {
    .journey {
        margin-top: 28px;
    }

    .journey-list {
        gap: 26px;
    }

    .journey-step, .journey-step:nth-child(even) {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
        margin-left: 0px;
        text-align: left;
    }

    .journey-step:nth-child(even) .journey-date {
        justify-content: flex-start;
    }

    .journey-node {
        width: 40px;
        height: 40px;
        margin-top: 14px;
        font-size: 12px;
        box-shadow: 0px 0px 0px 4px var(--theme-color-18);
    }

    .journey.is-live .is-reached .journey-node {
        box-shadow: 0px 0px 0px 4px var(--theme-color-18), 0px 0px 20px var(--accent-glow);
    }

    .journey-card {
        padding: 16px 18px;
    }

    .journey-card h3 {
        font-size: 17px;
    }
}

/* 5. PROJETS : filtres, cartes illustrees et fenetre d'apercu */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0px;
}

.projects-section {
    text-align: left;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.project-filters button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 16px;
    background: var(--theme-color-12);
    border: 1px solid var(--theme-color-20);
    border-radius: 10px;
    color: var(--theme-color-7);
    font: 500 16px / 1.5 var(--font-mono);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.project-filters button:hover {
    border-color: var(--theme-color-17);
    color: var(--theme-color-17);
}

.project-filters button[aria-pressed="true"] {
    background: linear-gradient(120deg, var(--theme-color-10), rgb(71, 229, 255));
    border-color: transparent;
    color: rgb(4, 27, 25);
    box-shadow: rgba(50, 245, 162, 0.22) 0px 3px 18px;
}

:root[data-theme="light"] .project-filters button[aria-pressed="true"] {
    background: linear-gradient(120deg, #4fdcaa, rgb(71, 229, 255));
}

.project-filters button:focus-visible, .tile-open:focus-visible, .preview-close:focus-visible {
    outline: var(--theme-color-17) solid 2px;
    outline-offset: 3px;
}

.filter-count {
    min-width: 24px;
    padding: 0px 6px;
    background: var(--theme-color-11);
    border-radius: 6px;
    color: var(--theme-color-16);
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.project-filters button[aria-pressed="true"] .filter-count {
    background: rgba(4, 27, 25, 0.16);
    color: rgb(4, 27, 25);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0px, 1fr));
    gap: 24px;
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.project-tile[hidden] {
    display: none;
}

.project-tile > article {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--theme-gradient), var(--theme-gradient));
    border: 1px solid var(--theme-color-20);
    border-radius: 16px;
    box-shadow: rgba(0, 0, 0, 0.267) 0px 10px 30px, rgba(255, 255, 255, 0.03) 0px 1px inset;
    transition: border-color 0.25s, box-shadow 0.25s;
}

:root[data-theme="light"] .project-tile > article {
    box-shadow: rgba(35, 65, 80, 0.1) 0px 10px 30px;
}

.project-tile.is-entering > article {
    animation: tile-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

@keyframes tile-in {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: none; }
}

.tile-cover {
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0d1a2e;
}

.tile-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease-out;
}

.tile-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 3px 12px;
    background: rgba(8, 13, 27, 0.78);
    border: 1px solid rgba(99, 234, 211, 0.22);
    border-radius: 999px;
    color: #edf3ff;
    font: 500 13px / 1.7 var(--font-mono);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.tile-status {
    right: 14px;
    left: auto;
    color: #63ead3;
}

.tile-status.is-progress {
    background: #63ead3;
    border-color: #63ead3;
    color: #07201d;
}

.tile-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.tile-body h3 {
    margin: 0px 0px 8px;
    font-size: 20px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.tile-body > p {
    flex: 1;
    margin: 0px;
    color: var(--theme-color-16);
    font-size: 16px;
    line-height: 1.7;
}

.tile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0px 0px;
    padding: 0px;
    list-style: none;
}

.tile-tags li {
    padding: 3px 10px;
    background: rgba(99, 234, 211, 0.027);
    border: 1px solid rgba(99, 234, 211, 0.157);
    border-radius: 6px;
    color: var(--theme-color-5);
    font: 500 13.5px / 1.6 var(--font-mono);
    font-variant-ligatures: none;
}

:root[data-theme="light"] .tile-tags li {
    border-color: rgba(8, 124, 107, 0.25);
}

:root[data-theme="light"] .tile-cover {
    background: #e4f3ef;
}

:root[data-theme="light"] .tile-badge {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(8, 124, 107, 0.28);
    color: #0b3a34;
    box-shadow: rgba(35, 65, 80, 0.12) 0px 4px 12px;
}

:root[data-theme="light"] .tile-status {
    color: #06705f;
}

:root[data-theme="light"] .tile-status.is-progress {
    background: #0c8a74;
    border-color: #0c8a74;
    color: #ffffff;
}

.tile-open {
    align-self: flex-start;
    margin-top: 22px;
    padding: 0px;
    background: none;
    border: 0px;
    color: var(--theme-color-17);
    font: 600 16px / 1.65 var(--font-sans);
    cursor: pointer;
}

.tile-open span {
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.25s;
}

.tile-open:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .project-tile > article:hover {
        transform: translateY(-5px);
        border-color: var(--theme-color-17);
        box-shadow: rgba(0, 0, 0, 0.333) 0px 14px 32px, rgba(99, 234, 211, 0.17) 0px 0px 22px;
    }

    .project-tile > article:hover .tile-cover img {
        transform: scale(1.05);
    }

    .tile-open:hover span {
        transform: translate(3px, -3px);
    }
}

/* Fenetre d'apercu : element <dialog> natif (touche Echap, focus garde a l'interieur). */
.project-preview {
    width: min(760px, calc(100% - 32px));
    max-height: min(90dvh, 900px);
    padding: 0px;
    overflow: hidden;
    background: var(--theme-color-18);
    border: 1px solid var(--accent-soft);
    border-radius: 18px;
    box-shadow: rgba(0, 0, 0, 0.5) 0px 30px 80px, 0px 0px 40px var(--globe-glow);
    color: var(--theme-color-15);
    text-align: left;
}

.project-preview[open] {
    display: flex;
    flex-direction: column;
    animation: preview-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-preview::backdrop {
    background: rgba(8, 13, 27, 0.72);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    animation: backdrop-in 0.3s ease-out;
}

@keyframes preview-in {
    from { opacity: 0; transform: translateY(26px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.preview-top {
    position: relative;
    flex-shrink: 0;
}

.preview-top .tile-cover {
    aspect-ratio: 16 / 7;
}

.preview-close {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: rgba(8, 13, 27, 0.82);
    border: 1px solid rgba(99, 234, 211, 0.3);
    border-radius: 50%;
    color: #edf3ff;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.preview-close:hover {
    background: #63ead3;
    color: #07201d;
    transform: rotate(90deg);
}

.preview-body {
    padding: 26px 30px 30px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.preview-stack {
    margin: 0px 0px 8px;
    color: var(--theme-color-17);
    font: 500 14px / 1.6 var(--font-mono);
}

.preview-body h3 {
    margin: 0px 0px 10px;
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.preview-summary {
    margin: 0px;
    color: var(--theme-color-16);
    font-size: 18px;
    line-height: 1.7;
}

.preview-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0px, 1fr));
    gap: 14px;
    margin: 24px 0px 0px;
}

.preview-details > div {
    padding: 16px 18px;
    background: var(--theme-color-12);
    border: 1px solid var(--theme-color-21);
    border-radius: 12px;
}

.preview-details dt {
    color: var(--theme-color-15);
    font-weight: 600;
}

.preview-details dd {
    margin: 4px 0px 0px;
    color: var(--theme-color-16);
    font-size: 16px;
    line-height: 1.7;
}

.preview-body .button {
    margin-top: 24px;
}

/* La page ne defile pas derriere un apercu ouvert. */
html:has(.project-preview[open]) {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0px, 1fr));
    }
}

@media (max-width: 680px) {
    .projects-grid {
        grid-template-columns: minmax(0px, 1fr);
        gap: 20px;
    }

    .project-filters {
        gap: 8px;
        margin-bottom: 22px;
    }

    .project-filters button {
        padding: 6px 12px;
        font-size: 15px;
    }

    .preview-top .tile-cover {
        aspect-ratio: 16 / 9;
    }

    .preview-body {
        padding: 20px 20px 24px;
    }

    .preview-details {
        grid-template-columns: minmax(0px, 1fr);
    }

    .preview-summary {
        font-size: 16px;
    }
}

/* 6. EXPLORER LE SITE : quatre cartes vers les autres pages */
.explore {
    margin-top: 48px;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0px, 1fr));
    gap: 20px;
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.explore-grid a {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 22px;
    background: var(--theme-color-3);
    border: 1px solid var(--theme-color-21);
    border-radius: 14px;
    color: var(--theme-color-15);
    text-decoration: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.explore-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--theme-color-10), rgb(71, 229, 255));
    border-radius: 13px;
    color: rgb(4, 27, 25);
    box-shadow: rgba(50, 245, 162, 0.2) 0px 6px 18px;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-theme="light"] .explore-icon {
    background: linear-gradient(135deg, #4fdcaa, rgb(71, 229, 255));
}

.explore-grid h3 {
    margin: 0px 0px 8px;
    font-size: 20px;
    line-height: 1.4;
}

.explore-arrow {
    display: inline-block;
    margin-left: 4px;
    color: var(--theme-color-17);
    font-size: 17px;
    transition: transform 0.25s;
}

.explore-grid p {
    margin: 0px;
    color: var(--theme-color-16);
    font-size: 16px;
    line-height: 1.7;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .explore-grid a:hover {
        transform: translateY(-5px);
        border-color: var(--theme-color-17);
        box-shadow: rgba(0, 0, 0, 0.333) 0px 14px 32px, rgba(99, 234, 211, 0.17) 0px 0px 22px;
    }

    .explore-grid a:hover .explore-icon {
        transform: translateY(-2px) rotate(-6deg);
    }

    .explore-grid a:hover .explore-arrow {
        transform: translate(3px, -3px);
    }
}

@media (max-width: 1200px) {
    .explore-grid {
        grid-template-columns: repeat(2, minmax(0px, 1fr));
    }
}

@media (max-width: 600px) {
    .explore {
        margin-top: 32px;
    }

    .explore-grid {
        gap: 14px;
    }

    .explore-grid a {
        padding: 18px;
    }

    .explore-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 14px;
        border-radius: 11px;
    }

    .explore-grid h3 {
        font-size: 18px;
    }

    .explore-grid p {
        font-size: 15px;
        line-height: 1.6;
    }
}

/* 7. CONTACT : formulaire a gauche, liens directs et retour d'experience a droite */
.reach-grid {
    display: grid;
    grid-template-columns: minmax(0px, 1fr) minmax(0px, 1fr);
    align-items: stretch;
    gap: 28px;
    margin-top: 36px;
    text-align: left;
}

/* Les deux colonnes sont deux cartes identiques : meme haut, meme hauteur, meme largeur. */
.reach-form, .reach-side {
    padding: 28px;
    background: linear-gradient(135deg, var(--theme-gradient), var(--theme-gradient));
    border: 1px solid var(--theme-color-20);
    border-radius: 16px;
    box-shadow: rgba(0, 0, 0, 0.267) 0px 10px 30px, rgba(255, 255, 255, 0.03) 0px 1px inset;
}

:root[data-theme="light"] .reach-form, :root[data-theme="light"] .reach-side {
    box-shadow: rgba(35, 65, 80, 0.1) 0px 10px 30px;
}

/* Les deux colonnes ont la meme hauteur : la zone de message s'etire pour
   remplir la carte, et le bouton reste en bas. */
.reach-form, .reach-side {
    display: flex;
    flex-direction: column;
}

.reach-form .message-form {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-top: 0px;
}

.reach-form .message-form > .message-field {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.reach-form .message-form > .message-field textarea {
    flex: 1;
}

.reach-form button.message-send {
    align-self: flex-start;
}

.reach-side {
    display: flex;
    flex-direction: column;
}

.form-mode {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0px;
    padding: 10px 14px;
    background: var(--theme-color-4);
    border: 1px solid var(--accent-soft);
    border-radius: 10px;
    color: var(--theme-color-15);
    font-size: 15px;
    line-height: 1.6;
}

.form-mode[hidden] {
    display: none;
}

.form-mode-cancel {
    padding: 0px;
    background: none;
    border: 0px;
    color: var(--theme-color-17);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.reach-side h2 {
    margin: 0px 0px 18px;
    font-size: 20px;
    line-height: 1.4;
}

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

.reach-row {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--theme-color-12);
    border: 1px solid var(--theme-color-20);
    border-radius: 14px;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.reach-link {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 14px;
    min-width: 0px;
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--theme-color-15);
    text-decoration: none;
}

.reach-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    background: var(--theme-color-4);
    border: 1px solid var(--accent-soft);
    border-radius: 10px;
    color: var(--theme-color-17);
}

.reach-text {
    display: grid;
    flex: 1;
    min-width: 0px;
}

.reach-text small {
    color: var(--theme-color-16);
    font-size: 14px;
    line-height: 1.5;
}

.reach-text strong {
    overflow: hidden;
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reach-arrow {
    flex-shrink: 0;
    color: var(--theme-color-17);
    font-size: 18px;
    transition: transform 0.25s;
}

.reach-copy {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin-right: 10px;
    background: var(--theme-color-12);
    border: 1px solid var(--theme-color-20);
    border-radius: 10px;
    color: var(--theme-color-15);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.reach-copy:hover {
    border-color: var(--theme-color-17);
    color: var(--theme-color-17);
}

.reach-copy span {
    display: grid;
}

.reach-copy .copied-icon, .reach-copy.is-copied .copy-icon {
    display: none;
}

.reach-copy.is-copied .copied-icon {
    display: grid;
}

.reach-copy.is-copied {
    border-color: var(--theme-color-17);
    color: var(--theme-color-17);
}

.reach-copied span {
    position: absolute;
    top: -14px;
    right: 8px;
    padding: 2px 10px;
    background: var(--theme-color-17);
    border-radius: 6px;
    color: var(--theme-color-18);
    font: 600 13px / 1.7 var(--font-mono);
    pointer-events: none;
    animation: copied-in 0.2s ease-out;
}

.reach-copied span[hidden] {
    display: none;
}

@keyframes copied-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

.reach-link:focus-visible, .reach-copy:focus-visible, .reach-feedback-button:focus-visible, .form-mode-cancel:focus-visible {
    outline: var(--theme-color-17) solid 2px;
    outline-offset: 3px;
}

.reach-feedback {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin-top: 18px;
    padding: 22px;
    border: 1px dashed var(--accent-soft);
    border-radius: 14px;
    background: var(--theme-color-12);
}

.reach-feedback h3 {
    margin: 0px 0px 8px;
    font-size: 18px;
    line-height: 1.4;
}

.reach-feedback p {
    margin: 0px;
    color: var(--theme-color-16);
    font-size: 16px;
    line-height: 1.7;
}

.reach-feedback-button {
    margin-top: 14px;
    padding: 0px;
    background: none;
    border: 0px;
    color: var(--theme-color-17);
    font: 600 16px / 1.65 var(--font-sans);
    cursor: pointer;
}

.reach-feedback-button span {
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.25s;
}

.reach-feedback-button:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .reach-row:hover {
        transform: translateY(-2px);
        border-color: var(--theme-color-17);
        box-shadow: rgba(99, 234, 211, 0.14) 0px 0px 20px;
    }

    .reach-link:hover .reach-arrow, .reach-feedback-button:hover span {
        transform: translate(3px, -3px);
    }
}

@media (max-width: 1100px) {
    .reach-grid {
        grid-template-columns: minmax(0px, 1fr);
    }
}

@media (max-width: 600px) {
    .reach-grid {
        gap: 24px;
        margin-top: 26px;
    }

    .reach-form, .reach-side {
        padding: 20px 18px;
    }

    .reach-link {
        gap: 12px;
        padding: 12px;
    }

    .reach-feedback {
        padding: 18px;
    }
}

/* 9. COMPETENCES : six cartes de services, puis les competences groupees par domaine */
.services-section, .expertise-section {
    margin-top: 44px;
    text-align: left;
}

.expertise-section {
    margin-top: 72px;
}

.skills-heading {
    max-width: 640px;
    margin-bottom: 28px;
}

.skills-heading .panel-label {
    margin: 0px 0px 10px;
    font-family: var(--font-mono);
}

.skills-heading h2 {
    margin: 0px 0px 10px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.skills-heading > p:last-child {
    margin: 0px;
    color: var(--theme-color-16);
    font-size: 18px;
    line-height: 1.7;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0px, 1fr));
    gap: 20px;
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.service-card {
    padding: 24px;
    background: var(--theme-color-3);
    border: 1px solid var(--theme-color-21);
    border-radius: 16px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.service-card:hover {
    border-color: var(--theme-color-17);
    box-shadow: rgba(0, 0, 0, 0.3) 0px 14px 32px, rgba(99, 234, 211, 0.15) 0px 0px 22px;
}

.service-card h3 {
    margin: 0px 0px 8px;
    font-size: 20px;
    line-height: 1.4;
}

.service-card p {
    margin: 0px;
    color: var(--theme-color-16);
    font-size: 16px;
    line-height: 1.7;
}

.skill-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0px, 1fr));
    gap: 30px 28px;
}

/* Deux feuilles decalees derriere chaque carte lui donnent de l'epaisseur. */
.skill-group {
    padding: 26px;
    background: var(--theme-color-18);
    border: 1px solid var(--theme-color-20);
    border-radius: 18px;
    box-shadow:
        5px 5px 0px -1px var(--theme-color-18), 5px 5px 0px 0px var(--theme-color-20),
        10px 10px 0px -1px var(--theme-color-18), 10px 10px 0px 0px var(--theme-color-21);
    transition: border-color 0.25s;
}

.skill-group:hover {
    border-color: var(--theme-color-17);
}

.skill-group-programming, .skill-group-security {
    grid-column: 1 / -1;
}

.skill-group-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.skill-group h3 {
    margin: 0px;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.skill-count {
    color: var(--theme-color-17);
    font: 500 14px / 1 var(--font-mono);
}

.skill-items {
    display: grid;
    gap: 26px 24px;
    margin: 0px;
    padding: 0px;
    list-style: none;
}

.skill-group-programming .skill-items {
    grid-template-columns: repeat(3, minmax(0px, 1fr));
}

.skill-group-security .skill-items {
    grid-template-columns: repeat(4, minmax(0px, 1fr));
}

.skill-item {
    min-width: 0px;
}

.skill-item h4 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0px 0px 6px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
}

.skill-learning {
    padding: 1px 9px;
    border: 1px solid var(--accent-soft);
    border-radius: 999px;
    color: var(--theme-color-17);
    font: 500 12.5px / 1.6 var(--font-mono);
}

.skill-item p {
    margin: 0px;
    color: var(--theme-color-16);
    font-size: 16px;
    line-height: 1.65;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 12px 0px 0px;
    padding: 0px;
    list-style: none;
}

.skill-tags li {
    padding: 2px 9px;
    background: rgba(99, 234, 211, 0.027);
    border: 1px solid rgba(99, 234, 211, 0.157);
    border-radius: 6px;
    color: var(--theme-color-5);
    font: 500 13px / 1.6 var(--font-mono);
    font-variant-ligatures: none;
}

:root[data-theme="light"] .skill-tags li {
    border-color: rgba(8, 124, 107, 0.25);
}

@media (max-width: 1150px) {
    .skill-group-security .skill-items {
        grid-template-columns: repeat(2, minmax(0px, 1fr));
    }
}

@media (max-width: 900px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0px, 1fr));
    }

    .skill-groups {
        grid-template-columns: minmax(0px, 1fr);
    }

    .skill-group-programming .skill-items {
        grid-template-columns: minmax(0px, 1fr);
    }
}

@media (max-width: 600px) {
    .services-section {
        margin-top: 32px;
    }

    .expertise-section {
        margin-top: 52px;
    }

    .service-grid, .skill-group-security .skill-items {
        grid-template-columns: minmax(0px, 1fr);
    }

    .service-grid {
        gap: 14px;
    }

    .service-card {
        padding: 20px;
    }

    .skills-heading > p:last-child {
        font-size: 16px;
    }

    .skill-group {
        padding: 20px 18px;
        box-shadow:
            4px 4px 0px -1px var(--theme-color-18), 4px 4px 0px 0px var(--theme-color-20),
            8px 8px 0px -1px var(--theme-color-18), 8px 8px 0px 0px var(--theme-color-21);
    }

    .skill-groups {
        gap: 26px;
        padding-right: 8px;
    }

    .skill-group h3 {
        font-size: 21px;
    }
}

/* 8. ANIMATIONS */
/* Cartes inclinables : tilt.js regle l'angle ; ici, le halo qui suit le curseur. */
.tilt {
    position: relative;
    will-change: transform;
}

.tilt-light {
    position: absolute;
    inset: 0px;
    z-index: 1;
    border-radius: inherit;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--tilt-light), transparent 62%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}

.tilt.is-tilting > .tilt-light {
    opacity: 1;
}

:root {
    --tilt-light: rgba(99, 234, 211, 0.13);
}

:root[data-theme="light"] {
    --tilt-light: rgba(8, 124, 107, 0.1);
}

/* Sections qui se redressent en entrant dans l'ecran, comme si la camera
   avancait vers elles. Uniquement dans les navigateurs qui savent lier une
   animation au defilement ; ailleurs les sections apparaissent normalement. */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        /* Une section penchee depasse un peu sur les cotes : la page ne doit pas defiler en largeur. */
        html, body {
            overflow-x: clip;
        }

        .network, .technologies, .explore, .featured-work,
        .about-page .panel.section-space, .projects-section, .services-section {
            transform-origin: 50% 0%;
            animation: depth-in linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 70%;
        }
    }
}

@keyframes depth-in {
    from {
        opacity: 0.35;
        transform: perspective(1400px) rotateX(14deg) scale(0.94);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .availability-dot::after {
        animation: none;
    }

    .journey-node, .journey-card {
        transition: none;
    }

    .project-tile.is-entering > article, .project-preview[open], .project-preview::backdrop, .reach-copied span {
        animation: none;
    }
}

@media print {
    .network-stage, .terminal-form, .terminal-footer, .journey-svg {
        display: none;
    }

    .journey.is-live .journey-card {
        opacity: 1;
    }
}

/* About intro card: terminal style (approved mock A2) */
.intro-term {
    position: relative;
    padding: 0;
    overflow: hidden;
    background-color: #0f1729;
    background-image: linear-gradient(rgba(99, 234, 211, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(99, 234, 211, 0.045) 1px, transparent 1px);
    background-size: 28px 28px;
    border: 1px solid rgba(99, 234, 211, 0.28);
    box-shadow: 0 0 0 1px rgba(176, 160, 255, 0.08), 0 18px 60px rgba(0, 0, 0, 0.5), 0 0 50px rgba(99, 234, 211, 0.14);
}
.intro-term::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
    pointer-events: none;
}
.term-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #26334d;
    background: rgba(8, 13, 27, 0.8);
}
.term-bar i { width: 11px; height: 11px; border-radius: 3px; background: #35405d; }
.term-bar i:nth-child(1) { background: #63ead3; }
.term-bar i:nth-child(2) { background: #b0a0ff; }
.term-bar span { margin-left: 12px; font: 13px var(--font-mono); color: #97a8be; }
.term-bar b {
    margin-left: auto;
    font: 600 12px var(--font-mono);
    color: #080d1b;
    background: #32f5a2;
    border-radius: 999px;
    padding: 4px 10px;
}
.term-body { position: relative; padding: clamp(22px, 3vw, 34px); }
.term-cmd { font: 15px var(--font-mono); color: #63ead3; margin: 0 0 22px; }
.term-cmd span { color: #b0a0ff; }
.intro-term h2 { margin-bottom: 18px; }
.term-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.term-tags span {
    font: 500 13px var(--font-mono);
    color: #b0a0ff;
    border: 1px solid rgba(176, 160, 255, 0.4);
    border-radius: 6px;
    padding: 4px 9px;
}
.term-status {
    font: 16px/1.7 var(--font-mono);
    color: #a6b4cc;
    background: rgba(8, 13, 27, 0.6);
    border: 1px solid #26334d;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 0 0 22px;
}
.term-status b { color: #32f5a2; font-weight: 600; }
.intro-term .code-note { color: #63ead3; margin: 0; }

/* About: single intro card, left aligned (approved layout) */
.about-page .content-grid > .intro-term { grid-column: 1 / -1; width: 100%; max-width: 100%; }
.about-page .intro-term .term-body { text-align: left; }
.about-page .intro-term p, .about-page .intro-term h2 { text-align: left; margin-left: 0; margin-right: 0; }
.about-page .intro-term .term-tags { justify-content: flex-start; }
.about-page .intro-term .term-status { text-align: left; }
.about-page .intro-term .code-note { text-align: left; }

/* About: other experiences and CV, terminal style (approved mock S1) */
.exp-cmd { font: 15px var(--font-mono); color: #63ead3; margin: 0 0 16px; }
.exp-cmd span { color: #b0a0ff; }
.exp-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.exp-file {
    background: #0b1222;
    border: 1px solid #26334d;
    border-left: 3px solid #63ead3;
    border-radius: 8px;
    padding: 18px 20px;
}
.exp-file-alt { border-left-color: #b0a0ff; }
.exp-file-name { font: 600 13px var(--font-mono); color: #b0a0ff; margin: 0 0 8px; }
.exp-file h3 { margin: 0 0 8px; }
.exp-file p { margin: 0; color: #a6b4cc; }
.cv-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cv-row h2 { margin-bottom: 8px; }
.cv-cmd { font: 15px var(--font-mono); color: #a6b4cc; margin: 0 0 8px; }
.cv-btn {
    font: 600 15px var(--font-mono);
    color: #080d1b;
    background: #63ead3;
    border-radius: 8px;
    padding: 12px 18px;
    box-shadow: 0 0 22px rgba(99, 234, 211, 0.35);
    text-decoration: none;
    white-space: nowrap;
}
@media (max-width: 700px) { .exp-list { grid-template-columns: 1fr; } }

/* About: CV block text aligned left */
.about-page .cv-row > div { text-align: left; }
.about-page .cv-row h2, .about-page .cv-row p, .about-page .cv-row .cv-cmd { text-align: left; margin-left: 0; margin-right: 0; }

/* Skills: learning log and next steps as terminal output (approved mock N3) */
.term-log {
    background-color: #0f1729;
    background-image: linear-gradient(rgba(99, 234, 211, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(99, 234, 211, 0.045) 1px, transparent 1px);
    background-size: 28px 28px;
    border: 1px solid rgba(99, 234, 211, 0.28);
    box-shadow: 0 0 50px rgba(99, 234, 211, 0.12);
}
.term-out {
    font: 15px/1.8 var(--font-mono);
    color: #a6b4cc;
    background: rgba(8, 13, 27, 0.7);
    border: 1px solid #26334d;
    border-radius: 10px;
    padding: 18px 22px;
    margin-top: 20px;
}
.term-entry { margin-bottom: 18px; }
.term-entry:last-child { margin-bottom: 0; }
.term-entry p { margin: 0; font-family: Inter, sans-serif; font-size: 16px; line-height: 1.6; color: #a6b4cc; }
.term-entry p:first-child { font-family: var(--font-mono); font-size: 15px; }
.term-tag { color: #b0a0ff; }
.term-title { color: #edf3ff; font-weight: 600; }
.term-bar { color: #32f5a2; margin-left: 8px; }
.term-line { margin: 0 0 6px; }
.term-line:last-child { margin-bottom: 0; }
.term-ok { color: #32f5a2; }
.term-todo { color: #63ead3; }
.term-next { color: #63ead3; text-shadow: 0 0 10px rgba(99, 234, 211, 0.4); }

/* Skills: terminal log layout fix (left aligned, progress on its own line) */
.term-log, .term-log h2, .term-log .exp-cmd { text-align: left; }
.term-entry p.term-head { font-family: var(--font-mono); font-size: 15px; margin: 0 0 6px; }
.term-entry p.term-progress { font-family: var(--font-mono); font-size: 15px; margin: 0 0 8px; color: #32f5a2; }
.term-bar { color: #32f5a2; margin-left: 0; letter-spacing: 0; }
.term-pct { color: #63ead3; margin-left: 12px; }
.term-entry p:not(.term-head):not(.term-progress) { text-align: left; }

/* Skills: light point before each step */
.term-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #63ead3; box-shadow: 0 0 10px rgba(99, 234, 211, 0.8); margin-right: 10px; vertical-align: middle; position: relative; top: -1px; }

/* Skills: progress bars that fill from empty to full, across the whole line */
.term-track {
    position: relative;
    display: inline-block;
    width: min(320px, 70%);
    height: 14px;
    vertical-align: middle;
    background: #08101f;
    border: 1px solid #26334d;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
}
.term-track::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), #08101f calc(10% - 2px) 10%);
    pointer-events: none;
}
.term-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(90deg, #32f5a2, #63ead3);
    box-shadow: 0 0 14px rgba(50, 245, 162, 0.7);
}
@media (prefers-reduced-motion: no-preference) {
    .term-fill { transform-origin: left center; animation: term-fill-grow 1.8s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
    .term-entry:nth-child(1) .term-fill { animation-delay: 0.2s; }
    .term-entry:nth-child(2) .term-fill { animation-delay: 0.7s; }
    .term-entry:nth-child(3) .term-fill { animation-delay: 1.2s; }
    .term-line .term-fill { animation: none; }
}
@keyframes term-fill-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Skills: aligned checkboxes, the X pops in when a goal is done */
.term-box { display: inline-block; width: 3ch; margin-right: 12px; text-align: center; font-family: var(--font-mono); white-space: pre; }
.term-box::before { content: "["; color: #63ead3; }
.term-box::after { content: "]"; color: #63ead3; }
.term-box.term-done::before, .term-box.term-done::after { color: #32f5a2; }
.term-mark { display: inline-block; color: #32f5a2; font-weight: 600; }
.term-done .term-mark { text-shadow: 0 0 10px rgba(50, 245, 162, 0.7); }
@media (prefers-reduced-motion: no-preference) {
    .term-done .term-mark { animation: term-x-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
    .term-line:nth-child(1) .term-mark { animation-delay: 0.4s; }
    .term-line:nth-child(2) .term-mark { animation-delay: 1s; }
}
@keyframes term-x-pop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Skills: the three goal lines type in from left to right */
@media (prefers-reduced-motion: no-preference) {
    .term-log .term-line { animation: term-line-reveal 1.1s steps(28, end) both; }
    .term-log .term-line:nth-child(1) { animation-delay: 0.1s; }
    .term-log .term-line:nth-child(2) { animation-delay: 0.9s; }
    .term-log .term-line:nth-child(3) { animation-delay: 1.7s; }
}
@keyframes term-line-reveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

/* LIGHT MODE FIXES
   1. The header tools (search, language, theme) sit on the right of the nav on wide screens: keep the nav clear of them. */
@media (min-width: 1000px) {
    header { padding-right: 360px; }
}

/* 2. Dark terminal panels keep a dark background in light mode, so their text needs light colours. */
:root[data-theme="light"] .intro-term { color: #a6b4cc; }
:root[data-theme="light"] .intro-term h2 { color: #edf3ff; }
:root[data-theme="light"] .intro-term .code-note { color: #63ead3; }
:root[data-theme="light"] .intro-term .term-cmd { color: #63ead3; }
:root[data-theme="light"] .intro-term .term-cmd span { color: #b0a0ff; }
:root[data-theme="light"] .exp-file h3 { color: #edf3ff; }
:root[data-theme="light"] .exp-file p { color: #a6b4cc; }
:root[data-theme="light"] .term-log { color: #a6b4cc; }
:root[data-theme="light"] .term-log h2 { color: #edf3ff; }
:root[data-theme="light"] .term-log .exp-cmd { color: #63ead3; }
:root[data-theme="light"] .term-log .exp-cmd span { color: #b0a0ff; }
:root[data-theme="light"] .term-title { color: #edf3ff; }
:root[data-theme="light"] .term-entry p { color: #a6b4cc; }
:root[data-theme="light"] .term-line { color: #a6b4cc; }
:root[data-theme="light"] .intro-term p,
:root[data-theme="light"] .exp-file p,
:root[data-theme="light"] .term-entry p,
:root[data-theme="light"] .term-line { color: #c5d1e4; }
:root[data-theme="light"] .term-entry p:first-child { color: #edf3ff; }

/* LIGHT MODE: terminal panels become light cards with dark text, so the code blocks match the page. */
:root[data-theme="light"] .intro-term,
:root[data-theme="light"] .term-log {
    background-color: #ffffff;
    background-image: linear-gradient(rgba(11, 122, 102, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 122, 102, 0.05) 1px, transparent 1px);
    border: 1px solid #cfd9e6;
    box-shadow: 0 18px 50px rgba(20, 40, 70, 0.10);
}
:root[data-theme="light"] .intro-term::after { background: none; }
:root[data-theme="light"] .term-bar {
    background: #f1f5fa;
    border-bottom: 1px solid #dbe3ee;
}
:root[data-theme="light"] .term-bar i { background: #c9d4e3; }
:root[data-theme="light"] .term-bar i:nth-child(1) { background: #0b7a66; }
:root[data-theme="light"] .term-bar i:nth-child(2) { background: #5b4bc4; }
:root[data-theme="light"] .term-bar span { color: #5a6b84; }
:root[data-theme="light"] .term-bar b { color: #0a6e5b; background: #d9f5ee; border-color: #9fdfcd; }
:root[data-theme="light"] .intro-term h2,
:root[data-theme="light"] .term-log h2,
:root[data-theme="light"] .exp-file h3,
:root[data-theme="light"] .term-title,
:root[data-theme="light"] .term-entry p:first-child { color: #15202f; }
:root[data-theme="light"] .intro-term p,
:root[data-theme="light"] .term-log p,
:root[data-theme="light"] .exp-file p,
:root[data-theme="light"] .term-entry p,
:root[data-theme="light"] .term-line { color: #3d4b60; }
:root[data-theme="light"] .intro-term .term-cmd,
:root[data-theme="light"] .term-log .exp-cmd,
:root[data-theme="light"] .intro-term .code-note,
:root[data-theme="light"] .term-todo,
:root[data-theme="light"] .term-next { color: #0b7a66; text-shadow: none; }
:root[data-theme="light"] .intro-term .term-cmd span,
:root[data-theme="light"] .term-log .exp-cmd span,
:root[data-theme="light"] .exp-file-name,
:root[data-theme="light"] .term-tags span,
:root[data-theme="light"] .term-tag { color: #5b4bc4; }
:root[data-theme="light"] .term-tags span { border-color: rgba(91, 75, 196, 0.35); background: #f3f0ff; }
:root[data-theme="light"] .term-status {
    background: #f4f7fb;
    border-color: #dbe3ee;
    color: #3d4b60;
}
:root[data-theme="light"] .term-status b,
:root[data-theme="light"] .term-ok,
:root[data-theme="light"] .term-done .term-mark,
:root[data-theme="light"] .term-box.term-done::before,
:root[data-theme="light"] .term-box.term-done::after { color: #0a7d55; text-shadow: none; }
:root[data-theme="light"] .term-box::before,
:root[data-theme="light"] .term-box::after { color: #0b7a66; }
:root[data-theme="light"] .term-dot { background: #0b7a66; box-shadow: none; }
:root[data-theme="light"] .term-bar { color: #0b7a66; }
:root[data-theme="light"] .term-pct { color: #0a6e5b; }
:root[data-theme="light"] .term-progress { color: #0a7d55; }
:root[data-theme="light"] .term-out {
    background: #f4f7fb;
    border-color: #dbe3ee;
    color: #3d4b60;
}
:root[data-theme="light"] .exp-file {
    background: #f4f7fb;
    border: 1px solid #dbe3ee;
    border-left: 3px solid #0b7a66;
}
:root[data-theme="light"] .exp-file-alt { border-left-color: #5b4bc4; }
:root[data-theme="light"] .term-track { background: #e6edf5; border-color: #cfd9e6; box-shadow: none; }
:root[data-theme="light"] .term-track::after { background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), #ffffff calc(10% - 2px) 10%); }
:root[data-theme="light"] .term-fill { background: linear-gradient(90deg, #0b7a66, #1fa98c); box-shadow: none; }
:root[data-theme="light"] .term-entry p.term-progress { color: #0a7d55; }

/* LIGHT MODE, option A "soft cards": white cards, soft shadow, stronger contrast */
:root[data-theme="light"] .service-card,
:root[data-theme="light"] section.skill-group,
:root[data-theme="light"] .journey-card {
    background: #ffffff;
    border: 1px solid #c9d4e3;
    box-shadow: 0 6px 18px rgba(20, 40, 70, 0.08);
}
:root[data-theme="light"] .exp-cmd { color: #0a6e5b; }
:root[data-theme="light"] .exp-cmd span { color: #5b4bc4; }
:root[data-theme="light"] .filter-count { background: #d9f5ee; color: #0a6e5b; }
:root[data-theme="light"] .project-filters button[aria-pressed="true"] .filter-count { background: #0a6e5b; color: #ffffff; }
:root[data-theme="light"] .tile-status.is-progress { background: #fff3d1; color: #7a4d00; border-color: #e0b44a; }

/* PREVIEW LINKS (project dialogs) */
.preview-links { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.preview-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #0b7a66;
    color: #0b7a66;
    font: 600 14px var(--font-mono);
    text-decoration: none;
}
.preview-link:hover { background: #0b7a66; color: #ffffff; }
:root:not([data-theme="light"]) .preview-link { color: #63ead3; border-color: #63ead3; }
:root:not([data-theme="light"]) .preview-link:hover { background: #63ead3; color: #0a1020; }
