:root {
    /* Base colors - professional dark gray palette */
    --white: #ffffff;
    --black: #1a1a1a;

    /* Gray scale for text hierarchy */
    --gray-900: #212121;  /* Primary text - darkest */
    --gray-700: #424242;  /* Secondary text */
    --gray-600: #5a5a5a;  /* Tertiary text */
    --gray-500: #757575;  /* Muted text */
    --gray-400: #9e9e9e;  /* Subtle elements */
    --gray-200: #e0e0e0;  /* Borders, dividers */
    --gray-100: #f5f5f5;  /* Backgrounds */

    /* Legacy variables for compatibility */
    --gray: #757575;
    --light-gray: #f5f5f5;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

/* Top Header Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    z-index: 100;
}

.logo a {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--gray-900);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 35px;
}

nav a {
    text-decoration: none;
    color: var(--gray-500);
    font-size: 13px;
    transition: color 0.3s;
    letter-spacing: 0.5px;
}

nav a:hover,
nav a.active {
    color: var(--gray-900);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Header Language Toggle */
.lang-toggle-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 15px;
    padding-right: 20px;
    border-right: 1px solid var(--gray-200);
}

.lang-toggle-header button {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 3px 6px;
    transition: color 0.3s;
}

.lang-toggle-header button:hover {
    color: var(--gray-700);
}

.lang-toggle-header button.active {
    color: var(--gray-900);
    font-weight: 400;
}

.lang-separator {
    color: var(--gray-400);
    font-size: 12px;
}

/* Main Content */
main {
    padding-top: 80px;
    min-height: 100vh;
}

/* Home Page - Gallery View */
.home-hero {
    width: 100%;
    height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.home-hero img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* About/Bio Page */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 60px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.bio-section {
    padding-right: 40px;
}

.bio-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    margin-bottom: 25px;
}

.bio-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--gray-700);
}

.bio-text p {
    margin-bottom: 20px;
    text-align: justify;
}

.cv-section-right {
    padding-left: 40px;
}

.cv-section-right h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    margin-bottom: 15px;
    margin-top: 30px;
}

.cv-section-right h3:first-child {
    margin-top: 0;
}

.cv-item {
    font-size: 13px;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 5px;
}

/* Carousel/Roulette for Selected Works */
.carousel-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.carousel-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-slide.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.carousel-slide img {
    max-width: 70vw;
    max-height: 65vh;
    object-fit: contain;
}

.carousel-caption {
    margin-top: 25px;
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
    letter-spacing: 0.5px;
}

.carousel-caption em {
    font-style: italic;
    color: var(--gray-900);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--gray-400);
    background: none;
    border: none;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s;
    user-select: none;
}

.carousel-nav:hover {
    color: var(--gray-900);
}

.carousel-prev {
    left: 30px;
}

.carousel-next {
    right: 30px;
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 60px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.contact-info-section {
    padding-right: 40px;
}

.contact-info-section p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--gray-700);
}

.contact-info-section a {
    color: var(--gray-600);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s;
}

.contact-info-section a:hover {
    color: var(--gray-900);
}

.contact-info-section h4 {
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    margin-top: 35px;
    margin-bottom: 10px;
}

.contact-info-section h4:first-child {
    margin-top: 0;
}

.contact-image {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-left: 40px;
}

.contact-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

/* CV Page Two Columns */
.cv-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 60px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.cv-bio-column {
    padding-right: 40px;
}

.cv-bio-column h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    margin-bottom: 25px;
}

.cv-bio-column .bio-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--gray-700);
}

.cv-bio-column .bio-text p {
    margin-bottom: 20px;
    text-align: justify;
}

.cv-bio-column .bio-text strong {
    color: var(--gray-900);
    font-weight: 400;
}

.cv-details-column {
    padding-left: 40px;
}

.cv-details-column h2 {
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-900);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.cv-details-column h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    margin-bottom: 15px;
    margin-top: 30px;
}

.cv-details-column h3:first-of-type {
    margin-top: 0;
}

.cv-details-column .cv-item {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 5px;
    color: var(--gray-700);
}

.cv-details-column .cv-item-highlight {
    color: var(--gray-900);
    font-weight: 400;
}

/* CV Biographical info styling */
.cv-details-column .cv-item:first-of-type,
.cv-details-column .cv-item:nth-of-type(2) {
    color: var(--gray-600);
    font-size: 13px;
}

/* CV Section blocks for better organization */
.cv-section {
    margin-bottom: 35px;
}

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

/* Language toggle for bilingual content */
.lang-toggle {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.lang-toggle button {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 5px 10px;
    transition: color 0.3s;
}

.lang-toggle button:hover {
    color: var(--gray-700);
}

.lang-toggle button.active {
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-900);
}

/* Hide inactive language content */
[lang="en"] { display: none; }
[lang="pt-br"] { display: block; }

body[data-lang="en"] [lang="en"] { display: block; }
body[data-lang="en"] [lang="pt-br"] { display: none; }

/* Inline language spans (inside links, captions, etc.) */
span[lang="en"] { display: none; }
span[lang="pt-br"] { display: inline; }

body[data-lang="en"] span[lang="en"] { display: inline; }
body[data-lang="en"] span[lang="pt-br"] { display: none; }

/* Mobile Responsive */
@media (max-width: 900px) {
    header {
        padding: 0 25px;
        height: 70px;
    }

    .logo a {
        font-size: 16px;
    }

    nav ul {
        gap: 20px;
    }

    nav a {
        font-size: 12px;
    }

    .lang-toggle-header {
        margin-right: 10px;
        padding-right: 15px;
    }

    .lang-toggle-header button {
        font-size: 11px;
        padding: 2px 4px;
    }

    main {
        padding-top: 70px;
    }

    .home-hero {
        height: calc(100vh - 70px);
        padding: 20px;
    }

    .about-container,
    .contact-container,
    .cv-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 25px;
    }

    .bio-section,
    .cv-section-right,
    .contact-info-section,
    .contact-image,
    .cv-bio-column,
    .cv-details-column {
        padding: 0;
    }

    .carousel-container {
        height: calc(100vh - 70px);
    }

    .carousel-slide img {
        max-width: 85vw;
        max-height: 55vh;
    }

    .carousel-nav {
        font-size: 20px;
        padding: 15px;
    }

    .carousel-prev {
        left: 10px;
    }

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

@media (max-width: 600px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .lang-toggle-header {
        margin-right: 5px;
        padding-right: 10px;
        border-right: 1px solid var(--gray-200);
    }

    main {
        padding-top: 100px;
    }

    .home-hero,
    .carousel-container {
        height: calc(100vh - 100px);
    }
}

/* Lightbox Modal Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 36px;
    color: var(--gray-500);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s;
    z-index: 1001;
}

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

/* Mobile lightbox adjustments */
@media (max-width: 600px) {
    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 28px;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
    }
}
