:root {
  --fg: #111111;
  --bg: #ffffff;
  --ink: var(--fg);
  --muted: #555555;
  --border: #eaeaea;
  --max: 920px;
  --pad: clamp(18px, 3vw, 36px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

nav a:hover { color: var(--ink); }

nav a.active {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

main { padding: 40px 0 90px; }

h1, h2, h3 {
  margin: 0 0 10px 0;
  font-weight: 600;
  line-height: 1.25;
}

h1 {
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.02;
  margin: 0 0 18px 0;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 18px;
  letter-spacing: -0.1px;
}

p { margin: 0 0 12px 0; }

a { color: #b000b5; }

a:hover { text-decoration: underline; }

/* External-link cue in article content: show a small icon only for off-site links. */
main p a[href^="http://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main p a[href^="https://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main li a[href^="http://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main li a[href^="https://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main blockquote a[href^="http://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main blockquote a[href^="https://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main h1 a[href^="http://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main h1 a[href^="https://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main h2 a[href^="http://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main h2 a[href^="https://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main h3 a[href^="http://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main h3 a[href^="https://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main h4 a[href^="http://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after,
main h4 a[href^="https://"]:not([href*="domingogallardo.site"]):not([href*="localhost"]):not([href*="127.0.0.1"])::after {
  content: "";
  display: inline-block;
  width: 0.78em;
  height: 0.78em;
  margin-left: 0.14em;
  vertical-align: 0.02em;
  opacity: 0.62;
  pointer-events: none;
  text-decoration: none;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 2.5h4v4'/%3E%3Cpath d='M8.5 7.5l5-5'/%3E%3Cpath d='M7 3H3.5A1.5 1.5 0 0 0 2 4.5v8A1.5 1.5 0 0 0 3.5 14h8a1.5 1.5 0 0 0 1.5-1.5V9'/%3E%3C/svg%3E");
}

.subtitle {
  color: var(--muted);
  margin-bottom: 16px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding-top: 28px;
  margin-top: 28px;
  border-top: 1px solid var(--border);
}

.section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.list {
  margin: 0;
  padding-left: 18px;
}

.list li {
  margin: 8px 0;
}

.posts-year-group + .posts-year-group {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.posts-year-heading {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.posts-year-list {
  margin-top: 0;
}

.post-tags {
  margin-left: 8px;
}

.post-tag {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  vertical-align: middle;
  text-decoration: none;
}

.post-tag:hover {
  color: var(--ink);
  text-decoration: none;
  border-color: #d6d6d6;
}

.inline-links a {
  color: var(--muted);
  text-decoration: none;
}

.inline-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.pub-links a {
  color: #0b57d0;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  margin-left: 0;
}

h1 .first { font-weight: 850; }
h1 .last { font-weight: 250; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: start;
}

.about-photo img {
  width: 100%;
  border-radius: 6px;
}

@media (max-width: 760px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo img {
    max-width: 220px;
  }
}

.pub-links a:hover { color: #073b8c; }

.footer {
  margin-top: 60px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .top {
    flex-direction: column;
    align-items: stretch;
  }

  .top nav {
    width: 100%;
  }

  .top nav ul {
    justify-content: flex-end;
    padding-right: 8px;
  }
}

article blockquote {
  margin: 1rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 4px solid #d6d6d6; /* línea vertical */
  color: var(--muted);
}

article blockquote p {
  margin: 0 0 0.6rem 0;
}

article blockquote p:last-child {
  margin-bottom: 0;
}
