/*
 * robertogisbert.website — site.css
 * Cubre: nav, secciones, footer, animaciones
 * El hero, chatbot y GDPR siguen en styles.css (intacto)
 *
 * Paleta: su original (#020617 navy, #3b82f6 azul, #10b981 verde)
 * Tipografía: Inter a lo largo + JetBrains Mono para etiquetas
 */

/* ── TOKENS ────────────────────────────────────────────── */
:root {
    /* Fondo — su navy original */
    --ink:          #020617;
    --ink-soft:     #061020;
    --surface:      #0f172a;
    --surface2:     #111827;

    /* Bordes */
    --border:       rgba(30, 41, 59, 0.9);
    --border-hi:    rgba(59, 130, 246, 0.35);

    /* Acentos — SU azul, SU verde */
    --blue:         #3b82f6;
    --blue-dim:     rgba(59, 130, 246, 0.1);
    --blue-glow:    rgba(59, 130, 246, 0.2);
    --green:        #10b981;
    --green-dim:    rgba(16, 185, 129, 0.1);
    --cyan:         #06b6d4;

    /* Texto */
    --text:         #f8fafc;
    --text-muted:   #94a3b8;
    --text-dim:     #334155;

    /* Fuentes */
    --f:            'Inter', sans-serif;
    --f-mono:       'JetBrains Mono', monospace;

    /* Radios */
    --r-sm:  6px;
    --r-md:  10px;
    --r-lg:  16px;
}

/* ── BASE ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--f);
    background: var(--ink);
    color: var(--text);
    padding-top: 60px;      /* espacio para el nav fijo */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 2px; }

/* ── FONDO — glow sutil, no dramático ──────────────────── */
.rg-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 50% 30% at 85% 5%,  rgba(59,130,246,.07) 0%, transparent 60%),
        radial-gradient(ellipse 30% 25% at 5%  90%,  rgba(16,185,129,.04) 0%, transparent 50%);
}

.rg-wrapper { position: relative; z-index: 1; }

/* ── NAV ───────────────────────────────────────────────── */
#rg-nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 900; height: 60px;
    background: rgba(2, 6, 23, .88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1040px; margin: 0 auto; height: 100%;
    padding: 0 28px;
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px;
}

.rg-nav-brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; flex-shrink: 0;
}

.rg-nav-logo {
    width: 34px; height: 34px; border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-mono); font-size: 12px; font-weight: 600;
    color: #fff; letter-spacing: -.5px;
    box-shadow: 0 0 14px var(--blue-glow);
    flex-shrink: 0;
}

.rg-nav-name {
    font-family: var(--f); font-size: 14px; font-weight: 700;
    color: var(--text); letter-spacing: -.1px;
}

.rg-nav-role {
    font-family: var(--f-mono); font-size: 8px;
    color: var(--cyan); letter-spacing: 1.5px;
    text-transform: uppercase; margin-top: 1px;
}

.rg-nav-links {
    display: flex; align-items: center; gap: 0;
}

.rg-nav-link {
    padding: 7px 13px;
    font-family: var(--f); font-size: 12.5px; font-weight: 500;
    color: var(--text-muted); text-decoration: none;
    border-radius: var(--r-sm);
    transition: color .2s, background .2s; white-space: nowrap;
}
.rg-nav-link:hover { color: var(--text); background: rgba(255,255,255,.05); }

.rg-nav-cta {
    flex-shrink: 0; padding: 8px 18px;
    background: var(--blue); color: #fff;
    font-family: var(--f); font-size: 12.5px; font-weight: 700;
    border-radius: var(--r-md); text-decoration: none;
    transition: all .2s; white-space: nowrap; margin-left: 8px;
    box-shadow: 0 0 0 rgba(59,130,246,0);
}
.rg-nav-cta:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--blue-glow);
}

@media (max-width: 700px) { .rg-nav-links { display: none; } }
@media (max-width: 480px) { .nav-container { padding: 0 16px; } }

