/* 
   PREMIUM DESIGN SYSTEM v3.0 - Mauro Flores CV
   Theme: Obsidian & Azure Ultra-Premium
   Features: Scroll-driven animations, glassmorphism, premium micro-interactions
*/

:root {
    --bg-main: #030303;
    --bg-card: #0a0b10;
    --bg-card-elevated: #0d0e14;
    --accent-primary: #00d2ff;
    --accent-secondary: #0066ff;
    --accent-glow: rgba(0, 210, 255, 0.15);
    --accent-subtle: rgba(0, 210, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(0, 210, 255, 0.2);
    --glass-bg: rgba(10, 11, 16, 0.6);
    --glass-bg-strong: rgba(10, 11, 16, 0.85);
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-3xl: 2.5rem;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   BASE RESETS & GLOBAL STYLES
   ======================================== */

html,
body {
    background-color: #030303 !important;
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: 'Sora', 'Inter', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Public Sans', 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.container {
    max-width: 1200px;
}

section {
    position: relative;
    z-index: 10;
}

/* ========================================
   PREMIUM NOISE TEXTURE OVERLAY
   ======================================== */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Ffilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ========================================
   SCROLL-DRIVEN REVEAL ANIMATIONS
   ======================================== */

/* Base hidden state for all animated elements */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale,
.reveal-rotate {
    opacity: 0;
    transition: all 0.9s var(--transition-smooth);
    will-change: transform, opacity;
}

.reveal-up {
    transform: translateY(60px);
}

.reveal-left {
    transform: translateX(-60px);
}

.reveal-right {
    transform: translateX(60px);
}

.reveal-scale {
    transform: scale(0.85);
    filter: blur(4px);
}

.reveal-rotate {
    transform: perspective(800px) rotateY(8deg) translateX(30px);
}

/* Visible state */
.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-scale.is-visible,
.reveal-rotate.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Staggered delay classes for children */
.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

.stagger-5 {
    transition-delay: 0.5s;
}

.stagger-6 {
    transition-delay: 0.6s;
}

/* Section level visibility */
section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero should be visible by default (it's the first thing you see) */
#hero {
    opacity: 1 !important;
    transform: none !important;
}

/* ========================================
   MESH GRADIENTS & ATMOSPHERIC EFFECTS
   ======================================== */
.mesh-gradient {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 140%;
    height: 140%;
    background:
        radial-gradient(at 0% 0%, rgba(0, 210, 255, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(0, 102, 255, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(0, 0, 0, 0.8) 0px, transparent 80%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    animation: meshFloat 20s ease-in-out infinite alternate;
}

@keyframes meshFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-20px, 15px) scale(1.02);
    }

    66% {
        transform: translate(15px, -10px) scale(0.98);
    }

    100% {
        transform: translate(-10px, 20px) scale(1.01);
    }
}

/* Ambient orbs that float in the background */
.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: orbFloat 15s ease-in-out infinite alternate;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -20px);
    }
}

/* ========================================
   GLASSMORPHISM SYSTEM
   ======================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-subtle);
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: all 0.5s var(--transition-smooth);
    position: relative;
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.glass-card:hover {
    border-color: var(--border-accent);
    box-shadow:
        0 20px 60px -15px rgba(0, 210, 255, 0.12),
        0 0 30px -5px rgba(0, 210, 255, 0.06),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.glass-card:hover::before {
    opacity: 1;
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
.header-bg {
    background-color: rgba(3, 3, 3, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.header-bg.scrolled {
    background-color: rgba(3, 3, 3, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-title {
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, var(--accent-primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerTitle 4s ease-in-out infinite alternate;
}

@keyframes shimmerTitle {
    0% {
        background-position: 0% center;
    }

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

.menu-text a {
    position: relative;
}

.menu-text a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s var(--transition-smooth);
    border-radius: 2px;
}

.menu-text a:hover::after {
    width: 100%;
}

/* Mobile Menu Overlay */
.mobile-menu-bg {
    background: rgba(3, 3, 3, 0.96);
    backdrop-filter: blur(20px) saturate(200%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mobile-menu-link {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
}

.mobile-menu-link:hover {
    color: var(--accent-primary);
    transform: translateX(10px);
}

.mobile-menu-link::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--accent-primary);
}

.mobile-menu-link:hover::before {
    opacity: 1;
    left: -10px;
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   HERO SECTION — CINEMATIC ENTRANCE
   ======================================== */
#hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(0, 210, 255, 0.05) 0%, transparent 60%);
    position: relative;
}

/* Hero content entrance animations */
#hero .container>* {
    animation: heroFadeIn 1s var(--transition-smooth) both;
}

#hero .profile-container {
    animation-delay: 0.1s;
}

#hero h2 {
    animation-delay: 0.3s;
}

#hero .h-12 {
    animation-delay: 0.5s;
}

#hero .flex.justify-center.mb-12 {
    animation-delay: 0.7s;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Floating particles subtle glow */
#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--bg-main), transparent);
    pointer-events: none;
    z-index: 5;
}

