/* 01. Diseño: colores, tipografía y escala de espaciado. */
:root {
  --paper: #faf9f6;
  --white: #ffffff;
  --ink: #1e2928;
  --muted: #626b67;
  --accent: #b74628;
  --line: #dedfd8;
  --soft: #efeee8;
  --heading: "Manrope", sans-serif;
  --body: "DM Sans", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.7 var(--body);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
}
h3 {
  font-size: 1.65rem;
  letter-spacing: -0.045em;
}
em {
  color: var(--accent);
  font-style: normal;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
[hidden] {
  display: none !important;
}
.container {
  width: min(1248px, calc(100% - 96px));
  margin-inline: auto;
}
.section {
  padding-block: 112px;
}
.eyebrow {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 16px;
  padding: 12px 20px;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}
.skip-link:focus {
  transform: translateY(0);
}

/* 02. Navegación: fija al desplazarse, con menú móvil accesible. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(250 249 246 / 96%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.navigation {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}
.monogram {
  font: 800 2.6rem/1 var(--heading);
  letter-spacing: -0.12em;
}
.monogram span {
  color: var(--accent);
}
.brand-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
}
.brand-name span {
  display: block;
  font-size: 0.57rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.83rem;
  font-weight: 500;
  padding-block: 10px;
}
.nav-links a:hover,
.nav-links .active {
  color: var(--accent);
}
.nav-links .nav-contact {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 11px 19px;
  border: 1px solid var(--ink);
  border-radius: 4px;
}
.nav-contact svg {
  width: 17px;
  height: 17px;
}
.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--ink);
  margin-block: 6px;
  transition: transform 0.2s;
}

/* 03. Presentación: retícula de texto e imagen con proporciones estables. */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 72px;
  align-items: center;
  padding-block: 72px 80px;
}
.hero-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}
.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}
.hero h1 {
  font-size: clamp(3.5rem, 5.9vw, 5.3rem);
  margin-block: 26px 24px;
  line-height: 1.04;
}
.hero-description {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 430px;
  line-height: 1.7;
}
.hero-role {
  max-width: 430px;
  font-size: 0.78rem;
  margin-top: 16px;
}
.hero-actions {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 18px 23px;
  border-radius: 4px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.button-dark {
  background: var(--ink);
  color: white;
}
.button-dark:hover {
  background: #354340;
  transform: translateY(-2px);
}
.button svg {
  width: 18px;
  height: 18px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 500;
}
.text-link:hover {
  color: var(--accent);
}
.text-link svg {
  width: 18px;
  height: 18px;
}
.hero-location {
  font-size: 0.7rem;
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}
.location-dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  position: relative;
}
.location-dot::after {
  content: "";
  width: 2px;
  height: 2px;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  background: var(--muted);
}
.hero-portrait {
  position: relative;
  margin-right: 16px;
}
.hero-portrait img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 160px 160px 12px 12px;
}
.hero-portrait figcaption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--paper);
  border-radius: 7px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.77rem;
  line-height: 1.5;
  gap: 12px;
}
.hero-portrait figcaption strong {
  font-weight: 600;
}
.hero-portrait figcaption svg {
  color: var(--accent);
  width: 28px;
  height: 28px;
}
.portrait-label {
  position: absolute;
  right: -36px;
  top: 46%;
  writing-mode: vertical-rl;
  letter-spacing: 0.15em;
  font-size: 0.58rem;
}
.principles {
  border-block: 1px solid var(--line);
}
.principles ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-block: 24px;
}
.principles li {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.76rem;
}
.principles li::before {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent);
}

