﻿/* ==========================================================================
   SAMCODE - PWA Portafolio Premium
   Rediseño: minimalista, glassmorphism, profesional
   ========================================================================== */

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/outfit-variable.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/jetbrainsmono-variable.woff2') format('woff2');
}

:root {
    --bg: #0b1020;
    --bg-elevated: rgba(255, 255, 255, 0.06);
    --bg-elevated-strong: rgba(255, 255, 255, 0.09);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.2);
    --text: #f5f7fb;
    --text-muted: #a9b4c7;
    --text-dim: #7f8aa3;
    --accent: #7dd3fc;
    --accent-2: #a5b4fc;
    --accent-soft: rgba(125, 211, 252, 0.14);
    --success: #34d399;
    --shadow-lg: 0 24px 60px rgba(2, 6, 23, 0.55);
    --shadow-md: 0 12px 30px rgba(2, 6, 23, 0.4);
    --blur: 18px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-pill: 999px;
    --container: 1120px;
    --transition: 180ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
    font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: radial-gradient(1200px 600px at 10% -10%, rgba(125,211,252,0.12), transparent 60%),
                radial-gradient(900px 500px at 100% 0%, rgba(165,180,252,0.10), transparent 55%),
                var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
ul, ol { padding-left: 1.2rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Background */
.background-effects { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient-orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55;
}
.ambient-orb-1 { width: 520px; height: 520px; top: -120px; left: -80px; background: rgba(125,211,252,0.18); }
.ambient-orb-2 { width: 420px; height: 420px; top: 20%; right: -120px; background: rgba(165,180,252,0.16); }
.ambient-orb-3 { width: 460px; height: 460px; bottom: -160px; left: 20%; background: rgba(52,211,153,0.10); }
.noise-overlay {
    position: absolute; inset: 0; opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress */
.scroll-progress-bar {
    position: fixed; top: 0; left: 0; height: 2px; width: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform-origin: left; transform: scaleX(0); z-index: 200;
}

/* Glass primitives */
.glass-panel, .project-card, .modal-container, .toast-notification, .navbar {
    background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
    border: 1px solid var(--border);
    backdrop-filter: blur(var(--blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
    box-shadow: var(--shadow-md);
}

/* Navbar */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(11, 16, 32, 0.55);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; }
.brand-mark {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; background: rgba(125,211,252,0.12); border: 1px solid rgba(125,211,252,0.35);
    color: var(--accent); font-weight: 700;
}
.brand-mark-img {
    width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(125,211,252,0.35);
    background: rgba(11,16,32,0.6); box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    object-fit: cover;
}
.brand-name { font-size: 1.05rem; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link, .btn-nav-ghost {
    padding: 8px 12px; border-radius: var(--radius-pill); color: var(--text-muted);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    border: 1px solid transparent; background: transparent; cursor: pointer;
}
.nav-link:hover, .btn-nav-ghost:hover { color: var(--text); background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); }
.nav-toggle {
    display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
    background: rgba(255,255,255,0.04); align-items: center; justify-content: center; flex-direction: column; gap: 5px; cursor: pointer;
}
.hamburger-bar { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav-toggle.active .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active .hamburger-bar:nth-child(2) { opacity: 0; }
.nav-toggle.active .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero-section { padding: 72px 0 32px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: start; }
.eyebrow { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; }
.hero-title { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; margin-bottom: 16px; }
.hero-title .js-brand-name { display: block; font-size: 0.95rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.hero-title-accent { display: block; }
.hero-bio { color: var(--text-muted); font-size: 1.05rem; max-width: 640px; margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 0.95rem;
    border: 1px solid transparent; cursor: pointer; transition: all var(--transition);
}
.btn-primary { background: linear-gradient(135deg, rgba(125,211,252,0.95), rgba(165,180,252,0.95)); color: #081018; box-shadow: 0 8px 24px rgba(125,211,252,0.25); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn-secondary { background: rgba(255,255,255,0.04); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: var(--border-strong); }

.skills-container { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
    padding: 6px 12px; border-radius: var(--radius-pill); font-size: 0.82rem; color: var(--text-muted);
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
}

.hero-panel { border-radius: var(--radius-lg); padding: 22px; }
.panel-header { margin-bottom: 14px; }
.panel-label { color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.stats-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat-card { padding: 14px 12px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); text-align: center; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.78rem; color: var(--text-dim); margin-top: 4px; }
.panel-contact { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 14px; }
.contact-link { color: var(--text); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.contact-icon { width: 18px; height: 18px; flex-shrink: 0; }
.panel-contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.link-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10);
    color: var(--text-muted); cursor: pointer; padding: 7px 12px; font-size: 0.85rem;
    border-radius: 999px; font-weight: 500;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.link-btn:hover { color: var(--text); background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.20); transform: translateY(-1px); }
.link-btn[data-action="copy-email"]:hover { color: var(--accent); border-color: rgba(125,211,252,0.35); }
#linkWhatsappBusiness:hover, #linkWhatsappChannel:hover { color: #25d366; border-color: rgba(37,211,102,0.45); background: rgba(37,211,102,0.08); }
#linkInstagram:hover { color: #e1306c; border-color: rgba(225,48,108,0.45); background: rgba(225,48,108,0.08); }

/* Sections */
.section { padding: 48px 0; }
.section-head { margin-bottom: 18px; }
.section-title { font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -0.02em; margin-bottom: 6px; }
.section-desc { color: var(--text-muted); max-width: 720px; }
.info-banner { border-radius: var(--radius-lg); padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.info-banner h3 { font-size: 1.1rem; margin-bottom: 4px; }
.info-banner p { color: var(--text-muted); }

/* Catalog */
.catalog-header { border-radius: var(--radius-lg); padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-tabs { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(0,0,0,0.18); border: 1px solid rgba(255,255,255,0.08); }
.filter-tab-pill {
    position: absolute; top: 0; left: 0; border-radius: 12px;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.14);
    transition: transform 0.25s ease, width 0.25s ease, height 0.25s ease; pointer-events: none; opacity: 0; z-index: 0; box-sizing: border-box;
}
.filter-tab-pill.is-initialized { opacity: 1; }
.filter-btn {
    position: relative; z-index: 1; background: transparent; border: none; color: var(--text-muted);
    padding: 8px 14px; border-radius: 12px; cursor: pointer; font-size: 0.9rem; font-weight: 500;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.2; white-space: nowrap;
}
.filter-btn.active { color: var(--text); }
.filter-badge { font-size: 0.75rem; color: var(--text-dim); background: rgba(255,255,255,0.06); padding: 1px 7px; border-radius: 999px; line-height: 1.4; }
.search-box { flex: 1; min-width: 220px; max-width: 360px; }
.search-input {
    width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2); color: var(--text); outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus { border-color: rgba(125,211,252,0.5); box-shadow: 0 0 0 3px rgba(125,211,252,0.12); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.project-card {
    border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.project-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.2); box-shadow: var(--shadow-lg); }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-icon { font-size: 1.6rem; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.card-icon-img { width: 44px; height: 44px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(125,211,252,0.35); background: var(--bg-elevated, #0b1020); box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.badge, .version-pill {
    font-size: 0.75rem; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-muted); background: rgba(255,255,255,0.04);
}
.badge-apk { color: #6ee7b7; border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.08); }
.badge-web { color: #bae6fd; border-color: rgba(125,211,252,0.35); background: rgba(125,211,252,0.08); }
.badge-tool { color: #fde68a; border-color: rgba(253,230,138,0.3); background: rgba(253,230,138,0.08); }
.card-title { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }
.card-desc { color: var(--text-muted); font-size: 0.93rem; }
.card-specs { display: flex; flex-wrap: wrap; gap: 10px 14px; color: var(--text-dim); font-size: 0.82rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag { font-size: 0.75rem; color: var(--text-dim); padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.card-actions .btn, .card-actions .btn-icon {
    flex: 1 1 auto; min-height: 40px; padding: 9px 12px; border-radius: 12px; font-size: 0.9rem;
}
.btn-icon {
    flex: 0 0 42px; width: 42px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer;
}
.btn-icon:hover { color: var(--text); background: rgba(255,255,255,0.08); border-color: var(--border-strong); }
.btn-ghost { background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.empty-state { grid-column: 1 / -1; padding: 40px 20px; text-align: center; color: var(--text-muted); border: 1px dashed rgba(255,255,255,0.14); border-radius: var(--radius-lg); background: rgba(255,255,255,0.02); }
.empty-state h3 { color: var(--text); margin-bottom: 4px; font-size: 1.05rem; }

/* Services */
.services-cta-wrapper { border-radius: 26px; padding: 32px; }
.services-cta-header { max-width: 760px; margin-bottom: 22px; }
.services-cta-subtitle { color: var(--text-muted); }
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 22px; }
.service-item-card { padding: 20px; border-radius: 18px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.service-item-title { font-size: 1.05rem; margin-bottom: 6px; }
.service-item-desc { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 10px; }
.service-feature-list { color: var(--text-dim); font-size: 0.9rem; display: grid; gap: 4px; }
.service-selector-box { margin-bottom: 18px; }
.service-selector-header { margin-bottom: 10px; color: var(--text-muted); font-size: 0.9rem; }
.service-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.service-pill-btn {
    padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03); color: var(--text-muted); cursor: pointer;
}
.service-pill-btn.active, .service-pill-btn[aria-checked="true"] {
    color: var(--text); background: rgba(125,211,252,0.12); border-color: rgba(125,211,252,0.35);
}
.services-action-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.08); }
.services-action-heading { font-size: 1rem; margin-bottom: 4px; }
.services-action-text { color: var(--text-muted); font-size: 0.93rem; }
.services-action-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* Modals */
.modal-backdrop {
    position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(5, 8, 18, 0.55); backdrop-filter: blur(10px);
    opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; z-index: 300;
}
.modal-backdrop.active { opacity: 1; visibility: visible; }
.modal-container { width: 100%; max-width: 560px; border-radius: 20px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.modal-title { font-size: 1.05rem; font-weight: 650; }
.btn-close-modal { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--text); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.modal-body { padding: 18px; overflow: auto; }
.qr-preview-box { display: flex; justify-content: center; margin-bottom: 14px; }
.qr-preview-box canvas { background: #fff; border-radius: 12px; padding: 8px; }
.qr-instructions { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 12px; }
.qr-url-box { display: flex; gap: 8px; align-items: center; }
.qr-url-text { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(0,0,0,0.2); padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); }
.btn-copy-url { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text); cursor: pointer; }

.security-note { padding: 12px 14px; border-radius: 12px; background: rgba(125,211,252,0.08); border: 1px solid rgba(125,211,252,0.18); color: var(--text-muted); font-size: 0.9rem; }
.details-meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.meta-box { padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.meta-box-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.meta-box-val { font-weight: 600; }
.changelog-section { margin-top: 8px; }
.changelog-title { font-size: 0.95rem; margin-bottom: 6px; }
.changelog-list { color: var(--text-muted); display: grid; gap: 4px; font-size: 0.92rem; }
.details-modal-actions { margin-top: 16px; display: flex; gap: 10px; }
.details-modal-actions .btn { flex: 1; }

/* Toast */
.toast-notification {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
    padding: 12px 16px; border-radius: 999px; color: var(--text); opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease; z-index: 400;
}
.toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-message { font-size: 0.9rem; }

/* Footer */
.footer { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 32px; }
.footer-content { padding: 28px 0 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-dim); font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-link:hover { color: var(--text); }

/* Responsive */
@media (max-width: 900px) {
    .hero-section { grid-template-columns: 1fr; padding-top: 48px; }
    .services-grid { grid-template-columns: 1fr; }
    .stats-panel { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .nav-toggle { display: inline-flex; }
    .nav-links {
        position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; display: none; flex-direction: column;
        padding: 12px; border-radius: 16px; background: rgba(11,16,32,0.92); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    }
    .nav-links.active { display: flex; }
    .nav-link, .btn-nav-ghost { width: 100%; text-align: left; }
    .container { padding: 0 16px; }
    .hero-actions .btn, .services-action-buttons .btn { width: 100%; }
    .info-banner { flex-direction: column; align-items: flex-start; }
    .catalog-header { flex-direction: column; align-items: stretch; }
    .search-box { max-width: none; }
    .stats-panel { grid-template-columns: 1fr 1fr 1fr; }
    .details-meta-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stats-panel { grid-template-columns: 1fr; }
    .filter-tabs { width: 100%; flex-wrap: wrap; border-radius: 16px; }
    .filter-btn { flex: 1 1 auto; justify-content: center; }
    .services-cta-wrapper { padding: 22px 16px; }
    .qr-url-box { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
