/* ========================================
   BASE STYLES - Portfolio Pedro Picoli
   ======================================== */

/* === Particles Background === */
#particles-bg {
    position: fixed;
    inset: 0;
    z-index: var(--z-particles);
    pointer-events: none;
}

/* === Container === */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

@media (max-width: 768px) {
    .container {
        padding-inline: var(--space-4);
    }
}

@media (max-width: 480px) {
    .container {
        padding-inline: var(--space-3);
    }
}

/* === Section Labels === */
.section-label {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
    color: var(--color-accent-primary);
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: var(--text-3xl);
    font-weight: var(--font-weight-black);
    margin-bottom: var(--space-6);
    background: var(--color-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
}

/* === Language Toggle === */
.lang-toggle {
    position: fixed;
    top: var(--space-4);
    right: var(--space-6);
    z-index: var(--z-lang-toggle);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-bg-glass);
    backdrop-filter: blur(10px);
    padding: var(--space-2);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
    opacity: 0.5;
    filter: grayscale(0.4) brightness(0.85);
    /* Subtle styling */
}

.lang-btn:hover {
    opacity: 0.8;
    filter: grayscale(0) brightness(1);
}

.lang-btn.active {
    opacity: 1;
    background: var(--color-bg-tertiary);
    filter: grayscale(0) brightness(1);
}

.lang-flag {
    font-size: 1.25rem;
}

.lang-flag-img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    filter: grayscale(0.5) brightness(0.8) contrast(0.9);
    transition: filter var(--duration-fast) var(--ease-out);
}

.lang-btn:hover .lang-flag-img,
.lang-btn.active .lang-flag-img {
    filter: grayscale(0) brightness(1) contrast(1);
}

@media (max-width: 768px) {
    .lang-toggle {
        top: var(--space-3);
        right: var(--space-4);
        padding: var(--space-1);
    }

    .lang-btn {
        width: 32px;
        height: 32px;
    }

    .lang-flag-img {
        width: 20px;
        height: 14px;
    }
}

/* === Navigation === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    height: var(--nav-height);
    background: transparent;
    transition: background var(--duration-normal) var(--ease-out);
}

.nav--scrolled {
    background: rgba(10, 10, 18, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.80rem;
    /* 30% larger than 1.1rem */
    font-weight: var(--font-weight-black);
    color: var(--color-accent-primary);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    background: rgba(10, 10, 20, 0.5);
    backdrop-filter: blur(5px);
}

.nav__logo:hover {
    transform: scale(1.05);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.nav__logo-text {
    position: relative;
    z-index: 2;
    background: linear-gradient(270deg,
            #4338ca,
            /* Dark Blue */
            #7c3aed,
            /* Deep Purple */
            #a855f7,
            /* Purple */
            #ec4899,
            /* Pink */
            #ef4444,
            /* Red */
            #06b6d4,
            /* Cyan */
            #4338ca
            /* Loop back */
        );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbowText 8s ease infinite;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

@keyframes rainbowText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.nav__menu {
    display: flex;
    gap: var(--space-8);
}

.nav__link {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    transition: color var(--duration-fast) var(--ease-out);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent-gradient);
    transition: width var(--duration-normal) var(--ease-out);
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

/* === Scroll Behavior === */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}