/* ═══════════════════════════════════════════════════════
   NAZIM HAMIA — DevSecOps Portfolio  v4.0
   Thème : Blanc/Vert (light) · Noir/Blanc (dark)
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── THÈME CLAIR ────────────────────────────────────── */
:root,
[data-theme="light"] {
    --bg: #ffffff;
    --bg-off: #f4faf7;
    --bg-card: #ffffff;
    --bg-card-hov: #f8fdfb;
    --bg-subtle: #edf8f2;

    --green: #16a85a;
    --green-dark: #0d8848;
    --green-light: #c8f0dc;
    --green-xlight: #edf8f2;

    --line: rgba(22, 168, 90, 0.14);
    --line-gray: #e4e9ee;

    --text: #0c1b2b;
    --text-2: #4a5e70;
    --text-dim: #94a3b8;

    --funnel-line: rgba(22, 168, 90, 0.4);
    --funnel-fill: rgba(22, 168, 90, 0.09);

    --console-bg: #0c1b2b;
    --console-cmd: #4ade80;
    --console-txt: rgba(255, 255, 255, 0.65);

    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.10);
    --shadow-green: 0 4px 24px rgba(22, 168, 90, 0.25);

    --pattern-1: rgba(75, 85, 99, 0.08);
    --pattern-2: rgba(107, 114, 128, 0.06);
    --pattern-3: rgba(55, 65, 81, 0.05);
    --pattern-4: rgba(31, 41, 55, 0.04);
}

/* ─── THÈME SOMBRE ───────────────────────────────────── */
[data-theme="dark"] {
    --bg: #0a0f1a;
    --bg-off: #0f1622;
    --bg-card: rgba(15, 24, 40, 0.8);
    --bg-card-hov: rgba(20, 32, 55, 0.9);
    --bg-subtle: rgba(22, 168, 90, 0.08);

    --green: #22d97a;
    --green-dark: #16a85a;
    --green-light: rgba(34, 217, 122, 0.2);
    --green-xlight: rgba(34, 217, 122, 0.08);

    --line: rgba(34, 217, 122, 0.15);
    --line-gray: rgba(255, 255, 255, 0.1);

    --text: #e8f4ff;
    --text-2: #8ba4c0;
    --text-dim: #4a6070;

    --funnel-line: rgba(34, 217, 122, 0.35);
    --funnel-fill: rgba(34, 217, 122, 0.07);

    --console-bg: #060c14;
    --console-cmd: #22d97a;
    --console-txt: rgba(255, 255, 255, 0.55);

    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
    --shadow-green: 0 4px 24px rgba(34, 217, 122, 0.2);

    --pattern-1: rgba(255, 255, 255, 0.035);
    --pattern-2: rgba(255, 255, 255, 0.025);
    --pattern-3: rgba(255, 255, 255, 0.02);
    --pattern-4: rgba(255, 255, 255, 0.015);
}

/* ─── VARIABLES FIXES ────────────────────────────────── */
:root {
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;
    --header-h: 68px;
    --font-body: 'Inter', sans-serif;
    --font-display: 'Syne', sans-serif;
    --font-clash: 'Clash Display', 'Space Grotesk', 'Syne', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --dur-fast: 150ms;
    --dur-med: 260ms;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* On retire la transition de base sur ces propriétés pour laisser place à la View Transition API */
}

/* ─── ANIMATION CHANGEMENT DE THEME (View Transitions API) ─── */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 999;
}

