/* ============================================
   LIONEL LOURDIN — Personal Website
   Color palette inspired by nature imagery:
   Forest greens, golden amber, warm cream
   ============================================ */

:root {
    /* Primary palette */
    --green-deep: #1a2e1a;
    --green-dark: #2d4a2e;
    --green-mid: #3a5a3c;
    --green-soft: #5a7a5c;
    --green-light: #8aaa7c;

    /* Gold / Amber accents */
    --gold: #c8a24e;
    --gold-light: #dbb963;
    --gold-glow: #e8cc7a;
    --gold-pale: #f0e0a8;

    /* Neutrals */
    --cream: #f5f0e4;
    --cream-light: #faf7f0;
    --warm-gray: #b8b0a0;
    --charcoal: #1c1c1c;
    --charcoal-soft: #2a2a28;
    --text-dark: #1a1a18;
    --text-body: #3a3a36;
    --text-muted: #7a7a72;
    --text-light: #e8e4dc;

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --section-padding: clamp(80px, 12vh, 140px);
    --container-max: 1100px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background-color: var(--cream-light);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s var(--ease-smooth);
}

a:hover {
    color: var(--gold-light);
}

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

::selection {
    background: var(--gold);
    color: var(--charcoal);
}

/* ============================================
   NAVIGATION
   ============================================ */

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 clamp(20px, 4vw, 60px);
    transition: background 0.4s var(--ease-smooth), padding 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}

#navbar.scrolled {
    background: rgba(26, 46, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(0,0,0,0.15);
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    transition: height 0.4s var(--ease-smooth);
}

#navbar.scrolled .nav-inner {
    height: 60px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--cream) !important;
    letter-spacing: 0.05em;
}

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

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

.nav-links a {
    color: var(--cream);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    opacity: 0.8;
    transition: opacity 0.3s, color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.4s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--gold-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(200, 162, 78, 0.5);
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    text-transform: uppercase;
}

.lang-btn:hover {
    background: var(--gold);
    color: var(--charcoal);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.menu-btn span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--cream);
    transition: all 0.3s var(--ease-smooth);
    transform-origin: center;
}

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

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

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: rgba(26, 46, 26, 0.97);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--ease-out);
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
}

.mobile-menu li {
    margin: 1.5rem 0;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s var(--ease-out);
}

.mobile-menu.open li {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu.open li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open li:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.open li:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.open li:nth-child(4) { transition-delay: 0.4s; }

.mobile-menu a {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--cream);
    letter-spacing: 0.05em;
}

.mobile-menu a:hover {
    color: var(--gold);
}

/* ============================================
   HERO SECTION
   ============================================ */

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    will-change: transform;
    backface-visibility: hidden;
    animation: heroCinematic 80s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes heroCinematic {
    0% {
        transform: scale(1.25) translate3d(0, 0, 0);
        transform-origin: 50% 20%;
    }
    8% {
        transform: scale(1.3) translate3d(-20px, -5px, 0);
        transform-origin: 65% 25%;
    }
    18% {
        transform: scale(1.4) translate3d(-35px, -8px, 0);
        transform-origin: 75% 30%;
    }
    28% {
        transform: scale(1.35) translate3d(-15px, 5px, 0);
        transform-origin: 60% 40%;
    }
    38% {
        transform: scale(1.28) translate3d(20px, 3px, 0);
        transform-origin: 40% 25%;
    }
    48% {
        transform: scale(1.38) translate3d(35px, -6px, 0);
        transform-origin: 30% 20%;
    }
    58% {
        transform: scale(1.32) translate3d(25px, 8px, 0);
        transform-origin: 35% 35%;
    }
    68% {
        transform: scale(1.42) translate3d(0, -4px, 0);
        transform-origin: 50% 15%;
    }
    78% {
        transform: scale(1.3) translate3d(-25px, 6px, 0);
        transform-origin: 65% 35%;
    }
    88% {
        transform: scale(1.35) translate3d(-10px, -3px, 0);
        transform-origin: 55% 22%;
    }
    100% {
        transform: scale(1.25) translate3d(0, 0, 0);
        transform-origin: 50% 20%;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 46, 26, 0.6) 0%,
        rgba(26, 46, 26, 0.4) 30%,
        rgba(26, 46, 26, 0.55) 60%,
        rgba(26, 46, 26, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 700px;
}

.hero-profile {
    margin-bottom: 2rem;
}

.profile-ring {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto;
    padding: 4px;
    background: linear-gradient(135deg, var(--gold), var(--green-soft), var(--gold-light));
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.3), 0 0 80px rgba(200, 162, 78, 0.15);
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    animation: fadeUp 1s var(--ease-out) 0.3s forwards;
}

.profile-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--cream);
    letter-spacing: 0.03em;
    margin-bottom: 0.6rem;
}

.hero-name .reveal-text {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 0.8s var(--ease-out) forwards;
}

