/* 
  Modern Neon Portfolio Design System
  Color Palette: 
  - Background: #0a0a0c (Deep Matte Black)
  - Card BG: rgba(255, 255, 255, 0.03) (Glass)
  - Primary Neon: #00f2ff (Cyan)
  - Secondary Neon: #7000ff (Purple)
  - Text Primary: #f0f0f0
  - Text Secondary: #a0a0a0
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.03);
    --primary-neon: #00f2ff;
    --secondary-neon: #7000ff;
    --text-main: #f0f0f0;
    --text-muted: #d4d4d4;
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-glow: 0 0 15px var(--primary-neon);
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    margin-left: 20px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.lang-btn:hover {
    border-color: var(--primary-neon);
    color: var(--primary-neon);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
    transform: translateY(-1px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary-neon);
    filter: blur(150px);
    opacity: 0.15;
    border-radius: 50%;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    animation: breathe 10s infinite alternate ease-in-out;
}

.blob-2 {
    background: var(--secondary-neon);
    width: 500px;
    height: 500px;
    animation-delay: -3s;
}

.blob-3 {
    background: #00f2ff;
    width: 400px;
    height: 400px;
    animation-delay: -7s;
}

@keyframes breathe {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.1;
    }

    100% {
        transform: scale(1.2) translate(50px, -50px);
        opacity: 0.2;
    }
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 242, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center center;
    transform: perspective(1000px) rotateX(60deg) translateY(-100px);
    transform-origin: top;
    z-index: -3;
    mask-image: linear-gradient(to bottom, transparent, black);
    animation: grid-scroll 25s linear infinite;
}

@keyframes grid-scroll {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 1000px;
    }
}

.blob-2 {
    background: var(--secondary-neon);
    right: -100px;
    bottom: -100px;
    opacity: 0.1;
}

.interactive-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.12) 0%, rgba(0, 242, 255, 0) 70%);
    filter: blur(80px);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    transition: transform 0.15s ease-out;
    opacity: 1;
}

/* Typography & Layout */
section {
    padding: 80px 8%;
    margin: 80px 5%;
    background: rgba(0, 0, 0, 0.85); /* Más opaco para compensar la falta de desenfoque */
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h1,
h2,
h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.neon-text {
    color: var(--primary-neon);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
}

/* Glassmorphism Classes */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass:hover {
    border-color: var(--primary-neon);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.1);
}

/* Hero Section */
#hero {
    text-align: center;
    align-items: center;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    margin: 0;
    padding: 100px 10%;
    min-height: 100vh;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(30px);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
}

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: transparent;
    border: 1px solid var(--primary-neon);
    color: var(--primary-neon);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--primary-neon);
    color: var(--bg-color);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}

/* CV Button Styles */
.cv-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 25px;
    border-radius: 50px;
    background: transparent;
    transition: all 0.3s ease;
}

.cv-es {
    border: 1px solid var(--primary-neon);
}