body::before {
    content: '';
    position: fixed;
    /* On agrandit l'élément pour que l'animation ne laisse pas de vide */
    top: -50%;
    left: 0;
    right: 0;
    bottom: -50%;
    z-index: -1;
    pointer-events: none;
    /* Motifs agrandis (~x1.5) */
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 30px, var(--pattern-1) 30px, var(--pattern-1) 32px),
        repeating-linear-gradient(90deg, transparent, transparent 45px, var(--pattern-2) 45px, var(--pattern-2) 47px),
        repeating-linear-gradient(60deg, transparent, transparent 60px, var(--pattern-3) 60px, var(--pattern-3) 62px),
        repeating-linear-gradient(150deg, transparent, transparent 52px, var(--pattern-4) 52px, var(--pattern-4) 54px);

    /* Animation infinie de haut en bas */
    animation: movePattern 25s linear infinite alternate;

    /* Dégradé pour estomper vers le bas : complètement visible en haut, invisible (uni) en bas */
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
}

@keyframes movePattern {
    0% {
        transform: translateY(-5%);
    }

    100% {
        transform: translateY(5%);
    }
}

section {
    scroll-margin-top: calc(var(--header-h)+20px)
}

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

ul {
    list-style: none
}

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

strong {
    font-weight: 600
}

/* ─── SVG FUNNEL (cascade) ──────────────── */
.funnel-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
    overflow: hidden;
    height: 780px;
    pointer-events: none;
}

.funnel-svg {
    width: 100%;
    height: 100%;
}

/* Styles SVG retirés pour laisser le dégradé défini dans le HTML s'appliquer */

/* ─── LAYOUT ─────────────────────────────────────────── */
.container {
    width: min(1180px, 100% - 2.5rem);
    margin-inline: auto;
}

.section {
    padding: 5.5rem 0 0
}

.section-head {
    margin-bottom: 2.4rem
}

/* ─── SECTION KICKER ─────────────────────────────────── */
.section-kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.section-kicker::before {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--green);
    border-radius: 2px;
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text);
}

/* ─── HEADER ─────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    /* Initialement transparent sans flou ni bordure pour se fondre avec le pattern */
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background var(--dur-med) var(--ease),
        box-shadow var(--dur-med) var(--ease),
        border-color var(--dur-med) var(--ease),
        backdrop-filter var(--dur-med) var(--ease),
        -webkit-backdrop-filter var(--dur-med) var(--ease);
}

[data-theme="dark"] .site-header {
    background: transparent;
}

/* Apparence de la navbar UNE FOIS le scroll activé */
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    border-bottom: 1px solid var(--line-gray);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .site-header.scrolled {
    background: rgba(10, 15, 26, 0.88);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.navbar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand {
    font-family: var(--font-clash);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
}

.brand span {
    color: var(--green)
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.1rem
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 0.42rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: color var(--dur-fast) var(--ease),
        background var(--dur-fast) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--bg-subtle)
}

.nav-links a.active.nav-cta {
    background: var(--green);
    color: #fff !important;
}

.nav-links .nav-cta {
    background: var(--green);
    color: #fff !important;
    border-radius: var(--radius-pill);
    padding: 0.45rem 1.05rem;
    font-weight: 600;
    transition: background var(--dur-fast) var(--ease),
        box-shadow var(--dur-fast) var(--ease);
}

.nav-links .nav-cta:hover {
    background: var(--green-dark);
    box-shadow: var(--shadow-green)
}

/* ─── THEME TOGGLE ───────────────────────────────────── */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-gray);
    background: var(--bg-off);
    color: var(--text-2);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all var(--dur-med) var(--ease);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-xlight);
}

/* mobile toggle */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-gray);
    background: var(--bg);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle span {
    width: 20px;
    height: 1.5px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--dur-med) var(--ease);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── HERO WRAPPER ───────────────────────────────────── */
.hero-wrap {
    position: relative;
    padding-top: 0;
}

/* ─── HERO CENTER (titre centré) ─────────────────────── */
.hero-center {
    text-align: center;
    padding-top: 5rem;
    padding-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.hero-center .hero-actions {
    justify-content: center;
}

/* ─── EYEBROW ────────────────────────────────────────── */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--green);
    background: var(--green-xlight);
    border: 1px solid rgba(22, 168, 90, 0.25);
    border-radius: var(--radius-pill);
    padding: 0.32rem 0.9rem;
    margin-bottom: 1.4rem;
}

.eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-dot 2.2s ease-in-out infinite;
}

/* ─── H1 HERO ────────────────────────────────────────── */
.hero-center h1 {
    font-family: var(--font-clash);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 1.2rem;
    color: var(--text);
}

.name-accent {
    color: var(--green)
}

.name-space {
    margin-left: 0.15em;
}


.lead {
    font-size: 1.05rem;
    color: var(--text-2);
    max-width: 55ch;
    margin: 0 auto 0;
    line-height: 1.78;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 1.8rem 0 0;
}

/* ─── HERO BOTTOM (2 colonnes) ───────────────────────── */
.hero-bottom {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
    align-items: start;
    padding-bottom: 4rem;
    position: relative;
    z-index: 1;
}

/* ─── PHOTO AVEC ORBITE ──────────────────────────────── */
.hero-photo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    position: relative;
}

.photo-orbit-container {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 3.5rem 0 2rem;
    /* Réduit pour orbite de 360px */
    z-index: 1;
}

/* L'anneau orbital qui tourne */
.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 2px dashed rgba(22, 168, 90, 0.3);
    animation: orbit-spin 14s linear infinite;
    pointer-events: none;
}

.orbit-ring::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(22, 168, 90, 0.2), 0 0 16px rgba(22, 168, 90, 0.6);
}

@keyframes orbit-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg)
    }
}

/* Cercle photo */
.photo-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bg);
    box-shadow:
        0 0 0 3px var(--green-light),
        var(--shadow-lg);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: box-shadow var(--dur-med) var(--ease);
}

.photo-circle:hover {
    box-shadow:
        0 0 0 5px var(--green-light),
        var(--shadow-green),
        var(--shadow-lg);
}

.photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.93) contrast(1.04);
}

/* Signal et tags sous la photo */
.signal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-2);
    background: var(--bg-card);
    border: 1px solid var(--line-gray);
    border-radius: var(--radius-pill);
    padding: 0.38rem 0.85rem;
    box-shadow: var(--shadow-sm);
    margin-top: 2.5rem;
    /* Éloigne BEAUCOUP le badge de l'orbite (précédemment 2rem) */
}

.signal .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(22, 168, 90, 0.18);
    animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(22, 168, 90, 0.18)
    }

    50% {
        box-shadow: 0 0 0 8px rgba(22, 168, 90, 0.06)
    }
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.hero-tags li {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(22, 168, 90, 0.08);
    border: 1px solid rgba(22, 168, 90, 0.2);
    color: var(--text);
    font-weight: 500;
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
    transition: all var(--dur-fast) var(--ease);
}

.hero-tags li:hover {
    background: rgba(22, 168, 90, 0.15);
    border-color: rgba(22, 168, 90, 0.4);
    transform: translateY(-2px);
}

.hero-tags li i {
    color: var(--green);
    font-size: 0.8rem;
}

/* ─── HERO ASIDE (droite) ────────────────────────────── */
.hero-aside {
    display: grid;
    gap: 1rem
}

.hero-profile-text p {
    color: var(--text-2);
    font-size: 0.93rem;
    line-height: 1.8;
    background: var(--bg-card);
    border: 1px solid var(--line-gray);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-sm);
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--dur-med) var(--ease);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--green);
    color: #fff;
    box-shadow: var(--shadow-green);
}

.btn-primary:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(22, 168, 90, 0.38);
}

.btn-ghost {
    background: var(--bg);
    border-color: var(--line-gray);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--green);
    background: var(--green-xlight);
    transform: translateY(-2px);
}

/* ─── QUICK STATS ────────────────────────────────────── */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.quick-stats article {
    background: var(--bg-card);
    border: 1px solid var(--line-gray);
    border-radius: var(--radius-md);
    padding: 0.9rem 0.75rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--dur-med) var(--ease);
}

