.home-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 32px 0 56px;
}

.home-panel {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  border-radius: 18px;
  color: #f8f5f1;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  position: relative;
  overflow: hidden;
}

.home-panel:hover,
.home-panel:focus {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.18);
  filter: brightness(1.02);
  text-decoration: none;
}

.home-panel-resume {
  background: linear-gradient(180deg, #7f2f1f 0%, #502117 100%);
}

.home-panel-blog {
  background: linear-gradient(180deg, #2f4036 0%, #1f2b24 100%);
}

.home-panel-architecture {
  background: linear-gradient(180deg, #3f2d61 0%, #281c3d 100%);
}

.home-panel-huayhuash {
  background:
    linear-gradient(180deg, rgba(5, 35, 64, 0.08) 0%, rgba(5, 35, 64, 0.94) 78%),
    url("../img/huayhuash-2026-cifras.png") center 28% / cover;
}

.home-panel::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.home-panel-label {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 245, 236, 0.82);
}

.home-panel-title {
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1;
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.home-panel-copy {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(248, 245, 241, 0.86);
  position: relative;
  z-index: 1;
}

.resume-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.resume-hero-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.resume-photo {
  width: 190px;
  flex: 0 0 190px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.resume-photo-note {
  font-size: 13px;
  color: #777;
}

.mermaid-wrap {
  margin: 28px 0;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid #e1d8cf;
  border-radius: 14px;
  background: #fffaf4;
}

.mermaid {
  min-width: 720px;
}

.mermaid svg {
  background: #fffaf4 !important;
}

.mermaid .label,
.mermaid .nodeLabel,
.mermaid .edgeLabel,
.mermaid .messageText,
.mermaid .loopText,
.mermaid .noteText,
.mermaid .branchLabel,
.mermaid .actor,
.mermaid text,
.mermaid tspan {
  fill: #1f1f1f !important;
  color: #1f1f1f !important;
}

.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node polygon,
.mermaid .node path,
.mermaid .actor,
.mermaid .labelBox,
.mermaid .note,
.mermaid .note rect,
.mermaid .activation0,
.mermaid .activation1,
.mermaid .activation2 {
  fill: #f2e4d7 !important;
  stroke: #8b5e3c !important;
}

.mermaid .cluster rect,
.mermaid .cluster polygon {
  fill: #f3ebe2 !important;
  stroke: #8b5e3c !important;
}

.mermaid .edgeLabel rect,
.mermaid .labelBkg {
  fill: #fffaf4 !important;
  opacity: 1 !important;
}

.mermaid .flowchart-link,
.mermaid .messageLine0,
.mermaid .messageLine1,
.mermaid .actor-line,
.mermaid .loopLine,
.mermaid .sequenceNumber,
.mermaid path,
.mermaid line {
  stroke: #5c5148 !important;
}

.mermaid marker path {
  fill: #5c5148 !important;
  stroke: #5c5148 !important;
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.post-gallery img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
}

.post-gallery .wide {
  grid-column: 1 / -1;
  max-height: 460px;
}

@media (max-width: 991px) {
  .home-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-panel {
    min-height: 240px;
  }

  .mermaid {
    min-width: 620px;
  }
}

@media (max-width: 767px) {
  .home-panels {
    grid-template-columns: 1fr;
  }

  .resume-hero {
    flex-direction: column-reverse;
    align-items: center;
    gap: 18px;
  }

  .resume-hero-copy {
    width: 100%;
  }

  .resume-photo {
    width: 200px;
    flex-basis: auto;
  }

  .post-gallery {
    grid-template-columns: 1fr;
  }

  .post-gallery .wide {
    grid-column: auto;
  }
}

.huayhuash-header {
  background-position: center 18%;
}

.huayhuash-heading {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.huayhuash-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(235, 179, 70, 0.72);
  color: #f5d28a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.huayhuash-header-note {
  max-width: 640px;
  margin: 18px auto 0;
  color: rgba(255, 248, 232, 0.9);
  font-size: 16px;
}

.huayhuash-page {
  padding-bottom: 60px;
  background: #f3efe6;
}

.huayhuash-shell {
  margin: 34px 0 40px;
}

.huayhuash-intro,
.huayhuash-panel,
.huayhuash-stat-card,
.huayhuash-statement,
.huayhuash-infographics figure {
  border: 1px solid #d7c69f;
  background: #fbf8ee;
  box-shadow: 0 16px 34px rgba(7, 34, 61, 0.1);
  color: #092b52;
}

.huayhuash-intro {
  padding: 24px 28px;
  border-left: 7px solid #b5821f;
}

.huayhuash-intro p {
  margin: 0;
  color: #102f50;
  font-size: 18px;
  line-height: 1.65;
}

.huayhuash-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.huayhuash-stat-card {
  min-height: 168px;
  padding: 22px;
  text-align: center;
}

.huayhuash-icon,
.huayhuash-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0b6c75;
  color: #fffaf0;
  font-weight: 900;
}

.huayhuash-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 50%;
  font-size: 14px;
}

.huayhuash-stat-card strong {
  display: block;
  margin-bottom: 8px;
  color: #062652;
  font-size: 38px;
  line-height: 1;
}

.huayhuash-stat-card span:last-child {
  display: block;
  color: #173858;
  font-size: 16px;
}

.huayhuash-panel {
  margin-top: 18px;
  padding: 28px;
}

.huayhuash-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.huayhuash-ribbon {
  flex: 0 0 46px;
  width: 46px;
  height: 58px;
  font-size: 24px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
}

.huayhuash-eyebrow {
  margin: 0 0 6px;
  color: #0b6c75;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.huayhuash-panel h2 {
  margin: 0;
  color: #082955;
  font-size: 32px;
  line-height: 1.1;
}

.huayhuash-panel p,
.huayhuash-panel li {
  color: #173858;
  font-size: 17px;
  line-height: 1.55;
}

.huayhuash-feature,
.huayhuash-comparison-grid {
  display: grid;
  gap: 18px;
}

.huayhuash-feature {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
}

.huayhuash-feature strong,
.huayhuash-comparison-grid strong {
  display: block;
  color: #062652;
  font-weight: 900;
  line-height: 1;
}

.huayhuash-feature strong {
  font-size: 74px;
}

.huayhuash-feature ul {
  margin: 0;
  padding-left: 22px;
}

.huayhuash-panel-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.huayhuash-panel-split > div + div {
  border-left: 1px dashed rgba(11, 108, 117, 0.45);
  padding-left: 26px;
}

.huayhuash-comparison-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.huayhuash-comparison-grid div {
  padding: 18px;
  border-left: 4px solid #b5821f;
  background: rgba(255, 255, 255, 0.58);
}

.huayhuash-comparison-grid strong {
  margin-bottom: 8px;
  font-size: 34px;
}

.huayhuash-comparison-grid span {
  display: block;
  color: #173858;
}

.huayhuash-statement {
  margin: 22px 0;
  padding: 26px 30px;
  background: #052340;
  border-color: #b5821f;
  text-align: center;
}

.huayhuash-statement p {
  margin: 0;
  color: #fff8e8;
  font-size: 24px;
  line-height: 1.45;
}

.huayhuash-statement strong {
  color: #f0b94b;
}

.huayhuash-infographics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
}

.huayhuash-infographics figure {
  margin: 0;
  padding: 14px;
}

.huayhuash-infographics img {
  display: block;
  width: 100%;
  height: auto;
}

.huayhuash-infographics figcaption {
  margin-top: 12px;
  color: #173858;
  font-size: 14px;
  text-align: center;
}

[data-theme="dark"] .huayhuash-page {
  background: #102338;
}

[data-theme="dark"] .huayhuash-intro,
[data-theme="dark"] .huayhuash-panel,
[data-theme="dark"] .huayhuash-stat-card,
[data-theme="dark"] .huayhuash-infographics figure {
  background: #fbf8ee !important;
  color: #092b52 !important;
}

[data-theme="dark"] .huayhuash-intro p,
[data-theme="dark"] .huayhuash-panel p,
[data-theme="dark"] .huayhuash-panel li,
[data-theme="dark"] .huayhuash-stat-card span,
[data-theme="dark"] .huayhuash-comparison-grid span,
[data-theme="dark"] .huayhuash-infographics figcaption {
  color: #173858 !important;
}

[data-theme="dark"] .huayhuash-panel h2,
[data-theme="dark"] .huayhuash-stat-card strong,
[data-theme="dark"] .huayhuash-feature strong,
[data-theme="dark"] .huayhuash-comparison-grid strong {
  color: #062652 !important;
}

@media (max-width: 991px) {
  .huayhuash-stat-grid,
  .huayhuash-infographics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .huayhuash-feature,
  .huayhuash-panel-split {
    grid-template-columns: 1fr;
  }

  .huayhuash-panel-split > div + div {
    border-left: 0;
    border-top: 1px dashed rgba(11, 108, 117, 0.45);
    padding-left: 0;
    padding-top: 22px;
  }
}

@media (max-width: 767px) {
  .huayhuash-intro,
  .huayhuash-panel,
  .huayhuash-statement {
    padding: 20px;
  }

  .huayhuash-stat-grid,
  .huayhuash-comparison-grid,
  .huayhuash-infographics {
    grid-template-columns: 1fr;
  }

  .huayhuash-stat-card strong {
    font-size: 34px;
  }

  .huayhuash-feature strong {
    font-size: 52px;
  }

  .huayhuash-panel h2 {
    font-size: 28px;
  }

  .huayhuash-statement p {
    font-size: 20px;
  }
}

@media print {
  .navbar,
  .intro-header .post-heading,
  .intro-header .page-heading,
  .intro-header .site-heading {
    display: none !important;
  }
}