/* 04. Proyectos: contenido estático; JavaScript solo filtra la lista. */
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}
.section-heading h2 {
  margin-top: 18px;
}
.section-heading > p {
  color: var(--muted);
  font-size: 0.86rem;
  padding-bottom: 6px;
}
.project-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}
.project-filters button {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 9px 15px;
  color: var(--muted);
  background: transparent;
  font-size: 0.77rem;
}
.project-filters button span {
  font-size: 0.6rem;
  margin-left: 9px;
}
.project-filters button[aria-pressed="true"] {
  border-color: var(--ink);
  color: var(--ink);
}
.project-filters button:hover {
  background: var(--soft);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.project-card {
  min-width: 0;
}
.blue {
  --project-bg: #e5eafa;
}
.sand {
  --project-bg: #ece6db;
}
.mint {
  --project-bg: #e6ede1;
}
.project-image {
  display: block;
  background: var(--project-bg);
  padding: 25px 18px 25px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.browser-bar {
  display: flex;
  height: 22px;
  align-items: center;
  gap: 3px;
  padding-inline: 8px;
  background: white;
  border-radius: 4px 4px 0 0;
}
.browser-bar i {
  width: 3px;
  height: 3px;
  background: #c7cbc7;
  border-radius: 50%;
}
.browser-bar > span {
  margin-left: auto;
  margin-right: auto;
  font-size: 0.4rem;
  color: #65706a;
}
.project-image img {
  width: 100%;
  aspect-ratio: 1.5;
  object-fit: cover;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 8px 20px rgb(30 41 40 / 5%);
  transition: transform 0.4s;
}
.project-image:hover img {
  transform: scale(1.025);
}
.image-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: var(--paper);
  border-radius: 50%;
}
.image-arrow svg {
  width: 18px;
  height: 18px;
}
.project-info {
  padding-top: 22px;
}
.project-category {
  display: flex;
  justify-content: space-between;
  font-size: 0.59rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  gap: 8px;
}
.project-category span {
  color: var(--muted);
  text-align: right;
}
.project-info h3 {
  margin-block: 12px;
}
.project-info h3 a:hover {
  color: var(--accent);
}
.project-info > p:not(.project-category) {
  font-size: 0.82rem;
  color: var(--muted);
  min-height: 68px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.tags li {
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 0.62rem;
  line-height: 1.8;
}
.project-links {
  display: flex;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}
.project-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 600;
}
.project-links svg {
  width: 16px;
  height: 16px;
}
.project-links a:hover {
  color: var(--accent);
}
.all-repositories {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  margin-top: 56px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.all-repositories:hover {
  color: var(--accent);
}

/* 05. Perfil y tecnologías: agrupación, jerarquía y espacio. */
.about {
  background: var(--soft);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 104px;
}
.about h2 {
  margin-top: 24px;
  font-size: clamp(2.3rem, 3.9vw, 3.5rem);
}
.about-signature {
  font-family: var(--heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  margin-top: 40px;
}
.about-signature span {
  color: var(--accent);
  margin-left: 10px;
}
.about-copy .lead {
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink);
}
.about-copy > p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.91rem;
}
.about-copy > p:first-child {
  margin-top: 0;
}
.about-copy strong {
  font-weight: 500;
  color: var(--ink);
}
.about-facts {
  margin: 32px 0 0;
}
.about-facts > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  border-top: 1px solid #d6d7d0;
  padding-block: 13px;
  font-size: 0.75rem;
}
.about-facts dt {
  color: var(--muted);
}
.about-facts dd {
  margin: 0;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.skills-grid article {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.skill-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent);
  margin-bottom: 24px;
}
.skills-grid h3 {
  font-size: 1.4rem;
}
.skills-grid p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 16px;
  min-height: 58px;
  max-width: 310px;
}
.skills-grid .tags {
  margin-top: 24px;
}

/* 06. Contacto y footer: enlaces directos, sin formularios de envío ficticio. */
.contact {
  background: var(--ink);
  color: var(--paper);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.contact .eyebrow {
  color: #c9cec7;
}
.contact h2 {
  margin-top: 24px;
}
.contact em {
  color: #e9ac91;
}
.contact :focus-visible {
  outline-color: #ffffff;
}
.contact-copy > p:first-child {
  color: #c9cec7;
  font-size: 1rem;
  max-width: 380px;
}
.contact-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #62706b;
  padding-block: 24px 16px;
  margin-bottom: 24px;
  font-size: clamp(0.85rem, 1.5vw, 1.16rem);
}
.contact-email:hover {
  color: #e9ac91;
}
.contact-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.contact-links a,
.copy-email {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.74rem;
}
.contact-links svg {
  width: 15px;
  height: 15px;
}
.copy-email {
  padding: 0;
  border: 0;
  color: var(--paper);
  background: transparent;
}
.copy-email:hover,
.contact-links a:hover {
  color: #e9ac91;
}
.copy-status {
  font-size: 0.73rem;
  color: #e9ac91;
  min-height: 24px;
  margin-top: 12px;
}
.site-footer {
  padding-block: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 32px;
}
.footer-brand {
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.footer-brand span {
  display: block;
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 4px;
}
.footer-grid nav {
  display: flex;
  justify-content: center;
  gap: 22px;
}
.footer-grid nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
}
.footer-grid nav a:hover {
  color: var(--accent);
}
.footer-grid nav svg {
  width: 15px;
  height: 15px;
}
.footer-grid > p {
  color: var(--muted);
  font-size: 0.65rem;
  text-align: right;
  line-height: 1.8;
}

