.section-detail#ai-study {
    color: #000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 1.06rem;
    background: rgba(255, 230, 150, 0.35);
    padding: 6px 8px;
    border-radius: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background: #ffffff;
}

html {
    scroll-behavior: smooth;
}

/* ==================== PANTALLA DE CARGA ==================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow: hidden;
    background: #000;
}

#loading-screen::before {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        repeating-linear-gradient(
            to right,
            rgba(255, 255, 255, 0.015),
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 180px
        ),
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.015),
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 180px
        );
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}


.shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0.35;
}

.shape-circle { border-radius: 50%; }
.circle-lg { width: 820px; height: 820px; top: 6%; left: 50%; transform: translateX(-50%); opacity: 0.22; }
.circle-md { width: 660px; height: 660px; top: 14%; left: 50%; transform: translateX(-50%); opacity: 0.28; }
.circle-sm { width: 540px; height: 540px; top: 19%; left: 50%; transform: translateX(-50%); opacity: 0.36; }


.shape-square {
    border-radius: 6px;
}

.sq-1 { width: 90px; height: 90px; top: 6%; left: 4%; opacity: 0.08; }
.sq-2 { width: 72px; height: 72px; top: 28%; left: 14%; transform: rotate(45deg); opacity: 0.1; }
.sq-3 { width: 64px; height: 64px; top: 8%; right: 6%; opacity: 0.08; }
.sq-4 { width: 58px; height: 58px; bottom: 18%; right: 10%; opacity: 0.1; }
.sq-5 { width: 100px; height: 100px; bottom: -28px; left: 6%; opacity: 0.06; }

.shape-diamond {
    width: 80px;
    height: 80px;
    transform: rotate(45deg);
    top: 12%;
    left: 18%;
    opacity: 0.18;
}

.shape-line {
    width: 120%;
    height: 1px;
    top: 50%;
    left: -10%;
    transform: rotate(-8deg);
    background: rgba(255, 255, 255, 0.04);
    border: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    opacity: 0.8;
}

.star-1 { top: 14%; left: 46%; }
.star-2 { top: 9%; right: 32%; opacity: 0.6; }
.star-3 { top: 36%; left: 28%; opacity: 0.5; }
.star-4 { bottom: 26%; right: 38%; opacity: 0.6; }
.star-5 { bottom: 12%; left: 42%; opacity: 0.45; }

/* ANIMACIÓN LETRAS "BIENVENIDO" */
.welcome-text {
    color: white;
    font-size: 5rem;
    margin-bottom: 36px;
    letter-spacing: 5px;
    font-weight: 700;
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.welcome-text .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-30px);
    animation: letterDrop 0.6s ease forwards;
}

@keyframes letterDrop {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-text .letter:nth-child(1) { animation-delay: 0.1s; }
.welcome-text .letter:nth-child(2) { animation-delay: 0.2s; }
.welcome-text .letter:nth-child(3) { animation-delay: 0.3s; }
.welcome-text .letter:nth-child(4) { animation-delay: 0.4s; }
.welcome-text .letter:nth-child(5) { animation-delay: 0.5s; }
.welcome-text .letter:nth-child(6) { animation-delay: 0.6s; }
.welcome-text .letter:nth-child(7) { animation-delay: 0.7s; }
.welcome-text .letter:nth-child(8) { animation-delay: 0.8s; }
.welcome-text .letter:nth-child(9) { animation-delay: 0.9s; }
.welcome-text .letter:nth-child(10) { animation-delay: 1s; }

.progress-container {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.progress-bar {
    width: 520px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
}

.progress-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d8e0ec 0%, #bac7d9 30%, #95a3ba 55%, #55657d 80%, #1f2f44 100%);
    width: 0%;
    transition: width 0.35s ease;
    box-shadow: 0 0 12px rgba(159, 179, 200, 0.45);
}

.loading-percentage {
    color: #cdd3de;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    min-width: 50px;
    text-align: right;
}

.loading-text {
    color: #cfd2d8;
    font-size: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    margin-top: 14px;
    position: relative;
    z-index: 1;
}

#dots {
    letter-spacing: 6px;
    display: inline-block;
}

/* ==================== NAVEGACIÓN ==================== */
nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-weight: 500;
}

.nav-btn:hover {
    background: #f5f5f5;
    color: #000;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: #000;
    color: #ffffff;
    transform: scale(1.05);
}

