:root {
    /* Brand — invariant entre thèmes */
    --blue: #1180ff;
    --cyan: #00c8f8;
    --violet: #a855f7;

    /* Light theme (par défaut) */
    --bg-page: #FAFAFF;
    --bg-section-dark: #0D1B2A;
    --surface: #FFFFFF;
    --surface-translucent: rgba(255, 255, 255, 0.85);
    --surface-on-dark: rgba(255, 255, 255, 0.05);
    --surface-on-dark-strong: rgba(255, 255, 255, 0.08);
    --paper: #fefdfb;
    --paper-text-strong: #1a1a1a;
    --paper-text: #555;
    --paper-text-muted: #888;
    --paper-text-faint: #999;
    --paper-line: rgba(0, 0, 0, 0.01);

    --text-strong: #0D1B2A;
    --text-muted: #4A5568;
    --text-on-dark: #E0E7FF;
    --text-on-dark-muted: rgba(224, 231, 255, 0.7);
    --text-on-dark-soft: rgba(224, 231, 255, 0.8);

    --border-card: #e5e7eb;
    --border-light: #f0f0f0;
    --border-subtle-blue: rgba(17, 128, 255, 0.1);
    --border-on-dark: rgba(160, 102, 211, 0.2);

    --header-bg: rgba(250, 250, 255, 0.95);
    --header-bg-scrolled: rgba(250, 250, 255, 0.98);
    --header-border: rgba(17, 128, 255, 0.1);
    --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --mobile-menu-bg: rgba(250, 250, 255, 0.98);
    --mobile-menu-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

    --grid-square: #f8f9ff;
    --grid-line: rgba(17, 128, 255, 0.05);

    --kicad-bg: #ffffff;
    --kicad-text: #000000;
    --kicad-border: #000000;

    --progress-track: rgba(255, 255, 255, 0.1);
    --shine: rgba(255, 255, 255, 0.3);

    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --diploma-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1), 0 16px 32px rgba(0,0,0,0.1);
    --diploma-shadow-hover: 0 4px 8px rgba(0,0,0,0.15), 0 12px 24px rgba(0,0,0,0.15), 0 24px 48px rgba(0,0,0,0.15);

    --footer-bg: #0D1B2A;
    --footer-text: #ffffff;

    /* Aliases rétrocompatibles — n'utilisez pas dans le nouveau code */
    --bg-light: var(--bg-page);
    --bg-white: var(--surface);
    --bg-dark: var(--bg-section-dark);
    --text-dark: var(--text-strong);
    --text-gray: var(--text-muted);
    --text-light: var(--text-on-dark);

    color-scheme: light;
}

/* ================================================================
   DARK THEME
   ================================================================ */
[data-theme="dark"] {
    --bg-page: #0a1018;
    --bg-section-dark: #050a12;
    --surface: #131c2a;
    --surface-translucent: rgba(19, 28, 42, 0.85);
    --surface-on-dark: rgba(255, 255, 255, 0.04);
    --surface-on-dark-strong: rgba(255, 255, 255, 0.07);
    --paper: #1a2434;
    --paper-text-strong: #E0E7FF;
    --paper-text: rgba(224, 231, 255, 0.75);
    --paper-text-muted: rgba(224, 231, 255, 0.55);
    --paper-text-faint: rgba(224, 231, 255, 0.4);
    --paper-line: rgba(255, 255, 255, 0.025);

    --text-strong: #E0E7FF;
    --text-muted: #94a3b8;
    --text-on-dark: #E0E7FF;
    --text-on-dark-muted: rgba(224, 231, 255, 0.65);
    --text-on-dark-soft: rgba(224, 231, 255, 0.78);

    --border-card: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.06);
    --border-subtle-blue: rgba(17, 128, 255, 0.18);
    --border-on-dark: rgba(160, 102, 211, 0.22);

    --header-bg: rgba(10, 16, 24, 0.85);
    --header-bg-scrolled: rgba(10, 16, 24, 0.96);
    --header-border: rgba(17, 128, 255, 0.18);
    --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --mobile-menu-bg: rgba(10, 16, 24, 0.98);
    --mobile-menu-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    --grid-square: #0e1622;
    --grid-line: rgba(17, 128, 255, 0.05);

    --kicad-bg: #0e1622;
    --kicad-text: #93c5fd;
    --kicad-border: #93c5fd;

    --progress-track: rgba(255, 255, 255, 0.08);
    --shine: rgba(255, 255, 255, 0.2);

    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.55);
    --diploma-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 8px 16px rgba(0,0,0,0.45), 0 16px 32px rgba(0,0,0,0.5);
    --diploma-shadow-hover: 0 4px 8px rgba(0,0,0,0.5), 0 12px 24px rgba(0,0,0,0.55), 0 24px 48px rgba(0,0,0,0.6);

    --footer-bg: #050a12;
    --footer-text: #E0E7FF;

    color-scheme: dark;
}