/* Profile Picture with Premium Morphing */
.profile-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 2px solid var(--accent-primary);
    padding: 5px;
    background: var(--bg-main);
    animation: morph 8s ease-in-out infinite alternate;
    transition: all 0.5s ease;
}

.profile-img:hover {
    border-color: white;
    box-shadow: 0 0 40px rgba(0, 210, 255, 0.3);
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    25% {
        border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }

    75% {
        border-radius: 40% 60% 70% 30% / 30% 70% 40% 60%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

.profile-container::after {
    content: "";
    position: absolute;
    inset: -10px;
    background: conic-gradient(from 0deg, var(--accent-primary), transparent, var(--accent-secondary), transparent, var(--accent-primary));
    border-radius: inherit;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.3;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Status Badge */
.status-badge {
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: var(--accent-primary);
    backdrop-filter: blur(4px);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 20px 5px rgba(0, 210, 255, 0.08);
    }
}

/* ========================================
   TECH CARDS — BENTO GRID
   ======================================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    justify-content: center;
    gap: 1.5rem;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.tech-card:hover {
    background: linear-gradient(135deg, var(--bg-card), rgba(0, 210, 255, 0.05));
    border-color: var(--accent-primary);
    transform: scale(1.08) translateY(-4px);
    box-shadow: 0 15px 40px -10px rgba(0, 210, 255, 0.15);
}

.tech-card:hover::before {
    width: 200%;
    height: 200%;
}

.tech-icon-container {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.4s var(--transition-bounce);
}

.tech-card:hover .tech-icon-container {
    transform: scale(1.15) rotate(-5deg);
}

/* ========================================
   TIMELINE
   ======================================== */
.timeline-line {
    position: absolute;
    left: 20px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent-primary), transparent);
}

.timeline-dot {
    position: absolute;
    left: 13px;
    width: 16px;
    height: 16px;
    background: var(--bg-main);
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 10px var(--accent-primary);
    transition: all 0.3s ease;
}

.timeline-item-trigger {
    transition: all 0.4s var(--transition-smooth);
}

.timeline-item-trigger:hover {
    transform: translateX(5px) !important;
    border-color: var(--border-accent) !important;
}

.timeline-item-trigger:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 20px var(--accent-primary);
}

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--transition-smooth), opacity 0.5s ease;
    opacity: 0;
}

.details-content.open {
    max-height: 300px;
    opacity: 1;
}

/* ========================================
   PROJECT CARDS
   ======================================== */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--bg-card);
    transition: all 0.5s var(--transition-smooth);
    border: 1px solid var(--border-subtle);
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 30%, rgba(0, 0, 0, 0.9) 100%);
    z-index: 1;
    transition: opacity 0.5s ease;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--border-accent);
    box-shadow:
        0 25px 60px -15px rgba(0, 210, 255, 0.12),
        0 0 1px 0 rgba(0, 210, 255, 0.3);
}

.project-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--accent-primary), transparent 40%, transparent 60%, var(--accent-secondary));
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-card:hover::after {
    opacity: 0.5;
}

.project-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
}

/* ========================================
   BUTTONS — PREMIUM CTA
   ======================================== */
.btn-premium {
    position: relative;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #000;
    font-weight: 700;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
    z-index: 1;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-premium:hover {
    box-shadow: 0 8px 30px rgba(0, 210, 255, 0.5);
    transform: translateY(-3px) scale(1.02);
}

.btn-premium:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-premium::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.6s;
    z-index: -1;
}

.btn-premium:hover::after {
    left: 100%;
}

/* ========================================
   MODALS
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.4s ease;
    overflow-y: auto;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-3xl);
    padding: 3rem;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s var(--transition-spring), opacity 0.4s ease;
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.pdf-container {
    width: 100%;
    height: 75vh;
    border-radius: var(--radius-xl);
    background: #000;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

/* ========================================
   FORMS — REFINED INPUTS
   ======================================== */
input,
textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    transition: all 0.4s var(--transition-smooth);
    font-family: 'Sora', sans-serif;
}

input:focus,
textarea:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
    outline: none;
    box-shadow:
        0 0 15px rgba(0, 210, 255, 0.1),
        0 0 0 3px rgba(0, 210, 255, 0.05);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    transition: opacity 0.3s ease;
}

input:focus::placeholder,
textarea:focus::placeholder {
    opacity: 0.5;
}

/* ========================================
   CHART CONTAINER
   ======================================== */
.chart-container {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-subtle);
    height: 400px;
    position: relative;
    transition: all 0.5s ease;
}

.chart-container:hover {
    border-color: var(--border-accent);
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.05);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: #000;
    border-top: 1px solid var(--border-subtle);
    position: relative;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    transform: translateY(-3px) scale(1.1);
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s var(--transition-smooth);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 210, 255, 0.3);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 210, 255, 0.5);
}

/* ========================================
   GLITCH EFFECTS
   ======================================== */
.glitch-container {
    position: relative;
}

.glitch-container:hover {
    animation: glitchShake 0.3s ease-in-out;
}

@keyframes glitchShake {

    0%,
    100% {
        transform: translate(0);
    }

    10% {
        transform: translate(-2px, 1px);
    }

    30% {
        transform: translate(2px, -1px);
    }

    50% {
        transform: translate(-1px, 2px);
    }

    70% {
        transform: translate(1px, -2px);
    }

    90% {
        transform: translate(-2px, 0);
    }
}

