:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #242323;
  background: #fffaf7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem clamp(1.25rem, 6vw, 5rem);
}

.site-name {
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

nav a {
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.language-switch {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid #d8c8c1;
  border-radius: 0.5rem;
}

.language-button {
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: #493832;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
}

.language-button.is-active {
  background: #493832;
  color: #fff;
}

.language-button:focus-visible {
  outline: 2px solid #74564e;
  outline-offset: 2px;
}

.hero {
  display: grid;
  min-height: 62vh;
  align-content: center;
  justify-items: start;
  padding: 5rem clamp(1.25rem, 12vw, 10rem);
  background: #f5e9e4;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #74564e;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  line-height: 1.05;
}

.intro {
  max-width: 38rem;
  margin-bottom: 1.75rem;
  color: #514846;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border-radius: 0.4rem;
  background: #493832;
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  background: #30241f;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.social-links a {
  color: #493832;
  font-weight: 650;
  text-underline-offset: 0.2em;
}

.content-section {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  line-height: 1.7;
}

.content-section > :last-child {
  margin-bottom: 0;
}

.content-section h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.75rem;
}

.profile-photo {
  width: min(100%, 20rem);
  margin: 0 0 2rem;
}

.profile-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  object-fit: cover;
}

.project-card {
  overflow: hidden;
  border: 1px solid #e3d6d0;
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.5rem rgb(73 56 50 / 8%);
}

.project-card-content {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.project-kicker {
  margin-bottom: 0.55rem;
  color: #74564e;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.project-card h3,
.content-section article h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.4;
}

.project-description {
  max-width: 62ch;
  margin: 0;
  color: #514846;
  line-height: 1.7;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.project-metric {
  display: flex;
  min-height: 7rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 0.6rem;
  background: #f8f1ed;
}

.project-metric strong {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.1;
}

.project-metric span {
  color: #514846;
  font-size: 0.9rem;
  line-height: 1.4;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.project-cta {
  display: inline-block;
  padding: 0.8rem 1.15rem;
  border-radius: 0.4rem;
  background: #493832;
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}

.project-cta:hover,
.project-cta:focus-visible {
  background: #30241f;
}

.project-source {
  color: #493832;
  font-weight: 650;
  text-underline-offset: 0.2em;
}

.content-section article p {
  margin-bottom: 0;
}

.publication-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.publication-card {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.2rem;
  border: 1px solid #e3d6d0;
  border-radius: 0.65rem;
  background: #fff;
}

.publication-card h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.publication-meta {
  margin: 0;
  color: #665954;
  font-size: 0.92rem;
}

.download-link {
  margin-top: auto;
  padding-top: 0.5rem;
  color: #493832;
  font-weight: 650;
  text-underline-offset: 0.2em;
}

.archive-heading {
  margin: 2.5rem 0 1rem;
}

#ponencias > .archive-heading,
#ponencias > .slide-gallery {
  display: none;
}

.publication-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}

.archive-item {
  margin: 0;
  overflow: hidden;
  border: 1px solid #e3d6d0;
  border-radius: 0.65rem;
  background: #fff;
}

.archive-item a {
  display: block;
  background: #f5e9e4;
}

.archive-item img {
  display: block;
  width: 100%;
  height: 16rem;
  object-fit: contain;
}

.archive-item figcaption {
  padding: 0.85rem;
  color: #514846;
  font-size: 0.9rem;
  line-height: 1.5;
}

.slide-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.slide-image {
  margin: 0;
  overflow: hidden;
  border: 1px solid #e3d6d0;
  border-radius: 0.65rem;
  background: #fff;
}

.slide-image a {
  display: block;
  background: #f5e9e4;
}

.slide-image img {
  display: block;
  width: 100%;
  height: 18rem;
  object-fit: contain;
}

.slide-image figcaption {
  padding: 0.85rem;
  color: #514846;
  font-size: 0.9rem;
  line-height: 1.5;
}

.presentation-viewer {
  margin: 2rem 0 2.5rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid #e3d6d0;
  border-radius: 0.75rem;
  background: #fff;
}

.presentation-viewer > h3 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
}