/* Respect du thème système si aucune préférence enregistrée */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]):not([data-theme="dark"]) {
        --bg-page: #0a1018;
        --bg-section-dark: #050a12;
        --surface: #131c2a;
        --surface-translucent: rgba(19, 28, 42, 0.85);
        --surface-on-dark: rgba(255, 255, 255, 0.04);
        --surface-on-dark-strong: rgba(255, 255, 255, 0.07);
        --paper: #1a2434;
        --paper-text-strong: #E0E7FF;
        --paper-text: rgba(224, 231, 255, 0.75);
        --paper-text-muted: rgba(224, 231, 255, 0.55);
        --paper-text-faint: rgba(224, 231, 255, 0.4);
        --paper-line: rgba(255, 255, 255, 0.025);

        --text-strong: #E0E7FF;
        --text-muted: #94a3b8;
        --text-on-dark: #E0E7FF;
        --text-on-dark-muted: rgba(224, 231, 255, 0.65);
        --text-on-dark-soft: rgba(224, 231, 255, 0.78);

        --border-card: rgba(255, 255, 255, 0.08);
        --border-light: rgba(255, 255, 255, 0.06);
        --border-subtle-blue: rgba(17, 128, 255, 0.18);
        --border-on-dark: rgba(160, 102, 211, 0.22);

        --header-bg: rgba(10, 16, 24, 0.85);
        --header-bg-scrolled: rgba(10, 16, 24, 0.96);
        --header-border: rgba(17, 128, 255, 0.18);
        --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        --mobile-menu-bg: rgba(10, 16, 24, 0.98);
        --mobile-menu-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

        --grid-square: #0e1622;
        --grid-line: rgba(17, 128, 255, 0.05);

        --kicad-bg: #0e1622;
        --kicad-text: #93c5fd;
        --kicad-border: #93c5fd;

        --progress-track: rgba(255, 255, 255, 0.08);
        --shine: rgba(255, 255, 255, 0.2);

        --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
        --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.55);
        --diploma-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 8px 16px rgba(0,0,0,0.45), 0 16px 32px rgba(0,0,0,0.5);
        --diploma-shadow-hover: 0 4px 8px rgba(0,0,0,0.5), 0 12px 24px rgba(0,0,0,0.55), 0 24px 48px rgba(0,0,0,0.6);

        --footer-bg: #050a12;
        --footer-text: #E0E7FF;

        color-scheme: dark;
    }
}

/* Transition couleur sur body uniquement — le reste hérite de leurs propres transitions */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

html {
    overflow-x: clip;
    max-width: 100vw;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: clip;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    /* No overflow rule — using "clip" on html/body prevents horizontal scroll
       without creating a scroll context that would trap vertical scroll on cards. */
}

.gradient-text {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================================================
   ANIMATED HEX BACKGROUND
   ================================================================ */

#hex-bg {
    position: fixed;
    inset: 0;
    z-index: -5;
    pointer-events: none;
    overflow: hidden;
}

.hex-layer {
    position: absolute;
    inset: 0;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hex-back {
    transform: translate3d(calc(var(--mx, 0) * 7px), calc(var(--my, 0) * 7px), 0);
}

.hex-front {
    transform: translate3d(calc(var(--mx, 0) * 22px), calc(var(--my, 0) * 22px), 0);
}

.hex-wrap {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--size);
    height: var(--size);
    margin-left: calc(var(--size) * -0.5);
    margin-top:  calc(var(--size) * -0.5);
    color: var(--c, rgba(17, 128, 255, 0.08));
    animation: hex-pulse var(--pulse, 12s) ease-in-out infinite;
    will-change: transform;
}

.hex-wrap svg {
    display: block;
    width: 100%;
    height: 100%;
    animation: hex-rotate var(--rot, 90s) linear infinite;
}

.hex-wrap.ccw svg {
    animation-direction: reverse;
}

@keyframes hex-rotate {
    from { transform: rotate(0deg);   }
    to   { transform: rotate(360deg); }
}

@keyframes hex-pulse {
    0%, 100% { transform: scale(1);     }
    50%      { transform: scale(1.055); }
}

@media (prefers-reduced-motion: reduce) {
    .hex-wrap, .hex-wrap svg, .hex-layer { animation: none !important; transition: none !important; }
    .progress-fill::after { animation: none !important; }
}

@media screen and (max-width: 768px) {
    /* Reduce visual noise on mobile — hide back layer, keep 4 front hexes */
    .hex-back { display: none; }
    .hex-front .hex-wrap:nth-child(n+5) { display: none; }
}

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    background: var(--bg-page);
}

/* Removed gridMove animation */

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* KiCad-style Cartouche - Only on Landing Page (#home) */
#home .kicad-cartouche {
    position: absolute;
    bottom: 20px;
    right: 10px;
    width: 150mm;
    min-height: 18mm; /* 3 rows at 6mm each */
    border: 1px solid var(--kicad-border);
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--kicad-text);
    z-index: 100;
    pointer-events: auto;
    line-height: 1.2;
    background: var(--kicad-bg);
}

#home .kicad-cartouche .cartouche-row {
    display: flex;
    height: 6mm;
    border-top: 1px solid var(--kicad-border);
}

#home .kicad-cartouche .cartouche-row:first-child {
    border-top: none;
}

#home .kicad-cartouche .cartouche-cell {
    padding: 1.5mm 2mm;
    border-right: 1px solid var(--kicad-border);
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

#home .kicad-cartouche .cartouche-cell:last-child {
    border-right: none;
}

#home .kicad-cartouche .cartouche-label {
    font-weight: bold;
    margin-right: 2mm;
}

#home .kicad-cartouche .cartouche-rev {
    text-align: right;
    font-weight: bold;
}

/* Hide cartouche on small screens */
@media screen and (max-width: 768px) {
    #home .kicad-cartouche {
        display: none;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--header-border);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

header.scrolled {
    background: var(--header-bg-scrolled);
    box-shadow: var(--header-shadow);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
    transition: filter 0.3s ease;
}

/* Logo header : toujours en bleu via currentColor (SVG inline) */
header .logo {
    color: var(--blue);
}

