/* Reset & Base Variables */
:root {
    --bg-base: #050508;
    --bg-card: rgba(20, 20, 25, 0.6);
    --bg-card-hover: rgba(30, 30, 40, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(124, 58, 237, 0.3);
    
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --secondary: #3b82f6;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* Preloader */
.loader-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: var(--bg-base);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-brand {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, #a78bfa, transparent);
    animation: loadingBar 1.5s infinite ease-in-out;
}

@keyframes loadingBar {
    0% { transform: translateX(-150%); }
    100% { transform: translateX(250%); }
}

html {
    /* scroll-behavior: smooth removed — incompatible with GSAP ScrollTrigger */
    overflow-anchor: none;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Background Glow */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, rgba(5,5,8,0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.glow-top {
    top: -200px;
    right: -100px;
}

.glow-bottom {
    bottom: 20%;
    left: -200px;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, rgba(5,5,8,0) 70%);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text-main);
}

.text-gradient {
    background: linear-gradient(135deg, #a78bfa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.mt-sm { margin-top: 1rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    padding: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-glow {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    isolation: isolate; /* creates own stacking context above GSAP pin-spacer */
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    user-select: none;
}

.logo-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1;
}

.logo-tag {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-home-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600 !important;
    color: var(--text-main) !important;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
}

.nav-home-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.25);
}

.nav-links a:hover:not(.nav-home-btn):not(.btn-primary),
.nav-links a.active:not(.btn-primary):not(.nav-home-btn) {
    color: var(--text-main);
}

.nav-links a.active:not(.btn-primary) {
    color: var(--primary);
    position: relative;
}

.nav-links a.active:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

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

.lang-btn.active {
    color: var(--text-main);
    background: rgba(124, 58, 237, 0.2);
}

.fi {
    background-color: transparent !important;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0.5rem;
    z-index: 9999;
}

.mobile-menu-btn span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: #f8fafc; /* hardcode white to guarantee visibility */
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Video Background */
.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
    opacity: 0.6; /* Slight transparency to blend with background */
}

/* Overlay to ensure text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(5,5,8,0.95) 0%, rgba(5,5,8,0.7) 50%, rgba(5,5,8,0.4) 100%);
    z-index: -2;
}

/* Giant Slogan Typography */
.hero-slogan-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 15vw;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03); /* Extremely subtle */
    white-space: nowrap;
    z-index: -1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.05em;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--border-highlight);
    color: #a78bfa;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Scroll Indicator */
.hero-scroll-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    opacity: 0.7;
    animation: pulse 2s infinite;
}

.mouse-icon {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-main);
    border-radius: 12px;
    position: relative;
}

.mouse-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--text-main);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

.scroll-text {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

@keyframes scrollWheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 18px; opacity: 0; }
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Impact Section (Why It Works) */
.impact-section {
    width: 100vw;
    max-width: 100vw;
}

.impact-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
    height: 100%;
}

.impact-header {
    width: 100%;
    max-width: 700px;
    text-align: center;
    margin: 0 auto;
}

