/* =========================================
   VARIABLES & DESIGN SYSTEM
   ========================================= */
:root {
    /* Colors – LAPIS Brand */
    --bg-main: #FFFFFF;
    --bg-secondary: #FFF7F2;
    --primary: #F06522;
    --primary-dark: #C94E10;
    --primary-light: #FF8C50;
    --primary-glow: rgba(240, 101, 34, 0.25);
    --secondary: #2D3561;
    --secondary-light: #3D4A80;
    
    --text-main: #1A1A2E;
    --text-muted: #6B7280;
    --white: #FFFFFF;

    /* Glassmorphism – light style */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(240, 101, 34, 0.12);
    --glass-blur: blur(16px);

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(ellipse 80% 50% at 15% 10%,  rgba(240, 101, 34, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 90%,  rgba(45,  53,  97, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 40% 30% at 50% 50%,  rgba(240, 101, 34, 0.03) 0%, transparent 70%);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ── dot-grid texture ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(240, 101, 34, 0.12) 1px, transparent 1px);
    background-size: 36px 36px;
    z-index: 0;
    pointer-events: none;
}

/* ── diagonal lines overlay ── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 60px,
        rgba(240, 101, 34, 0.025) 60px,
        rgba(240, 101, 34, 0.025) 61px
    );
    z-index: 0;
    pointer-events: none;
}

/* push all real content above the fixed overlays */
body > * {
    position: relative;
    z-index: 1;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

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

/* =========================================
   BACKGROUND GLOWS
   ========================================= */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* Orb 1 – large orange, top-left */
.bg-glow-1 {
    width: 800px;
    height: 800px;
    top: -200px;
    left: -200px;
    background: radial-gradient(circle, rgba(240, 101, 34, 0.22) 0%, transparent 70%);
    animation: drift-a 18s infinite alternate ease-in-out;
}

/* Orb 2 – medium navy, right-center */
.bg-glow-2 {
    width: 600px;
    height: 600px;
    top: 30%;
    right: -180px;
    background: radial-gradient(circle, rgba(45, 53, 97, 0.18) 0%, transparent 70%);
    animation: drift-b 14s infinite alternate ease-in-out;
}

/* Orb 3 – small bright orange, bottom-left */
.bg-glow-3 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    left: 5%;
    background: radial-gradient(circle, rgba(255, 140, 80, 0.16) 0%, transparent 70%);
    animation: drift-c 22s infinite alternate ease-in-out;
}

/* Orb 4 – wide navy, very bottom */
.bg-glow-4 {
    width: 900px;
    height: 500px;
    bottom: -100px;
    right: 10%;
    background: radial-gradient(ellipse, rgba(61, 74, 128, 0.12) 0%, transparent 70%);
    animation: drift-a 26s 4s infinite alternate ease-in-out;
}

/* Orb 5 – tiny sharp orange, top-right accent */
.bg-glow-5 {
    width: 300px;
    height: 300px;
    top: 5%;
    right: 15%;
    filter: blur(70px);
    background: radial-gradient(circle, rgba(240, 101, 34, 0.14) 0%, transparent 65%);
    animation: drift-b 12s 2s infinite alternate ease-in-out;
}

@keyframes drift-a {
    0%   { transform: translate(0px,   0px)   scale(1);    }
    33%  { transform: translate(40px, -30px)  scale(1.05); }
    66%  { transform: translate(-20px, 50px)  scale(0.97); }
    100% { transform: translate(60px,  20px)  scale(1.08); }
}

@keyframes drift-b {
    0%   { transform: translate(0px,   0px)   scale(1);    }
    50%  { transform: translate(-50px, 30px)  scale(1.06); }
    100% { transform: translate(30px, -40px)  scale(0.95); }
}

@keyframes drift-c {
    0%   { transform: translate(0px,  0px);  }
    40%  { transform: translate(30px, 60px); }
    100% { transform: translate(-40px, -20px); }
}

/* =========================================
   UTILITIES
   ========================================= */
.highlight {
    color: var(--primary);
    text-shadow: 0 0 18px rgba(240, 101, 34, 0.3);
}

.highlight-text {
    color: var(--primary);
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(240, 101, 34, 0.06);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 18px rgba(240, 101, 34, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(240, 101, 34, 0.5);
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(240, 101, 34, 0.15);
    box-shadow: 0 2px 20px rgba(240, 101, 34, 0.08);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary);
}

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

.nav-logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

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

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

.nav-links a:hover {
    color: var(--primary);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Space for navbar */
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(240, 101, 34, 0.08);
    border: 1px solid rgba(240, 101, 34, 0.25);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Decorative visual */
.hero-visual {
    position: relative;
    height: 400px;
    perspective: 1000px;
}

.floating-card-1, .floating-card-2 {
    position: absolute;
    padding: 2rem;
    transform-style: preserve-3d;
    animation: float 6s infinite alternate ease-in-out;
}

.floating-card-1 {
    top: 10%;
    left: 10%;
    width: 250px;
    height: 150px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transform: rotateY(-15deg) rotateX(10deg);
}

.floating-card-1 .circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 18px rgba(240, 101, 34, 0.4);
}

.floating-card-1 .lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.floating-card-1 .line {
    height: 6px;
    background: var(--text-muted);
    border-radius: 10px;
    opacity: 0.25;
}

.floating-card-1 .line.short {
    width: 60%;
}

.floating-card-2 {
    bottom: 10%;
    right: 10%;
    width: 200px;
    height: 200px;
    transform: rotateY(15deg) rotateX(-10deg);
    animation-delay: -3s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.data-block {
    height: 12px;
    background: rgba(45, 53, 97, 0.3);
    border-radius: 4px;
    opacity: 0.6;
}

.block-sm { width: 40%; }
.block-md { width: 70%; background: var(--primary); opacity: 0.85; }

/* =========================================
   ABOUT SECTION
   ========================================= */
.about {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

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

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

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

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-main);
    font-weight: 500;
}

.features-list span {
    color: var(--primary);
    font-weight: bold;
}

.about-image-glass {
    background: var(--bg-secondary);
    border: 1px solid rgba(240, 101, 34, 0.15);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(240, 101, 34, 0.08);
}

.code-snippet {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #3D4A80;
}

.code-snippet .keyword { color: #0369A1; }
.code-snippet .class { color: var(--primary); }
.code-snippet .string { color: #16A34A; }
.code-snippet .func { color: var(--secondary-light); }

/* =========================================
   PROJECTS SECTION
   ========================================= */
.projects {
    padding: 6rem 0;
    position: relative;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-base);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(240, 101, 34, 0.3);
    box-shadow: 0 15px 35px rgba(240, 101, 34, 0.12);
}

/* Project header (colored top strip) */
.project-header {
    padding: 1.5rem 1.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 90px;
    border-radius: 16px 16px 0 0;
}

.project-header h3 {
    font-size: 1.1rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.project-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.project-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

/* Project image gallery / carousel */
.project-gallery {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    flex-shrink: 0;
}

.gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.gallery-img {
    min-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    display: block;
    user-select: none;
    pointer-events: none;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, opacity 0.2s ease;
    opacity: 0;
    z-index: 5;
    padding: 0;
}

.project-gallery:hover .gallery-btn {
    opacity: 1;
}

.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }

.gallery-btn:hover {
    background: rgba(240, 101, 34, 0.75);
}

.gallery-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 5;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    border: none;
    display: inline-block;
}

.gallery-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-tags {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.72rem;
    padding: 0.25rem 0.7rem;
    background: rgba(240, 101, 34, 0.08);
    border: 1px solid rgba(240, 101, 34, 0.2);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Members list */
.members-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.member {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.member-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    flex: 1;
    min-width: 0;
}

.member-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.member-badge.grad {
    background: rgba(240, 101, 34, 0.12);
    color: var(--primary-dark);
    border: 1px solid rgba(240, 101, 34, 0.3);
}

.member-badge.tec {
    background: rgba(45, 53, 97, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(45, 53, 97, 0.25);
}

.member-reg {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    flex-shrink: 0;
}

/* =========================================
   FUNDING SECTION
   ========================================= */
.funding {
    padding: 6rem 0 8rem;
}

.funding-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.funding-card {
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition-base);
}

.funding-card:hover {
    transform: translateY(-10px);
    border-color: rgba(240, 101, 34, 0.25);
    box-shadow: 0 10px 30px rgba(240, 101, 34, 0.1);
}

.funding-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
}

.fapemig-icon {
    background: linear-gradient(135deg, #FF3366 0%, #FF6B35 100%);
    box-shadow: 0 5px 15px rgba(255, 51, 102, 0.3);
}

.cnpq-icon {
    background: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    box-shadow: 0 5px 15px rgba(0, 198, 255, 0.3);
}

.cefet-icon {
    background: linear-gradient(135deg, #11998E 0%, #38EF7D 100%);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.3);
}

.funding-logo-wrap {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.funding-logo-img {
    max-height: 70px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    /* Slight shadow so logos with white backgrounds blend well */
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.10));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.funding-card:hover .funding-logo-img {
    transform: scale(1.06);
    filter: drop-shadow(0 4px 14px rgba(240, 101, 34, 0.18));
}

.funding-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--text-main);
}

.funding-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: var(--secondary);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 4rem 0 2rem;
}

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

.footer-info p {
    color: rgba(255,255,255,0.55);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.footer-logo {
    color: #FFFFFF;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255,255,255,0.55);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

/* =========================================
   ANIMATIONS
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 900px) {
    .hero-container, .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-desc {
        margin: 0 auto 2.5rem;
    }

    .hero-visual {
        display: none;
    }
    
    .features-list li {
        justify-content: center;
    }
    
    .code-snippet {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none; /* simple mobile menu omit for brevity */
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}