/* ── SEPARADORES DE SECCIÓN ────────────────────────────── */
.rg-sep {
    display: flex; align-items: center; gap: 18px;
    margin-bottom: 56px;
}
.rg-sep-num {
    font-family: var(--f-mono); font-size: 10px; font-weight: 600;
    color: var(--green); letter-spacing: 1px; opacity: .8; flex-shrink: 0;
}
.rg-sep-line { flex: 1; height: 1px; background: var(--border); }
.rg-sep-label {
    font-family: var(--f-mono); font-size: 9px;
    color: var(--text-dim); text-transform: uppercase;
    letter-spacing: 3px; white-space: nowrap; flex-shrink: 0;
}

/* ── CONTENEDOR SECCIONES ──────────────────────────────── */
.rg-section {
    max-width: 1040px; margin: 0 auto;
    padding: 80px 28px;
}
@media (max-width: 480px) { .rg-section { padding: 64px 16px; } }

/* ── STATS STRIP ───────────────────────────────────────── */
.rg-stats-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.rg-stats-row {
    max-width: 1040px; margin: 0 auto;
    padding: 0 28px;
    display: flex; align-items: stretch;
}
.rg-stat {
    flex: 1; padding: 28px 20px;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 4px;
}
.rg-stat:last-child { border-right: none; }

