/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --navy:       #0d1b3e;
    --navy-mid:   #162d5e;
    --blue:       #2563eb;
    --blue-hover: #1d4ed8;
    --blue-pale:  #eff6ff;
    --blue-border: rgba(37, 99, 235, 0.3);

    --text-dark:  #1e293b;
    --text-mid:   #475569;
    --text-light: #94a3b8;

    --bg-white:   #ffffff;
    --bg-light:   #f8fafc;
    --border:     #e2e8f0;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg:  0 16px 40px rgba(0,0,0,0.1), 0 6px 12px rgba(0,0,0,0.05);
    --shadow-blue: 0 6px 20px rgba(37, 99, 235, 0.35);

    --radius:     14px;
    --radius-sm:  8px;
    --radius-pill: 100px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

p {
    color: var(--text-mid);
    line-height: 1.75;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px;
}

.section {
    padding: 88px 0;
}

.section--alt {
    background: var(--bg-light);
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--navy);
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    display: block;
    width: 44px;
    height: 4px;
    background: var(--blue);
    border-radius: 2px;
    margin-top: 14px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(13, 27, 62, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-contact {
    background: var(--blue);
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    margin-left: 8px;
}

.nav-contact:hover {
    background: var(--blue-hover) !important;
}

/* Hamburger toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    background: linear-gradient(150deg, #0b1936 0%, #0d1b3e 45%, #122050 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 110px 28px 80px;
    position: relative;
    overflow: hidden;
}

/* Clean hero — no dot grid */
.hero-grid-bg {
    display: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    align-items: center;
}

.hero-text {
    text-align: left;
}

.hero-name {
    color: #ffffff;
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
    line-height: 1.05;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(1rem, 2.2vw, 1.175rem);
    font-weight: 400;
    line-height: 1.75;
    max-width: 600px;
    margin: 0 0 40px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-photo-wrap {
    /* right column */
}

.hero-photo-box {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(160deg, #1e3f7a 0%, #162d5e 60%, #0f2247 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 32px rgba(0,0,0,0.28);
    overflow: hidden;
}

.hero-photo-caption {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.38);
    font-style: italic;
}

.btn-hero-primary {
    background: var(--blue);
    color: #fff;
    padding: 13px 30px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-hero-primary:hover {
    background: var(--blue-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    padding: 13px 30px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s, color 0.2s;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.hero-scroll-indicator span {
    display: block;
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    margin: 0 auto;
    border-radius: 2px;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(0.7); }
}

/* ============================================================
   ABOUT ME
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 64px;
    align-items: start;
}

.about-text p {
    margin-bottom: 18px;
    font-size: 1.025rem;
}

/* Stats */
.stats-row {
    display: inline-flex;
    align-items: stretch;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 32px 0;
}

.stat-box {
    padding: 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-num {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.stat-sep {
    width: 1px;
    background: var(--border);
    align-self: stretch;
}

/* Document buttons */
.doc-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.doc-btn--primary {
    background: var(--blue);
    color: #ffffff;
}

.doc-btn--primary:hover {
    background: var(--blue-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}

.doc-btn--secondary {
    background: var(--bg-white);
    color: var(--text-mid);
    border: 1.5px solid var(--border);
    cursor: default;
    opacity: 0.75;
}

.badge {
    background: var(--blue-pale);
    color: var(--blue);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Photo placeholder */
.about-photo {
    position: sticky;
    top: 86px;
}

.photo-box {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(150deg, #eef2ff 0%, #e0f2fe 100%);
    border: 2px dashed #c7d7f5;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    overflow: hidden;
}

.photo-initials-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-initials {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--blue);
    opacity: 0.6;
    letter-spacing: -0.03em;
}

.photo-caption {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* ============================================================
   MY WORK
   ============================================================ */
.work-block {
    margin-bottom: 60px;
}

.work-block:last-child {
    margin-bottom: 0;
}

.work-subtitle {
    font-size: 1.2rem;
    color: var(--navy);
    font-weight: 700;
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: -0.01em;
}

.work-subtitle-line {
    display: inline-block;
    width: 32px;
    height: 3px;
    background: var(--blue);
    border-radius: 2px;
    flex-shrink: 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), #60a5fa);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.25);
}

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

.card-category {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-mid);
    line-height: 1.65;
    flex: 1;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--blue);
    margin-top: 6px;
    transition: gap 0.2s;
}

.card:hover .card-link {
    gap: 10px;
}

/* Work split grid */
.work-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.work-split-block {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.work-split-block .work-subtitle {
    margin-bottom: 22px;
}

.work-split-p {
    font-size: 0.925rem;
    color: var(--text-mid);
    line-height: 1.75;
    margin-bottom: 14px;
}

.work-split-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--blue);
    margin-top: 10px;
    transition: gap 0.2s;
    align-self: flex-start;
}

.work-split-link:hover {
    gap: 11px;
}

/* ============================================================
   EXTRA-CURRICULAR
   ============================================================ */
.activities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.activity-block-desc {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.75;
    margin-bottom: 28px;
    padding-left: 2px;
}

.activity-photo {
    width: 120px;
    height: 100px;
    object-fit: contain;
    object-position: center;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.activity-item {
    display: flex;
    gap: 18px;
    align-items: center;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue);
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--blue-pale);
}

.activity-content {
    flex: 1;
}

.activity-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.activity-header h4 {
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--text-dark);
}

.activity-date {
    font-size: 0.775rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

.activity-content p {
    font-size: 0.875rem;
    line-height: 1.65;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--navy);
    padding: 44px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ============================================================
   PROJECT PAGES
   ============================================================ */
.project-hero {
    background: linear-gradient(140deg, var(--navy) 0%, #122050 50%, var(--navy-mid) 100%);
    padding: 130px 0 68px;
    position: relative;
    overflow: hidden;
}

.project-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
}

.project-hero .container {
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 28px;
    transition: color 0.2s;
    letter-spacing: 0.01em;
}

.back-link:hover {
    color: #ffffff;
}

.project-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.35);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.project-title {
    color: #ffffff;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    letter-spacing: -0.025em;
    margin-bottom: 14px;
    max-width: 820px;
    line-height: 1.15;
}

.project-lead {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.025rem;
    font-style: italic;
}

.project-body {
    padding: 70px 0;
}

.project-content {
    max-width: 780px;
}

.project-section {
    margin-bottom: 52px;
}

.project-section:last-child {
    margin-bottom: 0;
}

.project-section h2 {
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    letter-spacing: -0.01em;
}

.project-section p {
    font-size: 1rem;
    line-height: 1.8;
}

.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-list li {
    color: var(--text-mid);
    font-size: 1rem;
    line-height: 1.75;
    padding-left: 24px;
    position: relative;
}

.project-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--blue);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.5;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--blue-pale);
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(37, 99, 235, 0.2);
    letter-spacing: 0.02em;
}