/* 07. Páginas de proyecto: el caso está completo en HTML. */
.case-hero {
  padding-block: 32px 64px;
}
.breadcrumbs {
  display: flex;
  gap: 16px;
  font-size: 0.73rem;
  color: var(--muted);
  margin-bottom: 56px;
}
.breadcrumbs a:hover {
  color: var(--accent);
}
.case-hero h1 {
  font-size: clamp(3.2rem, 6vw, 5.3rem);
  margin-top: 20px;
}
.case-hero h1 span {
  display: block;
  max-width: 900px;
  font-size: clamp(1.9rem, 3.3vw, 3rem);
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.25;
  letter-spacing: -0.04em;
}
.case-intro {
  max-width: 660px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 24px;
}
.case-image {
  padding: 48px 72px 20px;
  background: var(--project-bg);
  border-radius: 8px;
}
.case-image img {
  width: 100%;
  border-radius: 5px;
}
.case-image figcaption {
  margin-top: 20px;
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
}
.case-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
}
.case-sidebar h2 {
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}
.case-sidebar dl {
  margin-top: 28px;
  font-size: 0.85rem;
}
.case-sidebar dt {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 24px;
}
.case-sidebar dd {
  margin: 4px 0 0;
}
.case-story article + article {
  margin-top: 56px;
}
.case-story h2 {
  margin-block: 16px 20px;
  font-size: 2rem;
}
.case-story article > p:not(.eyebrow) {
  color: var(--muted);
}
.feature-list {
  list-style: disc;
  padding-left: 20px;
  color: var(--muted);
}
.feature-list li {
  margin-block: 10px;
  padding-left: 8px;
}
.feature-list li::marker {
  color: var(--accent);
}
.next-project {
  border-top: 1px solid var(--line);
  padding-block: 48px 80px;
}
.next-project > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font: 600 clamp(2.4rem, 4vw, 3.4rem)/1.2 var(--heading);
  letter-spacing: -0.05em;
}
.next-project svg {
  width: 40px;
  height: 40px;
}
.next-project > a:hover {
  color: var(--accent);
}

/* 08. Movimiento progresivo: todo permanece visible sin JavaScript. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready {
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity 0.65s ease,
      transform 0.65s ease;
  }
  .reveal-ready.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* 09. Adaptación: retícula flexible y controles con espacio para tocar. */