.rg-stat-n {
    font-family: var(--f); font-size: 40px;
    font-weight: 800; line-height: 1; letter-spacing: -2px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.rg-stat-l {
    font-family: var(--f); font-size: 11px;
    color: var(--text-muted); letter-spacing: .3px; line-height: 1.4;
}

@media (max-width: 600px) {
    .rg-stats-row { flex-wrap: wrap; }
    .rg-stat { flex: 0 0 50%; border-bottom: 1px solid var(--border); }
    .rg-stat:nth-child(even) { border-right: none; }
}

/* ── SOBRE MÍ ──────────────────────────────────────────── */
.rg-about-grid {
    display: grid; grid-template-columns: 1fr 340px;
    gap: 60px; align-items: start;
}
@media (max-width: 860px) { .rg-about-grid { grid-template-columns: 1fr; gap: 40px; } }

.rg-about-eyebrow {
    font-family: var(--f-mono); font-size: 9px;
    color: var(--green); letter-spacing: 2px;
    text-transform: uppercase;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px;
}
.rg-about-eyebrow::before {
    content: ''; display: block;
    width: 24px; height: 1px;
    background: var(--green); opacity: .5;
}

.rg-about-h2 {
    font-family: var(--f); font-size: clamp(28px, 3.8vw, 42px);
    font-weight: 800; line-height: 1.1;
    letter-spacing: -1.2px; color: #fff;
    margin-bottom: 28px;
}
.rg-about-h2 em {
    font-style: normal; color: var(--blue);
    text-decoration: underline;
    text-decoration-color: rgba(16, 185, 129, .35);
    text-underline-offset: 5px;
    text-decoration-thickness: 2px;
}

.rg-about-body { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.rg-about-body p {
    font-family: var(--f); font-size: 15px;
    line-height: 1.8; color: rgba(248,250,252,.7);
}
.rg-about-body p strong { color: var(--text); font-weight: 600; }

.rg-pullquote {
    margin: 8px 0; padding: 18px 22px;
    border-left: 3px solid var(--blue);
    background: var(--blue-dim);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    font-family: var(--f); font-size: 14px;
    font-style: italic; color: rgba(248,250,252,.8); line-height: 1.65;
}
.rg-pullquote strong { color: var(--blue); font-style: normal; font-weight: 600; }

/* Tarjetas diferenciadores */
.rg-diff-stack { display: flex; flex-direction: column; gap: 10px; }
.rg-diff-item {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 16px 18px;
    display: flex; gap: 13px; align-items: flex-start;
    transition: border-color .2s; cursor: default;
}
.rg-diff-item:hover { border-color: var(--border-hi); }

.rg-diff-em { font-size: 19px; flex-shrink: 0; margin-top: 1px; }
.rg-diff-t {
    font-family: var(--f); font-size: 12.5px;
    font-weight: 700; color: var(--text); margin-bottom: 3px;
}
.rg-diff-d {
    font-family: var(--f); font-size: 11.5px;
    color: var(--text-muted); line-height: 1.5;
}

/* ── PROYECTOS ─────────────────────────────────────────── */
.rg-proj-row {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px;
}
@media (max-width: 800px) { .rg-proj-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .rg-proj-row { grid-template-columns: 1fr; } }

.rg-proj {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 24px;
    display: flex; flex-direction: column; gap: 10px;
    text-decoration: none; color: inherit;
    position: relative; overflow: hidden;
    transition: border-color .25s, transform .25s, box-shadow .25s;
}
.rg-proj:hover {
    border-color: var(--border-hi);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.rg-proj::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 2px; opacity: 0; transition: opacity .3s;
}
.rg-proj.p-a::before { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.rg-proj.p-b::before { background: linear-gradient(90deg, var(--green), #34d399); }
.rg-proj.p-c::before { background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.rg-proj:hover::before { opacity: 1; }

.rg-proj-icon { font-size: 24px; }
.rg-proj-title {
    font-family: var(--f); font-size: 15px; font-weight: 700;
    color: #fff; line-height: 1.2;
}
.rg-proj-desc {
    font-family: var(--f); font-size: 12px;
    color: var(--text-muted); line-height: 1.65; flex: 1;
}
.rg-proj-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.rg-proj-tag {
    font-family: var(--f-mono); font-size: 9px;
    padding: 2px 8px; border-radius: 4px;
    border: 1px solid rgba(255,255,255,.08);
    color: var(--text-muted);
}

/* ── HERRAMIENTAS ──────────────────────────────────────── */
.rg-tools-intro { margin-bottom: 44px; }

.rg-tools-kicker {
    font-family: var(--f-mono); font-size: 9px;
    color: var(--green); letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 14px;
}
.rg-tools-kicker::before {
    content: ''; display: block;
    width: 20px; height: 1px;
    background: var(--green); opacity: .5;
}

.rg-tools-h {
    font-family: var(--f); font-size: clamp(26px, 4vw, 42px);
    font-weight: 800; line-height: 1.05;
    letter-spacing: -1.5px; color: #fff;
    margin-bottom: 14px;
}
.rg-tools-h span { color: var(--blue); }

.rg-tools-sub {
    font-family: var(--f); font-size: 14.5px;
    color: rgba(248,250,252,.6); line-height: 1.75; max-width: 580px;
}
.rg-tools-sub strong { color: var(--text); font-weight: 600; }

.rg-tools-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    grid-template-rows: auto auto; gap: 12px;
}
@media (max-width: 860px) { .rg-tools-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .rg-tools-grid { grid-template-columns: 1fr; } }

.rg-tool {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 22px;
    display: flex; flex-direction: column; gap: 9px;
    text-decoration: none; color: inherit;
    position: relative; overflow: hidden;
    transition: all .25s;
}
.rg-tool::after {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    transform: scaleX(0); transform-origin: left;
    transition: transform .3s ease;
}
.rg-tool:hover {
    border-color: var(--border-hi);
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(0,0,0,.4);
}
.rg-tool:hover::after { transform: scaleX(1); }
.rg-tool.featured { grid-row: span 2; }
@media (max-width: 860px) { .rg-tool.featured { grid-row: span 1; } }

.tc-kicker {
    font-family: var(--f-mono); font-size: 8px;
    color: var(--cyan); letter-spacing: 2px; text-transform: uppercase;
}
.tc-icon { font-size: 25px; margin-bottom: 2px; }
.tc-title {
    font-family: var(--f); font-size: 15px; font-weight: 700;
    color: #fff; line-height: 1.2;
}
.tc-desc {
    font-family: var(--f); font-size: 12px;
    color: var(--text-muted); line-height: 1.65; flex: 1;
}
.tc-list {
    list-style: none; padding: 0;
    display: flex; flex-direction: column; gap: 5px; margin-top: 4px;
}
.tc-list li {
    font-family: var(--f); font-size: 11.5px;
    color: var(--text-muted);
    display: flex; gap: 7px; align-items: flex-start; line-height: 1.45;
}
.tc-list li::before {
    content: '›'; color: var(--blue);
    font-family: var(--f-mono); font-weight: 600;
    font-size: 12px; flex-shrink: 0; line-height: 1.3;
}
.tc-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px; padding-top: 12px;
    border-top: 1px solid var(--border);
}
.tc-pill {
    font-family: var(--f-mono); font-size: 8.5px;
    padding: 3px 9px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: .5px;
}
.tc-pill.active {
    border: 1px solid rgba(59,130,246,.3);
    color: var(--blue); background: var(--blue-dim);
}
.tc-pill.soon {
    border: 1px solid rgba(16,185,129,.3);
    color: var(--green); background: var(--green-dim);
}
.tc-arrow {
    font-size: 15px; color: var(--text-dim);
    transition: transform .2s, color .2s;
}
.rg-tool:hover .tc-arrow { transform: translateX(4px); color: var(--blue); }

/* Hub strip */
.rg-hub-strip {
    margin-top: 16px; padding: 20px 24px;
    background: linear-gradient(135deg, var(--surface2), rgba(59,130,246,.05));
    border: 1px solid rgba(59,130,246,.2);
    border-radius: var(--r-lg);
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px; flex-wrap: wrap;
    transition: border-color .2s;
}
.rg-hub-strip:hover { border-color: rgba(59,130,246,.4); }

.rg-hub-kicker {
    font-family: var(--f-mono); font-size: 8px;
    color: var(--cyan); letter-spacing: 2px;
    text-transform: uppercase; margin-bottom: 4px;
}
.rg-hub-title {
    font-family: var(--f); font-size: 16px;
    font-weight: 700; color: #fff; letter-spacing: -.3px;
}
.rg-hub-sub {
    font-family: var(--f); font-size: 12px;
    color: var(--text-muted); margin-top: 2px;
}
.rg-btn-hub {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; background: var(--blue); color: #fff;
    font-family: var(--f); font-size: 13px; font-weight: 700;
    border-radius: var(--r-md); text-decoration: none;
    transition: all .2s; white-space: nowrap; flex-shrink: 0;
}
.rg-btn-hub:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px var(--blue-glow);
}

/* ── FOOTER ────────────────────────────────────────────── */
.rg-footer {
    border-top: 1px solid var(--border);
    background: var(--ink-soft); padding: 40px 0;
}
.rg-footer-inner {
    max-width: 1040px; margin: 0 auto; padding: 0 28px;
    display: flex; align-items: flex-start;
    justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.rg-footer-brand {
    font-family: var(--f); font-size: 16px;
    font-weight: 700; color: var(--text); letter-spacing: -.2px;
}
.rg-footer-role {
    font-family: var(--f-mono); font-size: 9px;
    color: var(--text-muted); letter-spacing: 1px; margin-top: 3px;
}
.rg-footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.rg-footer-link {
    font-family: var(--f); font-size: 12.5px;
    color: var(--text-muted); text-decoration: none; transition: color .2s;
}
.rg-footer-link:hover { color: var(--blue); }
.rg-footer-copy {
    width: 100%; padding-top: 20px; margin-top: 8px;
    border-top: 1px solid var(--border);
    font-family: var(--f); font-size: 11px;
    color: var(--text-dim); text-align: center;
}
.rg-footer-copy span {
    font-family: var(--f-mono); font-size: 10px; color: var(--text-muted);
}
@media (max-width: 480px) { .rg-footer-inner { padding: 0 16px; } }

/* ── SCROLL REVEAL ─────────────────────────────────────── */
.rg-reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}
.rg-reveal.rg-in { opacity: 1; transform: translateY(0); }