.nav-btn i {
    font-size: 1rem;
}

/* ==================== SECCIONES ==================== */
.section {
    min-height: 100vh;
    padding: 120px 8%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== INICIO ==================== */
#inicio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    background: #ffffff;
}

.hero-content {
    flex: 1;
    max-width: 650px;
}

.hero-content h1 {
    font-size: 4.3rem;
    margin-bottom: 25px;
    line-height: 1.08;
    font-weight: 600;
    color: #1f2430;
}

.accent-name {
    font-weight: 700;
    background: linear-gradient(90deg, #1f2430 0%, #5f6677 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.typing-container {
    margin-bottom: 35px;
}

.typing-text {
    font-family: 'IBM Plex Mono', 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.45rem;
    font-weight: 700;
    border: 1px solid #dfe3e9;
    padding: 12px 18px;
    border-radius: 8px;
    display: inline-block;
    min-width: 500px;
    background: #f5f7fb;
    color: #1f2430;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.cursor {
    display: inline-block;
    color: #253046;
    animation: blink 0.8s infinite;
    margin-left: 3px;
    font-weight: 600;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    color: #555;
    line-height: 1.8;
    margin-bottom: 35px;
    font-size: 1.05rem;
}

.hero-description strong {
    color: #000;
}

.hero-buttons {
    display: flex;
    gap: 18px;
    margin-bottom: 50px;
}

.btn {
    padding: 14px 32px;
    border-radius: 30px;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 320px;
}

.btn-primary {
    background: white;
    color: #000;
}

.btn-primary:hover {
    background: #000;
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #000;
    color: white;
}

.btn-secondary:hover {
    background: white;
    color: #000;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.social-links span {
    color: #999;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.social-links a {
    color: #333;
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.social-links a:hover {
    color: #000;
    transform: translateY(-5px) scale(1.2) rotate(5deg);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-card {
    width: 420px;
    height: 420px;
    background: #ffffff;
    border-radius: 25px;
    padding: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-card:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.2);
}

.card-frame {
    display: none;
}

.card-content {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    bottom: 14px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
}

.card-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-card:hover .card-content img {
    transform: scale(1.05);
}

/* ==================== ACERCA ==================== */
#acerca {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 80px;
    background: #f6f7fb;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-image-card {
    width: 380px;
    height: 480px;
    background: #ffffff !important; /* forzar fondo blanco */
    border: 12px solid #ffffff !important; /* forzar borde blanco */
    border-radius: 25px;
    padding: 12px; /* ajustar para que se vea borde blanco limpio */
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-image-card:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.2);
}

.about-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px; /* mantener esquinas suaves */
    border: 8px solid #ffffff; /* marco interior blanco */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-image-card:hover img {
    transform: scale(1.12);
}

.about-content {
    max-width: 650px;
    transition: transform 0.4s ease;
    margin-left: auto;
}

#acerca:hover .about-content {
    transform: translateY(-6px);
}

.about-content h2 {
    font-size: 3.5rem;
    margin-bottom: 40px;
    font-weight: 600;
    color: #1f2430;
}

.about-header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.docs-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 26px;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.docs-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    background: #000000;
    color: #ffffff;
}

.docs-link-btn i {
    font-size: 1.1rem;
}

.text-gray {
    color: #6c7382;
}

.about-info h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.name-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-block;
    position: relative;
}

.name-hover:hover {
    transform: scale(1.08);
}

.about-info > p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 40px;
    font-size: 1.05rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.about-info > p:hover {
    transform: scale(1.02) translateX(8px);
    color: #333;
    letter-spacing: 0.3px;
}

.about-section {
    margin-bottom: 35px;
}

.about-section h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.bar {
    color: #000;
    font-weight: bold;
    font-size: 1.8rem;
}

.expandable-section {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 5px;
    border-radius: 10px;
    overflow: visible; /* evitar que se corte el contenido interno */
}

.expandable-section:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateX(10px);
}

