/* ============================================================
   ESTHER GARCÍA DELGADO — PORTFOLIO
   ============================================================ */

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
    --bg:            #FFFFFF;
    --bg-alt:        #F8F9FF;
    --dark:          #0A0A1A;
    --dark-2:        #120E2E;
    --accent:        #6D28D9;        /* violet */
    --accent-hover:  #5B21B6;
    --accent-light:  #EDE9FE;
    --accent-2:      #EC4899;        /* pink */
    --text:          #111827;
    --text-muted:    #6B7280;
    --border:        #E5E7EB;
    --font:          'Inter', sans-serif;
    --ease:          cubic-bezier(0.4, 0, 0.2, 1);
    --radius:        16px;
    --radius-sm:     10px;
    --shadow:        0 2px 20px rgba(0, 0, 0, 0.07);
    --shadow-card:   0 4px 28px rgba(0, 0, 0, 0.08);
    --shadow-hover:  0 12px 48px rgba(109, 40, 217, 0.2);
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    font-size: 16px;
}
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img  { max-width: 100%; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }

/* ── CONTAINER ──────────────────────────────────────────────── */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ── BOTONES ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    letter-spacing: -0.01em;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.btn-ghost {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.btn-full {
    width: 100%;
    justify-content: center;
}

/* ── LABEL ──────────────────────────────────────────────────── */
.label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 14px;
}
.label--light { color: #C4B5FD; }

/* ── CABECERA DE SECCIÓN ────────────────────────────────────── */
.section-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 72px;
}
.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    line-height: 1.15;
    color: var(--text);
}
.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}
.section-header--light h2 { color: #fff; }
.section-header--light p  { color: rgba(255,255,255,0.65); }

/* ── ANIMACIÓN REVEAL ───────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   NAVEGACIÓN
═══════════════════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 22px 0;
    transition: all 0.35s var(--ease);
}
.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 14px 0;
    box-shadow: var(--shadow);
}

.nav__container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav__logo {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    transition: color 0.3s;
}
.nav.scrolled .nav__logo { color: var(--dark); }

/* Menú */
.nav__menu {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav__link {
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.25s;
}
.nav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* CTA del nav */
.nav__cta {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    font-weight: 600;
}
.nav__cta:hover {
    background: rgba(255, 255, 255, 0.28) !important;
}

/* Nav scrolled */
.nav.scrolled .nav__link { color: var(--text-muted); }
.nav.scrolled .nav__link:hover { color: var(--accent); background: var(--accent-light); }
.nav.scrolled .nav__cta {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
.nav.scrolled .nav__cta:hover { background: var(--accent-hover) !important; }

/* Hamburguesa (móvil) */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}
.nav.scrolled .nav__toggle span { background: var(--dark); }

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0A0A1A 0%, #1E0E45 55%, #0A192F 100%);
    position: relative;
    overflow: hidden;
    padding: 130px 28px 90px;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
}

/* Badge */
.hero__badge {
    display: inline-block;
    background: rgba(109, 40, 217, 0.25);
    border: 1px solid rgba(109, 40, 217, 0.5);
    color: #C4B5FD;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 9px 22px;
    border-radius: 50px;
    margin-bottom: 36px;
    animation: fadeDown 0.8s var(--ease) both;
}

/* Título */
.hero__content h1 {
    font-size: clamp(3rem, 8.5vw, 5.8rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.04;
    letter-spacing: -0.045em;
    margin-bottom: 26px;
    animation: fadeUp 0.9s 0.15s var(--ease) both;
}
.hero__name {
    background: linear-gradient(135deg, #A78BFA 0%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtítulo */
.hero__sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.6);
    max-width: 520px;
    margin: 0 auto 44px;
    line-height: 1.75;
    animation: fadeUp 0.9s 0.3s var(--ease) both;
}

/* Botones */
.hero__btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.9s 0.45s var(--ease) both;
}

/* Círculos decorativos */
.hero__decoration { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.18;
}
.hero__circle--1 {
    width: 650px; height: 650px;
    background: radial-gradient(circle, #7C3AED, transparent);
    top: -200px; right: -200px;
}
.hero__circle--2 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, #EC4899, transparent);
    bottom: -120px; left: -120px;
}
.hero__circle--3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, #3B82F6, transparent);
    top: 55%; left: 48%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

/* ═══════════════════════════════════════════════════════════════
   SOBRE MÍ
═══════════════════════════════════════════════════════════════ */
.about {
    padding: 110px 0;
    background: var(--bg);
}
.about__grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 90px;
    align-items: center;
}

/* Foto */
.about__photo-wrap { display: flex; justify-content: center; }

.about__avatar {
    width: 300px;
    height: 300px;
    border-radius: 32px;
    background: linear-gradient(135deg, #6D28D9, #EC4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
    box-shadow: 0 24px 64px rgba(109, 40, 217, 0.35);
    flex-shrink: 0;
}
.about__img {
    width: 300px;
    height: 300px;
    border-radius: 32px;
    object-fit: cover;
    box-shadow: 0 24px 64px rgba(109, 40, 217, 0.3);
}

/* Texto */
.about__text h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
    line-height: 1.15;
}
.about__text p {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.8;
    margin-bottom: 18px;
}
.about__text p strong { color: var(--text); font-weight: 600; }