.cv-es:hover {
    background: rgba(0, 242, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.cv-es .cv-label, .cv-es .btn-cv-icon {
    color: var(--primary-neon);
}

.cv-es .btn-cv {
    border: 1px solid var(--primary-neon);
    color: var(--primary-neon);
}

.cv-es .btn-cv:hover {
    background: var(--primary-neon);
    color: var(--bg-color);
    box-shadow: var(--neon-glow);
}

.cv-en {
    border: 1px solid var(--secondary-neon);
}

.cv-en:hover {
    background: rgba(112, 0, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(112, 0, 255, 0.2);
}

.cv-en .cv-label, .cv-en .btn-cv-icon {
    color: var(--secondary-neon);
}

.cv-en .btn-cv {
    border: 1px solid var(--secondary-neon);
    color: var(--secondary-neon);
}

.cv-en .btn-cv:hover {
    background: var(--secondary-neon);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--secondary-neon);
}

.cv-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.cv-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-cv {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    background: transparent;
}

.btn-cv-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.btn-cv-icon:hover {
    transform: translateY(-3px);
    filter: brightness(1.3);
}

/* Project Card (NeoNBrawL Focus) */
.project-focus {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.project-img-container {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.project-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-img-container:hover img {
    transform: scale(1.05);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.project-card-small {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 30px;
    height: 100%;
}

.project-card-small .project-icon {
    width: 40px;
    height: 40px;
    color: var(--primary-neon);
}

.project-card-small h3 {
    font-size: 1.5rem;
    margin: 0;
}

.project-card-small p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-card-small .btn-primary {
    align-self: flex-start;
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Future Projects Card */
.future-projects-card {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 40px;
    border: 2px dashed var(--glass-border);
    background: rgba(255, 255, 255, 0.01);
}

.future-projects-card:hover {
    border-style: solid;
    border-color: var(--secondary-neon);
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.1);
}

.pulse-icon {
    width: 50px;
    height: 50px;
    color: var(--secondary-neon);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        text-shadow: 0 0 10px var(--secondary-neon);
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.skill-item {
    text-align: left;
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.skill-item h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.skill-dots {
    display: flex;
    gap: 8px;
    margin: 5px 0 10px 0;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
}

.dot.active {
    background: var(--primary-neon);
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}

.skill-details {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 5px;
    line-height: 1.5;
}

.skill-item:hover {
    border-color: var(--primary-neon);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.15);
}

.skill-item i {
    transition: transform 0.3s ease;
}

.skill-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Footer & Socials */
footer {
    padding: 50px 10%;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-left: 20px;
    transition: color 0.3s;
}

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

/* Animations Trigger Classes */
.fade-up {
    animation: fadeUp 1s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Education (Formación) Styles */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--glass-border);
    top: 0;
    bottom: 0;
    left: 10px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 100%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    background: var(--bg-color);
    border: 2px solid var(--primary-neon);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 5px var(--primary-neon);
}

.education-card {
    margin-bottom: 30px;
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.edu-date {
    color: var(--primary-neon);
    font-weight: 600;
    font-size: 0.9rem;
}

.edu-details {
    color: var(--text-muted);
    font-size: 0.95rem;
    list-style-type: none;
    margin-top: 10px;
}

.edu-details li {
    margin-bottom: 5px;
    position: relative;
    padding-left: 20px;
}

.edu-details li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-neon);
}

/* Contact Section Styles */
#contact {
    padding-bottom: 50px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
    margin-top: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-item i {
    width: 24px;
    height: 24px;
    color: var(--primary-neon);
}

.contact-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.contact-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-neon);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.form-group textarea {
    resize: none;
}

/* --- Mobile Responsive System --- */
@media (max-width: 992px) {
    nav {
        padding: 15px 5% !important;
    }

    section {
        padding: 60px 6%;
        margin: 50px 3%;
    }
    #hero {
        margin: 0;
        padding: 80px 5%;
    }
}

@media (max-width: 768px) {

    /* Navigation & Menu */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--text-main);
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 101;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        border-left: 1px solid var(--glass-border);
        z-index: 100;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        margin: 0 !important;
        font-size: 1.2rem;
    }

    .lang-btn {
        margin: 0;
        margin-top: 10px;
    }

    /* Typography Scale */
    h1 {
        font-size: 3rem !important;
    }

    h2 {
        font-size: 2.2rem !important;
    }

    /* Sections Adjustment */
    .hero-content {
        padding-top: 50px;
    }

    .project-focus {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .project-img-container {
        height: 250px;
        margin-bottom: 20px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Timeline */
    .timeline::after {
        left: 5px;
    }

    .timeline-item {
        padding-left: 35px;
    }

    .timeline-item::after {
        left: -3px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem !important;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .project-focus h3 {
        font-size: 2rem;
    }
}

/* Ensure menu toggle is hidden on desktop */
.menu-toggle {
    display: none;
}