/* Footer toujours sombre → logo <img> en blanc */
footer .logo-img {
    filter: invert(1);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: var(--blue);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ----- Language Toggle ----- */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 1.5rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(17, 128, 255, 0.3);
    background: rgba(17, 128, 255, 0.05);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-toggle:hover {
    border-color: var(--blue);
    background: rgba(17, 128, 255, 0.1);
    color: var(--blue);
}

.lang-toggle .lang-fr,
.lang-toggle .lang-en {
    transition: color 0.2s ease;
}

.lang-toggle .lang-sep {
    opacity: 0.4;
    font-weight: 400;
}

html[lang="fr"] .lang-toggle .lang-fr { color: var(--blue); }
html[lang="fr"] .lang-toggle .lang-en { opacity: 0.45; }
html[lang="en"] .lang-toggle .lang-en { color: var(--blue); }
html[lang="en"] .lang-toggle .lang-fr { opacity: 0.45; }

/* ----- Theme Toggle ----- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(17, 128, 255, 0.3);
    background: rgba(17, 128, 255, 0.05);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--blue);
    background: rgba(17, 128, 255, 0.1);
    color: var(--blue);
    transform: translateY(-1px);
}

.theme-toggle svg {
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

/* Light theme : montrer la lune (pour passer au sombre) */
:root:not([data-theme="dark"]) .theme-icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}
:root:not([data-theme="dark"]) .theme-icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Dark theme : montrer le soleil (pour passer au clair) */
[data-theme="dark"] .theme-icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}
[data-theme="dark"] .theme-icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}

/* Respect du système si pas de préférence enregistrée */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]):not([data-theme="dark"]) .theme-icon-sun {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
    :root:not([data-theme="light"]):not([data-theme="dark"]) .theme-icon-moon {
        opacity: 0;
        transform: rotate(-90deg) scale(0.6);
    }
}

/* Hero Section */
.hero {
    margin-top: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem 2rem 120px 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(17, 128, 255, 0.09) 0%, rgba(0, 200, 248, 0.04) 40%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .hero::before { display: none; }
}

.hero-content {
    max-width: 700px;
    text-align: center;
    z-index: 5;
    position: relative;
    margin: 0 auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-label {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.15), rgba(0, 200, 248, 0.08));
    border: 1px solid rgba(17, 128, 255, 0.4);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    color: var(--blue);
    box-shadow: 0 4px 15px rgba(17, 128, 255, 0.1);
}

[data-theme="dark"] .hero-label {
    box-shadow: 0 4px 20px rgba(17, 128, 255, 0.2), 0 0 40px rgba(0, 200, 248, 0.06);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hero-label {
        box-shadow: 0 4px 20px rgba(17, 128, 255, 0.2), 0 0 40px rgba(0, 200, 248, 0.06);
    }
}

.hero h1 {
    font-size: 3.5rem; /* Increased from 3rem */
    font-weight: 700;
    margin-bottom: 1rem; /* Increased from 0.8rem */
    line-height: 1.1;
    color: var(--text-dark);
    /* Performance optimization */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    will-change: auto;
}

.hero h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

[data-theme="dark"] .hero h1 {
    text-shadow: 0 0 80px rgba(17, 128, 255, 0.15);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hero h1 {
        text-shadow: 0 0 80px rgba(17, 128, 255, 0.15);
    }
}

.hero-description {
    font-size: 1.2rem; /* Increased from 1.1rem */
    color: var(--text-gray);
    margin-bottom: 2.5rem; /* Increased from 2rem */
    max-width: 650px; /* Increased from 600px */
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem; /* Increased from 1rem */
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem; /* Increased from 3rem */
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #1180ff, #0062d9);
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid rgba(17, 128, 255, 0.25);
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.08), rgba(17, 128, 255, 0.05));
    color: var(--blue);
    border-color: var(--blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(17, 128, 255, 0.18);
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem; /* Increased from 2.5rem */
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.85rem; /* Increased from 0.8rem */
    margin-top: 0.5rem; /* Increased from 0.3rem */
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-dark {
    background:
        var(--bg-dark) ;
    color: var(--text-light);
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.section-number {
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.section-dark .section-title {
    color: var(--text-light);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(160, 102, 211, 0.2);
    backdrop-filter: blur(10px);
}

.about-text .lead {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.about-text p {
    margin-bottom: 1.2rem;
    color: rgba(224, 231, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--blue);
}

.about-main > .info-card {
    margin-top: 2rem;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(160, 102, 211, 0.2);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: rgba(17, 128, 255, 0.5);
    box-shadow: 0 10px 30px rgba(17, 128, 255, 0.2);
}

.info-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.18), rgba(17, 128, 255, 0.04));
    border: 1px solid rgba(17, 128, 255, 0.28);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.info-card h3 {
    color: var(--blue);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-grid div {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(160, 102, 211, 0.1);
}

.info-grid strong {
    color: var(--text-light);
}

.info-grid span {
    color: rgba(224, 231, 255, 0.7);
}

.language-bars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.language-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lang-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.lang-level {
    color: var(--blue);
    font-weight: 600;
    font-size: 0.85rem;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3) 50%,
        transparent
    );
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.values-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.values-tags span {
    padding: 0.5rem 1rem;
    background: rgba(17, 128, 255, 0.2);
    border: 1px solid rgba(17, 128, 255, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s ease;
    border: 1px solid rgba(160, 102, 211, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--blue);
}

.project-label {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.4rem 1rem;
    background: rgba(17, 128, 255, 0.1);
    border: 1px solid var(--blue);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--blue);
}

.project-header {
    padding: 3rem;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.08), rgba(0, 200, 248, 0.04));
    position: relative;
}

.project-icon {
    width: 80px;
    height: 80px;
    background: var(--surface);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.project-icon svg {
    stroke: var(--blue);
}

.project-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.project-subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--blue);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    gap: 0.8rem;
}

.project-link svg {
    stroke: var(--blue);
}

.project-content {
    padding: 3rem;
}

