@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #efeee8;
  --fg: #1b1c1a;
  --muted: #62635c;
  --line: #dddbd2;
  --accent: #25695a;
  --on-accent: #ffffff;
  --sun: none;
  --moon: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141513;
    --surface: #1e1f1c;
    --fg: #eeede8;
    --muted: #a09f97;
    --line: #2f302c;
    --accent: #84c9b5;
    --on-accent: #10231e;
    --sun: block;
    --moon: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141513;
  --surface: #1e1f1c;
  --fg: #eeede8;
  --muted: #a09f97;
  --line: #2f302c;
  --accent: #84c9b5;
  --on-accent: #10231e;
  --sun: block;
  --moon: none;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* Barra superior */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -.02em;
}

.theme {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, background-color .15s;
}

@media (hover: hover) {
  .theme:hover { color: var(--fg); background: var(--surface); }
}

.theme svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme .sun { display: var(--sun); }
.theme .moon { display: var(--moon); }

/* Presentación */
.hero { padding: 72px 0 8px; }

h1 {
  margin: 0;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: clamp(3rem, 13vw, 4.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.035em;
}

.role {
  margin: 20px 0 0;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--accent);
}

.bio {
  max-width: 54ch;
  margin: 16px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: border-color .15s, background-color .15s, opacity .15s;
}

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

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

.btn.primary:hover { opacity: .88; }

/* Secciones */
section { margin-top: 64px; }
.hero { margin-top: 0; }

h2 {
  margin: 0 0 16px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.015em;
}

/* Qué hago */
.skills {
  display: grid;
  gap: 20px;
  margin: 0;
}

.skills dt { font-weight: 600; }
.skills dd { margin: 2px 0 0; color: var(--muted); font-size: 1rem; }

/* Proyectos */
.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.projects li { border-top: 1px solid var(--line); }

.projects a {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  align-items: baseline;
  padding: 16px 0;
}

.projects .name {
  font-weight: 600;
  transition: color .15s;
}

.projects a:hover .name { color: var(--accent); }

.projects .tag {
  grid-column: 2;
  grid-row: 1;
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
}

.projects .desc {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: var(--muted);
  font-size: 1rem;
}

/* Herramientas */
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tools li {
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--surface);
  font-size: .9375rem;
}

/* Pie */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9375rem;
}

.foot p { margin: 0; }

@media (min-width: 620px) {
  .wrap { padding: 32px 24px 48px; }
  .hero { padding-top: 104px; }
  .skills { grid-template-columns: repeat(3, 1fr); gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
