/* ============================================
   soyjuli.com — CSS base unificado
   Estilo: oscuro, minimalista, tipografia fina
   tipo SpaceX / Google / Apple (Inter).
   Este archivo NO lleva el fondo animado del
   home (esta en fondo-animado.css).
   ============================================ */

/* --- Variables --- */
:root {
  --color-muted: #888;
  --color-soft: #bbb;
  --color-text: #e5e5e5;
  --color-line: rgba(255,255,255,0.12);
  --color-line-soft: rgba(255,255,255,0.06);
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --radius: 14px;
  --pad: 24px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  background: #000;
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-weight: 300;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }

/* --- Progress bar --- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #fff, #666);
  z-index: 40;
  transition: width 0.1s linear;
}

/* --- Nav (SpaceX-like, fina y espaciada) --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.nav.scrolled {
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-line-soft);
  padding: 14px 40px;
}
.nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .95rem;
  font-weight: 300;
  letter-spacing: .35em;
  text-transform: uppercase;
}
.nav .brand img { width: 28px; height: 28px; }
.nav .links { display: flex; gap: 34px; }
.nav .links a {
  font-size: .74rem;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--color-soft);
  padding: 4px 0;
  position: relative;
  transition: color .3s;
}
.nav .links a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s;
}
.nav .links a:hover,
.nav .links a.active { color: #fff; }
.nav .links a:hover::after,
.nav .links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav .clock-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #777;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}
.nav .live-dot {
  width: 6px; height: 6px;
  background: #00e68a;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.nav .clock { letter-spacing: .25em; }

/* --- Burger (mobile) --- */
.burger {
  display: none;
  position: fixed;
  top: 18px; right: 20px;
  z-index: 35;
  width: 44px; height: 44px;
}
.burger span {
  display: block;
  width: 26px; height: 2px;
  background: #fff;
  margin: 6px auto;
  transition: transform .35s, opacity .35s;
}
.burger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Menu movil --- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}
.menu.open { opacity: 1; pointer-events: auto; }
.menu a {
  font-size: 1.4rem;
  font-weight: 200;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #fff;
}
.menu a:active { color: #999; }
body.menu-open { overflow: hidden; }

/* --- Layout --- */
.section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px;
  position: relative;
  z-index: 2;
  text-align: center;
}
.content { width: 100%; max-width: 1100px; margin: 0 auto; }
.wide { width: 100%; max-width: 1100px; margin: 0 auto; }

/* --- Hero (home) --- */
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin: 0 auto; }
.kicker {
  font-size: .74rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 28px;
  font-weight: 300;
}
.kicker b { font-weight: 300; color: #fff; }
.hero-logo {
  width: min(380px, 70vw);
  height: auto;
  display: inline-block;
}
.hero-sub {
  color: #e5e5e5;
  font-size: clamp(.95rem, 2vw, 1.2rem);
  font-weight: 200;
  letter-spacing: .08em;
  margin-top: 26px;
}
.hero .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(55px);
  transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--i) * 90ms);
}
.hero.on .char { opacity: 1; transform: none; }

/* --- Efecto Hacker en texto del hero (kicker y sub) --- */
.hx-char {
  display: inline;
}
.hx-live .hx-glitch {
  color: #6dff9c;
  text-shadow: 0 0 10px rgba(109,255,156,.7);
}
.hx-char.hx-on {
  color: #fff;
  opacity: 1;
  text-shadow: 0 0 8px rgba(109,255,156,.3);
}

/* --- Scroll hint --- */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: .62rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.scroll-hint .wheel {
  width: 1px; height: 46px;
  background: linear-gradient(#999, transparent);
  animation: drop 2s cubic-bezier(.22,1,.36,1) infinite;
  transform-origin: top;
}
@keyframes drop {
  0% { transform: scaleY(0); }
  55% { transform: scaleY(1); }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); }
}

