/* ================================================
   YVES CAINE — DARK CINEMATIC PARALLAX PORTFOLIO
   Version 2.0
   ================================================ */

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --gold: #c9a84c;
    --gold-light: #e2c97e;
    --gold-dark: #a38634;
    --white: #ffffff;
    --gray-100: #f0f0f0;
    --gray-200: #cccccc;
    --gray-300: #999999;
    --gray-400: #666666;
    --gray-500: #333333;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height: 72px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--gray-200);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition);
}

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

ul {
    list-style: none;
}

/* ---------- GRAIN OVERLAY ---------- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---------- NAVIGATION ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.1em;
    text-decoration: none;
}

.nav-logo:hover {
    color: var(--gold-light);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gray-300);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color var(--transition);
    position: relative;
}

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

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

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

/* Language Toggle */
.lang-toggle {
    background: none;
    border: 1px solid var(--gray-500);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color var(--transition);
}

.lang-toggle:hover {
    border-color: var(--gold);
}

.lang-option {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-400);
    letter-spacing: 0.05em;
    transition: color var(--transition);
}

.lang-option.active {
    color: var(--gold);
}

.lang-separator {
    color: var(--gray-500);
    font-size: 0.75rem;
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--gray-200);
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* ---------- SECTIONS BASE ---------- */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.section-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 120px 40px;
}

.section-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--gold);
    letter-spacing: 0.2em;
    margin-bottom: 16px;
    opacity: 0.7;
}

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* stagger children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- HERO SECTION ---------- */
.section-hero {
    min-height: 100vh;
    background: var(--bg-primary);
    overflow: hidden;
    flex-direction: column;
}

.hero-bg-parallax {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background: radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(201, 168, 76, 0.03) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
    text-align: center;
}

.hero-portrait {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gold-dark);
    margin-bottom: 40px;
    opacity: 0;
    transform: scale(0.8);
    animation: heroPortraitIn 1.2s ease 0.3s forwards;
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes heroPortraitIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
    opacity: 0;
    animation: heroTextIn 1s ease 0.6s forwards;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 300;
    color: var(--white);
    letter-spacing: 0.05em;
    line-height: 1.1;
    margin-bottom: 24px;
    opacity: 0;
    animation: heroTextIn 1s ease 0.8s forwards;
}

.hero-tagline {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--gray-300);
    max-width: 600px;
    margin-bottom: 32px;
    opacity: 0;
    animation: heroTextIn 1s ease 1s forwards;
}

.hero-decorations {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    opacity: 0;
    animation: heroTextIn 1s ease 1.2s forwards;
}

.decoration-badge {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(201, 168, 76, 0.3);
    padding: 8px 20px;
    border-radius: 2px;
}

@keyframes heroTextIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: heroTextIn 1s ease 1.5s forwards;
}

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

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

.scroll-indicator span {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray-400);
}

/* ---------- ABOUT SECTION ---------- */
.section-about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: start;
}

.about-label h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1.2;
}

.about-lead {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--gray-100);
    line-height: 1.8;
    margin-bottom: 48px;
}

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

.about-detail-block h3 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.about-detail-block ul li {
    font-size: 0.9rem;
    color: var(--gray-300);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ---------- STATS SECTION ---------- */
.section-stats {
    background: var(--bg-primary);
    border-top: 1px solid rgba(201, 168, 76, 0.1);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 40px 20px;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 300;
    color: var(--gold);
    line-height: 1;
    display: inline;
}

.stat-suffix {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    color: var(--gold);
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-top: 12px;
}

/* ---------- PROJECTS SECTION ---------- */
.section-projects {
    min-height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.projects-header {
    padding: 80px 40px 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.projects-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--white);
    margin-bottom: 8px;
}

/* Carousel Wrapper */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 60px 20px;
    box-sizing: border-box;
}

.carousel-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
    border-radius: 4px;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
}

/* Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: rgba(10, 10, 10, 0.8);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.carousel-arrow:hover {
    background: var(--gold);
    color: var(--bg-primary);
}

.carousel-arrow:hover svg {
    stroke: var(--bg-primary);
}

.carousel-arrow--left {
    left: 0;
}

.carousel-arrow--right {
    right: 0;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 24px 0;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active,
.carousel-dot:hover {
    background: var(--gold);
    transform: scale(1.2);
}

/* CTA to all projects */
.projects-cta {
    text-align: center;
    padding: 20px 0 40px;
}