.project-description {
    font-size: 1.05rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.feature-list {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.feature-item p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.project-tags span {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(160, 102, 211, 0.1), rgba(255, 209, 102, 0.1));
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Skills Section */
/* ---- Skills Section ---- */
.skills-intro {
    max-width: 640px;
    margin: -1rem auto 3rem;
    text-align: center;
    color: rgba(224, 231, 255, 0.55);
    font-size: 0.95rem;
    line-height: 1.6;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    position: relative;
    padding: 1.75rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
    isolation: isolate;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(17, 128, 255, 0.8) 50%, transparent 90%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-category::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(17, 128, 255, 0.12), transparent 55%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.skill-category:hover {
    transform: translateY(-4px);
    border-color: rgba(17, 128, 255, 0.35);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(17, 128, 255, 0.08) inset;
}

.skill-category:hover::before,
.skill-category:hover::after {
    opacity: 1;
}

.skill-category-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.skill-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.18), rgba(17, 128, 255, 0.04));
    border: 1px solid rgba(17, 128, 255, 0.25);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.skill-icon svg {
    stroke: var(--blue);
}

.skill-category:hover .skill-icon {
    transform: translateY(-1px);
    border-color: rgba(17, 128, 255, 0.55);
    box-shadow: 0 6px 18px rgba(17, 128, 255, 0.25);
}

.skill-category-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.skill-cat-tag {
    display: inline-block;
    width: max-content;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    background: rgba(17, 128, 255, 0.12);
    border: 1px solid rgba(17, 128, 255, 0.25);
    color: var(--blue);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.skill-category h3 {
    color: var(--text-light);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(224, 231, 255, 0.7);
    letter-spacing: 0.2px;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
    cursor: default;
}

.skill-chip.chip-highlight {
    background: rgba(17, 128, 255, 0.12);
    border-color: rgba(17, 128, 255, 0.4);
    color: #6fb1ff;
    position: relative;
    padding-left: 1.25rem;
}

.skill-chip.chip-highlight::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 6px rgba(17, 128, 255, 0.6);
    transform: translateY(-50%);
}

.skill-category:hover .skill-chip {
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(224, 231, 255, 0.9);
}

.skill-category:hover .skill-chip.chip-highlight {
    background: rgba(17, 128, 255, 0.2);
    border-color: rgba(17, 128, 255, 0.55);
    color: #8cc2ff;
}



.timeline-highlight {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.08), rgba(0, 200, 248, 0.04));
    border-left: 3px solid var(--blue);
    border-radius: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

/* Education Section - Modern Flat Design */
.education-grid {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.education-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-card);
    transition: all 0.3s ease;
}

.education-card:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 30px rgba(17, 128, 255, 0.15);
    transform: translateY(-2px);
}

.education-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.05), rgba(0, 200, 248, 0.02));
    border-bottom: 1px solid var(--border-card);
}

.education-icon {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.12), rgba(17, 128, 255, 0.03));
    border: 1px solid rgba(17, 128, 255, 0.22);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    flex-shrink: 0;
}

.education-header-content {
    flex: 1;
}

.education-period {
    display: inline-block;
    padding: 0.35rem 0.875rem;
    background: var(--surface);
    border: 1px solid rgba(17, 128, 255, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.75rem;
}

.education-header-content h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    line-height: 1.2;
}

.education-degree {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
}

.education-card-body {
    padding: 2rem;
}

.education-description {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.education-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.4rem 0.875rem;
    background: rgba(17, 128, 255, 0.06);
    border: 1px solid rgba(17, 128, 255, 0.15);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag:hover {
    background: rgba(17, 128, 255, 0.12);
    border-color: rgba(17, 128, 255, 0.4);
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-page);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.achievement-item:hover {
    border-color: rgba(17, 128, 255, 0.3);
    background: rgba(17, 128, 255, 0.02);
}

.achievement-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.1), rgba(17, 128, 255, 0.03));
    border: 1px solid rgba(17, 128, 255, 0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    flex-shrink: 0;
}

.achievement-content {
    flex: 1;
}

.achievement-content strong {
    display: block;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.achievement-details {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.achievement-details li {
    color: var(--text-gray);
    font-size: 0.85rem;
    line-height: 1.5;
    padding-left: 1.1em;
    position: relative;
}

.achievement-details li::before {
    content: '•';
    color: var(--blue);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Technical Drawing Border and Cartouche */
.technical-border {
    position: relative;
    width: 90%;
    max-width: 1200px;
    min-height: 80vh;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--surface-translucent);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(17, 128, 255, 0.2);
}

.technical-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--blue);
    z-index: 10;
}

.technical-corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.technical-corner.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.technical-corner.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.technical-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.technical-line {
    position: absolute;
    background: var(--blue);
    z-index: 5;
}

.technical-line.horizontal {
    width: 100%;
    height: 1px;
    left: 0;
}

.technical-line.horizontal.top {
    top: 0;
}

.technical-line.horizontal.bottom {
    bottom: 0;
}

.technical-line.vertical {
    height: 100%;
    width: 1px;
    top: 0;
}

.technical-line.vertical.left {
    left: 0;
}

.technical-line.vertical.right {
    right: 0;
}

.cartouche {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: var(--surface);
    border: 1px solid var(--blue);
    padding: 1rem;
    min-width: 250px;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(17, 128, 255, 0.2);
}

.cartouche-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(17, 128, 255, 0.2);
    padding-bottom: 0.5rem;
}

.cartouche-icon {
    font-size: 1.2rem;
}

.cartouche-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--blue);
    font-size: 0.9rem;
}

.cartouche-title {
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
}

.cartouche-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
}

.info-item {
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
}

.info-label {
    font-weight: 600;
    color: var(--blue);
}

.cartouche-title span {
    display: block;
    text-align: center;
    font-weight: 600;
    color: var(--blue);
    margin-top: 0.2rem;
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.cert-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(160, 102, 211, 0.2);
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-10px);
    border-color: rgba(17, 128, 255, 0.4);
    box-shadow: 0 15px 40px rgba(17, 128, 255, 0.25);
}

.cert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cert-icon {
    font-size: 2.5rem;
}

