/* ==========================================================================
   DESIGN SYSTEM & CSS VARIABLES - AMIR SEADE | JASDEV PORTFOLIO
   Theme: Editorial Human Craft (Modo Claro / Modo Oscuro Híbrido)
   ========================================================================== */

/* Tema por defecto: Modo Claro (Editorial & Clean) */
:root,
[data-theme="light"] {
    --bg-main: #fbfbfa;
    --bg-secondary: #f4f4f6;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-glass: rgba(251, 251, 250, 0.85);
    --bg-elevated: #f4f4f7;
    --bg-subtle: #eaeaea;

    /* Acentos Principales */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.08);
    --primary-border: rgba(37, 99, 235, 0.22);
    --secondary: #475569;

    /* Acentos Secundarios */
    --accent-emerald: #059669;
    --accent-emerald-bg: rgba(5, 150, 105, 0.08);
    --accent-emerald-border: rgba(5, 150, 105, 0.2);
    --accent-amber: #d97706;
    --accent-amber-bg: rgba(217, 119, 6, 0.08);
    --accent-purple: #7c3aed;

    /* Tipografía y Textos */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    --text-inverse: #ffffff;

    /* Bordes & Sombras */
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-highlight: rgba(37, 99, 235, 0.4);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-card-hover: 0 16px 30px -6px rgba(15, 23, 42, 0.09), 0 6px 12px -4px rgba(15, 23, 42, 0.04);
    --shadow-float: 0 20px 40px -10px rgba(15, 23, 42, 0.12);

    /* Patrón de fondo sutil */
    --hero-pattern: radial-gradient(#e2e8f0 1.2px, transparent 1.2px);
}

/* Modo Oscuro: Obsidian & Slate (Limpio, sin brillos estridentes) */
[data-theme="dark"] {
    --bg-main: #0c0d10;
    --bg-secondary: #12141a;
    --bg-card: #161922;
    --bg-card-hover: #1c202c;
    --bg-glass: rgba(12, 13, 16, 0.85);
    --bg-elevated: #1e2230;
    --bg-subtle: #252a3a;

    /* Acentos Principales */
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.12);
    --primary-border: rgba(59, 130, 246, 0.28);
    --secondary: #94a3b8;

    /* Acentos Secundarios */
    --accent-emerald: #10b981;
    --accent-emerald-bg: rgba(16, 185, 129, 0.12);
    --accent-emerald-border: rgba(16, 185, 129, 0.25);
    --accent-amber: #f59e0b;
    --accent-amber-bg: rgba(245, 158, 11, 0.12);
    --accent-purple: #a78bfa;

    /* Tipografía y Textos */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --text-inverse: #0c0d10;

    /* Bordes & Sombras */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-highlight: rgba(59, 130, 246, 0.45);
    
    --shadow-subtle: 0 4px 15px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 10px 25px -8px rgba(0, 0, 0, 0.5);
    --shadow-card-hover: 0 20px 35px -10px rgba(0, 0, 0, 0.7);
    --shadow-float: 0 25px 50px -12px rgba(0, 0, 0, 0.8);

    /* Patrón de fondo sutil */
    --hero-pattern: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px);
}

/* Transiciones Globales */
:root {
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESETS & PREVENCIÓN DE DESBORDES (100% RESPONSIVE BASE)
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    transition: background-color var(--transition-base), color var(--transition-base);
}

