:root{
  --bg:#0b0b0e;
  --ink:#f2f2f6;
  --muted:rgba(242,242,246,.65);
  --line:rgba(255,255,255,.35);

  --max: 1440px;
  --side: 260px;
  --gap: 36px;

  --mono: ui-monospace, Menlo, Consolas, monospace;
  --display: "Jacquard 24", serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--mono);
}

a, a:visited, a:active{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,.45);
}
a:hover{ border-bottom-style: solid; }

button{
  font-family:inherit;
  color:inherit;
  background:none;
  border:none;
}

.small{ font-size:12px; color: var(--muted); }

.bg{
  position:fixed;
  inset:-80px;
  pointer-events:none;
  background:
    repeating-linear-gradient(0deg,rgba(255,255,255,.06) 0 1px,transparent 1px 14px),
    repeating-linear-gradient(90deg,rgba(255,255,255,.06) 0 1px,transparent 1px 14px);
  z-index:0;
  will-change: transform;
}

/* TOPBAR MOBILE */
.topbar{
  position: fixed;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100vw;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg), transparent 10%);
  backdrop-filter: blur(6px);
}
.topbarTitle{ display:grid; gap:2px; }
.topbarH1{
  font-family: var(--display);
  font-size: 34px;
  line-height: .9;
}
.topbarSub{ font-size: 12px; color: var(--muted); }

.hamb{
  border: 1px solid var(--line);
  padding: 8px 10px;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
}
.hambIcon{
  width: 16px;
  height: 12px;
  display:inline-block;
  position: relative;
}
.hambIcon::before,
.hambIcon::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height:1px;
  background: var(--ink);
}
.hambIcon::before{ top:0; box-shadow: 0 5px 0 var(--ink), 0 10px 0 var(--ink); }
.hambText{ font-size:12px; letter-spacing:.08em; text-transform:uppercase; }

/* mobile default layout */
.wrap{
  position:relative;
  z-index:1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px 80px;
}

.main{
  padding-bottom: 140px;
}

/* SIDEBAR AS DRAWER (mobile) */
.sidebar{
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(88vw, 340px);
  z-index: 40;
  background: var(--bg);
  border-right: 1px solid var(--line);
  transform: translateX(-101%);
  transition: transform 180ms ease;
  overflow: auto;
  padding: 100px 16px 40px;
}

body.menuOpen .sidebar{
  transform: translateX(0);
  padding-top: 100px;
}

.sb-pad{ padding: 0; }

/* hide desktop header on mobile? no, lo dejamos, pero arriba está topbar */
.header{
  padding: 100px 0 100px;
  border-bottom: 1px solid var(--line);
}
.header h1{
  font-family: var(--display);
  font-weight: 400;
  margin:0;
  width:100%;
  max-inline-size:100%;
  font-size: clamp(250px, 9vw, 152px);
  line-height: 0.82;
  overflow-wrap:anywhere;
  word-break:break-word;
  text-wrap: balance;
  padding-bottom: 25px;
}
@media (max-width: 420px){
  .header h1{
    font-size: clamp(56px, 14vw, 88px);
    line-height: 0.88;
  }
}
.subtitle{ margin:8px 0 0; color:var(--muted); text-align: right;}

.sb-section{ margin-bottom: 52px; }
.list{ margin:0; padding-left:18px; }
.entries{ margin:0; padding-left:18px; }
.meta{ display:block; font-size:11px; color:var(--muted); }
.archive{ display:inline-block; margin-top: 8px; font-size:12px; }
.sb-footer{ padding-top: 14px; }

.hd{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin: 0 0 10px;
}

/* === BLOQUES === */
.block{ margin-top:56px; }
.subhead{
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 52px);
  line-height:1;
  margin:0 0 18px;
}

/* HERO */
.heroCard{ display:block; border: 1px solid var(--line); }
.heroCard img{ width:100%; height:320px; object-fit:cover; display:block; }
.heroCap{
  padding:10px 12px;
  border-top:1px solid var(--line);
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.heroMeta{ white-space: nowrap; }

/* tags */
.tags{ display:flex; flex-wrap:wrap; gap:6px; }
.tag{
  border:1px solid var(--line);
  padding:4px 8px;
  cursor:pointer;
  font-size:12px;
}
.tag.isActive{ background: var(--ink); color: var(--bg); }
.tag:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }

/* photos */
.photos{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:12px;
  margin-top:16px;
}
.photo{ display:block; border: 1px solid var(--line); }
.photo img{ width:100%; height:200px; object-fit:cover; display:block; }
.caption{
  padding:8px 10px;
  border-top:1px solid var(--line);
  font-size:12px;
  color:var(--muted);
}

/* =========================
   ÚLTIMOS DE AHORA (LISTA)
   ========================= */

.nowList{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* 2 columnas en desktop */
@media (min-width: 900px){
  .nowList{
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
  }
}

.nowRow{
  display:grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  padding: 10px;
  background: transparent;
}

/* hover coherente */
.nowRow:hover{
  border-color: rgba(255,255,255,.6);
}

.nowPortrait{
  width: 96px;
  height: 140px;
  object-fit: cover;
  display:block;
  border: 1px solid var(--line);
}

/* un poco más grande en desktop */
@media (min-width: 900px){
  .nowPortrait{
    width: 104px;
    height: 156px;
  }
}

.nowInfo{
  display:grid;
  gap: 6px;
}

.nowCat{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.nowTitle{
  font-size: 14px;
  color: var(--ink);
}



/* guestbook */
.gbTabs{ display:flex; gap:8px; margin-bottom:12px; }
.gbTab{ border:1px solid var(--line); padding:4px 10px; cursor:pointer; font-size:12px; }
.gbTab.isActive{ background: var(--ink); color: var(--bg); }
.gbPane{ display:none; }
.gbPane.isShown{ display:block; }
.embed{ width:100%; height:420px; border:1px solid var(--line); background:#000; }

/* footer */
.footer{ margin-top:70px; }
.footerLine{ border-top:1px solid var(--line); margin-bottom:12px; }
.footerGrid{
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  justify-content:space-between;
  align-items:center;
}

/* ===== DESKTOP: vuelve el layout original, oculta topbar/drawer ===== */
@media (min-width: 920px){
  .topbar{ display:none; }
  .overlay{ display:none; }

  body{ overflow:hidden; padding-top: 0; }

  .wrap{
    position:fixed;
    inset:0;
    max-width: var(--max);
    margin:auto;
    display:grid;
    grid-template-columns: var(--side) 1fr;
    gap: var(--gap);
    padding: 32px 28px;
  }

  .sidebar{
    position: relative;
    transform: none;
    width: auto;
    z-index: 1;
    background: transparent;
    border-right: 1px solid var(--line);
    padding: 0;
  }

  .sb-pad{
    padding-top: 350px;
    padding-right: 22px;
    padding-bottom: 40px;
  }

  .main{
    overflow:auto;
    padding-bottom: 240px;
    scrollbar-width: none;
  }
  .main::-webkit-scrollbar{ width:0; height:0; }
}


@media (max-width: 719px){

  .heroCard img{
    height: 200px;     
  }
  .photos{
    grid-template-columns: 1fr;
  }
  .heroCard{
    border: 1px solid var(--line);
  }
}