.cert-institution {
    padding: 0.4rem 1rem;
    background: rgba(17, 128, 255, 0.2);
    border: 1px solid var(--blue);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue);
}

.cert-card h3 {
    color: var(--text-light);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.cert-card p {
    color: rgba(224, 231, 255, 0.7);
    line-height: 1.6;
}

/* Objectives Section */
.objectives-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.objectives-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.15), rgba(0, 200, 248, 0.08));
    border: 1px solid rgba(17, 128, 255, 0.28);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    margin: 0 auto 2rem;
}

.objectives-content h2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    text-align: left;
}

.objective-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(160, 102, 211, 0.1);
    transition: all 0.3s ease;
}

.objective-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(17, 128, 255, 0.35);
}

.objective-card h3 {
    color: var(--blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.objective-card p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-intro {
    margin-bottom: 3rem;
    text-align: left;
}

.contact-intro h3 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.contact-intro p {
    color: rgba(224, 231, 255, 0.7);
    font-size: 1.1rem;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 500px;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(160, 102, 211, 0.2);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    border-color: var(--blue);
    box-shadow: 0 5px 20px rgba(17, 128, 255, 0.3);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(17, 128, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    stroke: var(--blue);
}

.contact-item h4 {
    color: var(--blue);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.contact-item p {
    color: rgba(224, 231, 255, 0.8);
    font-size: 0.95rem;
}

.form-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(160, 102, 211, 0.2);
}

.form-container h3 {
    color: var(--text-light);
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(160, 102, 211, 0.2);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--violet);
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(160, 102, 211, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(160, 102, 211, 0.2);
}

.footer-brand p {
    color: rgba(224, 231, 255, 0.6);
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    justify-content: flex-end;
}

.footer-links a {
    color: rgba(224, 231, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--cyan);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: rgba(224, 231, 255, 0.5);
    font-size: 0.9rem;
}

/* Certifications Section - Diploma Cards */
.certifications-section {
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.section-dark .section-title {
    color: var(--text-light);
}

.certifications-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .certifications-container {
        grid-template-columns: 1fr;
    }
}

/* Style diplôme papier */
.diploma-card {
    background: var(--paper);
    border-radius: 8px;
    padding: 0;
    box-shadow: var(--diploma-shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    max-width: 580px;
    margin: 0 auto;
}

.diploma-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--diploma-shadow-hover);
}

/* Phylactère "IN PROGRESS" en diagonal (style filigrane confidential) */
.diploma-in-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    width: 900px;
    color: var(--paper-text-faint);
    font-weight: 1000;
    font-size: 4rem;
    letter-spacing: 8px;
    text-align: center;
    padding: 20px 0;
    z-index: 5;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    border-radius: 8px;
    opacity: 50%;
}

/* Bordure décorative supérieure */
.diploma-border-top {
    height: 12px;
    position: relative;
    overflow: hidden;
}

.tu-delft .diploma-border-top {
    background: linear-gradient(135deg, #00a6d6 0%, #0088b3 100%);
}

.mit .diploma-border-top,
.mit-inprogress .diploma-border-top {
    background: linear-gradient(135deg, #a31f34 0%, #8b1a2d 100%);
}

.nus .diploma-border-top {
    background: linear-gradient(135deg, #003d7c 0%, #002d5c 100%);
}

/* Texture du papier */
.diploma-content {
    padding: 20px 30px;
    position: relative;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            var(--paper-line) 2px,
            var(--paper-line) 4px
        );
    min-height: 190px;
}

/* Coins décoratifs du diplôme */
.diploma-corner {
    position: absolute;
    width: 60px;
    height: 60px;
}

.corner-tl {
    top: 20px;
    left: 20px;
    border-top: 2px double;
    border-left: 2px double;
    opacity: 0.3;
}

.corner-tr {
    top: 20px;
    right: 20px;
    border-top: 2px double;
    border-right: 2px double;
    opacity: 0.3;
}

.corner-bl {
    bottom: 20px;
    left: 20px;
    border-bottom: 2px double;
    border-left: 2px double;
    opacity: 0.3;
}

.corner-br {
    bottom: 20px;
    right: 20px;
    border-bottom: 2px double;
    border-right: 2px double;
    opacity: 0.3;
}

.tu-delft .diploma-corner {
    border-color: #00a6d6;
}

.mit .diploma-corner,
.mit-inprogress .diploma-corner {
    border-color: #a31f34;
}

.nus .diploma-corner {
    border-color: #003d7c;
}

/* En-tête du diplôme */
.diploma-header {
    text-align: center;
    margin-bottom: 18px;
    border-bottom: 2px solid;
    padding-bottom: 15px;
}

.tu-delft .diploma-header {
    border-color: rgba(0, 166, 214, 0.2);
}

.mit .diploma-header,
.mit-inprogress .diploma-header {
    border-color: rgba(163, 31, 52, 0.2);
}

.nus .diploma-header {
    border-color: rgba(0, 61, 124, 0.2);
}

.institution-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}
.tu-delft .institution-logo {
    background: rgba(0, 166, 214, 0.12);
    border: 1px solid rgba(0, 166, 214, 0.3);
    color: #00a6d6;
}
.mit .institution-logo {
    background: rgba(163, 31, 52, 0.1);
    border: 1px solid rgba(163, 31, 52, 0.25);
    color: #a31f34;
}
.nus .institution-logo {
    background: rgba(0, 61, 124, 0.1);
    border: 1px solid rgba(0, 61, 124, 0.25);
    color: #003d7c;
}

.institution-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.tu-delft .institution-name {
    color: #00a6d6;
}

.mit .institution-name,
.mit-inprogress .institution-name {
    color: #a31f34;
}

.nus .institution-name {
    color: #003d7c;
}

.institution-subtitle {
    font-size: 10px;
    color: var(--paper-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Corps du diplôme */
.diploma-body {
    text-align: left;
    margin-bottom: 18px;
}

.certificate-of {
    font-size: 11px;
    color: var(--paper-text-faint);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 500;
}

.cert-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--paper-text-strong);
    line-height: 1.3;
    margin-bottom: 18px;
    font-family: 'Georgia', serif;
}

.cert-description {
    font-size: 13px;
    line-height: 1.6;
    color: var(--paper-text);
    font-style: italic;
}

/* Pied du diplôme */
.diploma-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 18px;
    border-top: 2px solid;
}

.tu-delft .diploma-footer {
    border-color: rgba(0, 166, 214, 0.2);
}

.mit .diploma-footer,
.mit-inprogress .diploma-footer {
    border-color: rgba(163, 31, 52, 0.2);
}

.nus .diploma-footer {
    border-color: rgba(0, 61, 124, 0.2);
}

.diploma-credential {
    text-align: left;
}

.credential-label {
    font-size: 9px;
    color: var(--paper-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-weight: 600;
}

.credential-id {
    font-size: 11px;
    color: var(--paper-text);
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.credential-id.in-progress {
    color: #a31f34;
    font-weight: 600;
}

.diploma-date {
    text-align: right;
}

.date-label {
    font-size: 9px;
    color: var(--paper-text-faint);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-weight: 600;
}

.date-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--paper-text-strong);
    font-family: 'Georgia', serif;
}

/* Watermark for in-progress certifications */
.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 2px;
    pointer-events: none;
    white-space: nowrap;
    padding: 10px 20px;
    font-family: 'Georgia', serif;
    z-index: 10;
}