/* Placeholder page styling */
.placeholder-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    color: #92400e;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-photo {
        order: -1;
        position: static;
    }

    .photo-box {
        aspect-ratio: 1;
        max-width: 180px;
        margin: 0 auto;
    }

    .activities-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 40px;
    }

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

    .hero-photo-wrap {
        max-width: 220px;
        margin: 0 auto;
    }

    .hero-photo-box {
        aspect-ratio: 1;
    }

    .work-split-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 640px) {
    .section { padding: 64px 0; }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 66px; left: 0; right: 0;
        background: rgba(13, 27, 62, 0.99);
        padding: 12px 16px 20px;
        gap: 4px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-contact {
        margin-left: 0;
        text-align: center;
    }

    .stats-row {
        flex-direction: column;
        width: 100%;
    }

    .stat-sep {
        width: 100%;
        height: 1px;
    }

    .doc-row {
        flex-direction: column;
    }

    .doc-btn {
        justify-content: center;
    }

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

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
}

/* ===== WORK LIST (inline project/lab list) ===== */
.work-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.work-entry {
    padding: 52px 0;
    border-bottom: 1px solid var(--border);
}

.work-entry:first-child {
    padding-top: 0;
}

.work-entry:last-child {
    border-bottom: none;
}

.work-entry-title {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1.2;
}

.work-entry-meta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 36px;
}

.work-entry-body {
    display: flex;
    gap: 52px;
    align-items: flex-start;
}

.work-entry:nth-child(even) .work-entry-body {
    flex-direction: row-reverse;
}

.work-entry-text {
    flex: 1;
    min-width: 0;
}

.work-entry .project-section {
    margin-bottom: 32px;
}

.work-entry .project-section:last-of-type {
    margin-bottom: 0;
}

.work-entry-photo {
    width: 364px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.work-entry-photo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.work-entry-photo img[src=""] {
    display: none;
}

.work-entry-photo::after {
    content: 'Photo à venir';
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 0 16px;
}

.work-entry-photo.has-photo::after {
    display: none;
}

@media (max-width: 700px) {
    .work-entry-body {
        flex-direction: column;
        gap: 32px;
    }

    .work-entry-photo {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}