.btn-all-projects {
    display: inline-block;
    padding: 14px 40px;
    border: 1px solid var(--gold);
    color: var(--gold) !important;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.btn-all-projects:hover {
    background: var(--gold);
    color: var(--bg-primary) !important;
}

/* Project Card */
.project-card {
    width: 100%;
    height: 65vh;
    min-height: 400px;
    max-height: 650px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition);
}

.project-card:hover {
    transform: scale(1.01);
}

/* --- All Projects Page Grid --- */
.projects-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    padding: 0 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.projects-page-grid .project-card {
    height: 320px;
    min-height: 280px;
    max-height: 400px;
}

.projects-page-grid .project-card.hidden {
    display: none;
}

/* Filter bar for projects page */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 20px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    background: transparent;
    color: var(--gray-300);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg-primary);
}

/* Projects page hero */
.projects-page-hero {
    text-align: center;
    padding: 140px 40px 60px;
}

.projects-page-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--white);
    margin-bottom: 12px;
}

.projects-page-hero p {
    color: var(--gray-400);
    font-size: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold) !important;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 30px;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.7;
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 40px 40px;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.7) 50%, transparent 100%);
    z-index: 2;
}

.project-region {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 8px;
}

.project-overlay h3 {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 400;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-overlay p {
    font-size: 0.9rem;
    color: var(--gray-300);
    max-width: 500px;
}

/* ---------- TIMELINE SECTION ---------- */
.section-timeline {
    background: var(--bg-primary);
}

.timeline-header {
    text-align: center;
    margin-bottom: 80px;
}

.timeline-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--white);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 60px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    padding-left: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -46px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: var(--bg-primary);
    z-index: 1;
}

.timeline-date {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.timeline-content h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--gray-300);
    line-height: 1.7;
}

/* ---------- PUBLICATIONS SECTION ---------- */
.section-publications {
    background: var(--bg-secondary);
}

.publications-header {
    text-align: center;
    margin-bottom: 60px;
}

.publications-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--white);
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.publication-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 40px;
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
}

.publication-card:hover {
    border-color: var(--gold-dark);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.publication-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    color: var(--gold);
}

.publication-card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 12px;
}

.publication-card p {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.publication-link {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
    padding-bottom: 2px;
    transition: border-color var(--transition);
}

.publication-card:hover .publication-link {
    border-color: var(--gold);
}

/* ---------- FOOTER ---------- */
.section-footer {
    min-height: auto;
    background: var(--bg-primary);
    border-top: 1px solid rgba(201, 168, 76, 0.1);
}

.section-footer .section-inner {
    padding: 60px 40px;
}

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

.footer-name {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 8px;
}

.footer-title {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.footer-subtitle {
    font-size: 0.75rem;
    color: var(--gold-dark);
    letter-spacing: 0.1em;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition);
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--gold);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 2px;
}

.lightbox-caption {
    margin-top: 20px;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--gray-200);
    text-align: center;
}

/* ---------- RESPONSIVE ---------- */

