/* Portfolio Alexandre Chaumereuil - Style Amélioré */
@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --jade: #00d2a0;
    --jade-dark: #00b894;
    --jade-light: #00f5c4;
    --bg: #0a0e27;
    --bg-secondary: #141936;
    --card-bg: #1a1f3a;
    --text: #ffffff;
    --muted: #9ca3c5;
    --accent: #667eea;
    --shadow: rgba(0, 210, 160, 0.15);
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Epilogue', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background animated gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 210, 160, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(102, 126, 234, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Header */
header {
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 60px;
    backdrop-filter: blur(10px);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    font-weight: 800;
    font-size: 1.5em;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--jade), var(--jade-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

nav {
    display: flex;
    gap: 8px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95em;
}

nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--jade), var(--jade-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

nav a span {
    position: relative;
    z-index: 1;
}

nav a:hover::before {
    opacity: 0.1;
}

nav a.active {
    background: linear-gradient(135deg, var(--jade), var(--jade-dark));
    color: var(--bg);
    box-shadow: 0 4px 20px var(--shadow);
}

/* Sidebar social */
.sidebar {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
    animation: slideInLeft 0.8s ease-out 0.3s both;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px) translateY(-50%);
        opacity: 0;
    }

    to {
        transform: translateX(0) translateY(-50%);
        opacity: 1;
    }
}

.sidebar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    filter: brightness(1);
}

.sidebar a:hover {
    background: var(--jade);
    border-color: var(--jade);
    transform: translateX(5px);
    box-shadow: 0 4px 20px var(--shadow);
}

.sidebar a img {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.sidebar a:hover img {
    filter: brightness(0) invert(0);
}

/* Main content */
main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 60px 80px;
}

/* Hero section */
.hero {
    display: flex;
    align-items: center;
    gap: 60px;
    margin: 80px 0 100px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 3.5em;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.hero-title span {
    display: block;
    background: linear-gradient(135deg, var(--jade), var(--jade-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.55em;
    font-weight: 600;
    margin-top: 8px;
    letter-spacing: 0;
}

.hero-desc {
    color: var(--muted);
    font-size: 1.15em;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 24px;
    background: var(--card-bg);
    border: 2px solid var(--jade);
    box-shadow: 0 20px 60px var(--shadow);
    transition: transform 0.4s ease;
}

.hero-img:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Quote */
.quote {
    position: relative;
    border-left: 4px solid var(--jade);
    padding: 28px 36px;
    margin: 60px 0;
    font-size: 1.2em;
    background: var(--card-bg);
    color: var(--text);
    font-style: italic;
    border-radius: 0 16px 16px 0;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.quote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 4em;
    color: var(--jade);
    opacity: 0.3;
    font-family: Georgia, serif;
}

/* Section */
section {
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out both;
}

section:nth-child(2) {
    animation-delay: 0.5s;
}

section:nth-child(3) {
    animation-delay: 0.6s;
}

section:nth-child(4) {
    animation-delay: 0.7s;
}

section:nth-child(5) {
    animation-delay: 0.8s;
}

.section-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
    letter-spacing: -1px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--jade), var(--jade-light));
    border-radius: 2px;
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--jade), var(--jade-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--jade);
    box-shadow: 0 20px 40px var(--shadow);
}

.project-title {
    font-weight: 700;
    font-size: 1.15em;
    color: var(--jade);
    margin-bottom: 12px;
    line-height: 1.4;
}

.project-desc {
    color: var(--muted);
    font-size: 0.95em;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Skills */
.skills {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.skill {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 24px;
    color: var(--jade);
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.skill:hover {
    background: var(--jade);
    color: var(--bg);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--shadow);
}

button.skill {
    border: none;
    font-family: inherit;
}

/* Contact Form */
.contact-form {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px;
    max-width: 600px;
    margin: 40px auto 0;
}

.contact-form label {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.contact-form input,
.contact-form textarea {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95em;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--jade);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    background: var(--jade);
    color: var(--bg);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.contact-form button:hover {
    background: var(--jade-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
}

/* About section */
.about {
    display: flex;
    gap: 48px;
    align-items: center;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.about-text {
    flex: 1;
}

.about-img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 20px;
    border: 2px solid var(--jade);
    box-shadow: 0 15px 40px var(--shadow);
}

/* Contact list */
.contact-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 28px;
    color: var(--text);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-card:hover {
    border-color: var(--jade);
    transform: translateX(8px);
    box-shadow: 0 8px 24px var(--shadow);
}

.contact-card a {
    color: var(--jade);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--jade-light);
    text-decoration: underline;
}

/* Footer */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Decorative squares */
.square {
    position: fixed;
    border: 2px solid var(--jade);
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, 20px) rotate(90deg);
    }

    50% {
        transform: translate(0, 40px) rotate(180deg);
    }

    75% {
        transform: translate(-20px, 20px) rotate(270deg);
    }
}

.square1 {
    top: 10%;
    left: 8%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
}

.square2 {
    top: 25%;
    right: 10%;
    width: 40px;
    height: 40px;
    animation-delay: -5s;
}

.square3 {
    top: 50%;
    left: 15%;
    width: 35px;
    height: 35px;
    animation-delay: -10s;
}

.square4 {
    top: 70%;
    right: 12%;
    width: 50px;
    height: 50px;
    animation-delay: -15s;
}

.square5 {
    bottom: 15%;
    left: 20%;
    width: 45px;
    height: 45px;
    animation-delay: -7s;
}

.square6 {
    bottom: 10%;
    right: 18%;
    width: 38px;
    height: 38px;
    animation-delay: -12s;
}

/* Responsive */
@media (max-width: 1024px) {
    header {
        padding: 24px 40px;
    }

    main {
        padding: 32px 40px 60px;
    }

    .sidebar {
        left: 20px;
    }

    .hero {
        gap: 40px;
        margin: 60px 0 80px;
    }

    .hero-title {
        font-size: 2.8em;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    nav a {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .sidebar {
        position: static;
        flex-direction: row;
        justify-content: center;
        transform: none;
        margin: 20px 0;
        animation: fadeInUp 0.8s ease-out 0.3s both;
    }

    main {
        padding: 20px;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        margin: 40px 0 60px;
        gap: 32px;
    }

    .hero-title {
        font-size: 2.2em;
    }

    .hero-img {
        width: 220px;
        height: 220px;
    }

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

    .about {
        flex-direction: column;
        text-align: center;
        padding: 28px;
    }

    .contact-list {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.6em;
    }
}

/* Loading animation for skill badges */
.skill {
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

.skill:nth-child(1) {
    animation-delay: 0.1s;
}

.skill:nth-child(2) {
    animation-delay: 0.15s;
}

.skill:nth-child(3) {
    animation-delay: 0.2s;
}

.skill:nth-child(4) {
    animation-delay: 0.25s;
}

.skill:nth-child(5) {
    animation-delay: 0.3s;
}

.skill:nth-child(6) {
    animation-delay: 0.35s;
}

.skill:nth-child(7) {
    animation-delay: 0.4s;
}

.skill:nth-child(8) {
    animation-delay: 0.45s;
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}