.presentation-slide {
  margin: 0;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: #f5e9e4;
}

.presentation-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.slide-count {
  padding: 0.75rem 0.25rem 0.25rem;
  color: #514846;
  font-size: 0.95rem;
  text-align: center;
}

.presentation-controls {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.presentation-button {
  min-width: 7rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0.4rem;
  background: #493832;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.presentation-button:hover:not(:disabled),
.presentation-button:focus-visible {
  background: #30241f;
}

.presentation-button:focus-visible {
  outline: 2px solid #74564e;
  outline-offset: 3px;
}

.presentation-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.presentation-error {
  margin: 1rem 0 0;
  color: #a12c2c;
}

.experience-group {
  margin-top: 2rem;
}

.experience-group > h3 {
  margin-bottom: 0.9rem;
  color: #74564e;
  font-size: 1.15rem;
}

.experience-card {
  margin-bottom: 0.85rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #e3d6d0;
  border-left: 4px solid #a47767;
  border-radius: 0.6rem;
  background: #fff;
}

.experience-card h4 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  line-height: 1.45;
}

.experience-organization {
  margin: 0 0 0.3rem;
  color: #514846;
  font-weight: 550;
}

.experience-period {
  margin: 0;
  color: #74564e;
  font-size: 0.92rem;
}

.experience-related {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid #eee4df;
}

.experience-related summary {
  color: #493832;
  cursor: pointer;
  font-weight: 650;
}

.experience-related > p {
  margin: 0.85rem 0;
}

.experience-related a {
  color: #493832;
  text-underline-offset: 0.2em;
}

.related-publication-list {
  display: grid;
  gap: 0.6rem;
  margin: 0.85rem 0 0;
  padding-left: 1.25rem;
}

.experience-related .publication-gallery {
  margin-top: 1rem;
}

.step-viewer {
  margin-top: 1rem;
}

.step-stage {
  display: grid;
  min-height: 24rem;
  place-items: center;
  padding: 1.25rem;
  border: 1px solid #e3d6d0;
  border-radius: 0.65rem;
  background: #fdf8f6;
  cursor: pointer;
  user-select: none;
}

.step-item[hidden] {
  display: none;
}

.step-text {
  max-width: 34rem;
}

.step-text h5 {
  margin: 0;
  color: #493832;
  font-size: 1.1rem;
}

.step-text p {
  margin: 0.6rem 0 0;
}

.step-text p:first-child {
  margin-top: 0;
}

.step-text .step-period {
  margin-top: 0.2rem;
  color: #74564e;
  font-size: 0.9rem;
}

.step-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.step-metric {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.5rem;
  background: #f5e9e4;
}

.step-metric strong {
  font-size: 1.4rem;
  line-height: 1.1;
}

.step-metric span {
  color: #514846;
  font-size: 0.85rem;
  line-height: 1.35;
}

.step-photo {
  margin: 0;
  text-align: center;
}

.step-photo img {
  display: block;
  max-width: 100%;
  max-height: 26rem;
  margin: 0 auto;
  border-radius: 6px;
}

.step-photo figcaption {
  margin-top: 0.6rem;
  color: #514846;
  font-size: 0.95rem;
  font-weight: 650;
}

.step-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.step-count {
  margin: 0;
  color: #74564e;
  font-size: 0.9rem;
}

.experience-video {
  margin-top: 0.85rem;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.experience-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}


footer {
  padding: 1.5rem;
  background: #f5e9e4;
  color: #514846;
  text-align: center;
}

footer p {
  margin: 0;
}

@media (max-width: 480px) {
  .hero {
    min-height: 55vh;
  }

  .project-metrics {
    grid-template-columns: 1fr;
  }

  .project-metric {
    min-height: auto;
  }
}

.step-credit {
  margin: 0.5rem 0 0;
  color: #74564e;
  font-size: 0.8rem;
}

.flipbook {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem 0.5rem 0.5rem;
  border: 1px solid #e3d6d0;
  border-radius: 0.65rem;
  background: #f5ede9;
}

.flipbook-spread {
  display: flex;
  justify-content: center;
  min-height: 18rem;
}

.flipbook-spread img {
  display: block;
  width: 50%;
  max-width: 22rem;
  height: auto;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.18);
}