/* Tablet */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-card {
        height: 55vh;
    }

    .carousel-arrow--left {
        left: 10px;
    }

    .carousel-arrow--right {
        right: 10px;
    }

    .carousel-wrapper {
        padding: 30px 50px 20px;
    }

    .projects-page-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-inner {
        padding: 0 20px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 28px;
        transform: translateX(100%);
        transition: transform 0.4s ease;
        border-left: 1px solid rgba(201, 168, 76, 0.1);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .section-inner {
        padding: 80px 20px;
    }

    .hero-portrait {
        width: 140px;
        height: 140px;
    }

    .hero-name {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-decorations {
        flex-direction: column;
        align-items: center;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .project-card {
        height: 50vh;
        min-height: 350px;
    }

    .project-overlay {
        padding: 40px 24px 24px;
    }

    .projects-header {
        padding: 80px 20px 20px;
    }

    .carousel-wrapper {
        padding: 20px 10px;
    }

    .carousel-arrow {
        width: 44px;
        height: 44px;
    }

    .carousel-arrow--left {
        left: 6px;
    }

    .carousel-arrow--right {
        right: 6px;
    }

    .projects-page-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 40px;
    }

    .filter-bar {
        padding: 10px 16px 30px;
        gap: 6px;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 0.7rem;
    }

    .timeline {
        padding-left: 40px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 24px;
    }

    .timeline-item::before {
        left: -36px;
    }

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

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* ============================================
   WORLD MAP SECTION
   ============================================ */
.section-worldmap {
    min-height: auto;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.section-worldmap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.04) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.worldmap-header {
    text-align: center;
    padding: 0 40px 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.worldmap-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--white);
    margin-bottom: 8px;
}

.worldmap-header p {
    color: var(--gray-300);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* ── Map Container ── */
.worldmap-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Base detailed map */
.worldmap-base {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

/* Pin overlay SVG — positioned exactly on top of the base map */
.worldmap-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Allow pointer events only on pin hit areas */
.worldmap-svg .pin-hitarea {
    pointer-events: all;
}

/* ── PIN STYLES ── */
.map-pin {
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.5s ease;
}

.pins-visible .map-pin {
    animation: pinFadeIn 0.6s ease forwards;
}

@keyframes pinFadeIn {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}

.pin-leader {
    stroke: rgba(201, 168, 76, 0.25);
    stroke-width: 0.5;
    stroke-dasharray: 2 2;
}

.pin-pulse {
    opacity: 0;
    animation: pinPulse 2.8s ease-out infinite;
}

.pins-visible .pin-pulse {
    animation: pinPulse 2.8s ease-out infinite;
}

@keyframes pinPulse {
    0%   { r: 5;  opacity: 0.5; }
    100% { r: 16; opacity: 0; }
}

.pin-outer {
    opacity: 0.85;
    transition: r 0.3s ease, opacity 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(201, 168, 76, 0.4));
}

.pin-inner {
    fill: rgba(255, 255, 255, 0.9);
}

.pin-hitarea {
    fill: transparent;
    cursor: pointer;
}

.map-pin:hover .pin-outer {
    r: 7;
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.7));
}

.map-pin:hover .pin-inner {
    r: 3;
}

/* ── TOOLTIP ── */
.map-tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    transform: translate(-50%, -100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.map-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -100%) translateY(-4px);
}

.tooltip-card {
    background: rgba(16, 16, 16, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 4px;
    padding: 10px 16px;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tooltip-card::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(201, 168, 76, 0.25);
}

.tooltip-name {
    display: block;
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.tooltip-location {
    display: block;
    color: var(--gray-300);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── LEGEND ── */
.worldmap-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px 20px 0;
    max-width: 900px;
    margin: 0 auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-300);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── PROJECT MODAL ── */
.map-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.map-modal.active {
    opacity: 1;
    visibility: visible;
}

.map-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.map-modal-content {
    position: relative;
    z-index: 2;
    display: flex;
    max-width: 920px;
    width: 90%;
    max-height: 85vh;
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 6px;
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.map-modal.active .map-modal-content {
    transform: translateY(0);
}

.map-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 76, 0.3);
    background: rgba(10, 10, 10, 0.8);
    color: var(--gold);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.map-modal-close:hover {
    background: var(--gold);
    color: var(--bg-primary);
}

.map-modal-image {
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
}

.map-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 400px;
}

.map-modal-body {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-modal-region {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
    padding: 4px 12px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 2px;
}

.map-modal-title {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 400;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.2;
}

.map-modal-location {
    color: var(--gray-300);
    font-size: 0.85rem;
    margin-bottom: 20px;
    letter-spacing: 0.03em;
}

.map-modal-desc {
    color: var(--gray-200);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.map-modal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold) !important;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.map-modal-link:hover {
    opacity: 0.7;
}

/* ── RESPONSIVE MAP ── */
@media (max-width: 1024px) {
    .section-worldmap {
        padding: 80px 0 60px;
    }
}

@media (max-width: 768px) {
    .section-worldmap {
        padding: 60px 0 40px;
    }

    .worldmap-container {
        padding: 0;
    }

    .map-modal-content {
        flex-direction: column;
        width: 95%;
        max-height: 90vh;
    }

    .map-modal-image {
        flex: 0 0 auto;
        max-height: 35vh;
    }

    .map-modal-img {
        min-height: 200px;
    }

    .map-modal-body {
        padding: 28px 24px;
    }

    .worldmap-legend {
        gap: 12px;
    }

    .legend-item {
        font-size: 0.65rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .map-modal-body {
        padding: 20px 16px;
    }

    .map-modal-title {
        font-size: 1.3rem;
    }

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

    .stat-item {
        padding: 20px 10px;
    }

    .project-card {
        height: 45vh;
    }
}