/* ========================================
   RESPONSIVE DESIGN - TABLETTE & MOBILE
   ======================================== */

/* TABLETTE - 768px */
@media screen and (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 1.5rem;
    }

    /* Section padding */
    section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
        gap: 1rem;
    }

    .section-number {
        font-size: 1.2rem;
    }

    /* Header & Navigation */
    nav {
        padding: 1rem 1.5rem;
    }

    .logo-img {
        height: 22px;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--mobile-menu-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
        box-shadow: var(--mobile-menu-shadow);
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.75rem 0;
    }

    .menu-toggle {
        display: flex;
    }

    .lang-toggle {
        margin-left: auto;
        margin-right: 0.4rem;
        padding: 0.3rem 0.65rem;
        font-size: 0.72rem;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
        margin-left: 0.25rem;
        margin-right: 0.5rem;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }

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

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

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

    /* Hero Section */
    .hero {
        margin-top: 70px;
        min-height: auto;
        padding: 3rem 1.5rem 4rem;
    }

    .hero-label {
        font-size: 0.7rem;
        padding: 0.4rem 1rem;
        margin-bottom: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .hero h2 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text {
        padding: 1.5rem;
    }

    .about-text .lead {
        font-size: 1.1rem;
    }

    .about-text p {
        font-size: 0.95rem;
    }

    .about-sidebar {
        gap: 1.5rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .info-card h3 {
        font-size: 1.1rem;
    }

    .info-icon {
        font-size: 1.5rem;
    }

    .language-bars {
        gap: 1rem;
    }

    /* Projects Section */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-card {
        border-radius: 16px;
    }

    .project-label {
        top: 1rem;
        right: 1rem;
        font-size: 0.65rem;
        padding: 0.3rem 0.75rem;
    }

    .project-header {
        padding: 1.5rem;
    }

    .project-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .project-icon svg {
        width: 32px;
        height: 32px;
    }

    .project-header h3 {
        font-size: 1.5rem;
    }

    .project-subtitle {
        font-size: 0.95rem;
    }

    .project-link {
        font-size: 0.8rem;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .feature-list {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .feature-item {
        gap: 0.75rem;
    }

    .feature-icon {
        font-size: 1.25rem;
    }

    .feature-item strong {
        font-size: 0.9rem;
    }

    .feature-item p {
        font-size: 0.85rem;
    }

    .project-tags {
        gap: 0.5rem;
    }

    .project-tags span {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    /* Skills Section */
    .skills-intro {
        margin: -0.5rem auto 2rem;
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .skill-category-head {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .skill-icon {
        width: 44px;
        height: 44px;
    }

    .skill-icon svg {
        width: 22px;
        height: 22px;
    }

    .skill-category h3 {
        font-size: 1rem;
    }

    /* Objectives Section */
    .objectives-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .objective-card {
        padding: 1.5rem;
    }

    .objectives-content h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    /* Education Section */
    .education-grid {
        gap: 1.5rem;
    }

    .education-card-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem 1.5rem;
    }

    .education-icon {
        font-size: 2rem;
    }

    .education-period {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }

    .education-header-content h3 {
        font-size: 1.25rem;
    }

    .education-degree {
        font-size: 0.9rem;
    }

    .education-card-body {
        padding: 1.5rem;
    }

    .education-description {
        font-size: 0.9rem;
    }

    .education-tags {
        gap: 0.4rem;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .achievements-list {
        gap: 1rem;
    }

    .achievement-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .achievement-icon {
        width: 36px;
        height: 36px;
    }

    .achievement-content strong {
        font-size: 0.85rem;
    }

    .achievement-details li {
        font-size: 0.8rem;
    }

    /* Certifications - Diploma Cards */
    .certifications-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .diploma-card {
        max-width: 100%;
    }

    .diploma-content {
        padding: 1.25rem;
        min-height: auto;
    }

    .diploma-header {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .institution-logo {
        font-size: 28px;
    }

    .institution-name {
        font-size: 16px;
    }

    .institution-subtitle {
        font-size: 9px;
    }

    .certificate-of {
        font-size: 10px;
        margin-bottom: 0.75rem;
    }

    .cert-title {
        font-size: 18px;
        margin-bottom: 1rem;
    }

    .cert-description {
        font-size: 12px;
    }

    .diploma-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        padding-top: 1rem;
    }

    .diploma-date,
    .diploma-credential {
        text-align: left;
    }

    .credential-label,
    .date-label {
        font-size: 8px;
    }

    .credential-id,
    .date-value {
        font-size: 10px;
    }

    .diploma-corner {
        width: 40px;
        height: 40px;
    }

    .corner-tl, .corner-bl {
        left: 10px;
    }

    .corner-tr, .corner-br {
        right: 10px;
    }

    .corner-tl, .corner-tr {
        top: 10px;
    }

    .corner-bl, .corner-br {
        bottom: 10px;
    }

    .diploma-in-progress {
        font-size: 2.5rem;
        letter-spacing: 4px;
        padding: 10px 0;
    }

    /* Contact Section */
    .contact-content {
        gap: 2.5rem;
    }

    .contact-intro h3 {
        font-size: 1.5rem;
    }

    .contact-intro p {
        font-size: 1rem;
    }

    .contact-methods {
        max-width: 100%;
    }

    .contact-item {
        padding: 1.25rem;
        gap: 1rem;
    }

    .contact-icon {
        width: 45px;
        height: 45px;
    }

    .contact-item h4 {
        font-size: 0.95rem;
    }

    .contact-item p {
        font-size: 0.9rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .form-container h3 {
        font-size: 1.4rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .footer-brand p {
        font-size: 0.85rem;
    }
}

/* MOBILE - 480px */
@media screen and (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Section padding */
    section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    .section-number {
        font-size: 1rem;
    }

    /* Header */
    nav {
        padding: 0.875rem 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .logo-img {
        height: 28px;
    }

    /* Hero */
    .hero {
        padding: 2rem 1rem 3rem;
    }

    .hero-label {
        font-size: 0.65rem;
        padding: 0.35rem 0.875rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero h2 {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .hero-buttons .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* About */
    .about-text {
        padding: 1.25rem;
    }

    .about-text .lead {
        font-size: 1rem;
    }

    .about-text p {
        font-size: 0.9rem;
    }

    .info-card {
        padding: 1.25rem;
    }

    /* Projects */
    .project-header {
        padding: 1.25rem;
    }

    .project-icon {
        width: 50px;
        height: 50px;
    }

    .project-icon svg {
        width: 28px;
        height: 28px;
    }

    .project-header h3 {
        font-size: 1.25rem;
    }

    .project-subtitle {
        font-size: 0.85rem;
    }

    .project-content {
        padding: 1.25rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    .feature-item strong {
        font-size: 0.85rem;
    }

    .feature-item p {
        font-size: 0.8rem;
    }

    /* Skills */
    .skill-category {
        padding: 1.25rem;
    }

    .skill-category h3 {
        font-size: 0.95rem;
    }

    .skill-cat-tag {
        font-size: 0.6rem;
    }

    .skill-chip {
        font-size: 0.72rem;
        padding: 0.28rem 0.6rem;
    }

    .skill-chip.chip-highlight {
        padding-left: 1.1rem;
    }

    .skill-chip.chip-highlight::before {
        left: 0.5rem;
    }

    /* Objectives */
    .objective-card {
        padding: 1.25rem;
    }

    .objectives-content h2 {
        font-size: 1.3rem;
    }

    /* Education */
    .education-card-header {
        padding: 1rem;
    }

    .education-card-body {
        padding: 1rem;
    }

    .education-header-content h3 {
        font-size: 1.1rem;
    }

    .education-degree {
        font-size: 0.85rem;
    }

    /* Certifications */
    .diploma-content {
        padding: 1rem;
    }

    .institution-logo {
        font-size: 24px;
    }

    .institution-name {
        font-size: 14px;
    }

    .cert-title {
        font-size: 16px;
    }

    .cert-description {
        font-size: 11px;
    }

    .diploma-in-progress {
        font-size: 1.75rem;
        letter-spacing: 2px;
    }

    /* Contact */
    .contact-intro h3 {
        font-size: 1.25rem;
    }

    .form-container {
        padding: 1.25rem;
    }

    .form-container h3 {
        font-size: 1.2rem;
    }
}

/* ================================================================
   ANIMATIONS & INTERACTIONS v2.0
   ================================================================ */

/* ----- Scroll Progress Bar ----- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    z-index: 9999;
    transition: width 0.08s linear;
    border-radius: 0 2px 2px 0;
}


/* ----- Typewriter cursor ----- */
.typewriter-cursor {
    display: inline-block;
    color: var(--blue);
    -webkit-text-fill-color: var(--blue);
    animation: blink-cursor 0.9s step-end infinite;
    font-weight: 300;
    margin-left: 2px;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .typewriter-cursor { animation: none; opacity: 1; }
}

/* ----- Hero staggered entrance ----- */
.hero-label {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero-content h1 {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.25s forwards;
}

.hero-content h2 {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

.hero-description {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.55s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.7s forwards;
}

.hero-stats {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.85s forwards;
}

@media (prefers-reduced-motion: reduce) {
    .hero-label, .hero-content h1, .hero-content h2,
    .hero-description, .hero-buttons, .hero-stats {
        opacity: 1 !important;
        animation: none !important;
    }
}

/* ----- Project icon hover ----- */
.project-icon {
    transition: background 0.35s ease, transform 0.35s ease;
    will-change: transform;
}

.project-card:hover .project-icon {
    background: rgba(17, 128, 255, 0.15);
    transform: rotate(-6deg) scale(1.1);
}

.project-icon svg {
    transition: stroke 0.35s ease, filter 0.35s ease;
}

.project-card:hover .project-icon svg {
    stroke: var(--blue);
    filter: drop-shadow(0 0 6px rgba(17, 128, 255, 0.5));
}

/* ----- Skill icon hover ----- */

/* ================================================================
   ACCESSIBILITY — Keyboard focus
   ================================================================ */

:focus { outline: none; }

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.menu-toggle:focus-visible,
.lang-toggle:focus-visible,
.theme-toggle:focus-visible,
.legend-item:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
    border-radius: 6px;
    box-shadow: 0 0 0 4px rgba(17, 128, 255, 0.18);
}

.section-dark a:focus-visible,
.section-dark .btn:focus-visible,
.section-dark [tabindex]:focus-visible {
    outline-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

/* Skip link — appears on Tab from page top */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 10000;
    background: var(--blue);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* Section transitions are handled by the gradient on .section-dark itself
   (fade at top + bottom 90px reveals the lighter section behind). */

/* ================================================================
   PROJECTS — Tabs + collapsible details
   ================================================================ */

.projects-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 2rem;
    padding: 0.45rem;
    background: var(--surface-translucent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle-blue);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.project-tab {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-gray);
    font-family: inherit;
    text-align: left;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    min-width: 0;
}

.project-tab:hover {
    background: rgba(17, 128, 255, 0.06);
    color: var(--text-dark);
    transform: translateY(-1px);
}

.project-tab.active {
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.12), rgba(0, 200, 248, 0.06));
    color: var(--blue);
    border-color: rgba(17, 128, 255, 0.25);
    box-shadow: 0 4px 14px rgba(17, 128, 255, 0.12);
}

.tab-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(17, 128, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--blue);
    transition: background 0.25s ease, transform 0.25s ease;
}

.project-tab.active .tab-icon {
    background: var(--blue);
    color: white;
    transform: scale(1.05);
}

.project-tab.active .tab-icon svg {
    stroke: white;
}

.tab-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow: hidden;
    min-width: 0;
}

.tab-name {
    font-weight: 700;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-cat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Panels */
.projects-panels {
    position: relative;
}

.project-panel {
    background: var(--bg-white);
    border: 1px solid rgba(17, 128, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

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

.project-panel.active {
    animation: panel-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes panel-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.panel-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.panel-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.12), rgba(17, 128, 255, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    flex-shrink: 0;
}

.panel-headline {
    flex: 1;
    min-width: 200px;
}

.panel-headline h3 {
    font-size: 1.85rem;
    margin: 0 0 0.2rem;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.panel-subtitle {
    color: var(--text-gray);
    font-size: 1.05rem;
    margin: 0;
}

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: rgba(17, 128, 255, 0.06);
    border: 1px solid rgba(17, 128, 255, 0.2);
    border-radius: 50px;
    color: var(--blue);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.panel-link:hover {
    background: linear-gradient(135deg, var(--blue), #0076e8);
    color: white;
    border-color: var(--blue);
    transform: translateY(-1px);
}

.panel-link:hover svg {
    stroke: white;
}

.panel-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.panel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.panel-tags span {
    padding: 0.35rem 0.85rem;
    background: rgba(17, 128, 255, 0.07);
    border: 1px solid rgba(17, 128, 255, 0.18);
    border-radius: 50px;
    color: var(--blue);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Hover hint — discreet visual cue that details are reveal-able */
.panel-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--blue);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0.65;
    transition: opacity 0.3s ease, transform 0.3s ease;
    user-select: none;
}

.panel-hint svg {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    animation: hint-bounce 2s ease-in-out infinite;
}

@keyframes hint-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
    .panel-hint svg { animation: none; }
}

/* Hover-to-reveal details (desktop) */
.panel-details {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.4s ease,
                margin-top 0.4s ease;
    margin-top: 0;
    opacity: 0;
}

.panel-details > * {
    overflow: hidden;
    min-height: 0;
}

@media (hover: hover) {
    .project-panel:hover .panel-details,
    .project-panel:focus-within .panel-details {
        grid-template-rows: 1fr;
        opacity: 1;
        margin-top: 1.25rem;
    }

    .project-panel:hover .panel-hint,
    .project-panel:focus-within .panel-hint {
        opacity: 0;
        transform: translateY(-4px);
    }
}

/* Touch / no-hover devices — always show details, hide the hint */
@media (hover: none) {
    .panel-hint {
        display: none;
    }
    .panel-details {
        grid-template-rows: 1fr;
        opacity: 1;
        margin-top: 1.25rem;
    }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(17, 128, 255, 0.04), rgba(17, 128, 255, 0.025));
    border-radius: 14px;
    border: 1px solid rgba(17, 128, 255, 0.08);
}

.features-grid .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.65rem;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.features-grid .feature-item:hover {
    background: rgba(17, 128, 255, 0.04);
}

.features-grid .feature-icon {
    width: 38px;
    height: 38px;
    background: rgba(17, 128, 255, 0.1);
    border: 1px solid rgba(17, 128, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.features-grid strong {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.2rem;
    font-size: 0.92rem;
}

.features-grid p {
    color: var(--text-gray);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* Responsive — tabs stack on mobile */
@media screen and (max-width: 768px) {
    .projects-tabs {
        flex-direction: column;
        gap: 0.3rem;
        padding: 0.4rem;
    }
    .project-tab {
        padding: 0.7rem 0.9rem;
    }
    .tab-icon {
        width: 34px;
        height: 34px;
    }
    .project-panel {
        padding: 1.75rem 1.25rem;
    }
    .panel-header {
        gap: 0.85rem;
    }
    .panel-icon {
        width: 52px;
        height: 52px;
    }
    .panel-icon svg {
        width: 32px;
        height: 32px;
    }
    .panel-headline h3 {
        font-size: 1.45rem;
    }
    .panel-subtitle {
        font-size: 0.95rem;
    }
    .panel-link {
        order: 3;
        flex-basis: 100%;
        justify-content: center;
    }
    .features-grid {
        padding: 1rem;
    }
}