.flipbook-spread img[hidden] {
  display: none;
}

.flipbook-spread.is-single img {
  width: 60%;
}

.flipbook-arrow {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: #493832;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.flipbook-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.flipbook-count {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  color: #74564e;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 600px) {
  .flipbook-spread img,
  .flipbook-spread.is-single img {
    width: 100%;
  }
}

.press-item {
  width: 100%;
  margin: 0;
  text-align: center;
}

.press-frame {
  display: flex;
  height: 22rem;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
}

.press-frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.press-frame.is-clipping {
  padding: 0.75rem;
  background: #ece3de;
}

.press-frame.is-clipping img {
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.18);
}

.press-card {
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid #e3d6d0;
  background: #f5ede9;
}

.press-card-outlet {
  color: #74564e;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.press-card-title {
  max-width: 26rem;
  color: #2f2522;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.4;
}

.press-card-date {
  color: #74564e;
  font-size: 0.9rem;
}

.press-item figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.75rem;
}

.press-meta,
.press-note {
  color: #74564e;
  font-size: 0.85rem;
}

.press-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #493832;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.press-title {
  color: #2f2522;
  font-size: 1rem;
}

.press-link a {
  color: #493832;
  font-weight: 650;
  text-underline-offset: 0.2em;
}

@media (max-width: 600px) {
  .press-frame {
    height: 16rem;
  }
}

.pub-stage {
  display: block;
  cursor: default;
}

.pub-slide h5 {
  margin: 0;
  color: #493832;
  font-size: 1.1rem;
}

.pub-slide .step-period {
  margin: 0.15rem 0 0;
  color: #74564e;
  font-size: 0.9rem;
}

.pub-slide .flipbook {
  margin-top: 0.75rem;
}

.flipbook.is-single .flipbook-spread img {
  width: auto;
  max-width: 100%;
  max-height: 34rem;
}

.pub-download {
  margin: 0.6rem 0 0;
  text-align: center;
}

.pub-download a {
  color: #493832;
  font-weight: 650;
  text-underline-offset: 0.2em;
}

.pub-reference {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px solid #e3d6d0;
  border-radius: 0.5rem;
  background: #fff;
}

.pub-reference img {
  display: block;
  width: 100%;
  height: auto;
}

.pub-reference p {
  margin: 0.75rem 0 0;
  color: #74564e;
  font-size: 0.9rem;
}

.flipbook.is-reference .flipbook-spread {
  align-items: center;
  min-height: 12rem;
}

.flipbook.is-reference .flipbook-spread img {
  max-height: none;
  background: #fff;
  box-shadow: 0 1px 6px rgb(0 0 0 / 0.12);
}

.pub-note {
  margin: 0.6rem 0 0;
  color: #74564e;
  font-size: 0.9rem;
  text-align: center;
}

.project-summary {
  margin: 0.85rem 0 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.button-secondary {
  border: 2px solid #493832;
  background: transparent;
  color: #493832;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: #493832;
  color: #fff;
}

@media (max-width: 900px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem 1rem;
    padding-top: 0.9rem;
    padding-bottom: 0.6rem;
  }

  .header-controls {
    display: contents;
  }

  .language-switch {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  nav {
    grid-column: 1 / -1;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 1.1rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    scrollbar-width: none;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }

  nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  .eyebrow {
    letter-spacing: 0.06em;
  }
}
