/* ================= VARIABLES ================= */
:root {
    --bg-dark: #070b14;
    --bg-light: #f5f5f7;
    --primary-cyan: #00E5FF;
    --primary-blue: #2962FF;
    --accent-orange: #E58312;
    --accent-orange-light: #FE9114;
    --text-light: #ffffff;
    --text-gray: #8b92a5;
    --text-dark: #1a1a24;
    --glass-bg-dark: rgba(13, 20, 36, 0.6);
    --glass-bg-light: rgba(255, 255, 255, 0.8);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-dark: rgba(0, 0, 0, 0.1);
}

/* ================= RESET Y BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

li {
    list-style: none;
}

.grid-bg {
    background-image:
        linear-gradient(var(--border-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
}

/* ================= NAVEGACIÓN ================= */
.privileged-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(7, 11, 20, 0.85);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 120;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.privileged-toggle:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
}

.privileged-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(7, 11, 20, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-cyan);
}

.logo-text {
    display: flex;
    flex-direction: column;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.65rem;
    color: var(--primary-cyan);
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-gray);
    transition: 0.3s;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--primary-cyan);
}

.btn-contact {
    border: 1px solid var(--border-light);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    color: var(--text-light);
    transition: 0.3s;
}

.btn-contact:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
}

/* ================= HERO SECTION ================= */
.hero {
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    padding: 0 5%;
    padding-top: 90px;
    padding-bottom: 30px;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
}

.hero-content {
    flex: 1;
    width: 50%;
    z-index: 2;
}

