@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Manrope:wght@400;500;700;800&display=swap');

:root {
    --bg-top: #f3f8f7;
    --bg-bottom: #dce7e4;
    --ink-900: #132425;
    --ink-700: #2b4243;
    --ink-500: #4f6869;
    --paper: rgba(255, 255, 255, 0.84);
    --paper-strong: rgba(255, 255, 255, 0.93);
    --line: rgba(22, 62, 63, 0.18);
    --accent: #0f8b8d;
    --accent-dark: #0d6e70;
    --accent-soft: #bde8e5;
    --gold: #d5a645;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-lg: 0 22px 60px rgba(16, 53, 54, 0.16);
    --shadow-sm: 0 8px 24px rgba(16, 53, 54, 0.1);
    --header-surface-start: var(--paper-strong);
    --header-surface-end: rgba(226, 244, 241, 0.9);
    --floating-bg: rgba(255, 255, 255, 0.82);
    --footer-bg: rgba(255, 255, 255, 0.75);
    --panel-soft: rgba(255, 255, 255, 0.6);
    --modal-surface: #ffffff;
    --input-bg: #f9fcfc;
    --input-border: #b8cfcf;
    --theme-btn-bg: rgba(15, 139, 141, 0.14);
    --theme-btn-text: #0d6e70;
}

[data-theme='dark'] {
    --bg-top: #10181d;
    --bg-bottom: #0b1216;
    --ink-900: #e6f2f1;
    --ink-700: #c2d6d5;
    --ink-500: #98b0af;
    --paper: rgba(19, 30, 35, 0.82);
    --paper-strong: rgba(23, 36, 41, 0.9);
    --line: rgba(125, 176, 173, 0.25);
    --accent: #43c8c4;
    --accent-dark: #38a9a6;
    --accent-soft: #163538;
    --shadow-lg: 0 24px 68px rgba(0, 0, 0, 0.42);
    --shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.3);
    --header-surface-start: rgba(22, 35, 41, 0.94);
    --header-surface-end: rgba(16, 28, 34, 0.94);
    --floating-bg: rgba(11, 18, 22, 0.82);
    --footer-bg: rgba(13, 22, 27, 0.8);
    --panel-soft: rgba(20, 33, 40, 0.82);
    --panel-variant-a: rgba(18, 33, 40, 0.86);
    --panel-variant-b: rgba(22, 34, 43, 0.88);
    --panel-variant-c: rgba(25, 35, 45, 0.88);
    --panel-variant-d: rgba(19, 37, 38, 0.88);
    --panel-variant-e: rgba(29, 36, 41, 0.88);
    --modal-surface: #162229;
    --input-bg: #111c22;
    --input-border: #39575a;
    --theme-btn-bg: rgba(67, 200, 196, 0.18);
    --theme-btn-text: #8df3ef;
}

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

html,
body {
    min-height: 100%;
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--ink-900);
    background: linear-gradient(170deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    padding-bottom: 56px;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.01em;
    color: var(--ink-900);
}

#matrix {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.09;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1840px;
    margin: 0 auto;
    padding: clamp(10px, 1.4vw, 22px);
}

.header {
    display: grid;
    grid-template-columns: minmax(170px, 230px) 1fr;
    gap: clamp(14px, 3vw, 30px);
    align-items: center;
    padding: clamp(20px, 4vw, 40px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--header-surface-start), var(--header-surface-end));
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.profil {
    width: min(100%, 220px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 24px;
    border: 3px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 32px rgba(19, 53, 53, 0.24);
}

.nom {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.1;
    margin-bottom: 8px;
}

.job {
    font-size: clamp(1rem, 2.1vw, 1.34rem);
    color: var(--accent-dark);
    margin-bottom: 16px;
    font-weight: 700;
}

.presentation {
    color: var(--ink-700);
    font-size: clamp(0.95rem, 1.45vw, 1.07rem);
    line-height: 1.6;
    margin-top: 10px;
}

.boxlinkedin {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 5;
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--floating-bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 10px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(7px);
}

.theme-toggle-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    min-height: 44px;
    padding: 10px 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(14, 112, 113, 0.2);
}

.contact-btn {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    min-height: 48px;
    padding: 12px 22px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(14, 112, 113, 0.3);
}

.main {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 0.9fr 1.35fr 1.1fr;
    gap: 14px;
    align-items: stretch;
}

