/* =============================================================
   PORTFOLIO — Full Stack Laravel Dev
   Archivo: portfolio.css
   Tipografía: Syne (display) + DM Sans (body)
============================================================= */

:root {
    --ink:       #0d0d0d;
    --ink-muted: #6b7280;
    --surface:   #ffffff;
    --bg:        #f7f6f3;
    --border:    rgba(0,0,0,.08);
    --accent:    #1a1a2e;
    --gold:      #f59e0b;
    --gold-soft: rgba(245,158,11,.12);
    --radius:    14px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
    --shadow:    0 8px 32px rgba(0,0,0,.10);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.14);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Syne', sans-serif; }

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

img { max-width: 100%; display: block; }

.container {
    width: 90%;
    max-width: 1160px;
    margin: 0 auto;
}

/* =========================
   HEADER
========================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13,13,13,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
}

.logo span { color: var(--gold); }

nav ul { display: flex; list-style: none; gap: 28px; }

nav a {
    color: rgba(255,255,255,.7);
    font-size: .88rem;
    font-weight: 500;
    letter-spacing: .02em;
    transition: color .2s;
}

nav a:hover { color: #fff; }

/* =========================
   HERO
========================= */
.hero {
    position: relative;
    background: var(--ink);
    color: #fff;
    padding: 110px 0 90px;
    overflow: hidden;
}

/* Grid de fondo decorativo */
.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* Resplandor dorado */
.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,158,11,.18) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: var(--gold-soft);
    border: 1px solid rgba(245,158,11,.3);
    color: var(--gold);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    margin-bottom: 20px;
    color: #fff;
}

.hero-title span { color: var(--gold); }

.hero-sub {
    color: rgba(255,255,255,.55);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 500px;
    margin-bottom: 40px;
}

.hero-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.4);
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(6px); }
}

/* =========================
   SECCIÓN HEADERS
========================= */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-kicker {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

/* =========================
   TIMELINE
========================= */
.timeline-section {
    padding: 100px 0;
    background: var(--surface);
}

.timeline {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
}

/* Línea central — se anima con JS */
.timeline-track {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0; /* crece con JS */
    background: linear-gradient(180deg, var(--gold), rgba(245,158,11,.2));
    transform: translateX(-50%);
    transition: height 0.05s linear;
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 40px);
    margin-bottom: 48px;
    position: relative;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity .5s ease, transform .5s ease;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 40px);
    transform: translateX(30px);
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Punto en la línea */
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--gold);
    transform: translateX(-50%);
    z-index: 2;
    transition: background .3s, transform .3s;
}

.timeline-dot--featured {
    width: 20px;
    height: 20px;
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 0 6px var(--gold-soft);
}

/* Tarjeta del timeline */
.timeline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform .2s, box-shadow .2s;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.timeline-card--featured {
    border-color: rgba(245,158,11,.35);
    background: linear-gradient(135deg, #fffdf7, #fff9ed);
    box-shadow: 0 8px 32px rgba(245,158,11,.12);
}

.featured-ribbon {
    position: absolute;
    top: -12px;
    right: 16px;
    background: var(--gold);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 999px;
}

.tcard-kicker {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}

.tcard-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
}