@media (max-width: 1100px) {
  .container {
    width: calc(100% - 64px);
  }
  .hero {
    gap: 40px;
  }
  .hero h1 {
    font-size: 4rem;
  }
  .hero-actions {
    gap: 20px;
  }
  .about-grid {
    gap: 48px;
  }
  .nav-links {
    gap: 22px;
  }
  .project-grid {
    gap: 20px;
  }
  .project-category {
    flex-direction: column;
  }
  .project-category span {
    text-align: left;
  }
}
@media (max-width: 800px) {
  .container {
    width: calc(100% - 48px);
  }
  .navigation {
    min-height: 80px;
    flex-wrap: wrap;
    gap: 0;
  }
  .brand-name {
    font-size: 0.7rem;
  }
  .monogram {
    font-size: 2.3rem;
  }
  .nav-links {
    width: 100%;
    justify-content: space-between;
    padding-block: 12px 20px;
  }
  .js .menu-toggle {
    display: block;
  }
  .js .nav-links {
    display: none;
  }
  .js .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .js .nav-links a {
    display: flex;
    min-height: 48px;
    align-items: center;
  }
  .js .nav-contact {
    margin-top: 12px;
    justify-content: space-between;
  }
  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }
  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }
  .hero {
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    padding-block: 56px;
  }
  .hero h1 {
    font-size: 3.1rem;
  }
  .hero-description {
    font-size: 0.96rem;
  }
  .hero-portrait {
    margin-right: 8px;
  }
  .hero-portrait img {
    aspect-ratio: 1/1.3;
    border-radius: 100px 100px 8px 8px;
  }
  .hero-portrait figcaption {
    left: 12px;
    right: 12px;
    bottom: 12px;
    font-size: 0.62rem;
    padding: 12px;
  }
  .hero-portrait figcaption svg {
    display: none;
  }
  .portrait-label {
    right: -24px;
  }
  .principles ul {
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
  }
  .section {
    padding-block: 80px;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 24px;
  }
  .project-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
  }
  .project-category {
    flex-direction: row;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-signature {
    display: none;
  }
  .about h2 br:last-of-type {
    display: none;
  }
  .skills-grid {
    gap: 24px;
  }
  .skills-grid h3 {
    font-size: 1.2rem;
  }
  .skills-grid p {
    min-height: 90px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-copy {
    max-width: 520px;
  }
  .footer-grid {
    grid-template-columns: 1fr auto;
  }
  .footer-grid nav {
    justify-content: end;
  }
  .footer-grid > p {
    grid-column: 1/-1;
    text-align: left;
  }
  .case-image {
    padding: 28px 28px 20px;
  }
  .case-content {
    gap: 40px;
    grid-template-columns: 1fr 2fr;
  }
}
@media (max-width: 600px) {
  .container {
    width: calc(100% - 40px);
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 40px 48px;
  }
  .hero h1 {
    font-size: clamp(3.15rem, 12vw, 4rem);
    margin-block: 24px;
  }
  .hero .eyebrow {
    font-size: 0.62rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .hero-role {
    font-size: 0.74rem;
  }
  .hero-actions {
    gap: 24px;
  }
  .button {
    padding: 16px 18px;
    font-size: 0.75rem;
    gap: 18px;
  }
  .text-link {
    font-size: 0.75rem;
  }
  .hero-location {
    margin-top: 28px;
  }
  .hero-portrait {
    width: min(100%, 380px);
    margin: 0 auto;
  }
  .hero-portrait img {
    aspect-ratio: 1/1.04;
    border-radius: 130px 130px 8px 8px;
  }
  .hero-portrait figcaption {
    font-size: 0.72rem;
    padding: 14px 18px;
  }
  .hero-portrait figcaption svg {
    display: block;
  }
  .portrait-label {
    display: none;
  }
  .principles ul {
    gap: 14px;
    padding-block: 20px;
  }
  .principles li {
    font-size: 0.62rem;
    gap: 9px;
  }
  .section {
    padding-block: 64px;
  }
  h2 {
    font-size: 2.4rem;
  }
  .section-heading > p {
    font-size: 0.8rem;
  }
  .section-heading > p br {
    display: none;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .project-image {
    padding: 25px 22px;
  }
  .project-info > p:not(.project-category) {
    min-height: 0;
  }
  .project-category {
    font-size: 0.62rem;
  }
  .project-filters {
    gap: 3px;
  }
  .project-filters button {
    padding-inline: 12px;
  }
  .project-filters button span {
    margin-left: 5px;
  }
  .all-repositories {
    margin-top: 40px;
    font-size: 0.72rem;
  }
  .about-copy .lead {
    font-size: 1.2rem;
  }
  .about-facts > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .skills-grid h3 {
    font-size: 1.45rem;
  }
  .skills-grid p {
    min-height: 0;
    max-width: 100%;
  }
  .contact-links {
    gap: 22px;
  }
  .contact-email {
    font-size: clamp(0.72rem, 3.6vw, 1rem);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-grid nav {
    justify-content: start;
  }
  .footer-grid > p {
    grid-column: auto;
  }
  .case-hero {
    padding-block: 24px 40px;
  }
  .breadcrumbs {
    margin-bottom: 40px;
  }
  .case-hero h1 {
    font-size: 3rem;
  }
  .case-hero h1 span {
    font-size: 1.9rem;
  }
  .case-image {
    padding: 16px 12px 12px;
  }
  .case-image figcaption {
    font-size: 0.58rem;
  }
  .case-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .case-sidebar dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: baseline;
    gap: 10px;
  }
  .case-sidebar dt,
  .case-sidebar dd {
    margin: 0;
  }
  .case-story h2 {
    font-size: 1.7rem;
  }
  .case-story article + article {
    margin-top: 40px;
  }
  .next-project {
    padding-bottom: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* 10. Idiomas: páginas reales en ES/EN y selector nativo. */
.navigation {
  gap: 24px;
}
.nav-links {
  gap: 24px;
  margin-left: auto;
}
.language-menu {
  position: relative;
  flex: 0 0 auto;
}
.language-menu summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.language-menu summary::-webkit-details-marker {
  display: none;
}
.language-menu summary svg {
  width: 17px;
  height: 17px;
}
.language-menu[open] summary {
  color: var(--accent);
}
.language-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 170px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgb(30 41 40 / 8%);
}
.language-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.8rem;
}
.language-menu a[aria-current] {
  color: var(--accent);
  font-weight: 600;
}
.language-menu a:hover {
  background: var(--soft);
  border-radius: 4px;
}
.footer-grid nav {
  flex-wrap: wrap;
  gap: 10px 18px;
}

/* 11. CV: resumen visual y una versión HTML además del PDF. */
.cv-section {
  background: var(--soft);
}
.cv-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: center;
}
.cv-grid h2 {
  margin-block: 22px;
}
.cv-grid header > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 450px;
  font-size: 0.9rem;
}
.cv-preview {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
}
.cv-preview .eyebrow {
  color: var(--accent);
}
.cv-preview h3 {
  margin-top: 24px;
  font-size: 2rem;
}
.cv-preview h3 span {
  display: block;
  font: 400 0.8rem/1.5 var(--body);
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 10px;
}
.cv-preview ul {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
  font-size: 0.76rem;
  line-height: 2;
}
.cv-download {
  margin-top: 24px;
}
.resume-sheet {
  max-width: 900px;
  margin-bottom: 80px;
  padding: 56px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.resume-sheet > header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.resume-sheet h2 {
  font-size: 2rem;
}
.resume-sheet > header > p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.resume-sheet > header nav {
  margin-top: 12px;
  font-size: 0.85rem;
}
.resume-sheet > section {
  margin-top: 32px;
}
.resume-sheet h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--accent);
}
.resume-sheet p {
  font-size: 0.9rem;
}
.resume-sheet a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.resume-sheet a:hover {
  color: var(--accent);
}
.resume-sheet dl {
  font-size: 0.85rem;
}
.resume-sheet dl > div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  margin-block: 8px;
}
.resume-sheet dd {
  margin: 0;
  color: var(--muted);
}
.resume-sheet article + article {
  margin-top: 22px;
}
.resume-sheet h4 {
  margin: 0 0 8px;
  font-family: var(--heading);
  font-size: 1rem;
}
.resume-sheet article > a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.75rem;
  margin-top: 8px;
}
.resume-sheet article > a svg {
  width: 15px;
  height: 15px;
}

