/* ===========================================
   SHARON NATIVIDAD · PORTFOLIO
   styles.css · v2 · Peek Carousel mejorado
   =========================================== */

:root {
    --bg:         #0f172a;
    --bg-alt:     #0d1424;
    --surface:    #1e293b;
    --surface2:   #263547;
    --border:     #2d3f55;
    --text:       #f1f5f9;
    --text-muted: #94a3b8;
    --accent:     #38bdf8;
    --accent2:    #818cf8;
    --green:      #4ade80;
    --orange:     #fb923c;
    --wa:         #25D366;
    --radius:     12px;
    --radius-lg:  20px;
    --shadow:     0 4px 24px rgba(0, 0, 0, .4);
    --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, svg { display: block; }

/* ===== UTILITIES ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.02em; display: inline-block; margin-bottom: 0.5rem; }
.section-title::after { content: ''; display: block; width: 48px; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 2px; margin-top: 0.5rem; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; margin-top: 0.6rem; margin-bottom: 3rem; }
.accent { color: var(--accent); }
.gradient-text { background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.75rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none; transition: all var(--transition); white-space: nowrap; }
.btn-primary { background: var(--accent); color: #0f172a; }
.btn-primary:hover { background: #7dd3fc; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn-wa { background: var(--wa); color: #fff; padding: 0.9rem 2rem; font-size: 1rem; gap: 0.6rem; }
.btn-wa:hover { background: #1dba5a; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35); }
.btn-gh { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); padding: 0.9rem 2rem; font-size: 1rem; gap: 0.6rem; }
.btn-gh:hover { border-color: var(--text-muted); transform: translateY(-2px); }

/* ===== NAVBAR ===== */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--transition), box-shadow var(--transition); }
.navbar.scrolled { border-bottom-color: var(--border); box-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.5px; }
.nav-menu { display: flex; gap: 2.25rem; }
.nav-link { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); position: relative; transition: color var(--transition); }
.nav-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--accent); border-radius: 2px; transition: width var(--transition); }
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }

/* ===== HERO ===== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; gap: 3.5rem; padding: 7rem 1.5rem 4rem; max-width: 1100px; margin: 0 auto; overflow: hidden; }
.hero-bg-orb { position: absolute; top: -150px; right: -100px; width: 650px; height: 650px; border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, 0.07) 0%, transparent 65%); pointer-events: none; z-index: 0; }
.hero-left { flex: 1; min-width: 0; position: relative; z-index: 1; }
.hero-tag { display: inline-block; background: rgba(56, 189, 248, 0.1); color: var(--accent); border: 1px solid rgba(56, 189, 248, 0.22); border-radius: 100px; padding: 0.35rem 1rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.5rem; }
.hero-name { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 1.25rem; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 460px; line-height: 1.75; margin-bottom: 2.25rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-right { flex: 0 0 400px; position: relative; z-index: 1; }

/* ===== CODE WINDOW ===== */
.code-window { background: #141e2d; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow), 0 0 80px rgba(56, 189, 248, 0.05); font-family: 'JetBrains Mono', 'Courier New', monospace; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.code-titlebar { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.1rem; background: #0f1826; border-bottom: 1px solid var(--border); }
.code-dots { display: flex; gap: 6px; }
.dot-red    { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.dot-yellow { width: 12px; height: 12px; border-radius: 50%; background: #febc2e; }
.dot-green  { width: 12px; height: 12px; border-radius: 50%; background: #28c840; }
.code-fname { margin-left: 0.4rem; font-size: 0.78rem; color: var(--text-muted); }
.code-body { padding: 1.5rem 1.5rem 1.75rem; font-size: 0.82rem; line-height: 1.85; overflow-x: auto; }
.code-body pre { white-space: pre; }
.c-kw  { color: #c678dd; }
.c-str { color: #98c379; }
.c-cm  { color: #5c6370; font-style: italic; }
.c-fn  { color: #61afef; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; margin-top: 2.5rem; }
.about-text p { color: var(--text-muted); font-size: 1.02rem; line-height: 1.8; margin-bottom: 1rem; }
.about-text strong { color: var(--text); font-weight: 600; }
.skills-list { display: flex; flex-wrap: wrap; gap: 0.75rem; align-content: flex-start; }
.skill-badge { display: flex; align-items: center; gap: 0.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.55rem 1rem; font-size: 0.9rem; font-weight: 500; transition: all var(--transition); cursor: default; }
.skill-badge:hover { border-color: var(--accent); background: rgba(56, 189, 248, 0.07); transform: translateY(-2px); }

/* ===========================================
   PEEK CAROUSEL v2 — más dramático
   =========================================== */
.carousel-wrapper { position: relative; padding-bottom: 3rem; }
.carousel-viewport { overflow: hidden; padding: 1rem 0; }
.carousel-track { display: flex; gap: 1.5rem; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; }

.carousel-btn {
    position: absolute;
    top: calc(1rem + 110px);
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.carousel-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(56, 189, 248, 0.12);
    transform: translateY(-50%) scale(1.08);
}
.carousel-btn:disabled { opacity: 0.25; cursor: default; pointer-events: none; }
#carouselPrev { left: 0.5rem; }
#carouselNext { right: 0.5rem; }

.carousel-dots { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--border); cursor: pointer; padding: 0; transition: all var(--transition); }
.dot.active { background: var(--accent); width: 26px; border-radius: 4px; }

/* ===== PROJECT CARD — peek effect marcado ===== */
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 0 0 68%;
    opacity: 0.3;
    transform: scale(0.82);
    filter: blur(3px);
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease,
                border-color var(--transition), box-shadow var(--transition);
}
.project-card.is-active {
    opacity: 1;
    transform: scale(1);
    filter: none;
    cursor: default;
}
.project-card.is-active.accent-blue   { box-shadow: 0 24px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(56,189,248,0.18);  border-color: rgba(56,189,248,0.35); }
.project-card.is-active.accent-purple { box-shadow: 0 24px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(167,139,250,0.18); border-color: rgba(167,139,250,0.35); }
.project-card.is-active.accent-green  { box-shadow: 0 24px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(74,222,128,0.18);  border-color: rgba(74,222,128,0.35); }
.project-card.is-active.accent-orange { box-shadow: 0 24px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(251,146,60,0.18);  border-color: rgba(251,146,60,0.35); }

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 2;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.accent-blue::before   { background: linear-gradient(90deg, #0f62d4, #1a8fd6); }
.accent-purple::before { background: linear-gradient(90deg, #6d28d9, #9333ea); }
.accent-green::before  { background: linear-gradient(90deg, #16a34a, #22c55e); }
.accent-orange::before { background: linear-gradient(90deg, #c2410c, #ea580c); }

/* ===== CARD THUMBNAIL ===== */
.card-thumb { position: relative; height: 220px; overflow: hidden; cursor: pointer; flex-shrink: 0; }
.thumb-1 { background: linear-gradient(135deg, #1a3a6e 0%, #0f62d4 60%, #1a8fd6 100%); }
.thumb-2 { background: linear-gradient(135deg, #2a1755 0%, #6d28d9 60%, #9333ea 100%); }
.thumb-3 { background: linear-gradient(135deg, #0d3d22 0%, #16a34a 60%, #22c55e 100%); }
.thumb-4 { background: linear-gradient(135deg, #431200 0%, #c2410c 60%, #ea580c 100%); }

.card-thumb-video { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.card-thumb-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.38); transition: background var(--transition); z-index: 1; }
.card-thumb:hover .card-thumb-overlay { background: rgba(0, 0, 0, 0.2); }
.play-circle { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,0.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 2px solid rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.card-thumb:hover .play-circle { background: rgba(255,255,255,0.3); transform: scale(1.12); }

.demo-badge {
    position: absolute;
    bottom: 0.85rem;
    right: 0.85rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 100px;
    padding: 0.35rem 0.85rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    z-index: 2;
    letter-spacing: 0.02em;
}

/* ===== CARD BODY ===== */
.card-body { padding: 1.6rem 1.75rem 1.75rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { font-size: 0.7rem; font-weight: 700; padding: 0.22rem 0.65rem; border-radius: 100px; letter-spacing: 0.04em; text-transform: uppercase; }
.t-blue   { background: rgba(56,189,248,.13);  color: #7dd3fc; border: 1px solid rgba(56,189,248,.22); }
.t-purple { background: rgba(129,140,248,.13); color: #a5b4fc; border: 1px solid rgba(129,140,248,.22); }
.t-green  { background: rgba(74,222,128,.1);   color: #86efac; border: 1px solid rgba(74,222,128,.18); }
.t-orange { background: rgba(251,146,60,.1);   color: #fdba74; border: 1px solid rgba(251,146,60,.18); }
.t-gray   { background: rgba(148,163,184,.09); color: #cbd5e1; border: 1px solid rgba(148,163,184,.18); }

.card-body h3 { font-size: 1.12rem; font-weight: 800; line-height: 1.3; color: var(--text); letter-spacing: -0.015em; }
.card-body p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.card-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.15rem; }
.card-list li { font-size: 0.85rem; color: var(--text-muted); padding-left: 1.2rem; position: relative; }
.card-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-size: 0.78rem; font-weight: 700; top: 1px; }
.accent-purple .card-list li::before { color: #a78bfa; }
.accent-green  .card-list li::before { color: #4ade80; }
.accent-orange .card-list li::before { color: #fb923c; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 1.5rem; opacity: 0; pointer-events: none; transition: opacity 0.28s ease; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-inner { position: relative; width: 100%; max-width: 960px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,0.75); background: #000; transform: scale(0.96); transition: transform 0.3s ease; }
.modal-overlay.open .modal-inner { transform: scale(1); }
.modal-video { width: 100%; display: block; max-height: 82vh; }
.modal-close { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 10; background: rgba(0,0,0,0.7); border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; transition: background var(--transition); }
.modal-close:hover { background: rgba(0,0,0,0.95); }

/* ===== CONTACT / FOOTER / WA ===== */
.contact-container { text-align: center; }
.contact-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.footer { text-align: center; padding: 2rem 1.5rem; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border); }
.wa-float { position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 99; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(37,211,102,0.45); transition: all var(--transition); animation: wa-pulse 2.8s ease-in-out infinite; }
.wa-float:hover { transform: scale(1.12); box-shadow: 0 6px 32px rgba(37,211,102,0.65); animation: none; }
@keyframes wa-pulse { 0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); } 50% { box-shadow: 0 4px 32px rgba(37,211,102,0.72); } }

/* ===== SCROLL ANIMATIONS ===== */
.fade-in { opacity: 0; transform: translateY(28px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 900px) {
    .hero { flex-direction: column; padding-top: 8rem; gap: 2.5rem; }
    .hero-right { flex: none; width: 100%; max-width: 480px; margin: 0 auto; }
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .project-card { flex: 0 0 80%; }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 640px) {
    .nav-menu { display: none; position: fixed; top: 64px; left: 0; right: 0; background: rgba(15,23,42,0.97); backdrop-filter: blur(14px); padding: 1.75rem; flex-direction: column; gap: 1.5rem; border-bottom: 1px solid var(--border); z-index: 99; }
    .nav-menu.open { display: flex; }
    .nav-hamburger { display: flex; }
    .hero-right { display: none; }
    .hero-name { font-size: 2.6rem; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { justify-content: center; }
    .section { padding: 4rem 0; }
    .card-body { padding: 1.25rem; }
    .card-thumb { height: 180px; }
    .project-card { flex: 0 0 90%; filter: none; transform: scale(0.95); }
    #carouselPrev, #carouselNext { display: none; }
    .contact-btns { flex-direction: column; align-items: center; }
    .btn-wa, .btn-gh { width: 100%; max-width: 300px; justify-content: center; }
}