/* Tags de habilidades */
.about__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 36px;
}
.about__tags span {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 50px;
    transition: all 0.25s;
}
.about__tags span:hover {
    background: var(--accent);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   SERVICIOS
═══════════════════════════════════════════════════════════════ */
.services {
    padding: 110px 0;
    background: var(--bg-alt);
}
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 38px 30px;
    border: 1.5px solid var(--border);
    transition: all 0.35s var(--ease);
    cursor: default;
}
.service-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
}
.service-card__icon {
    width: 54px;
    height: 54px;
    background: var(--accent-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    transition: all 0.3s;
}
.service-card:hover .service-card__icon {
    background: var(--accent);
}
.service-card__icon i {
    font-size: 1.3rem;
    color: var(--accent);
    transition: color 0.3s;
}
.service-card:hover .service-card__icon i { color: #fff; }
.service-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.service-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════
   ARTÍCULOS
═══════════════════════════════════════════════════════════════ */
.articles {
    padding: 110px 0;
    background: var(--bg);
}
.articles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.article-card {
    background: var(--bg);
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    overflow: hidden;
    transition: all 0.35s var(--ease);
}
.article-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
}

/* Imagen de portada */
.article-card__img {
    height: 190px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}
.article-card__img--1 { background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%); }
.article-card__img--2 { background: linear-gradient(135deg, #DB2777 0%, #F43F5E 100%); }
.article-card__img--3 { background: linear-gradient(135deg, #0284C7 0%, #6366F1 100%); }

.article-card__cat {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Cuerpo de la tarjeta */
.article-card__body { padding: 26px; }
.article-card__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.article-date,
.article-read {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.article-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 12px;
    letter-spacing: -0.015em;
}
.article-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 22px;
}
.article-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.25s, color 0.25s;
}
.article-link:hover { gap: 10px; color: var(--accent-hover); }

/* ═══════════════════════════════════════════════════════════════
   CONTACTO
═══════════════════════════════════════════════════════════════ */
.contact {
    padding: 110px 0;
    background: linear-gradient(135deg, #0A0A1A 0%, #1E0E45 100%);
    position: relative;
    overflow: hidden;
}
.contact::before {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(109,40,217,0.25), transparent 70%);
    pointer-events: none;
}
.contact::after {
    content: '';
    position: absolute;
    bottom: -150px; left: -150px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(236,72,153,0.15), transparent 70%);
    pointer-events: none;
}

.contact__grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.7fr;
    gap: 72px;
    align-items: start;
}

/* Info de contacto */
.contact__info {
    display: flex;
    flex-direction: column;
    gap: 36px;
}
.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}
.contact__item > i {
    font-size: 1.25rem;
    color: #A78BFA;
    margin-top: 3px;
    min-width: 22px;
}
.contact__item strong {
    display: block;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.01em;
}
.contact__item span,
.contact__item a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    transition: color 0.25s;
}
.contact__item a:hover { color: #A78BFA; }

/* Formulario */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    resize: none;
    transition: border-color 0.25s, background 0.25s;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: #7C3AED;
    background: rgba(255, 255, 255, 0.1);
}

.form-success {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #A7F3D0;
    font-size: 0.92rem;
    padding: 14px 18px;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: var(--radius-sm);
}
.form-success i { font-size: 1.1rem; }
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
.footer {
    background: #060610;
    padding: 30px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer p {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
}
.footer__social {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.4rem;
    transition: color 0.25s, transform 0.25s;
}
.footer__social:hover {
    color: #A78BFA;
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════════════════════════════ */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 960px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .about__grid {
        grid-template-columns: 1fr;
        gap: 56px;
        text-align: center;
    }
    .about__photo-wrap { order: -1; }
    .about__tags { justify-content: center; }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .articles__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact__grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }
    .contact__info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 28px;
    }
    .contact__item { flex: 1; min-width: 200px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MÓVIL (≤ 640px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    /* Nav */
    .nav__toggle { display: flex; }
    .nav__menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 26, 0.97);
        backdrop-filter: blur(16px);
        padding: 16px;
        gap: 4px;
        border-top: 1px solid rgba(255,255,255,0.07);
    }
    .nav.scrolled .nav__menu {
        background: rgba(255, 255, 255, 0.97);
    }
    .nav.scrolled .nav__menu .nav__link { color: var(--text-muted); }
    .nav.scrolled .nav__menu .nav__link:hover { color: var(--accent); }
    .nav__menu.active { display: flex; }
    .nav__link { padding: 13px 18px; width: 100%; border-radius: 10px; }

    /* Hero */
    .hero__btns { flex-direction: column; align-items: center; }
    .hero__btns .btn { width: 100%; max-width: 280px; justify-content: center; }

    /* About */
    .about__avatar, .about__img {
        width: 220px;
        height: 220px;
        font-size: 3rem;
    }

    /* Services y Articles */
    .services__grid  { grid-template-columns: 1fr; }
    .articles__grid  { grid-template-columns: 1fr; }

    /* Contact form */
    .form-row { grid-template-columns: 1fr; }

    /* Contact info */
    .contact__info { flex-direction: column; gap: 28px; }

    /* Footer */
    .footer__inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* Paddings generales */
    .about, .services, .articles, .contact { padding: 80px 0; }
    .section-header { margin-bottom: 48px; }
}
