:root {
  --bg: #0a0f1a;
  --surface: #0d1420;
  --border: #1d2636;
  --text: #e6edf7;
  --muted: #8fa0ba;
  --accent: #38e8c8;
  --accent-2: #f0b429;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

.site-header,
main,
.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  z-index: 100;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  text-decoration: none;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.hero {
  padding: 2rem 0 1.5rem;
}

.hero-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  /* The face sits in the upper half of a 448x532 portrait; bias the crop up. */
  object-position: 50% 22%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.hero-sub {
  color: var(--muted);
}

.hero-bio {
  color: var(--muted);
}

.hero-intro {
  color: var(--muted);
  max-width: 62ch;
  margin-top: 1.25rem;
}

.coffee {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  /* Matches the button on examen.flyingcrispy.com.ar; near-black text keeps
     it readable on the light end of the gradient (white would be ~1.9:1). */
  background-image: linear-gradient(to right, #facc15, #f97316);
  color: #111827;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.25), 0 4px 6px -4px rgb(0 0 0 / 0.25);
  transition: transform 0.15s ease, background-image 0.15s ease;
}

.coffee:hover {
  background-image: linear-gradient(to right, #eab308, #ea580c);
  transform: scale(1.05);
}

.coffee-cup {
  font-size: 1.1em;
  line-height: 1;
}

@media (min-width: 640px) {
  .hero-head {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.75rem;
  }

  .avatar {
    width: 152px;
    height: 152px;
  }
}

.section-title {
  font-size: 1.1rem;
  margin: 2rem 0 1rem;
}

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

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid--fallback {
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 85%, var(--accent) 15%);
}

.card--alt {
  border-left-color: var(--accent-2);
}

.card--video img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.card-title {
  margin: 0.5rem 0 0.25rem;
}

.card-desc {
  color: var(--muted);
  flex: 1;
}

.card-cta {
  color: var(--accent);
  font-weight: 600;
}

.card-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.card-link:hover {
  color: var(--accent-2);
}

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skeleton {
  min-height: 8rem;
  background: var(--surface);
  border-radius: 6px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.25rem 3rem;
  color: var(--muted);
}

.site-footer a {
  text-decoration: none;
}

.footer-note {
  width: 100%;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }

  * {
    transition: none;
  }

  .coffee:hover {
    transform: none;
  }
}