.hero-name .reveal-text:nth-child(1) {
    animation-delay: 0.6s;
    margin-right: 0.3em;
}

.hero-name .reveal-text:nth-child(2) {
    animation-delay: 0.8s;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-weight: 300;
    color: var(--gold-pale);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s var(--ease-out) 1s forwards;
}

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--warm-gray);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s var(--ease-out) 1.2s forwards;
}

.hero-location svg {
    color: var(--gold);
    width: 14px;
    height: 14px;
}

.scroll-indicator {
    display: block;
    margin-top: 3rem;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 1.5s forwards;
}

.scroll-line {
    width: 1px;
    height: 50px;
    margin: 0 auto;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* ============================================
   SECTIONS (General)
   ============================================ */

.section {
    padding: var(--section-padding) clamp(20px, 5vw, 60px);
}

.section-dark {
    background: var(--green-deep);
    color: var(--text-light);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.section-label::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--gold);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--text-dark);
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin-bottom: 3rem;
}

.section-title.light {
    color: var(--cream);
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.about-col p {
    margin-bottom: 1.4rem;
    font-size: 0.93rem;
    line-height: 1.9;
    color: var(--text-body);
    text-align: justify;
}

.about-lead {
    font-size: 1rem !important;
    font-weight: 400;
    color: var(--text-dark) !important;
    line-height: 1.85 !important;
}

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

.about-tags {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(45, 74, 46, 0.1);
}

.tag {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    padding: 6px 14px;
    background: var(--cream);
    color: var(--green-dark);
    border: 1px solid rgba(45, 74, 46, 0.12);
    border-radius: 1px;
    transition: all 0.3s var(--ease-smooth);
}

.tag:hover {
    background: var(--green-dark);
    color: var(--cream);
    border-color: var(--green-dark);
}

/* ============================================
   EXPERIENCE INTRO
   ============================================ */

.experience-intro {
    max-width: 900px;
    margin-bottom: 3.5rem;
}

.experience-intro p {
    font-size: 0.93rem;
    line-height: 1.9;
    color: var(--warm-gray);
    margin-bottom: 1.4rem;
    text-align: justify;
}

/* ============================================
   EXPERIENCE / TIMELINE
   ============================================ */

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--gold), var(--green-soft), transparent);
}

.timeline-item {
    position: relative;
    padding: 0 0 2.5rem 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--ease-out);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px var(--green-deep), 0 0 12px rgba(200, 162, 78, 0.3);
    transition: transform 0.3s var(--ease-out);
}

.timeline-item:hover::before {
    transform: scale(1.5);
}

.timeline-date {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--gold-glow);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--cream);
    margin-bottom: 0.15rem;
}

.timeline-content p {
    font-size: 0.88rem;
    color: var(--warm-gray);
    line-height: 1.6;
}

.timeline-content a {
    color: var(--gold-light);
    border-bottom: 1px solid rgba(219, 185, 99, 0.2);
    transition: border-color 0.3s, color 0.3s;
}

.timeline-content a:hover {
    color: var(--gold-glow);
    border-color: var(--gold-glow);
}

/* ============================================
   PUBLICATIONS
   ============================================ */

.publications-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.pub-card {
    background: white;
    border: 1px solid rgba(200, 162, 78, 0.12);
    padding: 2.2rem;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--ease-out);
}

.pub-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.pub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--green-mid));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}

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

.pub-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07);
    transform: translateY(-4px);
}

.pub-year {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--green-dark);
    line-height: 1;
    margin-bottom: 0.8rem;
}

.pub-card h3 {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.6rem;
}

.pub-card p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-body);
}

.pub-card a {
    color: var(--text-dark);
    border-bottom: 1px solid rgba(200, 162, 78, 0.3);
    transition: color 0.3s, border-color 0.3s;
}

.pub-card a:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-container {
    text-align: center;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(200, 162, 78, 0.2);
    padding: 1.4rem 2rem;
    border-radius: 2px;
    color: var(--cream) !important;
    transition: all 0.4s var(--ease-out);
}

.contact-card:hover {
    background: rgba(200, 162, 78, 0.1);
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    color: var(--gold);
    display: flex;
    align-items: center;
}

.contact-card span {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

/* ============================================
   FOOTER
   ============================================ */

#footer {
    background: var(--charcoal);
    padding: 2rem clamp(20px, 5vw, 60px);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--cream);
    letter-spacing: 0.05em;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Scroll-triggered animations */
[data-aos] {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-aos].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .about-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .nav-links {
        display: none;
    }

    .menu-btn {
        display: flex;
    }

    .lang-btn {
        margin-right: 1rem;
    }

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

    .footer-brand {
        flex-direction: column;
        gap: 0.6rem;
    }
}

@media (max-width: 600px) {
    .hero-name {
        font-size: 2.4rem;
    }

    .profile-ring {
        width: 130px;
        height: 130px;
    }

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

    .contact-cards {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