.quick-stats article:hover {
    border-color: rgba(22, 168, 90, 0.4);
    box-shadow: var(--shadow-green);
    transform: translateY(-2px);
}

.quick-stats h2 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--green);
}

.quick-stats p {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.2rem;
    line-height: 1.35
}

/* ─── OPS CONSOLE ────────────────────────────────────── */
.ops-console {
    background: var(--console-bg);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    position: relative;
    overflow: hidden;
    font-family: var(--font-mono);
    box-shadow: var(--shadow-md);
}

.ops-console::before {
    content: '● ● ●';
    display: block;
    font-size: 0.55rem;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.22);
    margin-bottom: 0.65rem;
}

.ops-console::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(22, 168, 90, 0.9), transparent);
    animation: scanline 5s linear infinite;
}

@keyframes scanline {
    to {
        left: 120%
    }
}

.console-title {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.7rem;
}

.ops-console ul {
    display: grid;
    gap: 0.5rem
}

.ops-console li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding-bottom: 0.42rem;
}

.ops-console li:last-child {
    border-bottom: none;
    padding-bottom: 0
}

.ops-console span {
    font-size: 0.7rem;
    color: var(--console-cmd)
}

.ops-console strong {
    font-size: 0.75rem;
    color: var(--console-txt);
    font-weight: 400
}

/* ─── GENERIC CARDS ──────────────────────────────────── */
.card,
.skill-card,
.project-card,
.timeline-item,
.workflow-step {
    background: var(--bg-card);
    border: 1px solid var(--line-gray);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--dur-med) var(--ease);
}

.card:hover,
.skill-card:hover,
.project-card:hover,
.workflow-step:hover {
    border-color: rgba(22, 168, 90, 0.3);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(22, 168, 90, 0.1);
    transform: translateY(-3px);
}

.card h3,
.skill-card h3,
.project-card h3,
.timeline-item h3,
.workflow-step h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
    color: var(--text);
}

.card p,
.card li,
.skill-card p,
.project-card p,
.timeline-item p,
.workflow-step p {
    color: var(--text-2);
    font-size: 0.9rem;
    line-height: 1.75;
}

.card ul,
.cert-list {
    display: grid;
    gap: 0.55rem
}

.card li {
    position: relative;
    padding-left: 1.1rem
}

.card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.68rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
}

/* ─── CHIPS ──────────────────────────────────────────── */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.85rem
}

.chips span {
    display: inline-block;
    border: 1px solid rgba(22, 168, 90, 0.25);
    background: var(--green-xlight);
    color: var(--green-dark);
    border-radius: var(--radius-pill);
    padding: 0.22rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 500;
    transition: all var(--dur-fast) var(--ease);
}

.chips span:hover {
    background: var(--green-light);
    border-color: rgba(22, 168, 90, 0.5)
}

/* ─── GRIDS ──────────────────────────────────────────── */
.profile-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.workflow-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(4, minmax(0, 1fr))
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.edu-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

/* ─── WORKFLOW ───────────────────────────────────────── */
.workflow-step {
    position: relative;
    overflow: hidden
}

.workflow-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), #4ade80);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-med) var(--ease);
}

.workflow-step:hover::before {
    transform: scaleX(1)
}

.step-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--green-xlight);
    border: 1px solid rgba(22, 168, 90, 0.25);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--green);
    margin-bottom: 0.8rem;
}

/* ─── TIMELINE ───────────────────────────────────────── */
.timeline {
    position: relative;
    display: grid;
    gap: 1.2rem
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 22px;
    bottom: 22px;
    width: 2px;
    background: linear-gradient(to bottom, var(--green), rgba(22, 168, 90, 0.1));
}

