@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {

    --bg-dark: #070e17; 
    --bg-card: rgba(13, 25, 41, 0.7);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary-color: #00d2ff; 
    --primary-gradient: linear-gradient(135deg, #00ffcc 0%, #0077ff 50%, #ff007f 100%); 
    --primary-gradient-hover: linear-gradient(135deg, #00ffaa 0%, #0055ff 50%, #ff0055 100%);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(7, 14, 23, 0.15);
    --glass-blur: blur(16px);

    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --max-width: 1200px;
    --header-height: 100px; 
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}
body {
    position: relative;
    overflow-x: hidden;
}

#inicio,
.tech-stack-section,
.about-section,
#portfolio,
#contato {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: calc(var(--header-height) + 20px) 24px 40px;
}

#sobre {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 210, 255, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 127, 0.04) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

/* Horizontal flowing RGB border bottom (gaming style) */
.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        #ff0055 0%, 
        #00ffcc 25%, 
        #0066ff 50%, 
        #ff00c1 75%, 
        #ff0055 100%
    );
    background-size: 200% 100%;
    animation: rgbHeaderFlow 4s linear infinite;
    box-shadow: 0 1px 6px rgba(0, 210, 255, 0.3), 0 2px 12px rgba(255, 0, 193, 0.15);
}

@keyframes rgbHeaderFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Ensure header contents sit in front of the decorative pixels */
.logo-container,
.nav-menu,
.nav-actions {
    position: relative;
    z-index: 5;
}

/* Navbar micro-pixels */
.navbar-pixel {
    position: absolute;
    border-radius: 1px;
    pointer-events: none;
    z-index: 2;
    will-change: opacity, transform, filter;
}

@keyframes pixelGlow {
    0% {
        opacity: 0.15;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.15;
        transform: scale(0.8);
        filter: hue-rotate(360deg);
    }
}

.navbar {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px; 
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.05);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition-smooth);
    z-index: 1002;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.hero-logo {
    max-width: 520px;
    filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.25));
    animation: floatLogo 6s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
    transition: var(--transition-smooth);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

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

.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

[id$="github"]:hover {
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

[id$="instagram"]:hover {
    color: #e1306c;
    box-shadow: 0 0 15px rgba(225, 48, 108, 0.25);
}

[id$="linkedin"]:hover {
    color: #0077b5;
    box-shadow: 0 0 15px rgba(0, 119, 181, 0.25);
}

[id$="itchio"]:hover {
    color: #fa5c5c;
    box-shadow: 0 0 15px rgba(250, 92, 92, 0.25);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-gradient-hover);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.content-wrapper {
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    text-align: center;
    position: relative;
    z-index: 1; 
}

.floating-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2; 
    pointer-events: none;
}

.floating-foreground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1; 
    pointer-events: none;
}

.floating-cube {
    position: absolute;
    pointer-events: none;
    user-select: none;
    opacity: 0.12; 
    will-change: transform; 
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

.hero-section {
    max-width: 800px;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.tech-stack-section {
    max-width: 800px;
    width: 100%;
}

.section-title-sm {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 600;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    padding: 16px;
    border-radius: 12px;
    transition: var(--transition-smooth);
    gap: 8px;
}

.tech-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;

    filter: brightness(0) saturate(100%) invert(48%) sepia(26%) saturate(2201%) hue-rotate(170deg) brightness(90%) contrast(85%);
    transition: var(--transition-smooth);
}

.tech-item span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.tech-item:hover {
    background-color: rgba(0, 210, 255, 0.04);
    border-color: rgba(0, 210, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.05);
}

.tech-item:hover img {
    filter: brightness(0) saturate(100%) invert(72%) sepia(85%) saturate(1478%) hue-rotate(167deg) brightness(103%) contrast(101%) drop-shadow(0 0 8px rgba(0, 210, 255, 0.75));
    transform: scale(1.08);
}

.tech-item:hover span {
    color: var(--text-main);
}

.about-section {
    position: relative;
    width: 100%;
    max-width: 100vw;
    background-color: rgba(13, 22, 38, 0.4);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1; 
    overflow-x: hidden;
}

.about-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 50px;
    line-height: 1.6;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 50px;
}

.carousel-track-container {
    width: 100%;
}

