/* Time Portal - Space-Time Continuum Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Orbitron:wght@400;700;900&display=swap');

:root {
    /* Colors */
    --bg-deep: #0b0d17;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #e0e6ed;
    --text-secondary: #94a3b8;
    --accent-cyan: #00f3ff;
    --accent-gold: #ffd700;
    --accent-purple: #bc13fe;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, var(--bg-deep) 0%, #1a1f35 100%);
    --gradient-text: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));

    /* Fonts */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(11, 13, 23, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

/* UI Elements */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 700;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-deep);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* =========================================
   RESPONSIVE STYLES (Mobile & Tablet)
   ========================================= */

@media (max-width: 768px) {

    /* General Spacing */
    .container {
        padding: 0 1rem;
        /* Reduced horizontal padding for more space */
    }

    .section {
        padding: 4rem 0;
    }

    /* Navbar adjustments */
    .navbar {
        height: auto;
        padding: 1rem 0;
        position: fixed;
        /* Keeping fixed but we need to spacing below */
    }

    .navbar .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo img {
        height: 50px;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        /* Ensure it wraps */
        justify-content: center;
        width: 100%;
        /* Force it to take full width to allow wrapping */
    }

    .nav-links li {
        text-align: center;
        /* Center text if wrapped */
    }

    /* Reduce padding-top slightly if nav wraps to multiple lines to avoid big gaps */
    body {
        padding-top: 160px;
    }

    .hero {
        height: auto !important;
        min-height: 50vh;
        padding-top: 2rem !important;
        padding-bottom: 4rem !important;
    }

    /* Project Grid - CENTERED */
    .project-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        /* Force single column that shrinks */
        gap: 2rem;
        width: 100%;
        margin: 0 auto;
    }

    .project-card {
        width: 100%;
        margin: 0 auto;
        max-width: 400px;
        /* Limit max width for better aesthetic on tablets */
    }

    /* Typography fixes */
    h1.gradient-text,
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    p {
        font-size: 1rem !important;
    }

    /* Intro Cards */
    .section .container>div[style*="display: flex"] {
        flex-direction: column;
        /* Stack the Human/IA cards */
        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 100% !important;
        margin-bottom: 1rem;
    }

    /* Form */
    form {
        width: 100%;
        padding: 0 1rem;
    }

    /* Hero Logos */
    .animate-float img {
        max-width: 60% !important;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {

    /* Extra Small adjustments */
    h1.gradient-text {
        font-size: 1.8rem !important;
    }

    .nav-links {
        gap: 1rem;
    }
}