/* 12. Artículos: índice, lectura y ejemplos con desplazamiento propio. */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.article-card {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  min-width: 0;
}
.article-category {
  display: flex;
  justify-content: space-between;
  color: var(--accent);
  font-size: 0.7rem;
  margin-bottom: 20px;
}
.article-category span {
  color: var(--muted);
}
.article-card h3 {
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.article-card h3 a:hover {
  color: var(--accent);
}
.article-card > p:not(.article-category) {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.article-card > .text-link {
  margin-top: auto;
}
.articles-home .section-heading > p {
  max-width: 350px;
}
.article-list {
  padding-top: 0;
}
.article-hero {
  padding-block: 32px 56px;
}
.article-hero h1 {
  font-size: clamp(2.6rem, 4.8vw, 4.5rem);
  max-width: 920px;
  margin-top: 24px;
}
.article-deck {
  max-width: 740px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 1.08rem;
}
.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 24px;
}
.reading-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  gap: 72px;
  padding-bottom: 80px;
}
.article-toc {
  align-self: start;
  position: sticky;
  top: 132px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.article-toc ol {
  margin: 20px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.8rem;
}
.article-toc li {
  padding-left: 5px;
  margin-block: 14px;
}
.article-toc a:hover {
  color: var(--accent);
}
.article-body > section + section {
  margin-top: 48px;
}
.article-body h2 {
  font-size: 1.85rem;
  letter-spacing: -0.04em;
  margin-bottom: 22px;
}
.article-body p {
  margin-block: 16px;
  color: var(--muted);
}
.article-body ul {
  list-style: disc;
  padding-left: 24px;
  color: var(--muted);
}
.article-body li {
  margin-block: 12px;
  padding-left: 5px;
}
.article-body code {
  font:
    0.88em/1.7 Consolas,
    monospace;
  background: var(--soft);
  color: var(--ink);
  padding: 2px 4px;
  border-radius: 3px;
}
.code-example {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin-block: 24px;
}
.code-example figcaption {
  padding: 10px 18px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}
.code-example pre {
  padding: 20px;
  margin: 0;
  overflow-x: auto;
  background: var(--ink);
  color: #f4f4ee;
  font:
    0.8rem/1.8 Consolas,
    monospace;
}
.code-example pre code {
  color: inherit;
  background: transparent;
  padding: 0;
  font-size: inherit;
}
.article-sources {
  background: var(--soft);
  padding: 28px;
  border-radius: 6px;
  margin-top: 48px;
}
.article-sources h2 {
  font-size: 1.3rem;
}
.article-sources ul {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}
.article-sources li {
  padding: 0;
  font-size: 0.8rem;
}
.article-sources li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.article-sources li a svg {
  width: 15px;
  height: 15px;
}

/* 13. Certificados: tipo de documento, emisor y acceso al original. */
.reading-layout > * {
  min-width: 0;
}
.article-hero h1 {
  overflow-wrap: anywhere;
  hyphens: auto;
}
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.certificate-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  min-width: 0;
}
.certificate-card > .eyebrow {
  color: var(--accent);
  margin-bottom: 20px;
}
.certificate-card h3 {
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.035em;
}
.certificate-type {
  font-size: 0.77rem;
  color: var(--muted);
  margin-top: 14px;
}
.certificate-meta {
  font-size: 0.69rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
  margin-bottom: 24px;
}
.certificate-card .text-link {
  font-size: 0.77rem;
  margin-top: auto;
}
.certificate-note {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 24px;
  max-width: 650px;
}
.certificate-list {
  padding-top: 0;
}
@media (max-width: 1000px) {
  .navigation {
    flex-wrap: wrap;
    min-height: 80px;
    gap: 0 14px;
  }
  .language-menu {
    margin-left: auto;
    order: 2;
  }
  .menu-toggle {
    order: 3;
  }
  .nav-links {
    order: 4;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    padding-block: 12px 20px;
  }
  .js .menu-toggle {
    display: block;
  }
  .js .nav-links {
    display: none;
  }
  .js .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .js .nav-links a {
    display: flex;
    min-height: 48px;
    align-items: center;
  }
  .js .nav-contact {
    margin-top: 12px;
    justify-content: space-between;
  }
  .cv-grid {
    gap: 40px;
  }
  .reading-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
  }
}
@media (max-width: 800px) {
  .cv-grid {
    grid-template-columns: 1fr;
  }
  .cv-preview {
    max-width: 540px;
  }
  .articles-grid,
  .certificates-grid {
    grid-template-columns: 1fr 1fr;
  }
  .reading-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .article-toc {
    position: static;
  }
  .article-toc ol {
    columns: 2;
  }
  .article-toc li {
    break-inside: avoid;
  }
  .resume-sheet {
    padding: 40px;
  }
}
@media (max-width: 600px) {
  .brand-name {
    font-size: 0.63rem;
  }
  .brand {
    gap: 10px;
  }
  .navigation {
    column-gap: 8px;
  }
  .language-menu summary {
    padding-inline: 8px;
  }
  .language-menu ul {
    right: -46px;
  }
  .nav-links {
    flex-wrap: wrap;
    gap: 12px;
  }
  .cv-grid h2 {
    font-size: 2.3rem;
  }
  .cv-preview {
    padding: 24px;
  }
  .articles-grid,
  .certificates-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .article-card h3 {
    font-size: 1.6rem;
  }
  .article-hero h1 {
    font-size: 2.5rem;
  }
  .article-deck {
    font-size: 1rem;
  }
  .article-toc ol {
    columns: 1;
  }
  .article-body h2 {
    font-size: 1.6rem;
  }
  .article-body p,
  .article-body li {
    font-size: 0.92rem;
  }
  .article-sources {
    padding: 22px;
  }
  .resume-sheet {
    padding: 24px;
    margin-bottom: 48px;
  }
  .resume-sheet h2 {
    font-size: 1.7rem;
  }
  .resume-sheet dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-block: 16px;
  }
}

/* 14. Datos personales del CV: foto, contactos y listas legibles. */
body.cv-page main,
.cv-preview {
  --ink: #000000;
  --muted: #333333;
  --accent: #000000;
  color: var(--ink);
}
.resume-sheet > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 28px;
  align-items: start;
}
.resume-identity > p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.resume-identity > nav {
  margin-top: 12px;
  font-size: 0.85rem;
}
.resume-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
}
.resume-contact dd {
  overflow-wrap: anywhere;
}
.resume-competencies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.resume-competencies li {
  padding: 6px 12px;
  font-size: 0.82rem;
  background: var(--soft);
  border-radius: 4px;
}
.resume-references {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.resume-references li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}
@media (max-width: 600px) {
  .resume-sheet > header {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .resume-photo {
    grid-row: 1;
    width: 100px;
    height: 100px;
  }
  .resume-references {
    grid-template-columns: 1fr;
  }
}

