/* ============================================================
   studio-carta — starter de retals
   portfolio tipo meowrhino/rikamichie: grid de proyectos,
   sobre mí, contacto. paleta neutra, tipografía cuidada.
   ============================================================ */

:root {
  --bg:      #f8f5f0;   /* fondo principal (off-white cálido) */
  --ink:     #1a1a1a;   /* texto principal */
  --muted:   #6b6b6b;   /* texto secundario */
  --accent:  #ef7d57;   /* acento coral */
  --border:  #d8d4cc;   /* bordes suaves */
  --paper:   #ffffff;   /* fondo de tarjetas */

  --font-mono: 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  --font-body: ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

/* ——— utilidades ——— */
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

/* ——— nav ——— */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.nav__brand {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--ink);
}
.nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav__links a {
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-mono);
}
.nav__links a:hover { color: var(--ink); }

/* ——— hero ——— */
.hero {
  padding: 5rem 2rem 3rem;
  max-width: 900px;
  margin: 0 auto;
}
.hero__title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__desc {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.65;
}

/* ——— secciones ——— */
section {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.section__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

/* ——— grid de proyectos ——— */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.project {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--border);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.project:hover {
  border-color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--ink);
}
.project:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.project__img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
}
.project__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project__body {
  padding: 1rem;
}
.project__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.project__meta {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ——— sobre mí ——— */
.about {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 600px) {
  .about { grid-template-columns: 1fr; }
}
.about__img {
  aspect-ratio: 1;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--muted);
  overflow: hidden;
}
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__text h2 {
  font-size: 1.5rem;
  font-family: var(--font-serif);
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.about__text p { color: var(--muted); margin-bottom: 0.75rem; }
.about__text p:last-child { margin-bottom: 0; }

/* ——— contacto ——— */
.contact p { color: var(--muted); margin-bottom: 0.5rem; }
.contact a { color: var(--accent); text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* ——— footer ——— */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ——— separador ——— */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}
