/* Palette neutre premium */
:root {
    --primary: #4f6d7a;
    --primary-light: #7a94a1;
    --primary-dark: #2f4a54;
    --secondary: #7a6e5a;
    --dark: #111827;
    --dark-gray: #374151;
    --medium-gray: #6b7280;
    --light-gray: #e5e7eb;
    --light: #f7f6f3;
    --white: #fff
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: linear-gradient(135deg, var(--dark), var(--dark-gray));
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem
}

/* Progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #4f6d7a, #7a94a1);
    box-shadow: 0 0 12px rgba(79, 109, 122, .4);
    z-index: 80
}

/* Hero */
.interactive-bg {
    position: relative;
    width: 100%;
    min-height: 64vh;
    background: linear-gradient(-45deg, #f7f6f3, #ebe9e4, #e7e5df, #e1dfd8);
    background-size: 300% 300%;
    animation: gradientMove 14s ease infinite;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    overflow: hidden;
    padding-left: clamp(1rem, 6vw, 6rem);
    padding-top: clamp(2rem, 8vh, 5rem)
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

.decor-blobs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1
}

.decor-blobs span {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: .28;
    animation: blobFloat 18s ease-in-out infinite
}

.decor-blobs span:nth-child(1) {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 30% 30%, rgba(79, 109, 122, .22), rgba(79, 109, 122, 0));
    top: 12%;
    left: 6%;
    animation-duration: 22s
}

.decor-blobs span:nth-child(2) {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle at 70% 40%, rgba(122, 148, 161, .22), rgba(122, 148, 161, 0));
    bottom: 18%;
    right: 10%;
    animation-duration: 20s
}

.decor-blobs span:nth-child(3) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 50% 70%, rgba(47, 74, 84, .22), rgba(47, 74, 84, 0));
    top: 28%;
    right: 28%;
    animation-duration: 24s
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1)
    }

    50% {
        transform: translate(20px, -18px) scale(1.06)
    }

    100% {
        transform: translate(0, 0) scale(1)
    }
}

.aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1
}

.aurora::before,
.aurora::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen
}

.aurora::before {
    width: 60vw;
    height: 60vw;
    left: -8vw;
    top: -6vw;
    background: conic-gradient(from 180deg at 50% 50%, rgba(79, 109, 122, .28), rgba(122, 148, 161, .18), rgba(47, 74, 84, .22), transparent 60%);
    animation: auroraSpin 24s linear infinite
}

.aurora::after {
    width: 48vw;
    height: 48vw;
    right: -6vw;
    bottom: -8vw;
    background: radial-gradient(circle at 40% 60%, rgba(122, 148, 161, .25), rgba(79, 109, 122, .2), transparent 55%);
    animation: auroraPulse 16s ease-in-out infinite
}

@keyframes auroraSpin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

@keyframes auroraPulse {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.08)
    }
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--dark)
}

.hero-title {
    background: linear-gradient(180deg, #2f4a54 0%, #4f6d7a 50%, #7a94a1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -.02em;
    line-height: 1.1;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 12px 30px rgba(17, 24, 39, .06)
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-top: .75rem
}

.back-button:hover {
    text-decoration: underline
}

/* CV header */
.cv-container {
    margin: 2rem 0
}

.cv-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem
}

.cv-photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary)
}

.cv-intro h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-dark)
}

.cv-title {
    font-size: 1.1rem;
    color: var(--primary);
    margin: .4rem 0 .8rem
}

.cv-contact .contact-item {
    margin: .3rem 0;
    color: var(--medium-gray)
}

.cv-contact .contact-item::before {
    content: "•";
    color: var(--primary);
    margin-right: .5rem
}

/* Sections */
.cv-section {
    margin: 2rem 0
}

.cv-section h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0 0 1rem
}

.cv-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem
}

.cv-item {
    background: #fff;
    border-left: 4px solid var(--primary);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .06);
    transition: transform .3s ease, border-color .25s ease
}

.cv-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary-dark)
}

.cv-company {
    font-style: italic;
    color: var(--medium-gray)
}

