/* Home: mismo lenguaje visual que styles.css (negro, Manrope, DM Mono, grano). */
html { scroll-behavior: smooth; scroll-padding-top: 70px; }

/* Barra superior: el enlace "Sobre mí" hace de banner. */
.nav-banner { min-width: min(46vw, 360px); justify-content: space-between; gap: 18px; }
.nav-banner span { font-size: 15px; letter-spacing: 0; }

.home-hero { position: relative; z-index: 2; padding: 150px 26px 56px; text-align: center; }
.home-hero .eyebrow { margin: 0 0 24px; }
.home-hero h1 { font-size: clamp(56px, 11vw, 150px); }

/* Pestañas */
.tabs {
  position: sticky; top: 0; z-index: 25;
  background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-block: 1px solid var(--line);
}
.tabs-inner { display: flex; justify-content: center; gap: 8px; padding: 12px 26px; overflow-x: auto; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.26); border-radius: 12px;
  color: #fff; text-decoration: none; font: 700 11px "DM Mono", monospace; letter-spacing: 0.18em; text-transform: uppercase;
  transition: border-color 0.2s, background 0.2s;
}
.tabs a span, .tabs a sup { color: var(--muted); font-weight: 400; }
.tabs a:hover { border-color: rgba(255, 255, 255, 0.6); }
.tabs a.is-active { background: #fff; color: #050505; border-color: #fff; }
.tabs a.is-active span, .tabs a.is-active sup { color: #555; }

/* Secciones */
main { position: relative; z-index: 2; }
.work { padding: 72px 26px 8px; }
.work-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.work-num, .work-count { font: 11px "DM Mono", monospace; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.work-head h2 { margin: 0; font-size: clamp(40px, 7vw, 96px); line-height: 0.85; letter-spacing: -0.07em; font-weight: 800; text-transform: uppercase; }
.work-head p { flex-basis: 100%; margin: 6px 0 0; max-width: 520px; color: #c2c2bd; font-size: 14px; }
.work-count { margin-left: auto; order: 2; }
.work-head p { order: 3; }

/* Mosaico */
.grid { columns: 3; column-gap: 14px; }
.tile { position: relative; display: block; margin: 0 0 14px; overflow: hidden; break-inside: avoid; background: #111; border: 1px solid var(--line); border-radius: 4px; }
.tile img { display: block; width: 100%; height: auto; transition: transform 0.5s ease; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); }
.tile-cap {
  position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; gap: 12px; padding: 36px 14px 12px;
  background: linear-gradient(transparent, rgba(5, 5, 5, 0.85));
  font: 11px "DM Mono", monospace; letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0; transition: opacity 0.25s;
}
.tile-cap b { font-weight: 700; }
.tile-cap i { font-style: normal; color: #c2c2bd; }
.tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; }
@media (hover: none) { .tile-cap { opacity: 1; } }
:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pie */
.foot { text-align: center; position: relative; z-index: 2; margin-top: 90px; padding: 48px 26px 110px; border-top: 1px solid var(--line); }
.foot p { margin: 0; font-size: clamp(32px, 6vw, 72px); line-height: 0.9; letter-spacing: -0.07em; font-weight: 800; text-transform: uppercase; }
.foot ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 28px 0 0; padding: 0; list-style: none; font: 11px "DM Mono", monospace; letter-spacing: 0.18em; text-transform: uppercase; }
.foot a { color: #c2c2bd; text-decoration: none; border-bottom: 1px solid var(--line); }
.foot a:hover { color: #fff; border-color: #fff; }

@media (max-width: 900px) { .grid { columns: 2; } }
@media (max-width: 700px) {
  .home-hero { padding: 110px 16px 40px; }
  .work { padding: 52px 16px 4px; }
  .tabs-inner { justify-content: flex-start; padding: 10px 16px; }
  .foot { padding: 40px 16px 110px; }
  .nav-banner { min-width: 0; }
}
@media (max-width: 480px) { .grid { columns: 1; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tile img { transition: none; } }

/* Navegación de escritorio: cabecera completa en lugar de botones flotantes. */
.brand-name, .nav-link { display: none; }
@media (min-width: 701px) {
  .top-bar {
    top: 0; left: 0; right: 0; height: 72px; padding: 0 clamp(20px, 3vw, 40px); gap: 16px;
    background: rgba(5, 5, 5, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .brand-button { width: 40px; height: 40px; border-radius: 10px; }
  .brand-name {
    display: block; color: #fff; text-decoration: none; font-weight: 800; font-size: 15px;
    letter-spacing: -0.03em; text-transform: uppercase;
  }
  .nav-menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
  .nav-link {
    position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 14px;
    color: var(--muted); text-decoration: none; font: 700 11px "DM Mono", monospace;
    letter-spacing: 0.18em; text-transform: uppercase; transition: color 0.2s;
  }
  .nav-link::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 1px;
    background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
  }
  .nav-link:hover, .nav-link.is-active { color: #fff; }
  .nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
  .nav-menu .nav-banner { min-width: 0; height: 40px; margin-left: 12px; padding: 0 16px; gap: 12px; border-radius: 10px; }
  .nav-banner[aria-current="page"] { background: #fff; color: #050505; border-color: #fff; }
  .tabs { display: none; }
  html { scroll-padding-top: 90px; }
  .home-hero { padding-top: 170px; }
  .about { padding-top: 150px; }
  .about-side { top: 110px; }
}
@media (max-width: 700px) {
  .nav-link { display: flex; align-items: center; height: 44px; padding: 0 14px; color: #fff; text-decoration: none; font: 700 11px "DM Mono", monospace; letter-spacing: 0.18em; text-transform: uppercase; }
}

/* Cabecera móvil: barra sólida con marca, menú a todo el ancho y pestañas que caben. */
@media (max-width: 700px) {
  .top-bar {
    top: 0; left: 0; right: 0; height: 68px; padding: 0 16px; gap: 12px; justify-content: flex-start;
    background: rgba(5, 5, 5, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .brand-button, .burger-button { width: 44px; height: 44px; flex: none; }
  .brand-name {
    display: block; min-width: 0; color: #fff; text-decoration: none; font-weight: 800; font-size: 14px;
    letter-spacing: -0.03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .burger-button { margin-left: auto; }
  .nav-menu {
    top: 68px; left: 0; right: 0; min-width: 0; gap: 0; padding: 8px 16px 16px;
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: rgba(5, 5, 5, 0.97);
  }
  .nav-link { height: 52px; padding: 0 2px; border-bottom: 1px solid var(--line); font-size: 12px; }
  .nav-menu .nav-banner { width: 100%; height: 52px; margin-top: 12px; justify-content: space-between; min-width: 0; }
  .home-hero { padding: 104px 16px 36px; }
  .home-hero .eyebrow { font-size: 10px; line-height: 1.7; letter-spacing: 0.14em; }
  .about { padding-top: 96px; }

  .tabs { top: 68px; }
  .tabs-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 16px; overflow: visible; }
  .tabs a { justify-content: center; height: 38px; padding: 0 4px; font-size: 10px; letter-spacing: 0.08em; border-radius: 10px; }
  .tabs a span, .tabs a sup { display: none; }
  html { scroll-padding-top: 130px; }

}