/* --- Tipografia general --- */
.num {
  font-size: .72rem;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 18px;
}
.big-title {
  font-size: clamp(1.8rem, 5.5vw, 3.4rem);
  font-weight: 200;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.1;
  color: #fff;
}
.desc {
  color: #ddd;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 200;
  line-height: 1.7;
  margin-top: 24px;
}
.desc a { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.line {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  margin: 40px auto 0;
}

/* --- Stats --- */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 60px;
  margin-top: 60px;
}
.stat { min-width: 130px; }
.stat .value {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 200;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.stat .cap {
  font-size: .68rem;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 10px;
}

/* --- CTA --- */
.cta {
  display: inline-block;
  margin-top: 40px;
  padding: 16px 42px;
  font-size: .78rem;
  font-weight: 300;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid #fff;
  transition: background .3s, color .3s;
}
.cta:hover { background: #fff; color: #000; }

/* --- Back link --- */
.back-link {
  display: inline-block;
  margin-top: 32px;
  padding: 14px 36px;
  font-size: .72rem;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-soft);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  transition: color .3s, border-color .3s;
}
.back-link:hover { color: #fff; border-color: #fff; }

/* --- Tags (etiquetas de post) --- */
.tag {
  display: inline-block;
  font-size: .62rem;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #999;
  border: 1px solid var(--color-line);
  padding: 6px 14px;
}

/* --- Fila de tags (centrada, ancho 1100) --- */
.tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto 90px;
  padding: 0 20px;
}

/* --- Cards (grid de proyectos) --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 60px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: rgba(17,17,19,0.9);
  transition: border-color .3s, transform .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
  text-align: left;
  font-weight: 300;
}
.card:hover {
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px -8px rgba(0,0,0,0.6);
}
.card .feature-heading { margin-bottom: 16px; }
.card .feature-title {
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
  overflow-wrap: break-word;
  line-height: 1.3;
}
.card .feature-meta {
  font-size: .62rem;
  font-weight: 300;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 6px;
}
.card .feature-desc {
  font-size: .9375rem;
  font-weight: 200;
  color: var(--color-soft);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .feature-image-container {
  aspect-ratio: 16/9;
  border: 1px solid var(--color-line-soft);
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0b;
  margin-top: auto;
}
.card .feature-image {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .85;
  transition: opacity .3s, transform .3s;
}
.card:hover .feature-image { opacity: 1; transform: scale(1.02); }

/* --- Search --- */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 480px;
  margin-top: 48px;
}
.search-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: .875rem;
  font-family: var(--font);
  color: #fff;
  font-weight: 300;
  letter-spacing: .04em;
  outline: none;
  transition: border-color .3s, background .3s;
}
.search-input::placeholder { color: #555; }
.search-input:focus { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); }
.search-count {
  font-size: .65rem;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}
.search-empty {
  color: #666;
  margin-top: 48px;
  font-size: 1rem;
  font-weight: 200;
}

/* --- Entry (contenido de posts) --- */
.entry {
  text-align: left;
  color: #ddd;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  font-weight: 200;
  line-height: 1.8;
}
.entry h2 {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  margin: 48px 0 14px;
}
.entry h3 {
  font-size: 1.2rem;
  font-weight: 300;
  color: #fff;
  margin: 36px 0 12px;
}
.entry p { margin: 14px 0; }
.entry ul, .entry ol { margin: 14px 0; padding-left: 1.4em; }
.entry li { margin-bottom: 6px; }
.entry code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .9em;
  background: rgba(255,255,255,0.07);
  padding: 2px 6px;
  border-radius: 4px;
}
.entry pre {
  border: 1px solid var(--color-line);
  background: #0a0a0a;
  border-radius: 8px;
  padding: 18px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: .85rem;
  line-height: 1.6;
}
.entry pre code { background: none; padding: 0; }
.entry a { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.entry strong { color: #fff; font-weight: 400; }
.entry img { border-radius: 8px; margin: 24px 0; }
.entry hr { border: none; border-top: 1px solid var(--color-line-soft); margin: 32px 0; }
.entry blockquote {
  border-left: 2px solid rgba(255,255,255,0.15);
  padding-left: 20px;
  margin: 24px 0;
  color: #888;
}

/* --- Footer --- */
footer {
  z-index: 2;
  text-align: center;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #888;
  padding: 40px 16px;
  font-size: .65rem;
  font-weight: 300;
  position: relative;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-inner span { color: #666; }

/* --- Reveal on scroll --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1);
}
[data-reveal].on { opacity: 1; transform: none; }

/* --- Responsive --- */
@media (max-width: 720px) {
  .nav { padding: 22px 20px; }
  .nav.scrolled { padding: 14px 20px; }
  .nav .links, .nav .clock { display: none; }
  .burger { display: block; }
  .section { padding: 84px 20px; }
  .kicker { font-size: .6rem; letter-spacing: .28em; line-height: 1.9; }
  .hero-sub { font-size: .95rem; margin-top: 20px; line-height: 1.7; }
  .num { letter-spacing: .2em; }
  .big-title { font-size: clamp(1.6rem, 8vw, 2.4rem); letter-spacing: .03em; }
  .desc { font-size: 1rem; line-height: 1.65; }
  .cta { width: 100%; max-width: 340px; padding: 16px 24px; display: block; margin: 40px auto 0; }
  .menu a { font-size: clamp(1.1rem, 5.5vw, 1.4rem); letter-spacing: .18em; }
  .stat .cap { letter-spacing: .22em; }
  .stats { gap: 36px; margin-top: 48px; }
  .stat { min-width: 100px; }
  .grid { grid-template-columns: 1fr; }
  .search-wrap { flex-direction: column; align-items: stretch; gap: 10px; }
  .search-count { text-align: center; }
  [data-reveal] { opacity: 1; transform: none; }
}

@media (max-height: 560px) { .scroll-hint { display: none; } }

@media (max-width: 420px) { .stats { flex-direction: column; gap: 34px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  [data-reveal], .hero .char { opacity: 1; transform: none; }
}
