:root {
    /* Quiet Luxury Palette */
    --bg-primary: #F8F7F4;
    /* Soft warm ceramic/linen white */
    --bg-secondary: #EFECE6;
    /* Slightly darker warm grey */
    --text-main: #2A2A2A;
    /* Charcoal off-black for elegant readability */
    --text-muted: #6B6965;
    --accent-gold: #BCA371;
    /* Subtle brushed gold for interactions */

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography Details */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Animations (Fade in utility) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(248, 247, 244, 0.85);
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

.logo img {
    height: 80px;
    width: auto;
    opacity: 0.9;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
    pointer-events: auto;
}

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

.lang-btn.active {
    color: var(--text-main);
    text-decoration: underline;
    text-decoration-color: var(--accent-gold);
    text-underline-offset: 4px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin-top: 1.5rem;
}

/* Sections General */
section {
    padding: 8rem 5%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* About / CV */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.resume-block {
    margin-bottom: 2.5rem;
}

.resume-block h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bg-secondary);
    padding-bottom: 0.5rem;
}

.experience-item {
    margin-bottom: 1.8rem;
    padding-left: 1rem;
    border-left: 2px solid var(--bg-secondary);
}

.experience-item h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-main);
}

.experience-item span {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Editorial Project Sub-page */
.project-page {
    background-color: var(--bg-primary);
}

.project-header {
    position: relative;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid var(--bg-secondary);
}

.back-link a {
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
}

.back-link a::before {
    content: '← ';
}

.back-link a:hover {
    color: var(--text-main);
}

.project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 5%;
}

.project-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.project-intro h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.project-category {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    font-size: 0.9rem;
}

.project-presentation {
    background: #fff;
    /* Pure white inside the warm grey shell gives an editorial 'paper' feel */
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    margin-bottom: 4rem;
    border-radius: 2px;
}

.project-presentation img {
    width: 100%;
    height: auto;
    display: block;
}

.project-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--bg-secondary);
}

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.nav-btn:hover {
    color: var(--accent-gold);
}

/* Portfolio Masonry Grid */
.portfolio-category-section {
    margin-bottom: 5rem;
}

.category-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    /* Slight rounding for a refined feel */
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-item:hover img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 0 1px rgba(188, 163, 113, 0);
    transition: box-shadow 0.6s ease;
    pointer-events: none;
}

.portfolio-item:hover::after {
    box-shadow: inset 0 0 0 1px rgba(188, 163, 113, 0.4);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 247, 244, 0.96);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--text-main);
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s ease;
}

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

/* Footer */
footer {
    text-align: center;
    padding: 4rem 5%;
    background-color: var(--bg-secondary);
}

.footer-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-links {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

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

    header {
        padding: 1rem 5%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    nav {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    nav ul {
        gap: 1.5rem;
        justify-content: center;
    }

    .project-header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 5%;
    }

    .back-link {
        order: 4;
        margin-top: 1rem;
    }
}