/* El bloque naranja */
.hero-badge {
    display: inline-block;
    border: 1px solid rgba(229, 131, 18, 0.4);
    background: rgba(229, 131, 18, 0.05);
    color: var(--accent-orange-light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-tag {
    color: var(--primary-cyan);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    display: block;
}

/* Tipografía escalada para que quepa */
.hero h1 {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero h1 .cyan-text {
    color: var(--primary-cyan);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.hero h1 .blue-text {
    color: var(--primary-blue);
    font-size: 1.1em;
}

.hero p {
    color: var(--text-gray);
    font-size: 0.85rem;
    max-width: 450px;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

/* Botones dobles */
.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background: var(--accent-orange);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    display: inline-block;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-orange-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    display: inline-block;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* ================= ESPACIO DEL RENDER Y CAJITAS ================= */
.hero-visual {
    flex: 1;
    width: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow: hidden;
}

.glow-spot {
    display: none;
    /* Se oculta para dejar la imagen completamente limpia */
}

.render-placeholder {
    width: 100%;
    max-width: 550px;
    height: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
    overflow: visible;
    padding: 0;
}

.render-placeholder model-viewer {
    border-radius: 10px;
}

/* Hero render image — mostrarla completa y grande */
.hero-render-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: 76vh;
    object-fit: contain;
    transform: scale(1.08) translate(-8px, 8px);
    border-radius: 0;
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: scale(1.08) translate(-8px, 8px);
    }

    50% {
        transform: scale(1.04) translate(-6px, 6px);
    }
}

/* Animaciones para alternar entre dos Renders (Fading cruzado) */
.hero-render-img.img-primary {
    animation: heroFloat 6s ease-in-out infinite, fadePrimary 12s ease-in-out infinite;
}

.hero-render-img.img-alternate {
    position: absolute;
    /* Al estar en un contenedor flex (render-placeholder), se superpone automáticamente */
    animation: heroFloat 6s ease-in-out infinite, fadeAlternate 12s ease-in-out infinite;
}

@keyframes fadePrimary {
    0%, 45% { opacity: 1; }
    50%, 95% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeAlternate {
    0%, 45% { opacity: 0; }
    50%, 95% { opacity: 1; }
    100% { opacity: 0; }
}

/* CAJITAS FLOTANTES (Especificaciones) */
.floating-card {
    position: absolute;
    background: rgba(13, 20, 36, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: 0.3s;
    white-space: nowrap;
}

.floating-card:hover {
    border-color: var(--primary-cyan);
    transform: scale(1.05);
}

.floating-card .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.floating-card .dot.cyan {
    background: var(--primary-cyan);
    box-shadow: 0 0 8px var(--primary-cyan);
}

.floating-card .dot.blue {
    background: var(--primary-blue);
    box-shadow: 0 0 8px var(--primary-blue);
}

/* Posición — apuntan al cabezote (top) y a la base (bottom) del exhibidor */
.card-top {
    top: 22%;
    right: -5px;
}

.card-bottom {
    bottom: 15%;
    left: -5px;
}

/* ================= RESTO DEL CSS ================= */
.about-section {
    background-color: var(--bg-light);
    color: var(--text-dark);
    padding: 100px 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.about-card,
.skills-card {
    background: var(--glass-bg-light);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-dark);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.about-card h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.about-card p {
    line-height: 1.8;
    color: #4a4a5a;
    margin-bottom: 1rem;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.software-item {
    background: #ffffff;
    border: 1px solid var(--border-dark);
    padding: 1.5rem 1rem;
    text-align: center;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
}

.software-item[data-color='orange'] {
    --software-color: #ff8a00;
}

.software-item[data-color='amber'] {
    --software-color: #f4b400;
}

.software-item[data-color='orange-dark'] {
    --software-color: #ff6a00;
}

.software-item[data-color='blue'] {
    --software-color: #1f8fff;
}

.software-item[data-color='cyan'] {
    --software-color: #00d7ff;
}

.software-item[data-color='blue-strong'] {
    --software-color: #1c63ff;
}

.software-item[data-color='purple'] {
    --software-color: #a259ff;
}

.software-item:hover {
    border-color: var(--software-color, var(--primary-cyan));
    color: var(--software-color, var(--primary-cyan));
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.projects-section {
    padding: 100px 5%;
    background-color: var(--bg-dark);
}

.projects-header {
    margin-bottom: 3rem;
}

.projects-subtitle {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
}

.projects-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-gray);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
}

.admin-panel {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 1.5rem;
}

.admin-panel.hidden {
    display: none;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-header h3 {
    font-size: 1.25rem;
}

.ghost-button {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.6rem 1rem;
    cursor: pointer;
}

.project-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
    align-items: start;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-group label {
    color: var(--text-gray);
    font-size: 0.8rem;
}

.field-group input,
.field-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(7, 11, 20, 0.7);
    color: var(--text-light);
}

.admin-submit {
    min-height: 48px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--glass-bg-dark);
    border: 1px solid var(--border-light);
    height: 350px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease, border-color 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
    border-color: var(--primary-cyan);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 229, 255, 0.12);
}

.project-card:hover .project-info {
    bottom: 0;
    opacity: 1;
}

.project-card:hover .card-preview .card-icon {
    transform: scale(1.15);
}

.project-card:hover .card-3d-badge {
    background: var(--primary-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

/* Static card preview with render images */
.card-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.03) 0%, rgba(41, 98, 255, 0.06) 50%, rgba(229, 131, 18, 0.03) 100%);
    position: relative;
    overflow: hidden;
}

.card-render-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.project-card:hover .card-render-img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.card-icon {
    font-size: 4rem;
    opacity: 0.7;
    transition: transform 0.4s ease;
    filter: grayscale(0.3);
}

.card-3d-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 229, 255, 0.15);
    color: var(--primary-cyan);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    transition: all 0.3s ease;
}

/* Filter animation */
.project-card.hidden {
    display: none;
}

.project-card.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.project-admin-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: none;
    gap: 0.5rem;
    z-index: 10;
}

.project-card.privileged .project-admin-actions {
    display: flex;
}

.project-admin-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(7, 11, 20, 0.8);
    color: var(--text-light);
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}

.project-admin-btn.delete:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.project-admin-btn.edit:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
}

.project-card.privileged .card-3d-badge {
    left: 12px;
    right: auto;
}

.project-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    opacity: 0;
    transition: 0.4s ease;
    z-index: 5;
}

.project-info h3 {
    color: white;
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 600;
}

.project-tag {
    color: var(--primary-cyan);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ================= MODAL 3D VIEWER ================= */
.privileged-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 130;
}

.privileged-modal.hidden {
    display: none;
}

.privileged-modal-content {
    width: min(420px, calc(100% - 2rem));
    background: rgba(13, 20, 36, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 2rem 1.5rem 1.5rem;
    position: relative;
    color: var(--text-light);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.privileged-modal-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.privileged-modal-content p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.privileged-modal-content input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-light);
    margin-bottom: 1rem;
}

.privileged-modal-content small {
    display: block;
    margin-top: 0.8rem;
    color: var(--text-gray);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    height: min(80vh, 760px);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transform: scale(0.9) translateY(30px);
    transition: transform 0.4s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    transform: rotate(90deg);
}

.modal-title {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
}

