/* ============================================
   Dark editorial theme — site-wide
   Colors/font sourced from pietroboselli.com/new-bio
   (warm charcoal background, white type, Aktiv Grotesk),
   with the background hue tuned to match this site's own
   hero photo (warm amber) instead of a neutral gray.
   Aktiv Grotesk is a paid Adobe/Typekit font, so this
   substitutes Inter — the closest free grotesque match.
   Scoped to body.theme-mono. Linked from every page.
   ============================================ */
body.theme-mono {
  --font-heading: "Inter", -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif;

  --color-bg: #4a453e;
  --color-bg-mobile-bar: #3e3a34;
  --color-card: #403c36;
  --color-card-hover: #4f4a42;
  --color-border: rgba(255, 255, 255, 0.25);
  --color-border-strong: rgba(255, 255, 255, 0.45);

  --color-text-primary: #ffffff;
  --color-text-body: #f2f2f2;
  --color-text-muted: #c9c9c9;

  --color-accent: #ffffff;
  --color-accent-hover: #ffffff;
  --color-on-accent: #1a1a1a;
  --color-focus-ring: #ffffff;
}

body.theme-mono .section {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
}

/* Education continues the Experience timeline rather than starting a new
   "chapter" — drop the divider rule and tighten the gap so the heading
   alone marks the transition, instead of heading + rule + full padding
   all stacking on top of each other. */
body.theme-mono .section.section--compact {
  border-top: none;
  padding-top: var(--space-4);
}

/* Widen the reading column on the About page at desktop sizes — the
   site-wide 40rem max-width reads a bit narrow (~45 characters per
   line) once the accordion labels get long; 56rem lands closer to the
   60-75 character desktop sweet spot. */
@media (min-width: 1024px) {
  body.page-home {
    --content-max-width: 56rem;
  }
}

/* Widen the Projects page at desktop to make room for the side
   visual next to the card grid without squeezing the two card
   columns too narrow. */
@media (min-width: 1024px) {
  body.page-projects {
    --content-max-width: 68rem;
  }
}

body.theme-mono .about__lead {
  font-size: var(--fs-md);
}

/* ---- Facts accordion (About page) ---- */
.facts {
  margin-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.facts__item {
  border-bottom: 1px solid var(--color-border);
}

.facts__heading {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
}

.facts__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  text-align: left;
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-text-primary);
  transition: color var(--duration-fast) var(--ease-out);
}
body.theme-mono .facts__trigger {
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: 0.03em;
}
.facts__trigger:hover,
.facts__trigger:focus-visible {
  color: var(--color-text-muted);
}

.facts__icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.facts__icon span {
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  transition: transform var(--duration-base) var(--ease-out), opacity var(--duration-base) var(--ease-out);
}
.facts__icon span:nth-child(1) { width: 100%; height: 1.5px; }
.facts__icon span:nth-child(2) { width: 1.5px; height: 100%; }

.facts__item.is-open .facts__icon span:nth-child(2) {
  transform: rotate(90deg);
  opacity: 0;
}

.facts__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-base) var(--ease-out);
}
.facts__item.is-open .facts__panel {
  /* Generous cap (not a real content height) — the "Previously" panel can
     grow past 600px once its nested role-accordion rows are all expanded,
     and a tight cap here clips them instead of letting the panel grow. */
  max-height: 2000px;
}

.facts__panel-inner {
  margin: 0 0 var(--space-5);
  color: var(--color-text-body);
  font-size: var(--fs-base);
}
.facts__panel-inner strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* ---- Nested role accordion (About → "Previously" panel) ----
   A compact accordion-per-row, styled as a hybrid of the top-level
   .facts accordion and the .timeline dot/rule used on the Experience
   page, so the "Previously" panel reads as a mini timeline you can
   drill into instead of a single wall of text. */
.facts__panel-inner--tight {
  margin-bottom: var(--space-3);
}

.role-accordion {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  border-top: 1px solid var(--color-border);
}

.role-accordion__item {
  position: relative;
  border-bottom: 1px solid var(--color-border);
}
.role-accordion__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.role-accordion__heading {
  margin: 0;
}

.role-accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0 var(--space-3) var(--space-4);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  transition: color var(--duration-fast) var(--ease-out);
}
.role-accordion__trigger:hover,
.role-accordion__trigger:focus-visible {
  color: var(--color-text-muted);
}

.role-accordion__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
}

.role-accordion__role {
  font-size: var(--fs-sm);
  font-weight: 500;
}

.role-accordion__date {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.role-accordion__icon {
  position: relative;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}
.role-accordion__icon span {
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  transition: transform var(--duration-base) var(--ease-out), opacity var(--duration-base) var(--ease-out);
}
.role-accordion__icon span:nth-child(1) { width: 100%; height: 1px; }
.role-accordion__icon span:nth-child(2) { width: 1px; height: 100%; }
.role-accordion__item.is-open .role-accordion__icon span:nth-child(2) {
  transform: rotate(90deg);
  opacity: 0;
}

.role-accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-base) var(--ease-out);
}
.role-accordion__item.is-open .role-accordion__panel {
  max-height: 240px;
}

.role-accordion__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: 0 0 0 var(--space-4);
  color: var(--color-text-body);
  font-size: var(--fs-sm);
}
.role-accordion__list li {
  position: relative;
  padding-left: var(--space-4);
}
.role-accordion__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

/* Stagger the facts accordion's scroll-in reveal (About page) */
.facts__item.reveal:nth-child(1) { transition-delay: 0ms; }
.facts__item.reveal:nth-child(2) { transition-delay: 60ms; }
.facts__item.reveal:nth-child(3) { transition-delay: 120ms; }
.facts__item.reveal:nth-child(4) { transition-delay: 180ms; }

/* ---- Minimal list (About → "Other" panel: education & certificates) ---- */
.minilist__heading {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.minilist__heading:not(:first-child) {
  margin-top: var(--space-4);
}

.minilist__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.minilist__list:last-child {
  margin-bottom: var(--space-2);
}

.minilist__list li {
  position: relative;
  padding-left: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-body);
}
.minilist__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.minilist__primary {
  color: var(--color-text-primary);
  font-weight: 500;
}
.minilist__secondary {
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
}

/* ---- Quick facts strip (About page) ---- */
.quickfacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: var(--space-3);
  padding: var(--space-5) 0;
  margin: 0;
  list-style: none;
  border-bottom: 1px solid var(--color-border);
}
.quickfacts li {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.quickfacts li + li::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  margin: 0 var(--space-4);
  vertical-align: middle;
}

/* ---- Next-steps links (About page) ---- */
.about__next {
  padding-bottom: var(--space-6);
}
.about__next-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}
.about__next-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-primary);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-border-strong);
  transition: color var(--duration-fast) var(--ease-out);
}
.about__next-link:hover,
.about__next-link:focus-visible {
  color: var(--color-text-muted);
}
.about__next-link svg {
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out);
}
.about__next-link:hover svg,
.about__next-link:focus-visible svg {
  transform: translateX(4px);
}
