/* Shared layout for the Platforms & Training and Systems indexes. */
.section-index-main {
  max-width: calc(980px + (var(--gap) * 2));
}

.section-index {
  width: 100%;
}

.section-index .post-header {
  position: relative;
  margin: 1.5rem 0 2.8rem;
  padding: clamp(1.7rem, 4vw, 2.8rem);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(85, 212, 210, 0.1), transparent 45%, rgba(217, 54, 184, 0.08)),
    var(--ui-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 70px var(--ui-shadow);
}

.training-index .post-header {
  background:
    linear-gradient(135deg, rgba(217, 54, 184, 0.1), transparent 45%, rgba(85, 212, 210, 0.09)),
    var(--ui-panel);
}

.section-index .post-header::before {
  display: block;
  margin-bottom: 1rem;
  color: var(--ui-cyan);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.training-index .post-header::before {
  content: "// PRACTICE & DEVELOPMENT";
}

.systems-index .post-header::before {
  content: "// SYSTEMS & RECOVERY";
}

.section-index .post-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ui-cyan), var(--ui-violet), var(--ui-magenta));
}

.training-index .post-header::after {
  background: linear-gradient(90deg, var(--ui-magenta), var(--ui-violet), var(--ui-cyan));
}

.section-index .post-title {
  margin: 0;
  font-family: "Tomorrow", Inter, system-ui, sans-serif;
  font-size: clamp(2.5rem, 7vw, 4.7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}

.section-index .post-description {
  max-width: 790px;
  margin-top: 1rem;
  color: var(--secondary);
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  line-height: 1.65;
}

.section-index .post-content {
  max-width: 960px;
  margin-inline: auto;
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.72;
  letter-spacing: -0.005em;
}

.section-index .post-content > p {
  max-width: 78ch;
}

.section-index .post-content > p:first-child {
  font-size: 1.02rem;
  line-height: 1.8;
}

.section-index .post-content > h2 {
  position: relative;
  margin: 3.8rem 0 1.35rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  font-family: "Tomorrow", Inter, system-ui, sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.section-index .post-content > h2:first-of-type {
  margin-top: 3.2rem;
}

.section-index .post-content > h2::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--ui-cyan), var(--ui-magenta));
}

.training-index .post-content > h2::after {
  background: linear-gradient(90deg, var(--ui-magenta), var(--ui-cyan));
}

.section-index .post-content > h3 {
  margin: 2.1rem 0 0.8rem;
  color: var(--primary);
  font-family: "Tomorrow", Inter, system-ui, sans-serif;
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.35;
}

.section-index .post-content > h3::before {
  content: "//";
  margin-right: 0.55rem;
  color: var(--ui-cyan);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72em;
}

.section-index .post-content > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 100%;
  margin: 1rem 0 1.8rem;
  padding: 0;
  list-style: none;
}

.section-index .post-content > ul > li {
  min-width: 0;
  margin: 0;
  padding: 1rem 1.05rem;
  color: var(--secondary);
  background: var(--ui-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.94rem;
  line-height: 1.6;
}

.section-index .post-content > ul strong {
  color: var(--primary);
}

.section-index .post-content a {
  color: var(--ui-cyan);
}

.section-index .post-content a:hover,
.section-index .post-content a:focus-visible {
  color: var(--ui-magenta);
}

.section-index .post-content > img {
  display: block;
  width: min(100%, 820px);
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 42px var(--ui-shadow);
}

.section-index .image-caption {
  max-width: 820px;
  color: var(--secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

@media screen and (max-width: 768px) {
  .section-index .post-header {
    margin-top: 0.9rem;
    padding: 1.55rem 1.25rem;
  }

  .section-index .post-title {
    font-size: clamp(2.2rem, 12vw, 3.15rem);
  }

  .section-index .post-content > h2 {
    margin-top: 3.2rem;
  }

  .section-index .post-content > ul {
    grid-template-columns: 1fr;
  }

  .section-index .post-content > ul > li {
    font-size: 1rem;
  }
}

/* Networking index: reuse the section layout without changing its content. */
.networking-index .post-header::before {
  content: "// NETWORK ARCHITECTURE";
}

.networking-index .post-title {
  font-size: clamp(2.4rem, 5.8vw, 4rem);
}

.networking-index .post-content > ul {
  gap: 1.1rem 1.2rem;
  margin-block: 1.5rem 2.35rem;
}

.networking-index .post-content > ul > li {
  padding: 1.15rem 1.25rem;
  box-shadow: inset 3px 0 0 var(--ui-cyan);
}

/* Give the first three Home Lab image/caption pairs their own rhythm. */
.networking-index .post-content > img.network-image:nth-of-type(-n + 3) {
  margin: 2.6rem 0 0.75rem;
}

.networking-index .post-content > img.network-image:nth-of-type(-n + 3) + .image-caption {
  margin: 0 0 3rem;
}

@media screen and (max-width: 768px) {
  .networking-index .post-title {
    font-size: clamp(2rem, 9vw, 3rem);
  }
}