.modal-viewer-container {
    flex: 1;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(13, 20, 36, 0.6);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal-viewer-container model-viewer {
    border-radius: 16px;
}

.modal-hint {
    color: var(--text-gray);
    font-size: 0.8rem;
    margin-top: 1rem;
    text-align: center;
    opacity: 0.7;
}

/* Loading spinner for 3D modal */
.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(13, 20, 36, 0.95);
    gap: 1rem;
}

.modal-loading p {
    color: var(--text-gray);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    will-change: transform;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================= FOOTER ENRIQUECIDO ================= */
footer {
    border-top: 1px solid var(--border-light);
    background: #04070d;
    padding: 4rem 5% 2rem 5%;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem auto;
}

.footer-col h4 {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
}

.footer-desc {
    margin-top: 1rem;
    line-height: 1.6;
    font-size: 0.88rem;
    max-width: 380px;
}

.footer-location {
    margin-top: 0.8rem;
    font-weight: 500;
    color: var(--primary-cyan);
    font-size: 0.85rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-col ul a {
    color: var(--text-gray);
    transition: 0.3s;
}

.footer-col ul a:hover {
    color: var(--primary-cyan);
}

.footer-contact-items {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.footer-contact-link {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    display: inline-block;
    transition: 0.3s;
    font-weight: 500;
    width: fit-content;
}

.footer-contact-link:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    background: rgba(0, 229, 255, 0.05);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ================= PÁGINA SOBRE MÍ ================= */
.nav-links a.active {
    color: var(--primary-cyan);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-cyan);
}

.about-hero {
    padding: 140px 5% 60px 5%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-hero h1 {
    font-size: clamp(2.3rem, 4vw, 3.8rem);
    margin: 1rem 0;
    line-height: 1.15;
}

.about-lead {
    font-size: 1.15rem;
    color: var(--text-gray);
    line-height: 1.7;
    max-width: 780px;
    margin: 0 auto;
}

.about-detail-section {
    padding: 2rem 5% 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.glass-card {
    background: var(--glass-bg-dark);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 2.5rem;
    transition: 0.3s;
}

.glass-card:hover {
    border-color: rgba(0, 229, 255, 0.3);
    transform: translateY(-3px);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.glass-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.glass-card p {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.process-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.process-list li {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    padding-left: 1rem;
    border-left: 2px solid var(--primary-cyan);
}

.skills-detail-section {
    padding: 4rem 5% 6rem 5%;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-light);
}

.section-title-center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.section-title-center h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.section-title-center p {
    color: var(--text-gray);
}

.software-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.software-card {
    background: rgba(13, 20, 36, 0.5);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    transition: 0.3s;
}

.software-card:hover {
    border-color: var(--accent-orange);
    background: rgba(229, 131, 18, 0.05);
    transform: translateY(-3px);
}

.software-card h3 {
    color: var(--primary-cyan);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.software-card p {
    color: var(--text-gray);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        gap: 0.65rem 1rem;
        padding: 0.75rem 5%;
    }

    .nav-links {
        display: flex;
        width: 100%;
        justify-content: space-between;
        gap: 0.4rem 0.7rem;
        flex-wrap: wrap;
    }

    .nav-links a {
        font-size: 0.68rem;
        letter-spacing: 0.04em;
    }

    .btn-contact {
        padding: 0.35rem 0.65rem;
    }

    .hero {
        height: auto;
        min-height: auto;
        padding: 125px 5% 36px;
        flex-direction: column;
        overflow: hidden;
        gap: 0.5rem;
    }

    .hero-content {
        width: 100%;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero p {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-wrap: wrap;
    }

    .about-section {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
        padding: 3.5rem 5%;
    }

    .about-card,
    .skills-card {
        min-width: 0;
        padding: clamp(1.25rem, 5vw, 2rem);
    }

    .software-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
        margin-top: 1.25rem;
    }

    .software-item {
        min-width: 0;
        padding: 1rem 0.5rem;
        overflow-wrap: anywhere;
    }

    .projects-section {
        padding: 4rem 5%;
    }

    .projects-header h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .filters {
        gap: 0.55rem;
    }

    .filter-btn {
        padding: 0.55rem 0.85rem;
        font-size: 0.82rem;
    }

    .hero-visual {
        width: 100%;
        height: clamp(250px, 72vw, 390px);
        margin-top: 0.5rem;
        overflow: hidden;
    }

    .render-placeholder {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .hero-render-img {
        height: 100%;
        width: 100%;
        max-height: 100%;
        object-fit: contain;
        transform: scale(1.02);
    }

    @keyframes heroFloat {

        0%,
        100% {
            transform: scale(1.02) translateY(0);
        }

        50% {
            transform: scale(1.02) translateY(-6px);
        }
    }

    .card-top {
        top: 8%;
        right: 4px;
    }

    .card-bottom {
        bottom: 8%;
        left: 4px;
    }

    .project-card {
        height: clamp(260px, 82vw, 350px);
    }

    .project-info {
        bottom: 0;
        padding: 1rem;
        opacity: 1;
    }

    .project-info h3 {
        font-size: 0.95rem;
    }

    .card-top {
        top: 10%;
        right: 5px;
    }

    .card-bottom {
        bottom: 10%;
        left: 5px;
    }

    .modal-content {
        width: 95%;
        height: min(72vh, 620px);
    }

    .modal-close {
        top: -50px;
        right: 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .nav-links {
        justify-content: flex-start;
        column-gap: 0.85rem;
    }

    .hero {
        padding-top: 140px;
    }

    .hero-badge {
        font-size: 0.78rem;
    }

    .hero-buttons > a {
        flex: 1 1 100%;
        text-align: center;
    }

    .admin-panel {
        padding: 1rem;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (hover: none), (pointer: coarse) {
    .project-info {
        bottom: 0;
        opacity: 1;
    }
}

/* ================= MODO ADMIN EXTENDIDO (TEXTOS, DESCRIPCIÓN Y CV) ================= */
.hidden {
    display: none !important;
}

.privileged-toggle.active {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 22px rgba(0, 229, 255, 0.45);
    color: var(--primary-cyan);
}

.admin-help-text {
    color: var(--primary-cyan);
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.admin-header {
    flex-wrap: wrap;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.admin-action-btn {
    padding: 0.6rem 1.15rem;
    font-size: 0.85rem;
    border-radius: 999px;
}

.admin-sections-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.admin-block {
    background: rgba(7, 11, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 1.25rem;
}

.admin-block-title {
    font-size: 1rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    font-weight: 700;
}

.field-group-full {
    grid-column: 1 / -1;
}

.field-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(7, 11, 20, 0.7);
    color: var(--text-light);
    resize: vertical;
    font-size: 0.9rem;
    line-height: 1.5;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.18);
}

.project-form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.cv-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cv-status-text {
    font-size: 0.82rem;
    color: var(--primary-cyan);
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    word-break: break-word;
}

.btn-admin-action {
    background: rgba(0, 229, 255, 0.14);
    color: var(--primary-cyan);
    border: 1px dashed var(--primary-cyan);
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.25s ease;
}

.btn-admin-action:hover {
    background: rgba(0, 229, 255, 0.25);
    transform: translateY(-2px);
}

.about-hero-buttons {
    justify-content: center;
    margin-top: 1.75rem;
}

.about-admin-panel {
    margin-top: 2rem;
    text-align: left;
}

/* Indicadores visuales para cualquier texto editable en Modo Admin */
.admin-editable-element {
    outline: 1px dashed rgba(0, 229, 255, 0.45);
    outline-offset: 4px;
    border-radius: 4px;
    cursor: text !important;
    transition: outline-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-editable-element:hover {
    outline: 1.5px dashed var(--primary-cyan);
    background-color: rgba(0, 229, 255, 0.07);
}

.admin-editable-element:focus {
    outline: 2px solid var(--primary-cyan);
    background-color: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.about-section .admin-editable-element {
    outline-color: rgba(41, 98, 255, 0.45);
}

.about-section .admin-editable-element:hover,
.about-section .admin-editable-element:focus {
    outline-color: var(--primary-blue);
    background-color: rgba(41, 98, 255, 0.08);
}

/* Descripción del proyecto en tarjetas y en el modal 3D */
.project-card-desc {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    line-height: 1.4;
    margin-top: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-content {
    height: min(88vh, 840px);
    overscroll-behavior: contain;
}

.modal-description-box {
    width: 100%;
    margin-top: 0.85rem;
    background: rgba(13, 20, 36, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.92rem;
    line-height: 1.55;
    text-align: left;
}

.modal-admin-desc-editor {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-admin-desc-editor label {
    font-size: 0.78rem;
    color: var(--primary-cyan);
    font-weight: 600;
}

.modal-admin-desc-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.modal-admin-desc-row textarea {
    flex: 1;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(7, 11, 20, 0.85);
    color: var(--text-light);
    font-size: 0.88rem;
    resize: vertical;
}

/* Barra flotante inferior de Modo Admin y notificaciones Toast */
.admin-floating-bar {
    position: fixed;
    left: 24px;
    bottom: 24px;
    right: 90px;
    max-width: 780px;
    background: rgba(7, 11, 20, 0.94);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 14px;
    padding: 0.75rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 119;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
}

.admin-floating-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.84rem;
    color: var(--text-light);
}

.admin-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 10px #00e676;
    flex-shrink: 0;
}

.admin-floating-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-floating-btn {
    padding: 0.48rem 0.95rem;
    font-size: 0.8rem;
    border-radius: 999px;
}

.admin-toast {
    position: fixed;
    top: 84px;
    right: 24px;
    background: rgba(7, 11, 20, 0.96);
    color: var(--text-light);
    border: 1px solid var(--primary-cyan);
    box-shadow: 0 12px 32px rgba(0, 229, 255, 0.22);
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    z-index: 1500;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.admin-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Edición de enlaces (Contactar, Correo, Instagram) en Modo Admin */
.admin-block-full {
    grid-column: 1 / -1;
}

.links-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    align-items: end;
}

.admin-editable-link {
    outline: 1.5px dashed var(--accent-orange-light) !important;
    outline-offset: 4px;
    cursor: pointer !important;
    position: relative;
}

.admin-editable-link:hover {
    background-color: rgba(254, 145, 20, 0.14) !important;
    border-color: var(--accent-orange-light) !important;
}

.admin-link-popover {
    position: fixed;
    width: min(320px, calc(100vw - 32px));
    background: rgba(10, 15, 28, 0.98);
    border: 1px solid var(--primary-cyan);
    border-radius: 14px;
    padding: 1rem;
    z-index: 1400;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-link-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--primary-cyan);
}

.link-popover-close {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}

.link-popover-close:hover {
    color: var(--text-light);
}

.admin-link-popover-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

@media (max-width: 900px) {
    .admin-sections-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modal-content {
        height: min(86vh, 720px);
    }

    .modal-admin-desc-row {
        flex-direction: column;
    }

    .admin-floating-bar {
        left: 12px;
        right: 12px;
        bottom: 84px;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ================= QA: CATEGORÍAS DINÁMICAS, STACK DE SOFTWARE Y SEGURIDAD ================= */
.filter-pill-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.filter-delete-chip {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 107, 107, 0.65);
    background: #140b12;
    color: #ff6b6b;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: transform 0.2s ease, background 0.2s ease;
}

.filter-delete-chip:hover {
    background: #ff6b6b;
    color: #fff;
    transform: scale(1.12);
}

.filter-add-btn {
    border-style: dashed !important;
    border-color: var(--primary-cyan) !important;
    color: var(--primary-cyan) !important;
    font-weight: 600;
}

.filter-add-btn:hover {
    background: rgba(0, 229, 255, 0.12) !important;
}

.admin-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.admin-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--text-light);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.admin-category-chip button {
    background: transparent;
    border: none;
    color: #ff6b6b;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.software-item {
    position: relative;
}

.software-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 80, 80, 0.45);
    background: rgba(255, 255, 255, 0.95);
    color: #d32f2f;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.software-delete-btn:hover {
    background: #d32f2f;
    color: #ffffff;
    transform: scale(1.1);
}

.software-add-pill {
    border: 1.5px dashed var(--primary-blue) !important;
    background: rgba(41, 98, 255, 0.06) !important;
    color: var(--primary-blue) !important;
    font-weight: 700;
}

.software-add-pill:hover {
    background: rgba(41, 98, 255, 0.14) !important;
}

.software-card {
    position: relative;
}

.software-card-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 107, 107, 0.45);
    background: rgba(13, 20, 36, 0.9);
    color: #ff6b6b;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.software-card-delete:hover {
    background: #ff6b6b;
    color: #fff;
}

.privileged-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.forgot-password-link {
    font-size: 0.84rem;
    color: var(--primary-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.forgot-password-link:hover {
    opacity: 0.8;
}

.input-upload-group {
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(7, 11, 20, 0.7);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-upload-group:focus-within {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.18);
}

.input-upload-group input[type='text'] {
    flex: 1;
    min-width: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.8rem 0.9rem;
    font-size: 0.88rem;
}

.upload-trigger-btn {
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 229, 255, 0.12);
    color: var(--primary-cyan);
    padding: 0 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.upload-trigger-btn:hover {
    background: var(--primary-cyan);
    color: var(--bg-dark);
}

@media (max-width: 640px) {
    .project-form {
        grid-template-columns: 1fr;
    }
}