.timeline-item {
    padding-left: 2.5rem;
    position: relative
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 22px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid var(--green);
    background: var(--bg);
    box-shadow: 0 0 0 4px rgba(22, 168, 90, 0.12);
    transition: box-shadow var(--dur-med) var(--ease);
}

.timeline-item:hover::before {
    box-shadow: 0 0 0 6px rgba(22, 168, 90, 0.2)
}

.timeline-item .date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.3rem;
}

/* ─── PROJECTS ───────────────────────────────────────── */
.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem
}

.project-card p {
    flex: 1
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.2rem
}

.project-top a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-gray);
    color: var(--text-dim);
    font-size: 0.95rem;
    transition: all var(--dur-fast) var(--ease);
    flex-shrink: 0;
}

.project-top a:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-xlight)
}

/* ─── EDUCATION ──────────────────────────────────────── */
.cert-list a {
    color: var(--green-dark);
    text-decoration: underline;
    text-decoration-color: rgba(22, 168, 90, 0.35);
    text-underline-offset: 3px;
    transition: all var(--dur-fast) var(--ease);
}

.cert-list a:hover {
    color: var(--green);
    text-decoration-color: var(--green)
}

/* ─── CONTACT ────────────────────────────────────────── */
.contact-box {
    background: var(--bg-card);
    border: 1px solid var(--line-gray);
    border-radius: var(--radius-xl);
    padding: 2.8rem;
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    margin-bottom: 5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.contact-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), #4ade80);
}

.contact-box::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(22, 168, 90, 0.05);
    pointer-events: none;
}

.contact-box h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.contact-box>div:first-child>p {
    color: var(--text-2);
    font-size: 0.93rem
}

/* ─── FORMULAIRE CONTACT ─────────────────────────────── */
.contact-form {
    display: grid;
    gap: 1rem
}

.form-group {
    display: grid;
    gap: 0.4rem
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em
}

.form-group input,
.form-group textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg-off);
    border: 1.5px solid var(--line-gray);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.95rem;
    outline: none;
    transition: border-color var(--dur-fast) var(--ease),
        box-shadow var(--dur-fast) var(--ease),
        background var(--dur-fast) var(--ease);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--green);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(22, 168, 90, 0.12);
}

.form-group textarea {
    min-height: 130px
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim)
}

.btn-submit {
    background: var(--green);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-green);
    transition: all var(--dur-med) var(--ease);
    width: 100%;
    justify-content: center;
}

.btn-submit:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(22, 168, 90, 0.38)
}

.success-msg {
    display: none;
    background: var(--green-xlight);
    border: 1.5px solid rgba(22, 168, 90, 0.35);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    color: var(--green-dark);
    font-weight: 500;
    font-size: 0.9rem;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.success-msg i {
    font-size: 1.1rem
}

/* ─── POPUP NOTIFICATION ───────────────────────────── */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--bg-card);
    border: 1px solid var(--line-gray);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    text-align: center;
    max-width: 380px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-content.show {
    transform: scale(1) translateY(0);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
}

.popup-close:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.popup-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.8rem;
}

.popup-icon.success {
    background: rgba(22, 168, 90, 0.15);
    color: #16a85a;
}

.popup-icon.error {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.popup-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 0.5rem;
}

.popup-message {
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* ─── FOOTER ─────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--line-gray);
    padding: 1.5rem 1rem 2rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

/* ─── REVEAL ─────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 560ms var(--ease), transform 560ms var(--ease)
}

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

/* stagger */
.profile-grid .reveal:nth-child(2),
.workflow-grid .reveal:nth-child(2),
.skills-grid .reveal:nth-child(2),
.projects-grid .reveal:nth-child(2),
.edu-grid .reveal:nth-child(2) {
    transition-delay: 80ms
}

.profile-grid .reveal:nth-child(3),
.workflow-grid .reveal:nth-child(3),
.skills-grid .reveal:nth-child(3),
.projects-grid .reveal:nth-child(3) {
    transition-delay: 160ms
}