.section-header {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.expandable-section:hover .section-header {
    transform: scale(1.05);
    color: #000;
}

.section-content {
    max-height: none;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}
.edu-item {
    margin-bottom: 18px;
}

.edu-item:last-child {
    margin-bottom: 0;
}

/* Revert special emphasis on last education line */

.section-detail strong {
    display: inline-block;
    margin-bottom: 6px;
}

.expandable-section:hover .section-content {
    transform: translateX(8px);
}

.section-detail {
    color: #444;
    line-height: 1.85;
    margin-bottom: 12px;
    font-size: 1.02rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.expandable-section:hover .section-detail {
    color: #222;
    transform: translateX(5px);
}

.section-detail strong {
    color: #000;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.skill-tag {
    background: #f5f5f5;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.skill-tag i {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-tag:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

/* Skill modal card */
.skill-modal {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    max-width: calc(100% - 40px);
    background: #ffffff;
    border: 2px solid #000;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    padding: 16px 16px 18px;
    z-index: 1100;
    display: none;
}

.skill-modal.active { display: block; }

.skill-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.skill-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.skill-modal h5 {
    font-size: 1.1rem;
    margin: 0;
}

.skill-modal p {
    color: #555;
    line-height: 1.6;
    margin: 6px 2px 0;
}

.skill-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
}
.skill-modal-close:hover { background: #f5f5f5; }

/* ==================== PROYECTOS ==================== */
#proyectos {
    background: #ffffff;
}

.section-title {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: #1f2430;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    border-color: #000;
}

.project-image {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.project-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;z-index: 1;
    filter: contrast(1.2) brightness(1.1) saturate(1.2) sharpness(1.2);
    image-rendering: crisp-edges;
}

.project-bg-1 {
    background: linear-gradient(135deg, #1e2a4a 0%, #4a5fc1 50%, #6b7fd7 100%);
}

.project-bg-2 {
    background: linear-gradient(135deg, #0d1929 0%, #1e3a5f 50%, #2a4d7c 100%);
}

.project-bg-3 {
    background: linear-gradient(135deg, #0a1420 0%, #1a2942 50%, #2a3f5f 100%);
}

.project-icon {
    font-size: 5rem;
    z-index: 2;
    position: relative;
}

.project-sparkles, .project-elements, .project-board {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.sparkle, .element {
    position: absolute;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.sparkle-1 { top: 20%; left: 15%; animation-delay: 0s; }
.sparkle-2 { top: 60%; right: 20%; animation-delay: 1s; }
.sparkle-3 { bottom: 25%; left: 25%; animation-delay: 2s; }

.element-1 { top: 15%; right: 15%; animation-delay: 0.5s; }
.element-2 { top: 70%; left: 20%; animation-delay: 1.5s; }
.element-3 { bottom: 20%; right: 25%; animation-delay: 2.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.board-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
}

.project-info {
    padding: 30px;
}

.project-info h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.project-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

/* Projects search & filters (home) */
.project-search {
    max-width: 1200px;
    margin: 0 auto 32px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.project-search-bar {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.project-search-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    background: #f8fafc;
    font-size: 0.95rem;
    color: #111827;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
}

.project-search-input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.16);
    background: #fff;
}

.project-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
    display: none;
    z-index: 10;
    max-height: 240px;
    overflow-y: auto;
}

.project-suggestions.visible {
    display: block;
}

.project-suggestion-item {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    text-align: left;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease, color 0.2s ease;
}

.project-suggestion-item:last-child {
    border-bottom: none;
}

.project-suggestion-item:hover {
    background: #f8fafc;
    color: #4f46e5;
}

.project-card.project-card-highlight {
    outline: 2px solid #7c3aed;
    box-shadow: 0 16px 36px rgba(124, 58, 237, 0.25);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
}

.project-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
    margin-bottom: 140px;
    position: relative;
}

/* Legacy style kept for safety but overridden inside dock */
.project-filter-btn { cursor: pointer; }

/* Dock styles */
.project-dock-outer {
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none; /* children re-enable */
}

.project-dock-panel {
    position: relative;
    left: auto;
    transform: none;
    display: flex;
    align-items: flex-end;
    gap: 28px;
    padding: 8px 32px 12px;
    background: white;
    border-radius: 50px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    height: 56px;
    transition: none;
    pointer-events: auto;
    margin: 40px auto 0 auto;
    width: fit-content;
}

.project-dock-panel::before {
    display: none;
}

.project-dock-item.project-filter-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 30px;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #666;
    cursor: pointer;
    transform-origin: center bottom;
    transition: background 140ms ease, color 140ms ease, transform 80ms ease;
    position: relative;
}

.project-dock-item .dock-icon { display: flex; align-items: center; justify-content: center; }
.project-dock-item .dock-icon i { font-size: 1.3rem; color: #000; transition: color 140ms ease; }

.project-dock-item:hover,
.project-dock-item:focus-visible {
    background: #f5f5f5;
    color: #000;
    border: none;
    box-shadow: none;
    transform: none !important;
}

.project-dock-item.active {
    background: #000;
    color: #ffffff;
    border: none;
    box-shadow: none;
    transform: none;
}

.project-dock-item.active .dock-icon i { color: #fff; }
.project-dock-item:hover .dock-icon i { color: #000; }

/* When an active item is hovered/focused, don't show black background */
.project-dock-item.active:hover,
.project-dock-item.active:focus-visible {
    background: #f5f5f5;
    color: #000;
}

.project-dock-item.active:hover .dock-icon i,
.project-dock-item.active:focus-visible .dock-icon i {
    color: #000;
}

.project-dock-item .dock-label {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(6, 0, 16, 0.9);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(192,132,252,0.28);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease;
}

.project-dock-item:hover .dock-label,
.project-dock-item:focus-visible .dock-label {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}

/* Scale applied from JS via transform */
.project-dock-item { will-change: transform, filter; }

.project-tag {
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
    border: 1.5px solid;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* HTML5 y CSS3 */
.project-tag:nth-child(1) {
    background: linear-gradient(135deg, rgba(227, 76, 38, 0.65) 0%, rgba(240, 101, 41, 0.65) 100%);
    border-color: rgba(255, 107, 61, 0.7);
    box-shadow: 0 2px 10px rgba(227, 76, 38, 0.2);
}

.project-tag:nth-child(1):hover {
    background: linear-gradient(135deg, rgba(240, 101, 41, 0.8) 0%, rgba(255, 122, 71, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(227, 76, 38, 0.35);
}

/* Linux */
.project-tag:nth-child(2) {
    background: linear-gradient(135deg, rgba(252, 198, 36, 0.65) 0%, rgba(255, 216, 77, 0.65) 100%);
    border-color: rgba(255, 224, 102, 0.7);
    color: #000;
    box-shadow: 0 2px 10px rgba(252, 198, 36, 0.2);
}

.project-tag:nth-child(2):hover {
    background: linear-gradient(135deg, rgba(255, 216, 77, 0.8) 0%, rgba(255, 229, 115, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(252, 198, 36, 0.35);
}

/* MySQL / Database */
.project-tag:nth-child(3) {
    background: linear-gradient(135deg, rgba(0, 117, 143, 0.65) 0%, rgba(0, 160, 200, 0.65) 100%);
    border-color: rgba(0, 184, 230, 0.7);
    box-shadow: 0 2px 10px rgba(0, 117, 143, 0.2);
}

.project-tag:nth-child(3):hover {
    background: linear-gradient(135deg, rgba(0, 160, 200, 0.8) 0%, rgba(0, 200, 240, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 117, 143, 0.35);
}

/* JavaScript */
.project-tag:nth-child(4) {
    background: linear-gradient(135deg, rgba(240, 219, 79, 0.65) 0%, rgba(247, 230, 109, 0.65) 100%);
    border-color: rgba(255, 243, 128, 0.7);
    color: #000;
    box-shadow: 0 2px 10px rgba(240, 219, 79, 0.2);
}

.project-tag:nth-child(4):hover {
    background: linear-gradient(135deg, rgba(247, 230, 109, 0.8) 0%, rgba(255, 250, 138, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(240, 219, 79, 0.35);
}

/* PHP */
.project-tag:nth-child(5) {
    background: linear-gradient(135deg, rgba(119, 123, 179, 0.65) 0%, rgba(136, 146, 191, 0.65) 100%);
    border-color: rgba(157, 168, 204, 0.7);
    box-shadow: 0 2px 10px rgba(119, 123, 179, 0.2);
}

.project-tag:nth-child(5):hover {
    background: linear-gradient(135deg, rgba(136, 146, 191, 0.8) 0%, rgba(155, 165, 217, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(119, 123, 179, 0.35);
}

/* AWS */
.project-tag:nth-child(6) {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.65) 0%, rgba(255, 179, 71, 0.65) 100%);
    border-color: rgba(255, 194, 102, 0.7);
    color: #000;
    box-shadow: 0 2px 10px rgba(255, 153, 0, 0.2);
}

.project-tag:nth-child(6):hover {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.8) 0%, rgba(255, 201, 115, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.35);
}

/* Docker */
.project-tag:nth-child(7) {
    background: linear-gradient(135deg, rgba(13, 183, 237, 0.65) 0%, rgba(45, 201, 247, 0.65) 100%);
    border-color: rgba(77, 214, 250, 0.7);
    box-shadow: 0 2px 10px rgba(13, 183, 237, 0.2);
}

.project-tag:nth-child(7):hover {
    background: linear-gradient(135deg, rgba(45, 201, 247, 0.8) 0%, rgba(96, 224, 255, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 183, 237, 0.35);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-link:hover {
    gap: 10px;
    transform: scale(1.06);
}

/* Force "Acerca" content to the right on desktop */
@media (min-width: 1025px) {
    #acerca {
        justify-content: flex-end;
    }

    .about-content {
        margin-left: auto;
    }
}

.arrow-icon {
    transition: transform 0.3s ease;
}

.project-link:hover .arrow-icon {
    transform: translateX(4px);
}

/* ==================== SERVICIOS ==================== */
#servicios {
    background: #f6f7fb;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.service-card {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 25px;
    padding: 45px 35px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.service-card:hover {
    border-color: #000;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
    transform: translateY(-12px) scale(1.02);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: #1f2430;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #1f2430;
}

.service-card p {
    color: #4a4f5c;
    line-height: 1.7;
    font-size: 1rem;
}

.services-cta {
    text-align: center;
}

/* ==================== CONTACTO ==================== */
#contacto {
    padding-top: 80px;
}

.contact-section .section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 8px;
}

.contact-section .section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 28px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: start;
}

.contact-form, .contact-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.05);
}

.form-field { 
    margin-bottom: 16px; 
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fafafa;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: #111;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: #9aa4b2;
    opacity: 1;
}

#contacto input, 
#contacto textarea { 
    text-transform: none !important; 
    letter-spacing: normal !important; 
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    background: #fff;
}

.contact-submit { 
    width: 100%; 
    margin-top: 6px; 
}

.contact-status { 
    margin-top: 10px; 
    font-size: 14px; 
    color: #2563eb; 
    min-height: 20px; 
}

.contact-card-title { 
    font-size: 20px; 
    margin-bottom: 14px; 
}

.contact-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    display: grid; 
    gap: 14px; 
}

.contact-list li { 
    display: grid; 
    grid-template-columns: 36px 1fr; 
    gap: 10px; 
    align-items: center; 
}

.contact-icon { 
    width: 36px; 
    height: 36px; 
    border-radius: 10px; 
    background: #f1f5ff; 
    color: #2563eb; 
    display: grid; 
    place-items: center; 
}

.contact-label { 
    font-size: 12px; 
    color: #666; 
}

.contact-card a { 
    color: #2563eb; 
    text-decoration: none; 
}

.contact-card a:hover { 
    text-decoration: underline; 
}

.contact-social { 
    margin-top: 16px; 
    display: flex; 
    gap: 10px; 
}

.contact-social a { 
    width: 38px; 
    height: 38px; 
    border-radius: 10px; 
    display: grid; 
    place-items: center; 
    background: #f8fafc; 
    color: #111; 
    border: 1px solid #eee; 
    transition: transform .2s ease, background .2s ease; 
}

.contact-social a:hover { 
    transform: translateY(-2px); 
    background: #fff; 
}

@media (max-width: 900px) {
    .contact-grid { 
        grid-template-columns: 1fr; 
    }
}

/* ==================== FOOTER ==================== */
footer {
    background: #000;
    color: white;
    padding: 70px 8% 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    color: #999;
    line-height: 1.7;
    font-size: 1rem;
}

.footer-section h4 {
    color: #777;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 18px;
}

.footer-social a {
    color: #999;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 35px;
    border-top: 1px solid #222;
    color: #666;
    font-size: 0.9rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    #inicio, #acerca {
        flex-direction: column;
        text-align: center;
        gap: 50px;
    }

    .hero-content, .about-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .about-content h2 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    nav {
        width: 90%;
        overflow-x: auto;
        padding: 8px 10px;
    }

    .nav-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .typing-text {
        min-width: 320px;
        font-size: 1.1rem;
    }

    .welcome-text {
        font-size: 2.5rem;
    }

    .image-card, .about-image-card {
        width: 320px;
        height: 380px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .projects-grid, .services-grid {
        grid-template-columns: 1fr;
    }
}

.skill-tag {
    background: #f5f5f5;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.skill-tag:hover {
    background: #000;
    color: white;
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ==================== PROYECTOS ==================== */
#proyectos {
    background: #ffffff;
}

.section-title {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: #1f2430;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    border-color: #000;
}

.project-image {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.project-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;z-index: 1;
    filter: contrast(1.2) brightness(1.1) saturate(1.2) sharpness(1.2);
    image-rendering: crisp-edges;
}

.project-bg-1 {
    background: linear-gradient(135deg, #1e2a4a 0%, #4a5fc1 50%, #6b7fd7 100%);
}

.project-bg-2 {
    background: linear-gradient(135deg, #0d1929 0%, #1e3a5f 50%, #2a4d7c 100%);
}

.project-bg-3 {
    background: linear-gradient(135deg, #0a1420 0%, #1a2942 50%, #2a3f5f 100%);
}

.project-icon {
    font-size: 5rem;
    z-index: 2;
    position: relative;
}

.project-sparkles, .project-elements, .project-board {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.sparkle, .element {
    position: absolute;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.sparkle-1 { top: 20%; left: 15%; animation-delay: 0s; }
.sparkle-2 { top: 60%; right: 20%; animation-delay: 1s; }
.sparkle-3 { bottom: 25%; left: 25%; animation-delay: 2s; }

.element-1 { top: 15%; right: 15%; animation-delay: 0.5s; }
.element-2 { top: 70%; left: 20%; animation-delay: 1.5s; }
.element-3 { bottom: 20%; right: 25%; animation-delay: 2.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.board-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
}

.project-info {
    padding: 30px;
}

.project-info h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.project-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.project-tag {
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
    border: 1.5px solid;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* HTML5 y CSS3 */
.project-tag:nth-child(1) {
    background: linear-gradient(135deg, rgba(227, 76, 38, 0.65) 0%, rgba(240, 101, 41, 0.65) 100%);
    border-color: rgba(255, 107, 61, 0.7);
    box-shadow: 0 2px 10px rgba(227, 76, 38, 0.2);
}

.project-tag:nth-child(1):hover {
    background: linear-gradient(135deg, rgba(240, 101, 41, 0.8) 0%, rgba(255, 122, 71, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(227, 76, 38, 0.35);
}

/* Linux */
.project-tag:nth-child(2) {
    background: linear-gradient(135deg, rgba(252, 198, 36, 0.65) 0%, rgba(255, 216, 77, 0.65) 100%);
    border-color: rgba(255, 224, 102, 0.7);
    color: #000;
    box-shadow: 0 2px 10px rgba(252, 198, 36, 0.2);
}

.project-tag:nth-child(2):hover {
    background: linear-gradient(135deg, rgba(255, 216, 77, 0.8) 0%, rgba(255, 229, 115, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(252, 198, 36, 0.35);
}

/* MySQL / Database */
.project-tag:nth-child(3) {
    background: linear-gradient(135deg, rgba(0, 117, 143, 0.65) 0%, rgba(0, 160, 200, 0.65) 100%);
    border-color: rgba(0, 184, 230, 0.7);
    box-shadow: 0 2px 10px rgba(0, 117, 143, 0.2);
}

.project-tag:nth-child(3):hover {
    background: linear-gradient(135deg, rgba(0, 160, 200, 0.8) 0%, rgba(0, 200, 240, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 117, 143, 0.35);
}

/* JavaScript */
.project-tag:nth-child(4) {
    background: linear-gradient(135deg, rgba(240, 219, 79, 0.65) 0%, rgba(247, 230, 109, 0.65) 100%);
    border-color: rgba(255, 243, 128, 0.7);
    color: #000;
    box-shadow: 0 2px 10px rgba(240, 219, 79, 0.2);
}

.project-tag:nth-child(4):hover {
    background: linear-gradient(135deg, rgba(247, 230, 109, 0.8) 0%, rgba(255, 250, 138, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(240, 219, 79, 0.35);
}

/* PHP */
.project-tag:nth-child(5) {
    background: linear-gradient(135deg, rgba(119, 123, 179, 0.65) 0%, rgba(136, 146, 191, 0.65) 100%);
    border-color: rgba(157, 168, 204, 0.7);
    box-shadow: 0 2px 10px rgba(119, 123, 179, 0.2);
}

.project-tag:nth-child(5):hover {
    background: linear-gradient(135deg, rgba(136, 146, 191, 0.8) 0%, rgba(155, 165, 217, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(119, 123, 179, 0.35);
}

/* AWS */
.project-tag:nth-child(6) {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.65) 0%, rgba(255, 179, 71, 0.65) 100%);
    border-color: rgba(255, 194, 102, 0.7);
    color: #000;
    box-shadow: 0 2px 10px rgba(255, 153, 0, 0.2);
}

.project-tag:nth-child(6):hover {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.8) 0%, rgba(255, 201, 115, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.35);
}

/* Docker */
.project-tag:nth-child(7) {
    background: linear-gradient(135deg, rgba(13, 183, 237, 0.65) 0%, rgba(45, 201, 247, 0.65) 100%);
    border-color: rgba(77, 214, 250, 0.7);
    box-shadow: 0 2px 10px rgba(13, 183, 237, 0.2);
}

.project-tag:nth-child(7):hover {
    background: linear-gradient(135deg, rgba(45, 201, 247, 0.8) 0%, rgba(96, 224, 255, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 183, 237, 0.35);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-link:hover {
    gap: 10px;
    transform: scale(1.06);
}

.arrow-icon {
    transition: transform 0.3s ease;
}

.project-link:hover .arrow-icon {
    transform: translateX(4px);
}

/* ==================== SERVICIOS ==================== */
#servicios {
    background: #f6f7fb;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.service-card {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 25px;
    padding: 45px 35px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.service-card:hover {
    border-color: #000;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
    transform: translateY(-12px) scale(1.02);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: #1f2430;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #1f2430;
}

.service-card p {
    color: #4a4f5c;
    line-height: 1.7;
    font-size: 1rem;
}

.services-cta {
    text-align: center;
}

/* ==================== FOOTER ==================== */
footer {
    background: #000;
    color: white;
    padding: 70px 8% 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    color: #999;
    line-height: 1.7;
    font-size: 1rem;
}

.footer-section h4 {
    color: #777;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 18px;
}

.footer-social a {
    color: #999;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 35px;
    border-top: 1px solid #222;
    color: #666;
    font-size: 0.9rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    #inicio, #acerca {
        flex-direction: column;
        text-align: center;
        gap: 50px;
    }

    .hero-content, .about-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .about-content h2 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    nav {
        width: 90%;
        overflow-x: auto;
        padding: 8px 10px;
    }

    .nav-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .typing-text {
        min-width: 320px;
        font-size: 1.1rem;
    }

    .welcome-text {
        font-size: 2.5rem;
    }

    .image-card, .about-image-card {
        width: 320px;
        height: 380px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .projects-grid, .services-grid {
        grid-template-columns: 1fr;
    }
}



/* ==================== VIDEO MODAL ==================== */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.2);
}

.video-player-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-modal-player { 
    width: 100%; 
    height: 100%; 
    object-fit: contain;
    display: block;
    background: #000;
}

.video-controls {
    display: none !important;
}

.video-player-container:hover .video-controls { opacity: 1; }

.progress-bar-video { flex: 1; }

.progress-input {
    width: 100%;
    height: 3px;
    cursor: pointer;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 999px;
}

.progress-input:hover { height: 3px; }

/* Track del progreso estilo nativo, gris fino */
.progress-input::-webkit-slider-runnable-track {
    height: 3px;
    background: linear-gradient(90deg, rgba(210,210,220,0.5) 0%, rgba(210,210,220,0.5) var(--progress), rgba(90,90,100,0.35) var(--progress), rgba(90,90,100,0.35) 100%);
    border-radius: 999px;
}

.progress-input:hover::-webkit-slider-runnable-track { filter: brightness(1.02); }

.progress-input::-moz-range-track {
    height: 3px;
    background: rgba(90,90,100,0.35);
    border-radius: 999px;
}

.progress-input::-moz-range-progress {
    height: 3px;
    background: rgba(210,210,220,0.5);
    border-radius: 999px;
}

.progress-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.2);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.progress-input:hover::-webkit-slider-thumb { background: #eee; }

.progress-input::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.2);
}

.progress-input:hover::-moz-range-thumb { background: #eee; }

.controls-bottom {
    display: flex;
    align-items: center;
    gap: 14px;
}

.play-btn {
    background: transparent;
    color: #fff;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 4px;
    margin-left: auto;
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.volume-control {
    width: 90px;
    height: 5px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.volume-control:hover {
    height: 6px;
}

.volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.volume-control::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.volume-control::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.volume-control::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.time-display {
    color: white;
    font-size: 12px;
    margin-left: 0;
    font-family: monospace;
    min-width: 90px;
}

.video-modal-close-top {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    line-height: 1;
}

.video-modal-close-top:hover {
    background: #fff;
    color: #000;
    transform: rotate(90deg);
}

.quality-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    margin-left: 5px;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quality-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.quality-menu {
    position: absolute;
    bottom: 60px;
    right: 10px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px 0;
    min-width: 150px;
    z-index: 10002;
}

.quality-option {
    padding: 10px 16px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.quality-option:hover {
    background: rgba(74, 158, 255, 0.3);
}

.quality-option.active {
    background: rgba(74, 158, 255, 0.5);
    font-weight: 600;
}

.video-modal-close {
    display: none; /* ocultamos el botón antiguo */
}

/* Ver más proyectos - CENTRADO FULL WIDTH */
.view-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 60px;
    margin-bottom: 60px;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    border: none;
}

.view-more-btn {
    padding: 15px 40px;
    font-size: 1.05rem;
    background: white;
    color: #000;
    border: 2px solid #000;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.view-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Responsive para botón de documentaciones */
@media (max-width: 1024px) {
    .about-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        justify-content: flex-start;
    }

    .docs-link-btn {
        font-size: 0.9rem;
        padding: 11px 22px;
    }
}

@media (max-width: 768px) {
    .about-header-container {
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .docs-link-btn {
        font-size: 0.85rem;
        padding: 10px 18px;
    }
}
/* ==================== TARJETA DOCUMENTACIONES 3D ==================== */
.docs-card-3d-wrapper {
    perspective: 1000px;
    flex-shrink: 0;
    margin-right: 40px;
}

.docs-card-3d {
    width: 380px;
    height: 520px;
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
    border-radius: 24px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.docs-card-3d:hover {
    box-shadow: 
        0 35px 80px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.docs-card-inner {
    width: 100%;
    height: 100%;
    padding: 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

/* Patrón hexagonal de fondo */
.docs-card-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.02) 2px, transparent 2px);
    background-size: 50px 50px;
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}

.docs-card-bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(255, 255, 255, 0.01) 40px,
            rgba(255, 255, 255, 0.01) 41px
        ),
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 40px,
            rgba(255, 255, 255, 0.01) 40px,
            rgba(255, 255, 255, 0.01) 41px
        ),
        repeating-linear-gradient(
            -60deg,
            transparent,
            transparent 40px,
            rgba(255, 255, 255, 0.01) 40px,
            rgba(255, 255, 255, 0.01) 41px
        );
    opacity: 0.6;
}

.docs-card-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 3;
}

.docs-card-icon i {
    font-size: 1.5rem;
    color: #ffffff;
}

.docs-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    position: relative;
    z-index: 3;
}

.docs-card-desc {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin-bottom: 20px;
    position: relative;
    z-index: 3;
}

.docs-card-image-container {
    flex: 1;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 3;
}

.docs-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-card-3d:hover .docs-card-image {
    transform: scale(1.08);
}

.docs-card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
}

.docs-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 3;
    align-self: flex-end;
}

.docs-card-btn:hover {
    background: linear-gradient(135deg, #444 0%, #222 100%);
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.docs-card-btn i {
    transition: transform 0.3s ease;
}

.docs-card-btn:hover i {
    transform: translateX(4px);
}

/* Efecto de brillo 3D */
.docs-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.08) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 4;
    border-radius: 24px;
}

.docs-card-3d:hover::before {
    opacity: 1;
}

/* Responsive para la tarjeta 3D */
@media (max-width: 1200px) {
    .docs-card-3d-wrapper {
        margin-right: 30px;
    }
    
    .docs-card-3d {
        width: 340px;
        height: 480px;
    }
}

@media (max-width: 992px) {
    #acerca {
        flex-direction: column;
        align-items: center;
    }
    
    .docs-card-3d-wrapper {
        margin-right: 0;
        margin-bottom: 40px;
    }
    
    .docs-card-3d {
        width: 360px;
        height: 500px;
    }
}

@media (max-width: 480px) {
    .docs-card-3d {
        width: 320px;
        height: 460px;
    }
    
    .docs-card-title {
        font-size: 1.4rem;
    }
    
    .docs-card-desc {
        font-size: 0.85rem;
    }
}