/* Portfolio — estilo minimalista, sin frameworks. */

:root {
  --bg: #ffffff;
  --text: #1f2328;
  --muted: #59636e;
  --accent: #0b64c4;
  --border: #d8dee4;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171b22;
    --text: #e6e9ef;
    --muted: #98a1ad;
    --accent: #6cb2ff;
    --border: #2c3441;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

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

a:hover {
  text-decoration: underline;
}

h1, h2 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.35rem;
  margin: 0;
}

h2 {
  font-size: 1.05rem;
  margin: 3rem 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
}

/* --- Cabecera --- */

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

header.site nav {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

header.site nav a {
  color: var(--muted);
}

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

.subtitle {
  color: var(--muted);
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

/* --- Intro --- */

.intro {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 2.5rem;
}

.intro img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.intro p {
  margin: 0 0 0.9rem;
}

.intro p:last-child {
  margin-bottom: 0;
}

/* --- Proyectos --- */

.project {
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
}

.project:last-child {
  border-bottom: 1px solid var(--border);
}

.project h3 {
  font-size: 1rem;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.project .award {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0 0.55rem;
  white-space: nowrap;
}

.project .status {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 0.55rem;
  white-space: nowrap;
}

.project p {
  margin: 0.4rem 0;
}

.project .meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.project .links {
  display: flex;
  gap: 0.9rem;
}

/* --- Listas compactas (educación, experiencia, idiomas) --- */

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rows li {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
}

.rows .what {
  min-width: 0;
}

.rows .detail {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.rows .when {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.85rem;
}

.rows .when a + a {
  margin-left: 0.7rem;
}

/* --- Pie --- */

footer.site {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

footer.site .contact {
  display: flex;
  gap: 1rem;
}

@media (max-width: 480px) {
  .intro {
    flex-direction: column;
  }

  .rows li {
    flex-direction: column;
    gap: 0;
  }
}
