:root {
  --bg: #f7f5f0;
  --paper: #ffffff;
  --ink: #1b1a17;
  --muted: #6c685f;
  --line: #e4e0d6;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* Cabecera */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.top__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand__mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--ink); color: var(--bg); font-size: 12px; letter-spacing: .04em;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.nav .nav__cta { color: var(--ink); border: 1px solid var(--line); background: var(--paper); }

/* Portada */
.hero { padding: 96px 0 72px; }
.eyebrow {
  margin: 0 0 18px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
h1, h2 { font-weight: 500; letter-spacing: -0.025em; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 84px); line-height: 1.02; max-width: 14ch; }
h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 46ch; margin: 28px 0 36px; }
.hero__actions, .contact__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; text-decoration: none;
  font-weight: 500; font-size: 15px; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--ghost { border: 1px solid var(--line); background: var(--paper); }
.btn--accent { background: var(--accent); color: #fff; margin-top: 8px; }

/* Proyectos */
.projects { display: grid; gap: 28px; padding-bottom: 48px; }
.project {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 28px;
}
.project--flip .project__shot { order: 2; }

.project__shot {
  display: block; border-radius: var(--radius); overflow: hidden; text-decoration: none;
  background: var(--tint); padding: 14px 14px 0;
  transition: transform .25s ease;
}
a.project__shot:hover { transform: scale(1.01); }
.project__shot img { border-radius: 10px 10px 0 0; box-shadow: 0 10px 30px -12px rgb(0 0 0 / .25); }
.browser {
  display: flex; align-items: center; gap: 6px; padding: 0 4px 10px; font-size: 12px; color: var(--muted);
}
.browser i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 30%, #fff); }
.browser b { font-weight: 500; margin-left: 8px; }
.project__shot--diagram { padding: 0; aspect-ratio: 8 / 5; }
.project__shot--diagram svg { width: 100%; height: 100%; display: block; }
.flow { animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }

.project__body { padding: 8px 8px 8px 0; }
.project--flip .project__body { padding: 8px 0 8px 8px; }
.project__kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 13px; color: var(--accent); background: var(--tint); padding: 4px 12px; border-radius: 999px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.project h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; }
.project__tagline { font-family: var(--serif); font-style: italic; font-size: 22px; margin: 4px 0 14px; color: var(--muted); }
.project p { margin: 0 0 14px; }

.features { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; gap: 8px; }
.features li { position: relative; padding-left: 24px; font-size: 15px; }
.features li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 10px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translateY(-3px);
}
.tags { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.private { font-size: 14px; color: var(--muted); }

/* Sobre mí y contacto */
.about { padding: 72px 0; border-top: 1px solid var(--line); }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.about h2 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.05; }
.about p { color: var(--muted); margin: 0 0 14px; font-size: 17px; }

.contact {
  text-align: center; padding: 64px 24px; margin-bottom: 24px;
  background: var(--ink); color: var(--bg); border-radius: 28px;
}
.contact h2 { font-size: clamp(36px, 5vw, 56px); font-family: var(--serif); font-style: italic; font-weight: 400; }
.contact p { color: #b9b4a8; margin: 8px 0 28px; }
.contact__links { justify-content: center; }
.contact .btn--dark { background: var(--bg); color: var(--ink); }
.contact .btn--ghost { background: transparent; border-color: #4a463f; color: var(--bg); }

.foot { display: flex; justify-content: space-between; padding: 8px 0 40px; font-size: 14px; color: var(--muted); }

/* Móvil */
@media (max-width: 860px) {
  .hero { padding: 56px 0 48px; }
  .project, .about__grid { grid-template-columns: 1fr; gap: 24px; }
  .project { padding: 16px; border-radius: 22px; }
  .project--flip .project__shot { order: 0; }
  .project__body, .project--flip .project__body { padding: 4px; }
  .nav a:not(.nav__cta) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow { animation: none; }
  .btn, .project__shot { transition: none; }
}
