/* Renamed from proyectos clave to experiencia resumida and renumbered as template 07. */
@page {
  size: A4;
  margin: 0;
}

* {
  box-sizing: border-box;
}

:root {
  --accent-red: #ff0000;
  --accent-red-deep: #d90000;
  --border-gray: #d8d8d8;
  --text-black: #000000;
  --paper-white: #fcfcfb;
  --type-lg: 9.4pt;
  --type-sm: 6.4pt;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #dfe5ea;
  color: var(--text-black);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  padding: 12mm 0;
  overflow: auto;
}

.page {
  width: 210mm;
  min-height: 297mm;
  padding: 8mm 18mm;
  margin: 0 auto;
  background: var(--paper-white);
  box-shadow: 0 3mm 10mm rgba(21, 36, 55, 0.08);
  page-break-after: always;
}

.portfolio-sheet {
  width: 174mm;
  height: 281mm;
  display: grid;
  grid-template-rows: auto 84mm minmax(0, 1fr);
  gap: 3.6mm;
  align-content: start;
}

.project-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3.4mm;
  min-height: 13.2mm;
  padding: 1mm 2.1mm 1.05mm;
  border: 0.35mm solid var(--border-gray);
  background: var(--paper-white);
  border-radius: 3.2mm;
}

.project-brand__meta {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.9mm;
  align-content: center;
}

.project-brand__logos {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5mm;
}

.project-brand__logo {
  display: block;
  width: 12mm;
  height: auto;
  opacity: 0.95;
}

.project-brand__banner {
  display: block;
  width: 28mm;
  max-width: 28mm;
  height: auto;
}

.project-brand__eyebrow {
  color: var(--accent-red-deep);
  font-size: var(--type-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-brand__title {
  margin: 0;
  color: var(--text-black);
  font-size: var(--type-lg);
  line-height: 1.08;
  font-weight: 700;
  text-wrap: balance;
}

.project-brand__subtitle {
  margin: 0;
  color: var(--text-black);
  font-size: var(--type-sm);
  line-height: 1.14;
  max-width: 106mm;
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: auto;
  hyphens: auto;
  text-wrap: pretty;
}

.project-brand__rule {
  display: block;
  width: 100%;
  height: 0.35mm;
  margin-top: 0.35mm;
  background: transparent;
}

.section-label {
  margin: 0 0 0.3mm;
  display: block;
  color: var(--accent-red-deep);
  font-size: var(--type-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--text-black);
  font-size: var(--type-lg);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.body-text {
  margin: 0;
  color: var(--text-black);
  font-size: var(--type-sm);
  line-height: 1.24;
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: auto;
  hyphens: auto;
  text-wrap: pretty;
}

.portfolio-hero,
.portfolio-list,
.project-list__item {
  border: 0.35mm solid var(--border-gray);
  border-radius: 3.2mm;
  background: var(--paper-white);
}

.portfolio-hero {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border-radius: 3.6mm;
}

.portfolio-hero__media,
.portfolio-hero__image {
  width: 100%;
  height: 100%;
  margin: 0;
}

.portfolio-hero__image {
  display: block;
  object-fit: cover;
  object-position: center;
}

.portfolio-hero__caption {
  position: absolute;
  left: 2.4mm;
  right: 2.4mm;
  bottom: 2.2mm;
  display: grid;
  gap: 0.35mm;
  padding: 1.6mm 1.9mm 1.75mm;
  border-radius: 2.6mm;
  background: rgba(252, 252, 251, 0.92);
  border: 0.3mm solid rgba(216, 216, 216, 0.9);
}

.portfolio-hero__title {
  margin: 0;
  color: var(--text-black);
  font-size: 6.8pt;
  line-height: 1.04;
  font-weight: 700;
}

.portfolio-hero__text {
  margin: 0;
  color: var(--text-black);
  font-size: var(--type-sm);
  line-height: 1.12;
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.portfolio-list {
  min-height: 0;
  height: 100%;
  padding: 1.45mm 2mm 1.55mm;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.85mm;
  align-content: stretch;
}

.project-cards {
  display: grid;
  height: 100%;
  grid-template-rows: auto repeat(13, minmax(0, 1fr));
  gap: 0.45mm;
  min-height: 0;
  align-content: stretch;
}

.project-cards__header {
  display: grid;
  grid-template-columns: 42mm 13mm 12mm 26mm minmax(0, 1fr);
  gap: 1.1mm;
  align-items: start;
  padding: 0 1.8mm 0;
}

.project-cards__heading {
  display: block;
  color: var(--accent-red-deep);
  font-size: 5.7pt;
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.project-card {
  display: grid;
  grid-template-columns: 42mm 13mm 12mm 26mm minmax(0, 1fr);
  gap: 1.1mm;
  align-items: center;
  padding: 1.05mm 1.55mm 1.1mm;
  border: 0.35mm solid var(--border-gray);
  border-radius: 3mm;
  background: var(--paper-white);
  min-height: 0;
  align-self: stretch;
}

.project-card__project {
  min-width: 0;
  display: grid;
  grid-template-columns: 6mm 1fr;
  gap: 0.95mm;
  align-items: center;
}

.project-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.8mm;
  min-height: 4.8mm;
  margin-top: 0.1mm;
  border-radius: 999px;
  border: 0.25mm solid var(--accent-red);
  background: transparent;
  color: var(--accent-red-deep);
  font-size: var(--type-sm);
  font-weight: 500;
  letter-spacing: 0;
  align-self: center;
}

.project-card__title {
  margin: 0;
  color: var(--text-black);
  font-size: 6.8pt;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: 0;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.project-card__field {
  min-width: 0;
  display: grid;
  gap: 0.08mm;
  align-content: center;
  align-self: center;
}

.project-card__field--location {
  gap: 0.05mm;
}

.project-card__field--work {
  padding-left: 0.8mm;
  border-left: 0.25mm solid var(--border-gray);
}

.project-card__value {
  display: block;
  margin: 0;
  color: var(--text-black);
  font-size: var(--type-sm);
  line-height: 1.08;
  text-wrap: pretty;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.project-card__value--subtle {
  line-height: 1.02;
}

.project-card__field:nth-child(4) .project-card__value,
.project-card__field--work .project-card__value {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__field:nth-child(4) .project-card__value {
  -webkit-line-clamp: 2;
}

.project-card__field--work .project-card__value {
  -webkit-line-clamp: 2;
}

@media print {
  html,
  body {
    width: 210mm;
    height: 297mm;
    background: var(--paper-white);
  }

  body {
    padding: 0;
    overflow: hidden;
  }

  .page {
    margin: 0;
    box-shadow: none;
  }
}