::selection {
    background: var(--primary-light);
    color: var(--primary);
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

ul {
    list-style: none;
}

/* Contenedor fluido con padding adaptativo */
.contenedor {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

/* Resaltado de Texto Sobrio */
.highlight-text {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

/* ==========================================================================
   HEADER & NAVBAR RESPONSIVE
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.9rem 0;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.header.scrolled {
    padding: 0.7rem 0;
    box-shadow: var(--shadow-subtle);
}

.contenedor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 1.5rem);
}

/* Logo & Marca */
.marca-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.logo-img {
    height: clamp(32px, 5vw, 38px);
    width: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

.marca-logo:hover .logo-img {
    transform: scale(1.04);
}

.marca-texto {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.nombre-autor {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.badge-marca {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary-border);
    letter-spacing: 0.05em;
}

/* Controles del Header (Theme Toggle + Menú Móvil) */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Botón Selector de Tema */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-subtle);
}

.theme-toggle-btn:hover {
    color: var(--primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

/* Control de iconos Sun / Moon */
.icon-moon {
    display: none;
}
.icon-sun {
    display: block;
}

[data-theme="dark"] .icon-sun {
    display: none;
}
[data-theme="dark"] .icon-moon {
    display: block;
}

/* Navegación Desktop */
.navegacion {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 1.8vw, 1.4rem);
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.35rem 0.5rem;
    position: relative;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link.activo {
    color: var(--primary);
    font-weight: 600;
}

.nav-link.activo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Botón CTA Navbar */
.btn-cta-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-base);
    white-space: nowrap;
}

.btn-cta-nav:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Toggle Móvil */
.menu-toggle {
    display: none;
    color: var(--text-main);
    font-size: 1.25rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.menu-toggle:hover {
    border-color: var(--border-hover);
}

/* ==========================================================================
   BOTONES REUTILIZABLES & ACCIONES
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.8rem 1.45rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    transition: var(--transition-base);
    text-align: center;
    max-width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.btn-whatsapp:hover {
    background: #15803d;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
    position: relative;
    padding: clamp(6.5rem, 11vw, 8.5rem) 0 clamp(3.5rem, 7vw, 5rem) 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--bg-main);
}

/* Fondo con patrón sutil y limpio */
.hero-background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--hero-pattern);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

.hero-contenedor {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(2rem, 4vw, 2.8rem);
}

.hero-content {
    max-width: 860px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--accent-emerald-bg);
    border: 1px solid var(--accent-emerald-border);
    color: var(--accent-emerald);
    font-size: clamp(0.75rem, 2vw, 0.84rem);
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.4rem;
    max-width: 100%;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-emerald);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--accent-emerald);
    border-radius: 50%;
    animation: pulseDot 2s infinite ease-out;
    opacity: 0.75;
}

@keyframes pulseDot {
    0% { transform: scale(1); opacity: 0.8; }
    60% { transform: scale(2.4); opacity: 0; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* Hero Titles */
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 1rem;
    word-break: break-word;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 1.6vw, 1.08rem);
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 620px;
    margin-bottom: 1.6rem;
}

.hero-subtitle strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Acciones Hero */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.8rem;
    width: 100%;
}

/* Tira de Métricas Compacta y Minimalista */
.hero-metrics-strip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(0.6rem, 2vw, 1.2rem);
    padding: 0.55rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-subtle);
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.metric-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--primary);
}

.metric-txt {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-sep {
    color: var(--border-hover);
    font-size: 0.8rem;
    user-select: none;
}

/* ==========================================================================
   SECCIONES COMUNES
   ========================================================================== */

.seccion {
    padding: clamp(4rem, 7vw, 5.5rem) 0;
    position: relative;
}

.seccion-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto clamp(2.2rem, 4vw, 3.2rem) auto;
}

.seccion-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--primary-border);
    margin-bottom: 0.85rem;
}

.seccion-titulo {
    font-family: var(--font-heading);
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    word-break: break-word;
}

.seccion-subtitulo {
    font-size: clamp(0.92rem, 1.7vw, 1.05rem);
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   SECCIÓN: SOBRE MÍ / PILARES
   ========================================================================== */

.sobre-mi-seccion {
    background-color: var(--bg-secondary);
}

.pilares-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1.2rem, 2.5vw, 1.8rem);
}

.pilar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 2.5vw, 2rem);
    transition: var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}

