/* ==========================================================================
   ciroanibal.com — Aire
   Mucho aire, una sola tipografía y un único azul.
   ========================================================================== */

@font-face {
  font-family: "Host Grotesk";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/assets/fonts/HostGrotesk-latin.woff2") format("woff2");
}

:root {
  --bg: #fafaf8;
  --ink: #111214;
  --mute: #66686c;
  --line: #e4e4e0;
  --line-2: #cfcfca;
  --plate: #efefeb;
  --blue: #2a3bd0;
  --blue-deep: #1e2ca8;

  --radius: 28px;
  --wrap: 1296px;
  --gutter: clamp(20px, 5vw, 72px);
  --header-h: 88px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  interpolate-size: allow-keywords;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--line-2) var(--bg);
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Host Grotesk", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  caret-color: var(--blue);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--blue);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border: 3px solid var(--bg);
  border-radius: 999px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

p,
figure,
h1,
h2,
h3,
dl,
dd,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 600;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mute {
  color: var(--mute);
}

.nowrap {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Cabecera y pestañas
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  transition: box-shadow 0.3s var(--ease);
  view-transition-name: site-header;
}
.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line);
}
.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: var(--header-h);
}

.logo {
  display: block;
  padding: 8px 0;
  color: var(--ink);
}
.logo svg {
  width: 92px;
  height: auto;
}

.tabs ul {
  display: flex;
  gap: clamp(18px, 2.3vw, 34px);
}
.tabs ul a {
  position: relative;
  display: block;
  padding: 10px 0;
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.tabs ul a:hover {
  color: var(--ink);
}
.tabs ul a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}
.tab-dot {
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--blue);
  view-transition-name: tab-dot;
}

.lang {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem;
}
.lang a {
  color: var(--mute);
  text-decoration: none;
  padding: 8px 0;
}
.lang a:hover {
  color: var(--ink);
}
.lang [aria-current="true"] {
  color: var(--ink);
  font-weight: 500;
}
.lang--menu {
  display: none;
}

.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.menu-btn .icon {
  width: 18px;
  height: 18px;
}
.menu-btn .icon--close,
.menu-btn[aria-expanded="true"] .icon--open {
  display: none;
}
.menu-btn[aria-expanded="true"] .icon--close {
  display: block;
}