.box-left,
.section,
.sectionbonus {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

[data-theme='dark'] .box-left {
    background: linear-gradient(160deg, var(--panel-variant-a), rgba(14, 25, 31, 0.92));
}

[data-theme='dark'] .box-right .section:nth-child(1) {
    background: linear-gradient(160deg, var(--panel-variant-b), rgba(16, 27, 34, 0.92));
}

[data-theme='dark'] .box-right .section:nth-child(2) {
    background: linear-gradient(160deg, var(--panel-variant-c), rgba(15, 26, 32, 0.92));
}

[data-theme='dark'] .box-right .section:nth-child(3) {
    background: linear-gradient(160deg, var(--panel-variant-d), rgba(13, 26, 28, 0.92));
}

[data-theme='dark'] .sectionbonus {
    background: linear-gradient(160deg, var(--panel-variant-e), rgba(20, 28, 33, 0.92));
}

.box-left {
    padding: 18px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.box-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section,
.sectionbonus {
    padding: 18px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.bonus {
    display: flex;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.box-left.visible,
.box-right.visible,
.section.visible,
.sectionbonus.visible,
.bonus.visible {
    opacity: 1;
    transform: translateY(0);
}

.info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.info-personnelles,
.linkedin-badge-block,
.competences,
.autres,
.hobbies {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--panel-soft);
}

[data-theme='dark'] .info-personnelles,
[data-theme='dark'] .linkedin-badge-block,
[data-theme='dark'] .competences,
[data-theme='dark'] .autres,
[data-theme='dark'] .hobbies {
    background: linear-gradient(160deg, rgba(20, 34, 41, 0.92), rgba(15, 26, 32, 0.9));
}

.info-personnelles h3,
.linkedin-badge-block h3,
.competences h3,
.autres h3,
.hobbies h3,
.section h3,
.sectionbonus h3 {
    font-size: 1.07rem;
    margin-bottom: 10px;
    color: var(--accent-dark);
}

.info-personnelles p,
.autres p,
.hobbies p,
.item p,
.section li,
.sectionbonus li,
.sectionbonus .item2 p {
    color: var(--ink-700);
    line-height: 1.55;
    font-size: 0.95rem;
}

.linkedin-badge-block {
    overflow: hidden;
}

.linkedin-badge-block .badge-base {
    max-width: 100%;
}

.linkedin-badge-dark {
    display: none;
}

[data-theme='dark'] .linkedin-badge-light {
    display: none;
}

[data-theme='dark'] .linkedin-badge-dark {
    display: block;
}

.competences ul,
.section ul,
.sectionbonus ul {
    padding-left: 18px;
}

.competences li {
    color: var(--ink-700);
    line-height: 1.5;
    margin-bottom: 4px;
    font-size: 0.94rem;
}

.competences li::marker {
    color: var(--accent);
}

.section h3,
.sectionbonus h3 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.item,
.sectionbonus .item2,
.item2 {
    margin-bottom: 10px;
}

.item p {
    margin: 3px 0;
}

.item ul {
    margin: 6px 0 10px;
    padding-left: 18px;
}

.experience-separator {
    height: 1px;
    margin: 14px 0 16px;
    background: linear-gradient(90deg, transparent, rgba(15, 139, 141, 0.35), transparent);
}

.item h4,
.sectionbonus .item2 h4,
.item2 h4 {
    font-size: 1rem;
    color: var(--ink-900);
    margin-bottom: 6px;
}

.emoji {
    display: inline-block;
    transform: translateY(1px);
    margin-right: 2px;
}

.section:hover,
.sectionbonus:hover,
.box-left:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(17, 60, 61, 0.14);
}

footer {
    margin-top: 16px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--footer-bg);
    padding: 14px;
    color: var(--ink-500);
    font-size: 0.9rem;
}

.legal-notice {
    margin-top: 6px;
    font-size: 0.82rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    overflow: auto;
    background: rgba(10, 25, 28, 0.46);
    backdrop-filter: blur(3px);
}

.modal-content {
    width: min(92vw, 560px);
    margin: 9vh auto;
    padding: 20px;
    border-radius: 14px;
    background: var(--modal-surface);
    border: 1px solid var(--line);
    box-shadow: 0 26px 60px rgba(9, 44, 45, 0.25);
}

.close {
    float: right;
    font-size: 28px;
    color: var(--ink-500);
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--ink-900);
}

.modal-content h2 {
    margin-bottom: 14px;
    color: var(--accent-dark);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-content label {
    font-size: 0.92rem;
    color: var(--ink-700);
}

.modal-content input,
.modal-content textarea {
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    font-family: 'Manrope', sans-serif;
    color: var(--ink-900);
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.15);
}

.modal-content textarea {
    min-height: 120px;
    resize: vertical;
}

.modal-content button {
    margin-top: 4px;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    cursor: pointer;
}

.modal-content button:hover {
    filter: brightness(0.97);
}

.info-personnelles a {
    color: var(--accent-dark);
    overflow-wrap: anywhere;
}

[data-theme='dark'] .info-personnelles a {
    color: #7ce9e4;
}

.honeypot {
    display: none !important;
}

@media (max-width: 1220px) {
    .main {
        grid-template-columns: 1fr 1fr;
    }

    .bonus {
        grid-column: span 2;
    }
}

@media (max-width: 860px) {
    body {
        padding-bottom: 108px;
    }

    .header {
        grid-template-columns: 1fr;
        text-align: left;
        justify-items: stretch;
        gap: 14px;
    }

    .header>div:first-child {
        justify-self: center;
    }

    .profil {
        width: min(220px, 60vw);
    }

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

    .bonus {
        grid-column: auto;
    }

    .boxlinkedin {
        right: 10px;
        left: 10px;
        justify-content: stretch;
        gap: 8px;
        padding: 8px;
    }

    .theme-toggle-btn,
    .contact-btn {
        flex: 1 1 0;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    body {
        padding-bottom: 122px;
    }

    .container {
        padding: 10px;
    }

    .nom {
        font-size: clamp(1.45rem, 8vw, 1.9rem);
    }

    .job {
        font-size: clamp(0.95rem, 4.8vw, 1.1rem);
    }

    .presentation {
        font-size: 0.95rem;
    }

    .header,
    .box-left,
    .section,
    .sectionbonus,
    footer {
        border-radius: 12px;
    }

    .boxlinkedin {
        bottom: 10px;
    }

    .theme-toggle-btn,
    .contact-btn {
        min-height: 42px;
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    .linkedin-badge-block {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-content {
        margin: 6vh auto;
        padding: 16px;
    }
}