.tcard-desc {
    font-size: .88rem;
    color: var(--ink-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

/* Tech tags */
.tech-stack { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: .03em;
}

.tag-laravel  { background: #fff0f0; color: #c0392b; border: 1px solid rgba(192,57,43,.2); }
.tag-adminlte { background: #eff6ff; color: #1d4ed8; border: 1px solid rgba(29,78,216,.2); }
.tag-flutter  { background: #eff9ff; color: #0284c7; border: 1px solid rgba(2,132,199,.2); }
.tag-stripe   { background: #f0f4ff; color: #4f46e5; border: 1px solid rgba(79,70,229,.2); }
.tag-spatie   { background: #f0fdf4; color: #16a34a; border: 1px solid rgba(22,163,74,.2); }
.tag-bootstrap{ background: #faf0ff; color: #7c3aed; border: 1px solid rgba(124,58,237,.2); }

/* =========================
   DEMO CARDS
========================= */
.links-section {
    padding: 100px 0;
    background: var(--bg);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.demo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    gap: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease, box-shadow .2s;
}

.demo-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.demo-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.demo-card--honey {
    border-color: rgba(245,158,11,.3);
    background: linear-gradient(135deg, #fffdf7, #fff9ed);
    grid-column: 1 / -1; /* ocupa todo el ancho */
    flex-direction: column;
}

.demo-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--ink-muted);
    flex-shrink: 0;
}

.demo-card-icon--honey {
    font-size: 1.6rem;
    background: var(--gold-soft);
    border-color: rgba(245,158,11,.3);
    width: 52px;
    height: 52px;
}

.demo-card-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.demo-card-body p {
    font-size: .84rem;
    color: var(--ink-muted);
    margin-bottom: 14px;
}

.demo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: .82rem;
    font-family: 'DM Sans', monospace;
    color: var(--ink-muted);
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}

.demo-link:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.demo-link--honey:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

/* =========================
   CREDENCIALES
========================= */
.credentials {
    margin-top: 20px;
    border: 1px solid rgba(245,158,11,.25);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,.7);
}

.cred-title {
    padding: 10px 16px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #92400e;
    background: rgba(245,158,11,.1);
    border-bottom: 1px solid rgba(245,158,11,.15);
    display: flex;
    align-items: center;
    gap: 7px;
}

.cred-pass {
    padding: 10px 16px;
    font-size: .84rem;
    color: var(--ink-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 7px;
}

.cred-pass strong { color: var(--ink); font-weight: 700; }

.cred-list { padding: 8px; display: flex; flex-direction: column; gap: 4px; }

.cred-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}

.cred-item:hover { background: var(--gold-soft); }

.cred-role {
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: .04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.cred-role--super  { background: #1a1a2e; color: #fff; }
.cred-role--admin  { background: #1d4ed8; color: #fff; }
.cred-role--client { background: #16a34a; color: #fff; }

.cred-email {
    font-size: .84rem;
    color: var(--ink);
    font-family: 'DM Sans', monospace;
    flex: 1;
}

.cred-copy {
    color: var(--ink-muted);
    font-size: .8rem;
    transition: color .15s;
}

.cred-item:hover .cred-copy { color: var(--gold); }

/* Feedback al copiar */
.cred-item.copied { background: #ecfdf5; }
.cred-item.copied .cred-copy { color: #16a34a; }

/* =========================
   SKILLS
========================= */
.skills-section {
    padding: 100px 0;
    background: var(--surface);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.skill-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    background: var(--bg);
    transition: transform .2s, box-shadow .2s;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease, box-shadow .2s;
}

.skill-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    background: var(--surface);
}

.skill-icon {
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 14px;
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.skill-card p {
    font-size: .86rem;
    color: var(--ink-muted);
    line-height: 1.55;
}

/* =========================
   FOOTER
========================= */
.site-footer {
    background: var(--ink);
    padding: 36px 0;
}

.footer-inner p {
    text-align: center;
    color: rgba(255,255,255,.35);
    font-size: .84rem;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 767.98px) {
    /* Timeline: una sola columna */
    .timeline-track { display: none; }

    .timeline-item,
    .timeline-item:nth-child(even) {
        justify-content: flex-start;
        padding: 0 0 0 28px;
        transform: translateY(20px);
    }

    .timeline-dot {
        left: 0;
        transform: none;
    }

    .timeline-card { max-width: 100%; }

    .demo-card--honey { grid-column: auto; }

    nav ul { gap: 16px; }
}

@media (max-width: 480px) {
    .hero { padding: 80px 0 60px; }
    .hero-title { font-size: 2rem; }
    .cred-email { font-size: .76rem; }
}
