/* Match the individual portfolios' Geist heading weights and tracking. */
html:root body.portfolio-home h1 {
  font-weight: 600;
  letter-spacing: -.035em;
  text-transform: none !important;
}
html:root body.portfolio-home h2 {
  font-weight: 600;
  letter-spacing: -.025em;
  text-transform: none !important;
}
html:root body.portfolio-home h3 {
  font-weight: 600;
  letter-spacing: -.02em;
  text-transform: none;
}

/* Portfolio library: continue the profile header treatment in light mode. */
html:root[data-theme="light"] body.portfolio-home .portfolio-masthead {
  --ct-bg: var(--portfolio-header-bg, #172129);
  --ct-ink: #f8f5ef;
  --ct-muted: #d9e5e8;
  --ct-line: #576873;
  --ct-denim: #bdd0db;
  background-color: var(--ct-bg) !important;
  color: var(--ct-ink);
  color-scheme: dark;
}

html:root[data-theme="light"] body.portfolio-home .section-navigation {
  --panel: #d9e5e8;
  --muted: #293540;
  --soft-hover: color-mix(in srgb, #293540 8%, #d9e5e8);
  --soft-selected: #354550;
  --soft-selected-ink: #f8f5ef;
  --soft-focus: #4a657a;
  background-color: var(--panel) !important;
  color: var(--muted);
  color-scheme: light;
}

/* A slight cream tint separates the featured panel from the page canvas. */
html:root[data-theme="light"] body.portfolio-home .lead-strategy {
  background-color: #f8f5ef;
  background-color: color-mix(in srgb, var(--ct-bg) 85%, #e8e4dd);
}

/* Use the shared portfolio ledger, without the older directory frame. */
html:root body.portfolio-home .directory-table {
  position: relative;
  border: 0;
  border-radius: 0;
  overscroll-behavior-x: contain;
}
html:root body.portfolio-home .directory-table table.portfolio-data-table {
  --green: var(--pt-positive);
  --red: var(--pt-negative);
  min-width: 1040px;
  border-top: 1px solid var(--pt-line);
}
html:root body.portfolio-home .directory-table table.portfolio-data-table td:first-child strong {
  color: var(--pt-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
html:root body.portfolio-home .directory-table table.portfolio-data-table td small {
  margin-top: 2px;
  color: var(--pt-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
html:root body.portfolio-home .directory-table table.portfolio-data-table td small.directory-source {
  margin-top: 4px;
  font-size: 11px !important;
  line-height: 1.5 !important;
}
html:root body.portfolio-home .directory-table table.portfolio-data-table td:nth-child(n + 3):nth-child(-n + 7) {
  font: inherit;
}
html:root body.portfolio-home .directory-table table.portfolio-data-table td:last-child a {
  color: var(--pt-muted);
}
html:root body.portfolio-home .directory-table:focus-visible {
  outline: 2px solid var(--ct-blue);
  outline-offset: 4px;
}

/* Keep the portfolio name in view when the figures scroll on a phone. */
@media(max-width:760px) {
  html:root body.portfolio-home .directory-table table.portfolio-data-table { table-layout: fixed; }
  html:root body.portfolio-home .directory-table table.portfolio-data-table th:first-child { width: 180px; }
  html:root body.portfolio-home .directory-table table.portfolio-data-table th:last-child { width: 44px; }
  html:root body.portfolio-home .directory-table table.portfolio-data-table :is(th, td):first-child:not([colspan]) {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--pt-bg);
    box-shadow: 1px 0 0 var(--pt-line);
    transition: background-color 160ms ease-out;
  }
  html:root body.portfolio-home .directory-table table.portfolio-data-table tbody tr:hover td:first-child:not([colspan]) { background: var(--pt-hover); }
}
@media(prefers-reduced-motion:reduce) {
  html:root body.portfolio-home .directory-table table.portfolio-data-table :is(th, td):first-child:not([colspan]) { transition: none; }
}

/* Center the portfolio universe above one broad editorial headline. */
html:root body.portfolio-home .portfolio-masthead {
  padding-block: 0;
  overflow: clip;
}
html:root body.portfolio-home .hero {
  position: relative;
  grid-template-columns: 1fr;
  min-height: 0;
  padding-block: 12px;
  gap: 12px;
}
html:root body.portfolio-home .orbit-hero {
  justify-self: center;
  max-width: 760px;
  margin-inline-end: 0;
}
html:root body.portfolio-home .hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.055em;
}
html:root body.portfolio-home .hero .eyebrow { margin-bottom: 8px; }
.hero-word { display: inline-block; }
.hero-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  margin-top: 12px;
}
html:root body.portfolio-home .hero-footer p { max-width: 580px; font-size: 14px; }
html:root body.portfolio-home .hero-footer .orbit-caption {
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 4px 0 4px 24px;
  border-top: 0;
  border-left: 1px solid var(--ct-line);
  font-size: 14px;
}
html:root body.portfolio-home .portfolio-masthead .orbit-hint { display: none; }
html:root body.portfolio-home .portfolio-masthead .orbit-point { animation: none; }
.library-browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 0;
  padding: 0 18px;
  border: 1px solid var(--ct-line);
  border-radius: 8px;
  color: var(--ct-ink);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 160ms ease-out;
}
.library-browse:hover { background: color-mix(in srgb, var(--ct-ink) 8%, transparent); }
.library-browse:focus-visible { outline: 2px solid var(--ct-denim); outline-offset: 4px; }
html:root body.portfolio-home .orbit-point i {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-style: normal;
}
.orbit-name {
  width: 80%;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}
html:root body.portfolio-home .orbit-number { font-size: 10px; }
html:root body.portfolio-home .directory-table table.portfolio-data-table .directory-source {
  margin-top: 5px;
  color: var(--pt-muted);
  font-size: 11px !important;
  line-height: 1.5 !important;
}
.directory-source details { margin-top: 3px; }
.directory-source summary {
  width: fit-content;
  padding-block: 4px;
  cursor: pointer;
  color: var(--pt-muted);
}
.directory-source summary:hover { color: var(--pt-ink); }
.directory-source summary:focus-visible { outline: 2px solid var(--ct-blue); outline-offset: 3px; }
.directory-source-detail {
  display: grid;
  gap: 3px;
  max-width: 440px;
  padding: 6px 0 3px;
}
html:root body.portfolio-home .directory-table table.portfolio-data-table th { padding-block: 0; }
html:root body.portfolio-home .directory-table table.portfolio-data-table th button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-height: 48px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.directory-table th button:hover { color: var(--pt-ink); }
.directory-table th button:focus-visible { outline: 2px solid var(--ct-blue); outline-offset: 3px; }
.directory-sort-icon { width: 14px; height: 14px; flex: none; opacity: .4; }
.directory-table th[aria-sort="ascending"] .directory-sort-icon,
.directory-table th[aria-sort="descending"] .directory-sort-icon { opacity: 1; color: var(--pt-positive); }
.directory-table th[aria-sort="ascending"] .sort-down,
.directory-table th[aria-sort="descending"] .sort-up { opacity: .15; }
.library-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* Keep the full hero and section tabs visible on shorter desktop screens. */
@media(min-width:901px) {
  html:root body.portfolio-home .orbit-hero {
    max-width: min(760px, max(360px, calc((100svh - 336px) * 1.5)));
  }
}
@media(max-width:640px) {
  html:root body.portfolio-home .hero { padding-block: 22px 26px; gap: 26px; }
  html:root body.portfolio-home .orbit-hero {
    width: calc(100% + 16px);
    max-width: min(420px, calc(100vw - 16px));
  }
  html:root body.portfolio-home .orbit-field { aspect-ratio: 1.35; }
  /* Enlarge around each center and keep circles round in the taller field. */
  html:root body.portfolio-home .orbit-expanded .orbit-point {
    width: calc(var(--mobile-bubble-size) * 1.14);
    height: calc(var(--mobile-bubble-size) * 1.539);
    left: calc(var(--mobile-bubble-left) - var(--mobile-bubble-size) * .07);
    top: calc(var(--mobile-bubble-top) - var(--mobile-bubble-size) * .0945);
  }
  html:root body.portfolio-home .orbit-point:nth-child(1) { --mobile-bubble-size: 26%; --mobile-bubble-left: 35%; --mobile-bubble-top: 4%; }
  html:root body.portfolio-home .orbit-point:nth-child(2) { --mobile-bubble-size: 20%; --mobile-bubble-left: 8%; --mobile-bubble-top: 8%; }
  html:root body.portfolio-home .orbit-point:nth-child(3) { --mobile-bubble-size: 17%; --mobile-bubble-left: 4%; --mobile-bubble-top: 44%; }
  html:root body.portfolio-home .orbit-point:nth-child(4) { --mobile-bubble-size: 20%; --mobile-bubble-left: 26%; --mobile-bubble-top: 49%; }
  html:root body.portfolio-home .orbit-point:nth-child(5) { --mobile-bubble-size: 20%; --mobile-bubble-left: 68%; --mobile-bubble-top: 5%; }
  html:root body.portfolio-home .orbit-point:nth-child(6) { --mobile-bubble-size: 12%; --mobile-bubble-left: 83%; --mobile-bubble-top: 39%; }
  html:root body.portfolio-home .orbit-point:nth-child(7) { --mobile-bubble-size: 19%; --mobile-bubble-left: 60%; --mobile-bubble-top: 50%; }
  html:root body.portfolio-home .orbit-point:nth-child(8) { --mobile-bubble-size: 12%; --mobile-bubble-left: 8%; --mobile-bubble-top: 76%; }
  html:root body.portfolio-home .orbit-point:nth-child(9) { --mobile-bubble-size: 10%; --mobile-bubble-left: 29%; --mobile-bubble-top: 85%; }
  html:root body.portfolio-home .orbit-point:nth-child(10) { --mobile-bubble-size: 11%; --mobile-bubble-left: 49%; --mobile-bubble-top: 83%; }
  html:root body.portfolio-home .orbit-point:nth-child(11) { --mobile-bubble-size: 16%; --mobile-bubble-left: 79%; --mobile-bubble-top: 74%; }
  html:root body.portfolio-home .hero h1 { font-size: clamp(30px, 8vw, 40px); }
  html:root body.portfolio-home .hero .eyebrow { font-size: 9px; margin-bottom: 12px; }
  .hero-footer { grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
  html:root body.portfolio-home .hero-footer .orbit-caption {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-left: 0;
    border-top: 1px solid var(--ct-line);
    padding: 14px 0 0;
    gap: 8px 16px;
    font-size: 12px;
  }
  .library-browse { justify-self: start; }
  .orbit-name { font-size: 11px; }
  .orbit-point:nth-child(3) .orbit-name,
  .orbit-point:nth-child(11) .orbit-name { display: none; }
}
@media(min-width:641px) and (max-width:900px) {
  .hero-footer { grid-template-columns: minmax(0, 1fr) auto; gap: 20px; }
  html:root body.portfolio-home .hero-footer .orbit-caption { grid-column: 1; grid-row: 2; border-left: 0; padding-left: 0; }
  .hero-footer .library-browse { grid-column: 2; grid-row: 1 / span 2; }
}
@media(prefers-reduced-motion:reduce) { .library-browse { transition: none; } }