.pilar-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.pilar-icono {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    margin-bottom: 1.2rem;
    border: 1px solid var(--primary-border);
}

.pilar-card:nth-child(2) .pilar-icono {
    background: rgba(124, 58, 237, 0.08);
    color: var(--accent-purple);
    border-color: rgba(124, 58, 237, 0.2);
}

.pilar-card:nth-child(3) .pilar-icono {
    background: var(--accent-emerald-bg);
    color: var(--accent-emerald);
    border-color: var(--accent-emerald-border);
}

.pilar-card h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.12rem, 2vw, 1.25rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.65rem;
}

.pilar-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

.pilar-features {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.pilar-features li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.pilar-features li i {
    color: var(--accent-emerald);
    font-size: 0.78rem;
    flex-shrink: 0;
}

/* ==========================================================================
   SECCIÓN: PROYECTOS DESTACADOS
   ========================================================================== */

.proyectos-seccion {
    background-color: var(--bg-main);
}

/* Filtros */
.filtros-proyectos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.btn-filtro {
    padding: 0.48rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-subtle);
}

.btn-filtro:hover {
    color: var(--text-main);
    border-color: var(--border-hover);
}

.btn-filtro.activo {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Grid de Proyectos */
.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: clamp(1.4rem, 2.5vw, 2rem);
}

.proyecto-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}

.proyecto-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* Preview de Proyecto */
.proyecto-preview-wrapper {
    position: relative;
    width: 100%;
}

.proyecto-preview {
    position: relative;
    width: 100%;
    height: clamp(200px, 26vw, 240px);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
}

.proyecto-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform var(--transition-smooth);
}

.proyecto-card:hover .proyecto-preview img {
    transform: scale(1.04);
}

.proyecto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
    backdrop-filter: blur(3px);
    padding: 1rem;
    text-align: center;
}

.proyecto-card:hover .proyecto-overlay {
    opacity: 1;
}

.btn-ver-imagen {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #ffffff;
    color: #0f172a;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Badge de Contador de Fotos */
.badge-contador-fotos {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    z-index: 2;
}

.badge-contador-fotos i {
    color: #60a5fa;
}

/* Tira de Miniaturas en la Tarjeta */
.proyecto-thumbnails-bar {
    display: flex;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.proyecto-thumbnails-bar::-webkit-scrollbar {
    display: none;
}

.thumb-btn {
    width: 44px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    opacity: 0.65;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-btn:hover,
.thumb-btn.activo {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Info del Proyecto */
.proyecto-info {
    padding: clamp(1.2rem, 2.5vw, 1.6rem);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.proyecto-header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge-cat {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--primary-border);
}

.badge-estado {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-emerald);
    background: var(--accent-emerald-bg);
    border: 1px solid var(--accent-emerald-border);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.proyecto-titulo {
    font-family: var(--font-heading);
    font-size: clamp(1.08rem, 1.8vw, 1.22rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.65rem;
    line-height: 1.35;
    word-break: break-word;
}

.proyecto-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

/* Tags Tecnológicos */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-bottom: 1.2rem;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
}

.proyecto-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-accion-proyecto {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-accion-proyecto:hover {
    color: var(--primary-hover);
    transform: translateX(3px);
}

/* ==========================================================================
   SECCIÓN: HABILIDADES & TECH STACK
   ========================================================================== */

.habilidades-seccion {
    background-color: var(--bg-secondary);
}

.habilidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1.2rem, 2.5vw, 1.8rem);
}

.habilidad-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.4rem, 2.5vw, 2rem);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}

.habilidad-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.habilidad-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.habilidad-icon-wrap {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.45rem;
    flex-shrink: 0;
}

.habilidad-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.habilidad-header h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 1.8vw, 1.18rem);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

.habilidad-sub {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
}

.habilidad-lista {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.3rem;
    flex-grow: 1;
}

