@import url('https://fonts.googleapis.com/css2?family=Fraunces:wdht@400;700&family=DM+Sans:wght@400;500;700&display=swap');

/* design system */
:root {
    /* couleurs */
    --bg-primary: #FAF6F1;
    --bg-card: #F0EAE2;
    --text-primary: #2C2420;
    --text-secondary: #7A6E65;
    --text-muted: #A89E95;
    --accent: #C4654A;
    --accent-hover: #A8503A;
    --border: #E2D9CF;

    /* fonts */
    --font-display: 'Fraunces', serif;
    --font-body: 'DM Sans', sans-serif;

    /* espacements */
    --section-padding: 6rem 2rem;
    --max-width: 1100px;
    --radius: 12px;
}

/* reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
}

/* icon */
.icon img {
    width: 50px;
    height: 50px;
}

/* selection du texte aux couleurs du site */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(250, 246, 241, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

/* quand l'utilisateur scroll, une bordure apparait */
nav.scrolled {
    border-bottom-color: var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-primary);
    text-decoration: none;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* bouton de langue FR/EN */
#lang-toggle {
    padding: 0.4rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

#lang-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* sections (style commun) */
section {
    padding: var(--section-padding);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* hero */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-image img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border);
    transition: border-color 0.3s;
}

.hero-image img:hover {
    border-color: var(--accent);
}

.hero-overline {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

/* boutons */
.btn {
    display: inline-block;
    padding: 0.85rem 1.8rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* style commun sections */
.section-label {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

/* a propos */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.08);
}

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

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.3rem;
}

.detail-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.accent {
    color: var(--accent);
}

/* skills */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: transform 0.3s;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.08);
}

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

.skill-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.skill-icon {
    font-size: 1.3rem;
}

.skill-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

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

.skill-tag {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.3s;
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.08);
}

/* projets */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.08);
}

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

.project-year {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 1px;
}

.project-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.project-context {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.8rem;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tech-tag {
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(196, 101, 74, 0.1);
    color: var(--accent);
    border: 1px solid rgba(196, 101, 74, 0.25);
}

.project-links {
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

.project-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

.project-link:hover {
    color: var(--accent-hover);
}

/* experience */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--border);
    z-index: 1;
}

.timeline-dot.active {
    border-color: var(--accent);
    background: var(--accent);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0.3rem 0;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.timeline-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* education */
.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.edu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.edu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.08);
}

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

.edu-year {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 1px;
}

.edu-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.5rem 0 0.3rem;
}

.edu-school {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.edu-mention {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
}

/* contact */
#contact {
    text-align: center;
    padding-bottom: 2rem;
}

.contact-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 450px;
    margin: 0 auto 2.5rem;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.08);
}

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

.contact-icon {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.contact-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.contact-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.contact-card:hover .contact-value {
    color: var(--accent);
}

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

.languages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.lang-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.lang-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.lang-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.5rem 0 0.3rem;
}

.lang-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(44, 36, 32, 0.08);
}

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

.lang-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.2rem;
}

.lang-level {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.lang-diploma {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
}

/* footer */
footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* icons lucide */
.skill-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.project-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    vertical-align: middle;
    margin-right: 2px;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

/* hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

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

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

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

/* animation */
section.hidden {
    opacity: 0;
    transform: translateY(60px);
}

section.hidden.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

/* scroll to top */
#scrollUp {
    position: fixed;
    bottom: 30px;
    background: var(--accent);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
}

#scrollUp a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    text-decoration: none;
}

#scrollUp svg {
    width: 30px;
    height: 30px;
}

/* responsive */
@media (max-width: 768px) {

    /* nav mobile */
    nav {
        background: rgba(250, 246, 241, 0.97);
        padding: 1rem 1.2rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        z-index: 1000;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    /* hero */
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        width: 180px;
        height: 180px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    /* sections */
    section {
        padding: 4rem 1.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

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

    /* skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }

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

    /* education */
    .education-grid {
        grid-template-columns: 1fr;
    }

    /* contact */
    .contact-links {
        grid-template-columns: 1fr 1fr;
    }

    .languages-grid {
        gap: 1.5rem;
    }
}