/* ══════════════════════════════════════
   BASE
══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --accent:    #6c47ff;
    --accent-2:  #a78bfa;
    --dark:      #0f0f13;
    --surface:   #ffffff;
    --border:    #e5e7eb;
    --text:      #111827;
    --muted:     #6b7280;
    --radius:    12px;
    --transition: 0.25s ease;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: #fafafa;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.site-hero {
    background: var(--dark);
    position: relative;
    overflow: hidden;
    padding: 96px 0 88px;
    min-height: 520px;
    display: flex;
    align-items: center;
}

/* Orbs */
.site-hero::before,
.site-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    pointer-events: none;
}
.site-hero::before {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #6c47ff 0%, transparent 70%);
    top: -200px; right: -60px;
}
.site-hero::after {
    width: 350px; height: 350px;
    background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
    bottom: -120px; left: -60px;
}

.hero-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-single {
    grid-template-columns: 1fr;
    max-width: 760px;
}

/* Columna izquierda */
.hero-left h1 {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 18px;
    letter-spacing: -0.04em;
}

.hero-left h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent-2), #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-left p {
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 32px;
    line-height: 1.75;
    max-width: 400px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 13px 26px;
    border-radius: 100px;
    transition: var(--transition);
    box-shadow: 0 4px 24px rgba(108, 71, 255, 0.4);
    text-decoration: none;
}
.hero-cta:hover {
    background: #5a38e0;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(108, 71, 255, 0.5);
    color: #fff;
}

/* Columna derecha — stats */
.hero-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hero-stat {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 22px 20px;
    transition: var(--transition);
}
.hero-stat:hover {
    background: rgba(108,71,255,0.12);
    border-color: rgba(108,71,255,0.3);
}
.hero-stat strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 6px;
}
.hero-stat span {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Fila de tecnologías en el hero */
.hero-tech-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hero-tech-pill {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.04);
}

/* ══════════════════════════════════════
   PROYECTOS
══════════════════════════════════════ */
.projects-section { padding: 64px 0 96px; }

.section-header { margin-bottom: 40px; }
.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.section-header p {
    font-size: 0.875rem;
    color: var(--muted);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── Card ── */
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.10);
    border-color: rgba(108, 71, 255, 0.25);
}

.card-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
}
.card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.project-card:hover .card-thumb img { transform: scale(1.05); }

.card-thumb-overlay {
    position: absolute; inset: 0;
    background: rgba(15, 15, 19, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.project-card:hover .card-thumb-overlay { opacity: 1; }
.card-thumb-overlay a {
    background: #fff;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 100px;
    transition: var(--transition);
}
.card-thumb-overlay a:hover { background: var(--accent); color: #fff; }

.card-badge {
    position: absolute;
    top: 12px; left: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
}
.badge-destacado  { background: #fef3c7; color: #92400e; }
.badge-completado { background: #d1fae5; color: #065f46; }
.badge-en-progreso { background: #dbeafe; color: #1e40af; }

.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin: 0;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
}

.card-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.card-actions a {
    flex: 1;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
    transition: var(--transition);
}
.card-actions a:hover { background: var(--dark); color: #fff; border-color: var(--dark); }
.card-actions a.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.card-actions a.primary:hover { background: #5a38e0; border-color: #5a38e0; }

.no-results {
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    padding: 48px 0;
}
.hidden { display: none; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.5); }

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-wrap: wrap;
    gap: 20px;
}
.footer-brand .logo {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.footer-brand p { font-size: 0.85rem; }

.footer-links { display: flex; gap: 24px; font-size: 0.875rem; font-weight: 500; }
.footer-links a:hover { color: #fff; }

.footer-copy { font-size: 0.8rem; padding: 16px 0; color: rgba(255,255,255,0.25); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { gap: 40px; }
}

@media (max-width: 768px) {
    .site-hero { padding: 64px 0 60px; min-height: unset; }
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-stat-row { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-links { flex-direction: column; gap: 12px; }
}