.workflow-grid .reveal:nth-child(4),
.projects-grid .reveal:nth-child(4) {
    transition-delay: 240ms
}

/* ─── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px
}

::-webkit-scrollbar-track {
    background: var(--bg-off)
}

::-webkit-scrollbar-thumb {
    background: rgba(22, 168, 90, 0.35);
    border-radius: 999px
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green)
}

/* ─── SELECTION ──────────────────────────────────────── */
::selection {
    background: rgba(22, 168, 90, 0.2);
    color: var(--text)
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */
@media(max-width:1100px) {
    .hero-bottom {
        grid-template-columns: 1fr;
        gap: 2rem
    }

    .hero-photo-wrap {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center
    }

    .orbit-ring {
        width: 280px;
        height: 280px
    }

    .workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media(max-width:900px) {
    .nav-right {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-left: auto;
    }

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

    .theme-toggle {
        position: absolute;
        left: 50%;
        top: 15px;
        transform: translateX(-50%);
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100dvh;
        border-radius: 0;
        border: none;
        background: #ffffff !important;
        padding: 6rem 1.5rem 2rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        transform: translateY(-100%);
        transform-origin: top;
        opacity: 0;
        pointer-events: none;
        transition: transform 450ms cubic-bezier(0.4, 0, 0.2, 1), opacity 350ms ease;
        box-shadow: none;
        z-index: 999;
    }

    [data-theme="light"] .nav-links {
        background: #ffffff !important;
    }

    [data-theme="dark"] .nav-links {
        background: #0a0f1a !important;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 300ms ease 100ms, transform 300ms ease 100ms;
    }

    .nav-links.open li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.open li:nth-child(1) {
        transition-delay: 50ms;
    }

    .nav-links.open li:nth-child(2) {
        transition-delay: 100ms;
    }

    .nav-links.open li:nth-child(3) {
        transition-delay: 150ms;
    }

    .nav-links.open li:nth-child(4) {
        transition-delay: 200ms;
    }

    .nav-links.open li:nth-child(5) {
        transition-delay: 250ms;
    }

    .nav-links.open li:nth-child(6) {
        transition-delay: 300ms;
    }

    .nav-links.open li:nth-child(7) {
        transition-delay: 350ms;
    }

    .nav-links a {
        display: block;
        padding: 1rem 1.2rem;
        font-size: 1.1rem;
        border-radius: var(--radius-md);
        color: var(--text);
    }

    .nav-links .nav-cta {
        text-align: center;
        margin-top: 0.5rem;
        background: var(--green);
        color: #fff !important;
    }

    .skills-grid,
    .workflow-grid,
    .projects-grid,
    .edu-grid,
    .profile-grid {
        grid-template-columns: 1fr
    }

    .quick-stats {
        grid-template-columns: repeat(3, 1fr)
    }

    .contact-box {
        grid-template-columns: 1fr;
        padding: 1.75rem
    }
}

@media(max-width:600px) {
    .section {
        padding-top: 4rem
    }

    .hero-center {
        padding-top: 3.5rem;
        padding-bottom: 2rem
    }

    .hero-center h1 {
        font-size: clamp(2.2rem, 8vw, 3rem);
    }

    .hero-bottom {
        padding-bottom: 2.5rem
    }

    .hero-tags {
        justify-content: flex-start
    }

    .btn {
        width: 100%;
        justify-content: center
    }

    .hero-actions {
        width: 100%;
        flex-direction: column
    }

    .timeline-item {
        padding-left: 2rem
    }

    .contact-box {
        padding: 1.4rem;
        margin-bottom: 3rem
    }

    .quick-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        text-align: center;
    }

    .photo-orbit-container {
        margin: 2.5rem 0 1rem;
        transform: scale(0.9);
    }

    .orbit-ring {
        width: 240px;
        height: 240px
    }

    .photo-circle {
        width: 180px;
        height: 180px
    }
}