.carousel-track {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 480px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.carousel-slide {
    position: absolute;
    width: 340px;
    max-width: 85vw;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transform: translate(0, 100px) scale(0.5);
    cursor: pointer;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 5;
    transform: translate(0, -30px) scale(1);
    filter: none;
    cursor: default;
}

.carousel-slide.prev {
    opacity: 0.85;
    z-index: 4;
    transform: translate(-75%, 15px) scale(0.85);
    filter: blur(2px);
    pointer-events: auto;
}

.carousel-slide.next {
    opacity: 0.85;
    z-index: 4;
    transform: translate(75%, 15px) scale(0.85);
    filter: blur(2px);
    pointer-events: auto;
}

.carousel-slide.far-left {
    opacity: 0.4;
    z-index: 3;
    transform: translate(-45%, 80px) scale(0.65);
    filter: blur(5px);
    pointer-events: auto;
}

.carousel-slide.far-right {
    opacity: 0.4;
    z-index: 3;
    transform: translate(45%, 80px) scale(0.65);
    filter: blur(5px);
    pointer-events: auto;
}

.carousel-slide.back {
    transform: translate(0, 110px) scale(0.5);
    opacity: 0.2;
    filter: blur(8px);
    z-index: 1;
    pointer-events: auto;
}

.carousel-slide.hidden-left {
    transform: translate(-50%, 140px) scale(0.4);
    opacity: 0;
    filter: blur(10px);
    z-index: 0;
}

.carousel-slide.hidden-right {
    transform: translate(50%, 140px) scale(0.4);
    opacity: 0;
    filter: blur(10px);
    z-index: 0;
}

/* Fix Firefox rendering bug with nested filters */
.carousel-slide:not(.active-done) .team-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: backdrop-filter 0s, -webkit-backdrop-filter 0s;
}

.team-card {
    background-color: rgba(30, 45, 75, 0.6); /* Slightly lighter/bluer glass */
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 48px 24px 32px; /* Increased top padding for the header */
    text-align: center;
    transition: var(--transition-smooth);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Mac OS Buttons */
.team-card::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ff5f56;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
    z-index: 2;
}

/* Window Header Bar */
.team-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(0, 0, 0, 0.35);
    border-top-left-radius: 19px;
    border-top-right-radius: 19px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1;
}

.team-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color), inset 0 0 8px rgba(0, 210, 255, 0.3);
}

.card-pixel {
    position: absolute;
    border-radius: 1px;
    pointer-events: none;
    z-index: -1; 
    will-change: opacity, transform;
}

@keyframes cardPixelSnake {
    0% { left: 0%; top: 0%; transform: translate(-50%, -50%); }
    29% { left: 0%; top: 100%; transform: translate(-50%, -50%); }
    50% { left: 100%; top: 100%; transform: translate(-50%, -50%); }
    79% { left: 100%; top: 0%; transform: translate(-50%, -50%); }
    100% { left: 0%; top: 0%; transform: translate(-50%, -50%); }
}

/* Hide expensive snake animation completely on mobile */
@media (max-width: 1023px) {
    .card-pixel {
        display: none !important;
    }
}

.avatar-container {
    --avatar-glow: 0, 210, 255;
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 3px;
    background: var(--primary-gradient); 
    box-shadow: 0 0 15px rgba(var(--avatar-glow), 0.35); 
    margin-bottom: 24px;
    transition: var(--transition-smooth);
    will-change: transform;
}
.avatar-container.float-1 {
    --avatar-glow: 255, 144, 0;
    background: linear-gradient(135deg, #ff4b1f 0%, #ff9000 100%);
}
.avatar-container.float-2 {
    --avatar-glow: 0, 255, 135;
    background: linear-gradient(135deg, #00ff87 0%, #60efff 100%);
}
.avatar-container.float-3 {
    --avatar-glow: 189, 0, 255;
    background: linear-gradient(135deg, #bd00ff 0%, #ff00a0 100%);
}
.avatar-container.float-4 {
    --avatar-glow: 0, 85, 255;
    background: linear-gradient(135deg, #0055ff 0%, #00d2ff 100%);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-dark);
    border: 2px solid var(--bg-dark);
}

.float-1 {
    animation: floatAvatar 3.6s ease-in-out infinite alternate;
}
.float-2 {
    animation: floatAvatar 4.2s ease-in-out infinite alternate;
    animation-delay: -0.8s;
}
.float-3 {
    animation: floatAvatar 3.9s ease-in-out infinite alternate;
    animation-delay: -1.6s;
}
.float-4 {
    animation: floatAvatar 4.5s ease-in-out infinite alternate;
    animation-delay: -2.4s;
}

@keyframes floatAvatar {
    0% {
        transform: translateY(0px) rotate(0deg);
        box-shadow: 0 0 15px rgba(var(--avatar-glow), 0.35);
    }
    100% {
        transform: translateY(-10px) rotate(3deg);
        box-shadow: 0 0 25px rgba(var(--avatar-glow), 0.65); 
    }
}

.team-card:hover .avatar-container {
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.85); 
    transform: scale(1.05);
}

.member-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.member-username {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.github-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.github-profile-btn:hover {
    background-color: var(--text-main);
    color: var(--bg-dark);
    border-color: var(--text-main);
    transform: translateY(-1px);
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.carousel-control:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

.reveal-section {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(15px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, filter, transform;
}

.reveal-section.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Gentle Floating Text Animation */
.hero-title,
.section-title,
h1.gradient-text,
h2.gradient-text {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    animation: textFloatWave 6s ease-in-out infinite;
    will-change: transform;
}


@keyframes textFloatWave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.card-large {
    max-width: 600px;
    padding: 60px 40px;
    text-align: center;
    margin: 0 auto;
}

.email-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    margin-bottom: 45px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    background-color: rgba(0, 210, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 30px;
    transition: var(--transition-smooth);
    max-width: 100%;
    word-break: break-all;
}

.email-btn i {
    color: var(--primary-color);
}

.email-btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
    transform: translateY(-1px);
}

.email-btn:hover i {
    color: var(--bg-dark);
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 999;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    border-radius: 2px;
}

.scroll-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-smooth);
    position: relative;
    cursor: pointer;
}

.scroll-dot:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.scroll-dot.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.8), 0 0 5px rgba(0, 210, 255, 0.4) inset;
    transform: scale(1.3);
}

.scroll-dot.active::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    animation: ripple 1.5s infinite ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}