.impact-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.impact-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.impact-panels-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.impact-panel {
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 25, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.impact-panel:hover {
    background: rgba(28, 28, 38, 0.75);
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px rgba(124, 58, 237, 0.15);
}

.impact-img-wrap {
    width: 100%;
    height: 180px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.impact-img-wrap .img-before,
.impact-img-wrap .img-after {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Default: show before image (grayscale), hide after */
.impact-img-wrap .img-before {
    opacity: 1;
    filter: grayscale(40%);
}

.impact-img-wrap .img-after {
    opacity: 0;
    transform: scale(1.04);
}

/* Hover e estado ativo: imagem colorida de Solução */
.impact-panel:not(.is-dismissed):hover .img-before,
.impact-panel.is-active .img-before {
    opacity: 0;
}

.impact-panel:not(.is-dismissed):hover .img-after,
.impact-panel.is-active .img-after {
    opacity: 1;
    transform: scale(1);
}

.impact-content {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
}

/* Container de crossfade sem salto de layout */
.impact-badge-wrap {
    position: relative;
    height: 20px;
    margin-bottom: 0.6rem;
}

.impact-problem,
.impact-solution {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    transition: opacity 0.35s ease, transform 0.35s ease;
    white-space: nowrap;
}

.impact-problem {
    color: #ef4444;
    opacity: 1;
    transform: translateY(0);
}

.impact-solution {
    color: #10b981;
    opacity: 0;
    transform: translateY(6px);
}

.impact-panel:not(.is-dismissed):hover .impact-problem,
.impact-panel.is-active .impact-problem {
    opacity: 0;
    transform: translateY(-6px);
}

.impact-panel:not(.is-dismissed):hover .impact-solution,
.impact-panel.is-active .impact-solution {
    opacity: 1;
    transform: translateY(0);
}

.impact-quote {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    line-height: 1.35;
    margin-bottom: 0.75rem; /* Espaço compacto e proporcional */
    color: var(--text-main);
    transition: color 0.35s ease;
}

.impact-panel:not(.is-dismissed):hover .impact-quote,
.impact-panel.is-active .impact-quote {
    color: #cbd5e1;
}

/* Benefícios/tech posicionados logo abaixo do texto sem espaço excessivo */
.impact-tech {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0.3;
    transform: translateY(3px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s ease;
}

.impact-panel:not(.is-dismissed):hover .impact-tech,
.impact-panel.is-active .impact-tech {
    opacity: 1;
    transform: translateY(0);
    border-top-color: rgba(124, 58, 237, 0.3);
}

.impact-panel.is-active {
    background: rgba(28, 28, 38, 0.75);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px rgba(124, 58, 237, 0.15);
}

/* Mini Piloto de Status (Radar Pill) */
.radar-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(10, 10, 15, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 10px 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    pointer-events: none;
    transition: all 0.35s ease;
}

.radar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    position: relative;
    transition: background 0.3s ease;
}

.radar-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: #ef4444;
    opacity: 0.6;
    animation: pingRadar 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pingRadar {
    70%, 100% {
        transform: scale(2.3);
        opacity: 0;
    }
}

.radar-txt {
    font-size: 0.7rem;
    color: #e2e8f0;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* Radar pill: estado controlado exclusivamente via JS (.is-solved no pill) */
.radar-pill.is-solved .radar-dot {
    background: #10b981;
}

.radar-pill.is-solved .radar-dot::after {
    background: #10b981;
}

.radar-pill.is-solved .radar-txt {
    color: #10b981;
}

.impact-tech-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #94a3b8;
    transition: color 0.35s ease;
}

.impact-panel:not(.is-dismissed):hover .impact-tech-item,
.impact-panel.is-active .impact-tech-item {
    color: var(--text-main);
}

.tech-icon-wrap {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tech-icon-wrap svg {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 0;
    left: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modo Problema (padrão): X vermelho sutil */
.tech-icon-wrap .icon-cross {
    stroke: #ef4444;
    opacity: 0.75;
    transform: scale(1) rotate(0deg);
}

.tech-icon-wrap .icon-check {
    stroke: #10b981;
    opacity: 0;
    transform: scale(0.4) rotate(-20deg);
}

/* Modo Solução (hover ou active): transição animada para Check verde brilhante */
.impact-panel:not(.is-dismissed):hover .tech-icon-wrap .icon-cross,
.impact-panel.is-active .tech-icon-wrap .icon-cross {
    opacity: 0;
    transform: scale(0.4) rotate(20deg);
}

.impact-panel:not(.is-dismissed):hover .tech-icon-wrap .icon-check,
.impact-panel.is-active .tech-icon-wrap .icon-check {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Full Site Horizontal Scroll (GSAP-powered) */
.horizontal-container {
    padding: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.main-horizontal-track {
    display: flex;
    height: 100vh;
    width: max-content;
    will-change: transform;
    position: relative;
}

.horizontal-section {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 72px 0 2rem 0; /* Account for navbar */
    flex-shrink: 0;
}

.horizontal-section > .container {
    width: 100%;
}

.vertical-section {
    padding: 8rem 0;
}

/* Portfolio Horizontal Carousel Layout */
.portfolio .container {
    display: flex;
    align-items: center;
    gap: 3rem;
    height: 100%;
    max-width: 1200px; /* Match standard container size to make cards more proportional */
}

.portfolio .section-header {
    width: 280px;
    flex-shrink: 0;
    text-align: left;
    margin: 0;
}

.portfolio-swiper {
    padding-bottom: 4rem !important; /* space for pagination + buttons */
    width: 100%;
    min-width: 0;
    flex-grow: 1;
}
/* =====================================================
   Connected three-piece carousel control bar
   [ ← ] [  ● ● ● ●  ] [ → ]
   !important needed to override Swiper's own injected CSS.
   ===================================================== */

/* Center piece: pagination dots */
.portfolio-swiper .swiper-pagination {
    position: absolute !important;
    bottom: 0 !important;
    top: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 130px !important;
    height: 3rem !important;
    line-height: 3rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-left: none;
    border-right: none;
    border-radius: 0;
    backdrop-filter: blur(12px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.portfolio-swiper .swiper-pagination-bullet {
    background: var(--text-muted);
    margin: 0 !important;
    flex-shrink: 0;
    width: 8px !important;
    height: 8px !important;
    opacity: 1 !important;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.portfolio-swiper .swiper-pagination-bullet-active {
    background: var(--primary) !important;
    width: 20px !important;
    border-radius: 4px;
}

/* Left and right pieces: arrow buttons — flush against center */
.portfolio-swiper .swiper-button-prev,
.portfolio-swiper .swiper-button-next {
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    top: auto !important;
    bottom: 0 !important;
    width: 48px !important; /* 3rem at 16px base = 48px, explicit for calc() */
    height: 3rem !important;
    margin-top: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover */
.portfolio-swiper .swiper-button-prev:hover,
.portfolio-swiper .swiper-button-next:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    color: #a78bfa;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Left button: rounded left, no right border — sits flush against center */
.portfolio-swiper .swiper-button-prev {
    left: calc(50% - 65px - 48px) !important; /* 65px = half of 130px pagination */
    right: auto !important;
    border-radius: 12px 0 0 12px;
    border-right: none;
}
/* Right button: rounded right, no left border — sits flush against center */
.portfolio-swiper .swiper-button-next {
    right: calc(50% - 65px - 48px) !important;
    left: auto !important;
    border-radius: 0 12px 12px 0;
    border-left: none;
}
.portfolio-swiper .swiper-button-prev::after,
.portfolio-swiper .swiper-button-next::after {
    font-size: 1rem;
    line-height: 1;
    display: block;
    font-weight: 800;
}

.portfolio-swiper .swiper-slide {
    height: auto;
}

.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0; /* Removed padding to let image reach edges */
    overflow: hidden; /* Constrain image to rounded corners */
}

.project-image-wrapper {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    background: #0a0a0f;
}

.project-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 20, 50, 0.28) 0%, rgba(15, 23, 42, 0.38) 100%);
    mix-blend-mode: multiply;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.project-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,5,8,0) 85%, rgba(12,12,18,0.4) 100%);
    pointer-events: none;
    z-index: 3;
}

.project-screenshot {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    display: block;
    border-radius: 0;
    /* contain: respects original image proportions without distortion.
       Empty side strips will show the dark wrapper background. */
    object-fit: contain;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.4s ease;
    background: rgba(12, 12, 18, 0.95); /* fills letterbox areas */
}

@media (min-width: 1024px) {
    .project-screenshot {
        aspect-ratio: 3/4;
    }
}

/* No desktop: ao passar o mouse */
.project-card:hover .project-screenshot {
    transform: scale(1.03);
    filter: brightness(1.02);
}

.project-card:hover .project-image-wrapper::before {
    opacity: 0;
}

/* No mobile: o slide que estiver ativo/centralizado no Swiper acende sozinho automaticamente */
.swiper-slide-active .project-card .project-screenshot {
    filter: brightness(1.02);
}

.swiper-slide-active .project-card .project-image-wrapper::before {
    opacity: 0;
}

/* No desktop: os dois primeiros cards visíveis (ativo e próximo imediato) acendem juntos; o terceiro fica com película */
@media (min-width: 1024px) {
    .swiper-slide-next .project-card .project-screenshot {
        filter: brightness(1.02);
    }

    .swiper-slide-next .project-card .project-image-wrapper::before {
        opacity: 0;
    }
}

.project-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.project-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.project-desc {
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-grow: 1; /* Pushes the tech tags and buttons down */
    font-size: 0.8rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Allow up to 3 lines so it never truncates our short copies */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.project-tech {
    display: flex;
    gap: 0.35rem;
    flex-wrap: nowrap; /* Single line of tags */
    margin-bottom: 1rem;
    overflow: hidden;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.project-tech span {
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.project-link-wrapper {
    margin-top: auto;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    font-size: 0.875rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
    color: white;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-photo {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    filter: grayscale(20%) contrast(110%);
    transition: var(--transition);
}

.about-photo:hover {
    filter: grayscale(0%) contrast(100%);
    transform: scale(1.02);
}

.about-content h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-content strong {
    color: var(--text-main);
    font-weight: 600;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-text {
    font-weight: 600;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info .section-title {
    text-align: left;
}

.contact-info .section-desc {
    text-align: left;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary);
}

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    background: rgba(5, 5, 8, 0.5);
}

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

.footer-copy {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .impact-panels-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.2rem;
    }

    .logo-name {
        font-size: 1.1rem;
    }

    .logo-tag {
        font-size: 0.65rem;
    }

    .section {
        padding: 5rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none; /* simple mobile menu hiding for now, would need JS toggle */
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .timeline-step {
        gap: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Fallback to vertical stack on mobile for the horizontal sections */
    /* !important is necessary here to override GSAP inline styles */
    .horizontal-container {
        height: auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
        display: block !important;
    }

    .main-horizontal-track {
        height: auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        display: block !important;
        transform: none !important; /* Kill any GSAP translateX */
        will-change: auto !important;
    }

    .horizontal-section {
        width: 100% !important;
        max-width: 100vw !important;
        height: auto !important;
        min-height: 100vh;
        overflow: hidden !important;
        padding: 5rem 0; /* Normal vertical section padding */
    }

    .portfolio .container {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 2rem;
        gap: 2rem;
    }

    .portfolio .section-header {
        width: 100%;
    }

    .portfolio-swiper {
        width: calc(100vw - 4rem);
    }

    /* Swiper handles horizontal swiping on mobile for portfolio */

    /* Impact section: single column on mobile */
    .impact-panels-row {
        grid-template-columns: 1fr;
    }
}