/* ========================================
   PREMIUM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #030303;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #1e293b, #334155);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
}

/* ========================================
   SELECTION STYLE
   ======================================== */
::selection {
    background: rgba(0, 210, 255, 0.3);
    color: #fff;
}

/* ========================================
   MOBILE — APP-NATIVE EXPERIENCE
   ======================================== */
@media (max-width: 768px) {
    :root {
        --section-py: 3.5rem;
    }

    body {
        padding-bottom: 80px;
    }

    /* ============================
       HIDE OLD HEADER COMPLETELY ON MOBILE
       Keep ONLY the bottom tab nav bar
       ============================ */
    header {
        display: none !important;
    }

    /* Hero Mobile — Immersive Full-Width */
    #hero {
        padding-top: 3rem !important;
        padding-bottom: 4rem !important;
        text-align: center !important;
        min-height: 100vh;
        min-height: 100dvh;
    }

    #hero .container {
        padding: 0 1.5rem;
    }

    .profile-container {
        width: 140px;
        height: 140px;
        margin: 0 auto 2rem auto;
    }

    #hero h2 {
        font-size: 2.8rem !important;
        text-align: center;
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    #hero #typewriter {
        font-size: 1.15rem !important;
    }

    .status-badge {
        justify-content: center;
        display: inline-flex;
    }

    /* Section titles with accent bar */
    .section-title {
        font-size: 2rem;
        text-align: left !important;
        margin-bottom: 2rem;
        border-left: 4px solid var(--accent-primary);
        padding-left: 1rem;
    }

    /* Horizontal scroll tech cards */
    .tech-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding: 1rem 0.5rem;
        margin: 0 -1.5rem;
        padding-left: 1.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .tech-grid::-webkit-scrollbar {
        display: none;
    }

    .tech-card {
        flex: 0 0 150px;
        scroll-snap-align: start;
        background: rgba(255, 255, 255, 0.03);
        border-radius: var(--radius-2xl);
        aspect-ratio: 1/1;
    }

    /* Project cards */
    .project-card {
        margin-bottom: 1.5rem;
        border-radius: var(--radius-3xl);
    }

    .glass-card {
        margin: 0;
        border-radius: var(--radius-3xl) !important;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* ============================
       BOTTOM TAB BAR (THE NEW NAV)
       ============================ */
    .mobile-nav-bar {
        left: 5% !important;
        right: 5% !important;
        transform: none !important;
        width: 90% !important;
        max-width: none !important;
        background: var(--glass-bg-strong) !important;
        backdrop-filter: blur(20px) saturate(200%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(200%) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow:
            0 -5px 30px rgba(0, 0, 0, 0.5),
            0 0 15px rgba(0, 210, 255, 0.05) !important;
    }

    .mobile-tab-item {
        color: var(--text-secondary);
        padding: 12px;
        border-radius: 1rem;
        transition: all 0.3s var(--transition-bounce);
        position: relative;
    }

    .mobile-tab-item.active {
        color: var(--accent-primary);
        background: rgba(0, 210, 255, 0.1);
        box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
    }

    .mobile-tab-item.active svg {
        filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.5));
    }

    .mobile-tab-item:active {
        transform: scale(0.85);
    }

    /* Layout optimizations */
    #perfil .glass-card {
        background: linear-gradient(135deg, rgba(0, 210, 255, 0.05) 0%, transparent 100%);
    }

    .chart-container {
        height: 320px;
        margin: 0 -1rem;
        border-radius: 0;
        background: transparent;
        border: none;
    }

    /* Timeline mobile */
    #timeline-container>div {
        padding: 1.5rem !important;
        margin-left: 2rem !important;
        border-radius: 1.5rem !important;
    }

    .timeline-line {
        left: 15px !important;
    }

    .timeline-dot {
        left: 8px !important;
    }

    /* PDF modal mobile */
    .modal-content {
        padding: 1rem !important;
        margin-top: 5vh;
        width: 95%;
        height: 85vh;
        display: flex;
        flex-direction: column;
    }

    .pdf-container {
        flex-grow: 1;
        height: auto !important;
        margin-top: 2rem;
    }

    .modal-content .btn-premium {
        margin-top: 1rem;
        width: 100%;
        font-size: 0.9rem;
    }

    /* Back to top - above the tab bar */
    #back-to-top {
        bottom: 100px;
        right: 20px;
    }

    /* Contact section */
    #contacto .glass-card {
        padding: 2rem 1.5rem !important;
        border-radius: var(--radius-2xl) !important;
    }

    /* Footer spacing */
    footer {
        padding-bottom: 5rem !important;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .section-title {
        font-size: 2.2rem;
    }

    .profile-container {
        width: 180px;
        height: 180px;
    }
}

/* ========================================
   REDUCED MOTION — Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    section {
        opacity: 1;
        transform: none;
    }

    .reveal-up,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-rotate {
        opacity: 1;
        transform: none;
        filter: none;
    }
}