:root {
    --bg-color: #f7f7f7;
    --text-color: #373636;
    --secondary-text: #867f9f;
    --accent: #fcd92c;
    --font-stack: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --transition-speed: 0.5s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none !important;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    overflow-y: scroll;
    /* Force vertical scrollbar to prevent horizontal jumping when content height changes */
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}

/* Header */
#site-header {
    width: 100%;
    padding: 0;
    z-index: 100;
    view-transition-name: site-header;
    /* Separate from root so it doesn't fade */
}


.header-content {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.personal-info {
    display: flex;
    align-items: center;
    gap: 26px;
    text-align: left;
}

.name-details {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.name-details h1 {
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 -1px 0;
    line-height: 1;
}

.name-details p {
    color: var(--secondary-text);
    font-size: 14px;
    margin: 0;
    opacity: 0.5;
    /* Made lighter as requested */
}


.social-links-container {
    position: relative;
    display: flex;
    align-items: center;
}

.ig-text,
.mobile-divider {
    display: none;
}

#menu-icon-plus.open {
    transform: rotate(45deg);
}

.social-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--text-color);
}

/* Main Carousel Container */
#main-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.carousel-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 40px 0 80px 0;
    /* Add padding so hover scale and shadows don't clip */
    margin: 50px 0 -40px 0;
    /* Offset padding bottom slightly if needed, but margin-top provides the gap */
    scroll-behavior: smooth;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    align-items: center;
    gap: 120px;
    padding-left: calc(50vw - 325px);
    /* Align with header content (max-width 650) */
    padding-right: 50vw;
    /* Allow scrolling past the end */
    width: max-content;
}

.carousel-track img {
    -webkit-user-drag: none;
    /* Prevent ghost dragging when dragging carousel */
    user-select: none;
}

/* Carousel Items */
.carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-item:hover {
    transform: scale(1.02);
}

.device-frame.image-only {
    position: relative;
    /* No borders or background, just scaling the image properly */
}

.device-frame.image-only img {
    height: 360px;
    /* Reduced from 480px to fit on notebook screens */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

.carousel-item[data-id="moodslab"] .device-frame.image-only img {
    height: 350px;
    /* Kept slightly smaller as requested */
}

.item-label {
    margin-top: 24px;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.carousel-item:hover .item-label {
    opacity: 1;
    transform: translateY(0);
}

.item-label h2 {
    font-size: 20px;
    font-weight: 500;
}

.item-label p {
    font-size: 14px;
    color: var(--secondary-text);
    margin-top: 4px;
}

/* Project View (Detail State) */
#project-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 200;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

#project-view.active {
    opacity: 1;
    pointer-events: auto;
}

#close-project {
    position: fixed;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-color);
    z-index: 210;
    transition: transform 0.2s;
}

#close-project:hover {
    transform: scale(1.1);
}

#project-content-area {
    min-height: 100vh;
    padding: 100px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* View Transitions Setup */
body:not(.is-viewing) .carousel-item[data-active="true"] .device-frame {
    view-transition-name: active-project;
}

body.is-viewing .hero-device,
body.is-viewing .hero-image {
    view-transition-name: active-project;
}

::view-transition-old(active-project),
::view-transition-new(active-project) {
    animation-duration: 0.6s;
    animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Project Detail Layouts */
.project-detail-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 80px;
    max-width: 1100px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 0.6s 0.3s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-device.image-only {
    flex: 1;
    display: flex;
    justify-content: center;
    position: sticky;
    top: 40px;
}

.hero-device.image-only img {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.15));
}

.hero-image {
    width: 400px;
    height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.text-content {
    flex: 1;
    max-width: 550px;
    text-align: left;
}

.text-content h1,
.text-content h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.text-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 8px 0;
    color: var(--text-color);
}

.text-content .subtitle {
    font-size: 16px;
    color: var(--secondary-text);
    margin-bottom: 30px;
}

.text-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-color);
}
.text-content ul {
    padding-left: 20px;
    margin-bottom: 24px;
}

.text-content li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
    color: var(--text-color);
}


.image-gallery {
    margin-top: 60px;
    width: 100%;
}

.image-gallery img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.btn {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 30px;
    background-color: var(--text-color);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #000;
}

/* Layout adjustments */
body.is-viewing #main-container {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

/* About Modal */
#about-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(247, 247, 247, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

#about-modal.active {
    opacity: 1;
    pointer-events: auto;
}

#close-about {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-color);
    transition: transform 0.2s;
}

#close-about:hover {
    transform: scale(1.1);
}

.about-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
    padding: 20px;
    /* Hide scrollbar for clean look */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.about-content::-webkit-scrollbar {
    display: none;
}

.about-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 30px;
}

.about-image-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
}

.about-main-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.about-header-text h2 {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 16px 0;
    letter-spacing: 0.5px;
    color: var(--text-color);
}

.about-info-lines {
    font-size: 14px;
    line-height: 1.5;
    color: var(--secondary-text);
    margin: 0 0 16px 0;
}

.about-tags {
    display: flex;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

.about-tags span {
    background-color: #f8f8f8;
    color: #888888;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 500;
}

.about-description p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--secondary-text);
    margin: 0 0 24px 0;
    font-weight: 300;
}

