/* calligari.ar - sitio estático, sin build.
   Tipografías self-hosted (Geist + JetBrains Mono), modo claro/oscuro
   automático vía prefers-color-scheme, cero JavaScript. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/plex-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/plex-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1c1a;
  --muted: #5f5f5a;
  --line: #e5e4df;
  --accent: #047857;
  --accent-strong: #065f46;
  --on-accent: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131514;
    --surface: #1a1d1b;
    --text: #e7e7e3;
    --muted: #a2a29c;
    --line: #2b2e2c;
    --accent: #34d399;
    --accent-strong: #6ee7b7;
    --on-accent: #0c1210;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container.narrow {
  max-width: 640px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

/* ---------- Navegación ---------- */

.nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.nav-inner {
  max-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.wordmark:hover {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.hero-grid {
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 44ch;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
}

.btn-secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.avatar-frame {
  width: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
}

.avatar-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Secciones ---------- */

.section {
  padding: 3.25rem 0;
}

.section-compact {
  padding: 2.25rem 0;
}

h2 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 1.75rem;
}

/* ---------- Nota personal ---------- */

.lede {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.25rem;
  max-width: 62ch;
}

.lede:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

/* ---------- Trabajo ---------- */

.work-line {
  color: var(--muted);
  max-width: 64ch;
  margin-bottom: 2rem;
}

/* ---------- Filas ---------- */

.track-group {
  margin-top: 0.5rem;
}

.track-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  padding: 0.875rem 0;
  align-items: baseline;
}

.track-row + .track-row {
  border-top: 1px solid var(--line);
}

.track-org {
  display: block;
  font-weight: 600;
  font-size: 1rem;
}

.track-role {
  display: block;
  color: var(--text);
  font-size: 0.925rem;
  margin-top: 0.15rem;
}

.track-desc {
  color: var(--muted);
  font-size: 0.925rem;
  margin-top: 0.35rem;
  max-width: 62ch;
}

.track-date {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Stack ---------- */

.stack-line {
  color: var(--muted);
  max-width: 68ch;
  line-height: 1.8;
}

/* ---------- Contacto ---------- */

.contact-email {
  display: inline-block;
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.2rem;
  transition: color 0.2s ease;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-rows {
  display: grid;
  gap: 0.25rem;
  max-width: 560px;
}

.contact-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  align-items: baseline;
}

.contact-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-sep::after {
  content: "/";
  color: var(--muted);
  margin: 0 0.5rem;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1080px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Motion (solo load-in, respeta reduced-motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-text > * {
    animation: rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero-text > *:nth-child(2) { animation-delay: 0.06s; }
  .hero-text > *:nth-child(3) { animation-delay: 0.12s; }
  .hero-text > *:nth-child(4) { animation-delay: 0.18s; }
  .hero-media {
    animation: rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  .hero {
    padding-top: 3.5rem;
    padding-bottom: 3rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .hero-media {
    order: -1;
  }

  .avatar-frame {
    width: 140px;
  }

  .section {
    padding: 2.5rem 0;
  }

  .track-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .nav-links {
    gap: 1.1rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }
}