.cv-date {
    font-size: .9rem;
    color: var(--medium-gray);
    margin-bottom: .6rem
}

.cv-details {
    margin: .2rem 0 0 1rem
}

/* Skills */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem
}

.skill-item h4 {
    margin: 0 0 .4rem;
    color: var(--primary-dark)
}

.skill-badge {
    display: inline-block;
    padding: 4px 10px;
    margin: 3px 3px 3px 0;
    background: var(--primary-light);
    color: #fff;
    font-size: .85rem;
    border-radius: 20px
}

/* Languages */
.languages .language-item {
    margin-bottom: 1rem
}

.languages span {
    font-weight: 600;
    margin-bottom: 4px;
    display: inline-block
}

.language-level {
    background: var(--light-gray);
    border-radius: 20px;
    overflow: hidden;
    height: 12px;
    margin-top: 4px;
    position: relative
}

.language-level .level-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 20px;
    transition: width .8s ease
}

/* Download */
.cv-download {
    text-align: center;
    margin-top: 2rem
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: 12px 24px;
    background: linear-gradient(135deg, #5e7680, #4f6d7a);
    color: #fff;
    border-radius: 28px;
    font-weight: 700;
    transition: transform .25s ease, box-shadow .25s ease;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(79, 109, 122, .18);
    position: relative;
    overflow: hidden
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(79, 109, 122, .22)
}

/* Footer */
.main-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #f7f6f3, #ecebe6, #e7e5df, #e1dfd8);
    background-size: 300% 300%;
    animation: gradientMove 14s ease infinite;
    padding: 60px 0 24px;
    border-top: 1px solid rgba(17, 24, 39, .08);
    color: #111827;
    backdrop-filter: blur(8px)
}

.footer-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    align-items: start
}

.footer-links a {
    color: #374151;
    text-decoration: none;
    transition: color .2s ease
}

.footer-links a:hover {
    color: var(--primary)
}

.footer-bottom {
    text-align: center;
    margin-top: 1rem;
    color: #374151
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
    will-change: opacity, transform
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0)
}

/* Overlay & back to top */
.page-overlay {
    position: fixed;
    inset: 0;
    background: rgba(247, 246, 243, .7);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center
}

.page-overlay.show {
    opacity: 1
}

.loader-ring {
    width: 56px;
    height: 56px;
    position: relative
}

.loader-ring .dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulseDot 1.2s ease infinite
}

.loader-ring .dot:nth-child(2) {
    animation-delay: .2s
}

.loader-ring .dot:nth-child(3) {
    animation-delay: .4s
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: .2;
        transform: translate(-50%, -50%) scale(.8)
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.06)
    }
}

.back-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--light-gray);
    background: linear-gradient(135deg, #5e7680, #4f6d7a);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 14px 36px rgba(79, 109, 122, .26);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease;
    z-index: 70
}

.back-top.show {
    opacity: 1;
    transform: translateY(0)
}

/* Ripple & cursors */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    background: rgba(255, 255, 255, .6);
    animation: ripple .6s ease-out forwards
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: .6
    }

    100% {
        width: 220px;
        height: 220px;
        opacity: 0
    }
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 90;
    mix-blend-mode: multiply;
    transition: width .15s ease, height .15s ease, border-color .2s ease, background-color .2s ease;
    background: rgba(79, 109, 122, .06)
}

.cursor-ring.hover {
    width: 32px;
    height: 32px;
    background: rgba(79, 109, 122, .12)
}

.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 89;
    filter: blur(80px);
    mix-blend-mode: screen;
    background: radial-gradient(closest-side, rgba(79, 109, 122, .35), rgba(122, 148, 161, .18), transparent 70%);
    transform: translate(-50%, -50%)
}

/* Responsive */
@media(max-width:768px) {
    .cv-header {
        flex-direction: column;
        align-items: flex-start
    }

    .interactive-bg {
        min-height: 56vh;
        padding: 2rem 1rem
    }

    .cv-photo img {
        width: 120px;
        height: 120px
    }

    .container {
        padding: 0 1rem
    }
}