/* --------------------------------------------------------------------------
   Botones y enlaces
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}
.btn:focus-visible {
  border-radius: 999px;
}
.btn .icon {
  transition: transform 0.35s var(--ease);
}
.btn:hover .icon--right {
  transform: translateX(4px);
}
.btn:hover .icon--down {
  transform: translateY(3px);
}
.btn:hover .icon--out {
  transform: translate(2px, -2px);
}
.btn--ink {
  background: var(--ink);
  color: #fff;
}
.btn--ink:hover {
  background: var(--blue);
}
.btn--line {
  border-color: var(--line-2);
  background: transparent;
  color: var(--ink);
}
.btn--line:hover {
  border-color: var(--ink);
}
.btn small {
  color: var(--mute);
  font-size: 0.875rem;
  font-weight: 400;
}

.link-u {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--ink);
  transition:
    color 0.2s var(--ease),
    text-decoration-color 0.2s var(--ease);
}
.link-u:hover {
  color: var(--blue);
  text-decoration-color: var(--blue);
}

/* --------------------------------------------------------------------------
   Inicio
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: clamp(40px, 6.6vw, 96px);
  align-items: start;
  padding-top: clamp(24px, 4.4vw, 64px);
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(3.25rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.lead {
  max-width: 30ch;
  margin-top: 34px;
  color: var(--mute);
  font-size: clamp(1.1875rem, 1.6vw, 1.4375rem);
  line-height: 1.45;
}
.lead strong {
  color: var(--ink);
  font-weight: 500;
}

.wins {
  display: grid;
  gap: 14px;
  margin-top: 46px;
}
.win {
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr);
  align-items: baseline;
  column-gap: 18px;
  font-size: 1.1875rem;
}
.win b {
  color: var(--blue);
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.win__disc {
  color: var(--mute);
  white-space: nowrap;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 50px;
}

.hero__photo {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--plate);
}
.hero__photo {
  aspect-ratio: 4 / 5;
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  padding-top: clamp(96px, 12vw, 176px);
}
.about h2,
.block-title {
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.about__text p {
  max-width: 38ch;
  font-size: clamp(1.1875rem, 1.6vw, 1.4375rem);
  line-height: 1.5;
}
.about__text p + p {
  margin-top: 1em;
}

.index {
  padding-top: clamp(80px, 10vw, 140px);
}
.index a {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
  align-items: center;
  gap: 24px 48px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.index li:last-child a {
  border-bottom: 1px solid var(--line);
}
.index__name {
  font-size: clamp(1.75rem, 3.4vw, 2.875rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
  transition: transform 0.45s var(--ease);
}
.index__desc {
  color: var(--mute);
}
.index .arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition:
    background-color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.index a:hover .index__name {
  transform: translateX(10px);
}
.index a:hover .arrow {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Cabecera de cada pestaña
   -------------------------------------------------------------------------- */

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 32px 64px;
  padding-top: clamp(40px, 6.4vw, 104px);
  padding-bottom: clamp(48px, 6vw, 88px);
}
.page-head h1 {
  font-size: clamp(3rem, 6.4vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.page-head .lead {
  max-width: 36ch;
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Listas con filete (experiencia, formación, datos)
   -------------------------------------------------------------------------- */

.rows > li,
.row {
  border-top: 1px solid var(--line);
}
.rows > li:last-child {
  border-bottom: 1px solid var(--line);
}

.row-grid {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(0, 5fr) minmax(0, 4fr) 48px;
  align-items: start;
  gap: 8px 40px;
  padding: 30px 0;
}
.when {
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.when small {
  display: block;
  font-size: 0.9375rem;
}
.what h3,
.what .title {
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.what .title {
  display: block;
}
.what p,
.what .org {
  display: block;
  margin-top: 4px;
  color: var(--mute);
}
.means {
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 0.9375rem;
  font-weight: 500;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Desplegable de tareas */
.job summary {
  list-style: none;
  cursor: pointer;
}
.job summary::-webkit-details-marker {
  display: none;
}
.job summary:focus-visible {
  outline-offset: 6px;
}
.toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -6px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition:
    background-color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.toggle .icon {
  width: 18px;
  height: 18px;
  transition: rotate 0.4s var(--ease);
}
.job summary:hover .toggle {
  border-color: var(--ink);
}
.job[open] .toggle {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.job[open] .toggle .icon {
  rotate: 45deg;
}
.job::details-content {
  block-size: 0;
  overflow-y: clip;
  transition:
    block-size 0.45s var(--ease),
    content-visibility 0.45s allow-discrete;
}
.job[open]::details-content {
  block-size: auto;
}

.job__body {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(0, 9fr) 48px;
  gap: 0 40px;
  padding-bottom: 36px;
}
.steps {
  grid-column: 2;
  max-width: 68ch;
}
.steps > li {
  padding: 8px 0;
  line-height: 1.55;
}
.steps > li + li {
  margin-top: 6px;
}
.steps ul {
  margin-top: 6px;
}
.steps ul li {
  position: relative;
  padding: 3px 0 3px 22px;
  color: var(--mute);
}
.steps ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.95em;
  width: 8px;
  height: 1px;
  background: currentColor;
}

/* Bloques de datos: categoría + valor */
.block {
  padding-top: clamp(80px, 10vw, 136px);
}
.block-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px 64px;
  margin-bottom: 36px;
}
.block-head p {
  max-width: 40ch;
  color: var(--mute);
}
.specs {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(0, 9fr);
}
.specs dt,
.specs dd {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.specs dt {
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.specs dd {
  padding-left: 40px;
  font-size: 1.125rem;
  line-height: 1.6;
}
.specs dt:nth-last-of-type(1),
.specs dd:last-of-type {
  border-bottom: 1px solid var(--line);
}
.specs dd small {
  color: var(--mute);
  font-size: 1rem;
}
.specs dd a {
  text-decoration-color: var(--line-2);
}
.specs dd a:hover {
  color: var(--blue);
  text-decoration-color: var(--blue);
}

/* --------------------------------------------------------------------------
   Logros
   -------------------------------------------------------------------------- */

.award {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px clamp(40px, 6vw, 96px);
  align-items: start;
  padding: 40px 0 64px;
  border-top: 1px solid var(--line);
}
.award:last-child {
  padding-bottom: 0;
}
.award__pos {
  color: var(--blue);
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.award h2 {
  margin-top: 22px;
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.award .meta {
  margin-top: 8px;
  color: var(--mute);
}
.award__text {
  max-width: 46ch;
  margin-top: 20px;
  font-size: 1.125rem;
}
.award__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.award__photos img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Fotos en blanco y negro, como el retrato; con el ratón encima recuperan el color */
.project__media img,
.award__photos img {
  filter: grayscale(1);
  transition: filter 0.6s var(--ease);
}
@media (hover: hover) {
  .project__media img:hover,
  .award__photos img:hover {
    filter: grayscale(0);
  }
}

/* --------------------------------------------------------------------------
   Proyectos
   -------------------------------------------------------------------------- */

.projects > .project {
  border-top: 1px solid var(--line);
}
.projects > .project:last-child {
  border-bottom: 1px solid var(--line);
}
.project {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas:
    "name info"
    "media media";
  gap: 24px clamp(32px, 5vw, 72px);
  padding: clamp(36px, 4.4vw, 56px) 0 clamp(44px, 5.4vw, 72px);
}
.project__name {
  grid-area: name;
  max-width: 12ch;
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}
.project__info {
  grid-area: info;
  padding-top: 8px;
}
.project .meta {
  color: var(--mute);
}
.project .brief {
  margin-top: 24px;
}
.project .brief h3 {
  color: var(--mute);
  font-size: 0.9375rem;
  font-weight: 400;
}
.project .brief p {
  max-width: 36ch;
  margin-top: 6px;
  font-size: 1.1875rem;
  line-height: 1.5;
}
/* Hueco para fotos o renders: no ocupa nada mientras está vacío */
.project__media {
  grid-area: media;
  margin-top: 16px;
  overflow: hidden;
  border-radius: var(--radius);
}
.project__media:empty {
  display: none;
}
.project__media img {
  width: 100%;
  height: auto;
}
/* Una foto: ancho limitado. Varias: en fila, todas del mismo tamaño */
.project__media:not(.project__media--multi) {
  max-width: 760px;
}
.project__media:not(.project__media--multi) img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project__media--multi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  overflow: visible;
  border-radius: 0;
}
.project__media--multi img {
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Formula Student: temporadas y cargos */
.roles {
  margin-top: 24px;
}
.roles > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 4px 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.roles dt {
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.roles dd {
  font-size: 1.125rem;
  line-height: 1.5;
}
.roles .status {
  margin-left: 10px;
  white-space: nowrap;
}

/* Enlaces a noticias y páginas externas */
.links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.award__body .links {
  margin-top: 22px;
}
.links a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  transition:
    color 0.2s var(--ease),
    text-decoration-color 0.2s var(--ease);
}
.links a:hover {
  color: var(--blue);
  text-decoration-color: var(--blue);
}
.links .icon {
  width: 0.95em;
  height: 0.95em;
  align-self: center;
  transition: transform 0.35s var(--ease);
}
.links a:hover .icon {
  transform: translate(2px, -2px);
}

/* Lista con guion (tareas sueltas dentro de un proyecto) */
.dash {
  margin-top: 6px;
}
.dash li {
  position: relative;
  padding: 3px 0 3px 22px;
}
.dash li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.95em;
  width: 8px;
  height: 1px;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   Cronología: línea vertical por años
   -------------------------------------------------------------------------- */

.tl-year {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(0, 9fr);
  column-gap: 40px;
}
.tl-year__num {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.tl-items {
  position: relative;
  padding: 0 0 64px 44px;
  border-left: 1px solid var(--line-2);
}
.tl-year:last-child .tl-items {
  padding-bottom: 8px;
}
.tl-items::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 6px var(--bg);
}
.tl-item {
  display: grid;
  grid-template-columns: minmax(130px, 2fr) minmax(0, 6fr) minmax(0, 2fr);
  gap: 4px 32px;
  padding: 14px 0;
}
.tl-item + .tl-item {
  border-top: 1px solid var(--line);
}
.tl-when,
.tl-kind {
  padding-top: 4px;
  color: var(--mute);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.tl-kind {
  text-align: right;
}
.tl-what a {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.tl-what a:hover {
  color: var(--blue);
}
.tl-what .org {
  display: block;
  margin-top: 2px;
  color: var(--mute);
}
.tl-what .status {
  margin-top: 6px;
}
.tl-item--cont {
  padding: 8px 0;
}
.tl-item--cont .tl-when {
  padding-top: 2px;
}
.tl-item--cont .tl-what a {
  color: var(--mute);
  font-size: 1rem;
  font-weight: 400;
}
.tl-item--cont .tl-what a:hover {
  color: var(--blue);
}
.tl-item--cont .tl-what .org {
  font-size: 0.9375rem;
}
.pos {
  color: var(--blue);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Contacto
   -------------------------------------------------------------------------- */

.mail {
  display: inline-block;
  font-size: clamp(1.75rem, 5.4vw, 4.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  text-decoration-color: var(--line-2);
  overflow-wrap: anywhere;
  transition:
    color 0.25s var(--ease),
    text-decoration-color 0.25s var(--ease);
}
.mail:hover {
  color: var(--blue);
  text-decoration-color: var(--blue);
}
.mail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 36px;
}
.copy[data-state="ok"] {
  border-color: var(--blue);
  color: var(--blue);
}

/* --------------------------------------------------------------------------
   Pie
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(96px, 12vw, 168px);
  border-top: 1px solid var(--line);
}
.site-footer__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px 40px;
  color: var(--mute);
  font-size: 0.9375rem;
}
.site-footer__id {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-footer__id svg {
  width: 64px;
  height: auto;
  color: var(--ink);
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.site-footer a {
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.site-footer a:hover {
  color: var(--ink);
}

/* Página 404 */
.lost {
  min-height: 50vh;
}
.lost .hero__cta {
  margin-top: 40px;
}

/* --------------------------------------------------------------------------
   Transiciones entre pestañas
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}
.page {
  view-transition-name: page;
}
::view-transition-old(page) {
  animation: page-out 0.16s var(--ease) both;
}
::view-transition-new(page) {
  animation: page-in 0.42s var(--ease) both;
}
::view-transition-group(tab-dot) {
  animation-duration: 0.5s;
  animation-timing-function: var(--ease);
}
@keyframes page-out {
  to {
    opacity: 0;
  }
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 40%);
  }
  .row-grid {
    grid-template-columns: minmax(120px, 2fr) minmax(0, 5fr) minmax(0, 3fr) 44px;
    gap: 8px 28px;
  }
  .job__body {
    grid-template-columns: minmax(120px, 2fr) minmax(0, 8fr) 44px;
    gap: 0 28px;
  }
}

@media (max-width: 980px) {
  :root {
    --header-h: 68px;
  }
  .tl-year {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    padding-left: 30px;
  }
  .tl-year::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line-2);
  }
  .tl-year:first-child::before {
    top: 29px;
  }
  .tl-year__num {
    z-index: 2;
    top: var(--header-h);
    padding: 10px 0 12px;
    background: var(--bg);
  }
  .tl-year__num::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 50%;
    width: 11px;
    height: 11px;
    margin-top: -6px;
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 0 0 6px var(--bg);
  }
  .tl-items {
    padding: 0 0 40px;
    border-left: 0;
  }
  .tl-items::before {
    display: none;
  }
  .tl-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "when kind"
      "what what";
    gap: 2px 16px;
  }
  .tl-when {
    grid-area: when;
  }
  .tl-kind {
    grid-area: kind;
  }
  .tl-what {
    grid-area: what;
  }
  .roles > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .logo svg {
    width: 84px;
  }
  .lang--bar {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }

  .tabs {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 39;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px var(--gutter) 40px;
    background: var(--bg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity 0.3s var(--ease),
      transform 0.4s var(--ease),
      visibility 0s linear 0.4s;
  }
  .menu-open .tabs {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity 0.3s var(--ease),
      transform 0.4s var(--ease),
      visibility 0s;
  }
  .tabs ul {
    flex-direction: column;
    gap: 0;
  }
  .tabs ul a {
    padding: 14px 0 14px 22px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 1.875rem;
    font-weight: 500;
    letter-spacing: -0.03em;
  }
  .tabs ul a[aria-current="page"] {
    font-weight: 500;
  }
  .tab-dot {
    left: 2px;
    top: 50%;
    bottom: auto;
    width: 8px;
    height: 8px;
    margin: -4px 0 0;
  }
  .lang--menu {
    display: flex;
    gap: 20px;
    font-size: 1rem;
  }
  .menu-open body {
    overflow: hidden;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__photo {
    max-width: 560px;
  }
  .about,
  .page-head,
  .block-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .about {
    gap: 24px;
  }
  .index a {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .index__desc {
    grid-column: 1;
    grid-row: 2;
  }
  .index .arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .row-grid {
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas:
      "what toggle"
      "when toggle"
      "means toggle";
    gap: 6px 20px;
    padding: 24px 0;
  }
  .row-grid .what {
    grid-area: what;
  }
  .row-grid .when {
    grid-area: when;
  }
  .row-grid .means {
    grid-area: means;
  }
  .row-grid .toggle,
  .row-grid .end {
    grid-area: toggle;
  }
  .job__body {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps {
    grid-column: 1;
  }
  .specs {
    grid-template-columns: minmax(0, 1fr);
  }
  .specs dt {
    padding-bottom: 0;
  }
  .specs dd {
    padding-top: 2px;
    padding-left: 0;
    border-top: 0;
  }
  .specs dt:nth-last-of-type(1) {
    border-bottom: 0;
  }

  .award {
    grid-template-columns: minmax(0, 1fr);
  }
  .project {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "name"
      "info"
      "media";
    gap: 16px;
  }
  .project__info {
    padding-top: 0;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }
  .project__media--multi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  /* En móvil, con un número impar de fotos la primera ocupa todo el ancho */
  .project__media--multi img:first-child:nth-last-child(odd) {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10;
  }
  .hero h1 {
    font-size: clamp(2.9rem, 13.4vw, 3.6rem);
  }
  .lead {
    margin-top: 24px;
  }
  .wins {
    margin-top: 32px;
  }
  .hero__cta {
    margin-top: 36px;
  }
  .win__disc {
    display: block;
    font-size: 1rem;
  }
  .win__sep {
    display: none;
  }
  .hero__cta .btn {
    flex: 1 1 100%;
  }
  .page-head h1 {
    font-size: clamp(2.6rem, 12vw, 3.4rem);
  }
  .site-footer__in {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  .site-header {
    position: static;
  }
  .menu-btn,
  .skip,
  .toggle {
    display: none !important;
  }
  .job::details-content {
    block-size: auto;
    content-visibility: visible;
  }
}