@media (max-width: 900px) {
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .carousel-container {
        padding: 0 35px;
    }
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-title {
        font-size: 2.3rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .card-large {
        padding: 40px 20px;
        margin: 0 16px;
    }
    .email-btn {
        font-size: 0.85rem;
        padding: 10px 16px;
        margin-bottom: 30px;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 1024px) {
    html {
        scroll-snap-type: y mandatory;
    }
    #inicio, .tech-stack-section, .about-section, #portfolio, #contato {
        scroll-snap-align: start;
        padding-top: var(--header-height);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .content-wrapper {
        min-height: auto;
        padding-top: 0;
        padding-bottom: 40px;
    }

    #inicio {
        padding: calc(var(--header-height) + 10px) 16px 20px;
        scroll-snap-align: start;
    }

    .tech-stack-section,
    .about-section,
    #portfolio,
    #contato {
        padding: calc(var(--header-height) + 40px) 16px 20px;
        scroll-snap-align: start;
    }
    
    .hero-logo {
        max-height: 160px;
        margin-bottom: 10px;
    }

    .scroll-indicator {
        display: none;
    }

    .logo {
        height: 38px;
    }

    .avatar-container {
        width: 85px;
        height: 85px;
        margin-bottom: 16px;
    }

    .team-card {
        padding: 44px 16px 20px; /* Keep top padding > 36px to prevent overlap with window bar */
    }

    .member-username {
        margin-bottom: 12px;
    }

    .section-description {
        margin-bottom: 20px;
    }

    .carousel-track {
        padding: 10px 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        transform: none;
        width: 280px;
        height: 100vh;
        background: rgba(10, 18, 30, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-subtle);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        padding: 80px 24px;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1001;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        font-size: 1.3rem;
        display: block;
        width: 100%;
    }

    .nav-actions {
        display: none;
    }

    .carousel-control {
        top: -10px;
        transform: none;
        z-index: 10;
        width: 42px;
        height: 42px;
    }
    .carousel-control.prev-btn {
        left: calc(50% - 55px);
    }
    .carousel-control.next-btn {
        right: calc(50% - 55px);
        left: auto;
    }
}

@media (max-width: 600px) {
    .carousel-track {
        height: 380px;
    }
    .carousel-slide {
        max-width: 45vw;
    }
    .carousel-slide.active {
        transform: translate(0, -10px) scale(1);
    }
    .carousel-slide.prev {
        transform: translate(-60%, 10px) scale(0.85);
    }
    .carousel-slide.next {
        transform: translate(60%, 10px) scale(0.85);
    }
    .carousel-slide.far-left,
    .carousel-slide.far-right,
    .carousel-slide.back,
    .carousel-slide.hidden-left,
    .carousel-slide.hidden-right {
        transform: translate(0, 40px) scale(0.5);
        opacity: 0;
        pointer-events: none;
    }
}

/* Character Selection UI additions */
.carousel-slide::after {
    content: '';
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 20px solid var(--primary-color);
    filter: drop-shadow(0 0 10px var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10;
}

.carousel-slide.active::after {
    opacity: 1;
    animation: arrowBounce 1.5s infinite ease-in-out;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

.carousel-slide:not(.active) .card-pixel {
    opacity: 0 !important;
}

.carousel-slide.active .avatar-container {
    animation: coinFlip 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg); box-shadow: 0 0 15px rgba(var(--avatar-glow), 0.35); }
    100% { transform: rotateY(360deg); box-shadow: 0 0 25px rgba(var(--avatar-glow), 0.65); }
}

/* Enable native scroll snap ONLY on mobile/tablets where touch works perfectly */
@media (max-width: 1023px) {
    html {
        scroll-snap-type: y mandatory;
    }
    #inicio,
    .tech-stack-section,
    .about-section,
    #portfolio,
    #contato {
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

/* Hide scrollbar on desktop for app-like feeling */
@media (min-width: 1024px) {
    ::-webkit-scrollbar {
        display: none;
    }
    html {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}
