:root {
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --accent-glow: rgba(0, 150, 255, 0.2);
    --lg-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Page Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

.stagger-5 {
    transition-delay: 0.5s;
}

/* Unlock Screen Overlay */
#unlock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

.key-logo {
    cursor: pointer;
    transition: all 0.5s ease;
    user-select: none;
    animation: keyPulse 3s infinite ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.key-logo:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 30px rgba(0, 150, 255, 0.8));
}

.unlock-text {
    margin-top: 20px;
    font-size: 0.8rem;
    letter-spacing: 5px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    margin-bottom: 30px;
}

/* Sound Selector Toggle */
.sound-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1002;
    transition: all 0.5s ease;
}

.sound-label {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
}

input:checked+.slider {
    background-color: rgba(0, 150, 255, 0.2);
}

input:checked+.slider:before {
    transform: translateX(20px);
    background-color: #0096ff;
}

@keyframes keyPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

#unlock-screen.unlocked {
    transform: scale(1);
    background: rgba(0, 0, 0, 0.98);
}

#unlock-screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.5);
}

#terminal {
    width: 80%;
    max-width: 700px;
    height: 400px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-top: 40px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 40px rgba(0, 0, 0, 1);
    z-index: 1002;
    position: relative;
}

/* Code Rain Background */
#code-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    pointer-events: none;
    display: none;
    opacity: 0.15;
}


#terminal::-webkit-scrollbar {
    width: 4px;
}

#terminal::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.2);
}

.terminal-line {
    margin-bottom: 5px;
    white-space: pre-wrap;
    opacity: 0;
    animation: fadeInLine 0.1s forwards;
}

@keyframes fadeInLine {
    to {
        opacity: 1;
    }
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: #fff;
    margin-left: 5px;
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}


body {
    background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    cursor: none;
    /* Hide default cursor */
}

/* Custom Cursor Dot */
.cursor-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Click Halo Effect */
.click-halo {
    position: fixed;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    animation: haloExpand 0.6s ease-out forwards;
}

@keyframes haloExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        width: 150px;
        height: 150px;
        opacity: 0;
    }
}

/* Restore cursor on interactive elements if needed, or keep none for consistent feel */
a,
button,
.key-logo {
    cursor: none;
}

/* WWDC25 Style Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    z-index: -1;
    pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0.5;
    /* Subtler particles to let the glass shine */
}

/* Lueur d'arrière-plan supprimée par l'utilisateur */
.background-glow {
    display: none;
}

/* Conteneur principal style "Liquid Glass" */
.glass-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border-radius: 0.4rem;
    overflow: hidden;
    flex: 1 1 auto;
    width: 90%;
    max-width: 1000px;
    padding: 80px 60px;
    gap: 60px;
    color: var(--lg-text);

    /* Glass Effects */
    /* backdrop-filter: blur(30px) saturate(180%); */
    /* -webkit-backdrop-filter: blur(30px) saturate(180%); */
    border: 1px solid rgba(255, 255, 255, 0.15);

    /* Liquid Shadows & Reflections */
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 0 80px rgba(255, 255, 255, 0.05),
        0 6px 6px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(0, 0, 0, 0.1);

    /* Initial state before unlock */
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition:
        opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
        transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2);

    z-index: 1;
}

.glass-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
    animation: liquidShine 10s infinite alternate ease-in-out;
}

@keyframes liquidShine {
    0% {
        transform: translate(-10%, -10%) rotate(0deg);
    }

    100% {
        transform: translate(10%, 10%) rotate(5deg);
    }
}

.glass-container.show {
    opacity: 0.9;
    transform: scale(1) translateY(0);
}

.glass-container:hover {
    box-shadow:
        0 12px 40px 0 rgba(0, 0, 0, 0.45),
        inset 0 0 100px rgba(255, 255, 255, 0.08),
        0 8px 8px rgba(0, 0, 0, 0.25),
        0 0 30px rgba(0, 150, 255, 0.1);
    transform: scale(1.005);
}

/* Header & Nav */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    width: 100%;
}

.logo {
    font-size: 2.5rem;
    letter-spacing: 8px;
    font-weight: 800;
    background: linear-gradient(90deg,
            #ffffff 0%,
            #0096ff 25%,
            #ffffff 50%,
            #0096ff 75%,
            #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 4s linear infinite;
}

@keyframes textShine {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: 0% center;
    }
}

.title-tag {
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(90deg,
            #0096ff 0%,
            #ffffff 50%,
            #0096ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 6s linear infinite;
}

/* Sections */
section {
    width: 100%;
}

section h2 {
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 30px;
    border-left: 3px solid #0096ff;
    padding-left: 15px;
    text-transform: uppercase;
}

.cv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
}

/* Experience & Education */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.timeline-item {
    border-left: 1px solid var(--glass-border);
    padding-left: 20px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 5px;
    width: 9px;
    height: 9px;
    background: #0096ff;
    border-radius: 50%;
}

.item-date {
    font-size: 0.75rem;
    color: #0096ff;
    margin-bottom: 5px;
}

.item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.item-desc {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.6;
}

/* Skills */
.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.skill-tag:hover {
    background: rgba(0, 150, 255, 0.1);
    border-color: #0096ff;
    transform: translateY(-2px);
}

/* Footer */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
    width: 100%;
}

.footer-title {
    font-size: 1rem;
    letter-spacing: 3px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

footer a {
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

footer a svg {
    transition: transform 0.3s ease;
}

footer a:hover {
    color: #0096ff;
    background: rgba(0, 150, 255, 0.08);
    border-color: rgba(0, 150, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

footer a:hover svg {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .cv-grid {
        grid-template-columns: 1fr;
    }

    .glass-container {
        padding: 30px;
    }
}