.about-description strong {
    color: var(--text-color);
    font-weight: 500;
}

.about-left-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.about-languages {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 10px;
}

.lang-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.lang-flag {
    font-size: 8px;
    font-weight: 600;
    color: #555;
}

.lang-level {
    font-size: 12px;
    color: var(--secondary-text);
    text-align: center;
    line-height: 1.2;
}

.about-section {
    margin-bottom: 40px;
}

.about-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-list li {
    position: relative;
    padding-left: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--secondary-text);
}

.about-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-color);
}

.about-list li strong {
    color: var(--text-color);
    font-weight: 500;
}

/* Custom Cursor */
#custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, opacity 0.2s;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
}

#custom-cursor.active {
    width: 60px;
    height: 60px;
}

/* Header Profile Pic */
.header-profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    /* margin-bottom removed for side-by-side layout */
}

/* Project Logo in details */
.project-logo {
    max-width: 250px;
    height: auto;
    margin: 0 0 10px 0;
    display: block;
}

/* Category Menu */
.category-menu {
    display: flex;
    gap: 40px;
    padding-left: calc(50vw - 325px);
    /* Align with header content (max-width 650) */
    margin-bottom: 40px;
    margin-top: 50px;
    /* Reduced from 100px as requested */
    view-transition-name: category-menu;
    /* Separate from root so it doesn't fade */
}

.category-btn {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 400;
    /* Regular as requested */
    color: #ccc;
    font-family: inherit;
    transition: color 0.2s;
    padding: 0;
}

.category-btn.active {
    color: var(--text-color);
}

.category-btn:hover {
    color: var(--text-color);
}

/* Infograficos */
.infograficos-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    padding: 20px 40px 100px;
    width: 100%;
}

.infograficos-container img {
    width: 100%;
    max-width: 650px;
    /* Aligned with header content width */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .page-wrapper {
        padding-top: 0;
        /* Usa flexbox para centralizar como no desktop */
    }

    .header-content {
        padding: 0 24px;
        align-items: flex-start;
    }

    .personal-info {
        gap: 12px;
    }

    .name-details h1 {
        font-size: 20px;
    }

    .name-details p {
        font-size: 13px;
    }

    
.social-links-container {
    position: relative;
    display: flex;
    align-items: center;
}

.ig-text,
.mobile-divider {
    display: none;
}

#menu-icon-plus.open {
    transform: rotate(45deg);
}

.social-links {
        flex-direction: column;
        align-items: flex-end;
        gap: 16px;
    }

    .carousel-container {
        margin: 10px 0 -40px 0 !important;
        /* Reduz o gap no mobile (10px margin + 40px padding = 50px visual) */
    }

    .carousel-track {
        gap: 30px;
        /* Reduz gap entre os projetos */
        padding-left: 24px;
        /* Padding lateral inicial do carrossel */
        padding-right: 24px;
    }

    .device-frame.image-only img {
        height: 320px;
        /* Diminui um pouco para caber melhor no mobile */
    }

    .carousel-item[data-id="moodslab"] .device-frame.image-only img {
        height: 310px;
    }

    /* Ajuste da tela de detalhes do projeto */
    .project-detail-body {
        flex-direction: column;
        gap: 40px;
        padding: 20px;
        margin-top: 40px;
    }

    .text-content {
        max-width: 100%;
        order: 2;
        /* Texto embaixo no mobile */
    }

    .hero-device.image-only {
        order: 1;
        /* Imagem no topo no mobile */
        position: static;
    }

    .hero-device.image-only img {
        max-height: 45vh;
    }
}

@media (max-width: 768px) {
    .about-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-tags {
        justify-content: center;
    }

    .about-image-wrapper {
        width: 140px;
    }
}
.email-link {
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.email-link:hover {
    color: #111;
}

.email-icon {
    transition: transform 0.2s ease;
}

.email-link:hover .email-icon {
    transform: translateX(3px);
}

@media (max-width: 768px) {

    #mobile-menu-btn {
        display: flex !important;
        color: var(--secondary-text);
    }

    .social-links {
        display: none !important; 
        position: absolute;
        top: 100%;
        right: 0;
        flex-direction: column !important;
        align-items: flex-end !important;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 16px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        gap: 16px !important;
        z-index: 1000;
        margin-top: 12px;
        min-width: 140px;
    }

    .social-links.open {
        display: flex !important;
        animation: fadeIn 0.2s ease-in-out;
    }

    .ig-text {
        display: inline-block;
        font-size: 14px;
        color: var(--secondary-text);
    }
    
    .ig-link {
        flex-direction: row;
    }
    .ig-link svg {
        width: 14px;
        height: 14px;
    }

    .mobile-divider {
        display: block;
        width: 100%;
        height: 1px;
        background-color: rgba(0,0,0,0.06);
        border: none;
        margin: -4px 0;
    }

    /* Set exact order requested */
    #about-btn { order: 1; }
    .ig-link { order: 2; }
    .mobile-divider { order: 3; }
    #lang-btn { order: 4; }

}


/* Hide custom cursor on mobile / touch devices */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    #custom-cursor {
        display: none !important;
    }
}

@media (max-width: 768px) {

    /* Prevent vertical scrolling on mobile main page */
    body {
        overflow-y: hidden !important;
    }

}
