/* ==========================================================================
   About Page
   Architecture cleanup + mobile/spacing correction

   Ownership:
   - _data/about.yml owns editable About content, skills, roles, and contact.
   - _layouts/about.html owns About page structure.
   - This file owns About-specific composition only.
   - Global CSS owns the page background, typography tokens, colours, and nav.
   ========================================================================== */

.about-page-shell {
  width: 100%;
  min-height: 100vh;
  padding: clamp(4.35rem, 7vh, 5.6rem) clamp(1rem, 5vw, 3.5rem) 0;
  box-sizing: border-box;
  background: transparent;
}

.about-page {
  width: min(100%, 1180px);
  margin: 0 auto 4rem;
  color: var(--text-secondary, #C4C7D4);
}

/* --------------------------------------------------------------------------
   Shared page rhythm
   -------------------------------------------------------------------------- */

.about-intro-copy h2,
.about-section h2,
.about-skills-band h2,
.about-bottom-panel h2 {
  width: 100%;
  max-width: none;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  color: var(--text-primary, #F4F1EA);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.09));
  font-size: clamp(1.28rem, 1.55vw, 1.62rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.about-section,
.about-skills-band,
.about-background,
.about-bottom-grid {
  width: 100%;
}

.about-section {
  margin: 0 0 clamp(2.05rem, 3.8vw, 3.1rem);
}

.about-intro-copy p,
.about-section p,
.about-section li,
.about-bottom-panel p,
.about-bottom-panel li {
  color: var(--text-secondary, #C4C7D4);
  font-size: clamp(0.92rem, 0.96vw, 0.98rem);
  line-height: 1.68;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.about-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
  gap: clamp(1.8rem, 4vw, 3.25rem);
  align-items: start;
  margin-bottom: clamp(2.05rem, 3.8vw, 3rem);
}

.about-intro-copy {
  min-width: 0;
  max-width: none;
}

.about-lead-wrap {
  max-width: 820px;
  min-height: clamp(8.4rem, 12vw, 11.5rem);
  margin-bottom: 0.9rem;
}

.about-lead-wrap::after {
  content: "";
  display: block;
  clear: both;
}

.about-inline-headshot {
  float: left;
  width: clamp(8.3rem, 12vw, 11.4rem);
  height: clamp(8.3rem, 12vw, 11.4rem);
  margin: 0.05rem 1.45rem 0.9rem 0;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--bg-surface, #111827);
  shape-outside: circle(50%);
}

.about-lead-wrap p {
  max-width: 820px;
  padding-top: clamp(1.15rem, 2.2vw, 2rem);
  color: var(--text-primary, #F4F1EA);
  font-size: clamp(0.98rem, 1vw, 1.06rem);
  font-weight: 570;
  line-height: 1.62;
}

.about-intro-rest {
  clear: both;
  max-width: 820px;
}

.about-intro-rest p {
  max-width: 820px;
}

.about-direction-panel {
  margin-top: clamp(3.1rem, 4.6vw, 3.8rem);
  padding: 0.95rem 1rem 1rem;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.09));
  border-radius: var(--radius-md, 14px);
  background: rgba(255, 255, 255, 0.024);
}

.panel-kicker {
  margin: 0 0 0.45rem;
  color: var(--accent-soft, #B7C5FF);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-summary {
  margin: 0 0 0.75rem;
  color: var(--text-secondary, #C4C7D4);
  font-size: 0.9rem;
  line-height: 1.58;
}

/* Role chips sit in a narrow panel, so use natural wrapping rather than
   rigid columns. This prevents desktop overflow. */
.role-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.role-chip-list li,
.skill-group li {
  width: auto;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  padding: 0.24rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary, #C4C7D4);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Why Work With Me
   -------------------------------------------------------------------------- */

.about-story {
  max-width: none;
}

/* Full-width section, normal paragraph rhythm. No grid here, because grid gaps
   caused the oversized paragraph spacing on desktop and mobile. */
.about-wide-copy {
  display: block;
  width: 100%;
  max-width: none;
}

.about-wide-copy > p {
  max-width: none;
  width: 100%;
  margin: 0 0 1.05rem;
}

.about-wide-copy > p:last-of-type {
  margin-bottom: 0;
}

.about-wide-copy > blockquote {
  max-width: 820px;
  margin: 1.25rem 0 0;
  padding: 0.75rem 0 0.75rem 1rem;
  border: 0;
  border-left: 2px solid var(--accent-teal, #5CA6A6);
  background: transparent;
  color: var(--text-primary, #F4F1EA);
  font-style: italic;
}

.about-wide-copy blockquote p {
  margin: 0;
  color: var(--text-primary, #F4F1EA);
  font-size: 0.94rem;
  line-height: 1.62;
}

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */

.about-skills-band {
  margin: 0 0 clamp(2.2rem, 4vw, 3.2rem);
}

.skills-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  margin-top: 1.05rem;
}

.skill-group {
  min-width: 0;
  padding: 0.85rem 0.9rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius-md, 14px);
  background: rgba(255, 255, 255, 0.018);
}

.skill-group h3 {
  margin: 0 0 0.7rem;
  color: var(--text-primary, #F4F1EA);
  font-size: 0.9rem;
  line-height: 1.3;
}

.skill-group ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-group li {
  width: 100%;
  white-space: nowrap;
}

.skill-group li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: min(100%, 10rem);
  justify-self: center;
}

/* --------------------------------------------------------------------------
   Background rows
   -------------------------------------------------------------------------- */

.info-block-container {
  width: 100%;
  max-width: none;
}

.info-block-container h4 {
  margin: 1.65rem 0 0.65rem;
  padding-left: 0.75rem;
  color: var(--text-primary, #F4F1EA);
  font-size: 0.94rem;
  line-height: 1.3;
  border-left: 2px solid transparent;
}

.info-block {
  margin: 0 0 0.75rem;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.028);
  border: 0;
  border-left: 2px solid rgba(139, 124, 246, 0.68);
  border-radius: 0.25rem;
  box-shadow: none;
}

.info-block:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: none;
}

.info-block p,
.info-block li {
  max-width: none;
  margin: 0;
  color: var(--text-secondary, #C4C7D4);
}

.info-block strong {
  color: var(--text-primary, #F4F1EA);
}

.info-block a,
.info-block a:visited {
  color: var(--text-link, #B7C5FF);
  text-decoration: none;
  font-weight: 560;
}

.info-block a:hover,
.info-block a:focus {
  color: var(--text-primary, #F4F1EA);
  text-decoration: none;
}

.ib-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.ib-date {
  color: var(--text-muted, #8F96AA);
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Bottom grid + contact
   -------------------------------------------------------------------------- */

.about-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: clamp(1.2rem, 3vw, 2.2rem);
  align-items: start;
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
}

.about-bottom-panel {
  min-width: 0;
}

.about-contact-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.about-contact-list a,
.about-contact-list a:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary, #C4C7D4);
  font-size: 0.95rem;
  font-weight: 560;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.about-contact-list a i {
  width: 1rem;
  color: var(--accent-soft, #B7C5FF);
  font-size: 0.88rem;
  text-align: center;
}

.about-contact-list a:hover,
.about-contact-list a:focus {
  color: var(--text-primary, #F4F1EA);
  transform: translateX(2px);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 940px) {
  .about-masthead,
  .about-bottom-grid {
    grid-template-columns: 1fr;
  }

  .about-direction-panel {
    margin-top: 0;
  }

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

  /* Mobile should fit chip content rather than forcing huge full-width pills. */
  .role-chip-list,
  .skill-group ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .role-chip-list li,
  .skill-group li,
  .skill-group li:last-child:nth-child(odd) {
    width: auto;
    max-width: 100%;
    justify-self: auto;
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .about-page-shell {
    padding-top: 4.5rem;
  }

  .about-lead-wrap {
    min-height: 0;
  }

  .about-inline-headshot {
    width: 6.2rem;
    height: 6.2rem;
    margin-right: 1rem;
    margin-bottom: 0.65rem;
  }

  .about-lead-wrap p {
    padding-top: 0.3rem;
  }
}