.habilidad-lista li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.habilidad-lista li i {
    color: var(--primary);
    margin-top: 0.25rem;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.tech-pills span {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   SECCIÓN: CONTACTO & CONVERSIÓN
   ========================================================================== */

.contacto-seccion {
    background-color: var(--bg-main);
}

.contacto-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
}

/* Columna Izquierda: Info */
.contacto-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.4rem, 2.5vw, 2rem);
    box-shadow: var(--shadow-card);
}

.contacto-info-card h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.18rem, 2.2vw, 1.35rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.65rem;
}

.contacto-info-p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contacto-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.contacto-item-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.95rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    cursor: pointer;
    position: relative;
    max-width: 100%;
    word-break: break-word;
}

.contacto-item-link:hover:not(.static-item) {
    border-color: var(--border-hover);
    transform: translateX(3px);
}

.contacto-item-icono {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #ffffff;
    flex-shrink: 0;
}

.whatsapp-bg { background: #16a34a; }
.mail-bg { background: #dc2626; }
.instagram-bg { background: #d946ef; }
.location-bg { background: #2563eb; }

.contacto-item-texto {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

.contacto-item-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 500;
}

.contacto-item-val {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-icon-subtle {
    color: var(--text-dim);
    font-size: 0.85rem;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.contacto-item-link:hover .copy-icon-subtle {
    color: var(--primary);
}

.garantia-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.garantia-badge i {
    color: var(--accent-emerald);
    flex-shrink: 0;
}

/* Columna Derecha: Formulario */
.contacto-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.4rem, 2.5vw, 2rem);
    box-shadow: var(--shadow-card);
}

.formulario-moderno {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
}

/* Selector Tipo de Proyecto */
.campo-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.selector-tipo-proyecto {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tipo-opcion {
    cursor: pointer;
}

.tipo-opcion input {
    display: none;
}

.tipo-badge {
    display: block;
    padding: 0.4rem 0.8rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.tipo-opcion input:checked + .tipo-badge {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* Inputs y TextArea */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.campo-input {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 0.9rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    pointer-events: none;
    transition: var(--transition-fast);
}

.input-wrap input,
.input-wrap textarea {
    width: 100%;
    padding: 0.75rem 0.85rem 0.75rem 2.35rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.88rem;
    transition: var(--transition-fast);
}

.textarea-wrap {
    align-items: flex-start;
}

.textarea-wrap .input-icon {
    top: 0.85rem;
}

.input-wrap textarea {
    resize: vertical;
    min-height: 95px;
}

.input-wrap input:focus,
.input-wrap textarea:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary-light);
    outline: none;
}

.input-wrap input:focus ~ .input-icon,
.input-wrap textarea:focus ~ .input-icon {
    color: var(--primary);
}

.btn-submit {
    width: 100%;
    background: #16a34a;
    color: #ffffff;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-base);
}

.btn-submit:hover {
    background: #15803d;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    transform: translateY(-2px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: clamp(3rem, 5vw, 4rem) 0 2rem 0;
}

.footer-contenedor {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    margin-bottom: 2.2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.8rem;
}

.footer-logo-img {
    height: 32px;
    width: auto;
}

.footer-logo-text {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-main);
}

.footer-logo-text small {
    color: var(--primary);
    font-weight: 600;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 340px;
    line-height: 1.6;
}

.footer-links h4,
.footer-social h4 {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-social-icons {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.footer-social-icons a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-subtle);
}

.footer-social-icons a:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.footer-location {
    font-size: 0.82rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-location i {
    color: var(--accent-amber);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.4rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.82rem;
}

.footer-bottom strong {
    color: var(--text-main);
}

/* ==========================================================================
   MODAL LIGHTBOX MULTI-IMAGEN
   ========================================================================== */

.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: clamp(0.75rem, 2vw, 1.5rem);
}

.lightbox-modal.activo {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 1050px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 2.5vw, 1.4rem);
    box-shadow: var(--shadow-float);
    display: flex;
    flex-direction: column;
    max-height: 94vh;
}

.lightbox-close {
    position: absolute;
    top: 0.6rem;
    right: 0.9rem;
    font-size: 1.7rem;
    color: var(--text-muted);
    line-height: 1;
    transition: var(--transition-fast);
    z-index: 10;
    padding: 0.2rem 0.5rem;
}

.lightbox-close:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* Header del Modal */
.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 2rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.6rem;
    gap: 0.5rem;
}

.lightbox-titulo {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 2vw, 1.12rem);
    font-weight: 700;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-contador {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* Slider de Imagenes */
.lightbox-slider-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 60vh;
}

.lightbox-img-holder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-img-holder img {
    max-height: 55vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    transition: opacity 0.2s ease;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(34px, 5vw, 42px);
    height: clamp(34px, 5vw, 42px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-main);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 5;
    box-shadow: var(--shadow-card);
}

.lightbox-prev {
    left: 0.35rem;
}

.lightbox-next {
    right: 0.35rem;
}

.lightbox-nav-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Miniaturas en Modal */
.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    overflow-x: auto;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lightbox-thumbnails::-webkit-scrollbar {
    display: none;
}

.lightbox-thumb-btn {
    width: 48px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.5;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.lightbox-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-thumb-btn:hover,
.lightbox-thumb-btn.activo {
    opacity: 1;
    border-color: var(--primary);
}

/* ==========================================================================
   TOAST NOTIFICATION & VOLVER ARRIBA
   ========================================================================== */

.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 3000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--shadow-float);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 90vw;
}

.toast-notification i {
    color: var(--accent-emerald);
    font-size: 1rem;
    flex-shrink: 0;
}

.toast-notification.activo {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.btn-back-to-top {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 999;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition-base);
}

.btn-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-back-to-top:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ==========================================================================
   ANIMACIONES SCROLL REVEAL
   ========================================================================== */

.reveal-fade {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.97) translateY(12px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* ==========================================================================
   BREAKPOINTS RESPONSIVE
   ========================================================================== */

/* Tablets & Laptops medianas (992px y menores) */
@media (max-width: 992px) {
    .hero-metrics-card {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 1.4rem;
    }

    .metric-divider {
        width: 60%;
        height: 1px;
        margin: 0 auto;
    }

    .contacto-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-contenedor {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tablets y Móviles (768px y menores) */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .navegacion {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1.8rem 1.2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
        box-shadow: var(--shadow-float);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .navegacion.menu-abierto {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        font-size: 1.02rem;
        width: 100%;
        text-align: center;
        padding: 0.5rem;
    }

    .nav-link.activo::after {
        display: none;
    }

    .btn-cta-nav {
        width: 100%;
        justify-content: center;
        margin-top: 0.4rem;
        padding: 0.65rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .proyectos-grid {
        grid-template-columns: 1fr;
    }

    .footer-contenedor {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .btn-back-to-top {
        bottom: 1rem;
        left: 1rem;
    }

    .toast-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        justify-content: center;
    }
}

/* Móviles Estándar y Pequeños (480px y menores) */
@media (max-width: 480px) {
    .contenedor {
        padding: 0 1rem;
    }

    .hero-meta {
        flex-direction: column;
        gap: 0.8rem;
    }

    .contacto-info-card,
    .contacto-form-card {
        padding: 1.3rem 1rem;
    }

    .pilar-card,
    .habilidad-card {
        padding: 1.3rem 1rem;
    }

    .proyecto-info {
        padding: 1.1rem 0.95rem;
    }

    .selector-tipo-proyecto {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }

    .tipo-badge {
        text-align: center;
        padding: 0.45rem 0.35rem;
        font-size: 0.74rem;
    }

    .lightbox-content {
        padding: 0.85rem;
        max-height: 92vh;
    }

    .lightbox-header {
        padding-right: 1.8rem;
    }

    .lightbox-img-holder img {
        max-height: 42vh;
    }
}