.ap-home {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.ap-home-content > *:first-child {
  margin-top: 0;
}

.ap-home-content > * + * {
  margin-top: var(--space-md);
}

.ap-home-content section {
  border-top: 1px solid var(--soft-line);
  padding-top: var(--space-sm);
}

.ap-home-content section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.ap-home-content .skills .ap-skills-domains {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.ap-home-content .skills .ap-skill-domain {
  border: 0;
  padding: 0;
}

.ap-home-content .skills .ap-skill-domain h4 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
  padding-top: 0;
  border-top: 0;
}

.ap-home-content .skills .ap-skill-domain p {
  margin: 0 0 8px;
}

.ap-home-content h2,
.ap-home-content h4 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  padding-top: 0;
  border-top: 0;
}

.ap-home-content h2 {
  font-size: 2rem;
  line-height: 1.2;
}

.ap-home-content h3 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--space-sm) 0 4px;
}

.ap-home-content h4 {
  font-size: 1.6rem;
  line-height: 1.2;
}

/* Field Notes inner category headings should be visually below main sections. */
.ap-home-content section.artical-agile h2,
.ap-home-content section.artical-agile h3,
.ap-home-content section.artical-agile h4,
.ap-home-content section.artical-delivery_leadership h2,
.ap-home-content section.artical-delivery_leadership h3,
.ap-home-content section.artical-delivery_leadership h4 {
  font-size: 1.45rem;
  line-height: 1.25;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  padding-top: 0;
  border-top: 0;
}

.ap-home-content h5 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 var(--space-xs);
}

.ap-home-content p,
.ap-home-content li {
  max-width: 84ch;
}

.ap-home-content p {
  margin: 0 0 var(--space-sm);
}

.ap-home-content a {
  text-underline-offset: 0.16em;
}

/* Hybrid layout: keep readable line-length, enrich side whitespace with light structure. */
.home .site-main {
  width: min(1200px, 90vw);
}

/* Skills grouped layout */
.ap-skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.ap-skill-card {
  border: 0;
  padding: var(--space-sm);
  min-height: 220px;
}

.ap-skill-card p {
  margin: 0 0 10px;
}

.ap-skill-card p:last-child {
  margin-bottom: 0;
}

/* Notes injected blocks */
.ap-home-notes {
  margin: var(--space-xs) 0 var(--space-sm);
}

.ap-home-note {
  margin-bottom: var(--space-sm);
}

.ap-home-note-title {
  font-size: 1.1rem;
  line-height: 1.35;
  margin: 0 0 4px;
}

.ap-home-note-title a {
  text-decoration: none;
}

.ap-home-note-excerpt {
  color: #3f3f3f;
  margin: 0;
}

.ap-home-content .artical-agile a,
.ap-home-content .artical-delivery_leadership a {
  font-weight: 600;
}

.ap-home-content .artical-agile a::after,
.ap-home-content .artical-delivery_leadership a::after {
  content: " \2192";
}

/* Credentials hierarchy */
.ap-home-content h4:last-of-type + h5 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: var(--space-sm);
}

.ap-home-content p strong {
  font-size: 1.2rem;
  line-height: 1.25;
}

.ap-home-content p:has(strong) {
  margin-top: var(--space-sm);
  margin-bottom: 6px;
}

.ap-home-content p:has(strong) + p {
  color: var(--muted);
  margin-bottom: var(--space-md);
}

@media (max-width: 900px) {
  .ap-home {
    max-width: 100%;
  }

  .home .site-main {
    width: min(92vw, 680px);
  }

  .home .site-main::before,
  .home .site-main::after,
  .ap-home::before,
  .ap-home::after {
    display: none;
  }

  .ap-home-content h2,
  .ap-home-content h4 {
    font-size: 1.35rem;
    margin-top: var(--space-sm);
  }

  .ap-home-content h2 {
    font-size: 1.65rem;
    margin-top: var(--space-md);
  }

  .ap-home-content section.artical-agile h2,
  .ap-home-content section.artical-agile h3,
  .ap-home-content section.artical-agile h4,
  .ap-home-content section.artical-delivery_leadership h2,
  .ap-home-content section.artical-delivery_leadership h3,
  .ap-home-content section.artical-delivery_leadership h4 {
    font-size: 1.25rem;
    margin-top: var(--space-sm);
  }

  .ap-home-content .skills .ap-skills-domains {
    grid-template-columns: 1fr;
  }

  .ap-home-content h5 {
    font-size: 1.1rem;
  }

  .ap-home-content p strong {
    font-size: 1.05rem;
  }

  .ap-skills-grid {
    grid-template-columns: 1fr;
  }

  .ap-skill-card {
    min-height: 0;
  }
}

