/* ChemicallyFired — founder profile (/ethan-garcia/) and the homepage
   "Meet the founder" block. Scoped to .fp-page / .fp-home / .fp-crumbs.
   Dark instrument look under Precision (dark), light under Precision light
   mode and the Legacy theme — same tokens as the Orbital Atlas. */

@font-face {
  font-family: "CF Founder Sans";
  src: url("/themes/precision-lab/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "CF Founder Mono";
  src: url("/themes/precision-lab/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

.fp-page,
.fp-home,
.fp-crumbs {
  --fp-surface: #111416;
  --fp-surface-2: #15191b;
  --fp-border: rgba(255, 255, 255, 0.09);
  --fp-border-strong: rgba(255, 255, 255, 0.18);
  --fp-text: #eef0f0;
  --fp-muted: rgba(226, 230, 231, 0.7);
  --fp-dim: rgba(226, 230, 231, 0.5);
  --fp-orange: #ff5a1f;
  --fp-orange-soft: rgba(255, 90, 31, 0.12);
  --fp-media: #0b0d0e;
  --fp-font: "CF Founder Sans", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fp-mono: "CF Founder Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--fp-text);
  font-family: var(--fp-font);
}

html[data-pl-mode="light"] .fp-page,
html[data-pl-mode="light"] .fp-home,
html[data-pl-mode="light"] .fp-crumbs,
html:not([data-theme="precision-lab"]) .fp-page,
html:not([data-theme="precision-lab"]) .fp-home,
html:not([data-theme="precision-lab"]) .fp-crumbs {
  --fp-surface: #ffffff;
  --fp-surface-2: #f6f7f6;
  --fp-border: rgba(0, 0, 0, 0.09);
  --fp-border-strong: rgba(0, 0, 0, 0.18);
  --fp-text: #121517;
  --fp-muted: rgba(18, 21, 23, 0.72);
  --fp-dim: rgba(18, 21, 23, 0.52);
  --fp-media: #eceeed;
}

html:not([data-theme="precision-lab"]) body.fp-body {
  background: #f2f3f2;
}

/* Breadcrumb ------------------------------------------------------------- */
.fp-crumbs {
  display: flex;
  gap: 8px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4.6vw, 72px) 0;
  color: var(--fp-dim);
  font-family: var(--fp-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fp-crumbs a {
  color: var(--fp-muted);
  text-decoration: none;
}

.fp-crumbs a:hover {
  color: var(--fp-text);
}

/* Page ------------------------------------------------------------------ */
.fp-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4.6vw, 72px) clamp(56px, 8vw, 110px);
}

.fp-page .fp-label,
.fp-home .fp-label {
  margin: 0 0 12px;
  color: var(--fp-orange);
  font-family: var(--fp-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fp-page .fp-dot,
.fp-crumbs .fp-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--fp-orange);
  vertical-align: 1px;
}

.fp-page .fp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding-bottom: clamp(32px, 5vw, 64px);
  border-bottom: 1px solid var(--fp-border);
}

.fp-page .fp-kicker {
  margin: 0 0 18px;
  color: var(--fp-muted);
  font-family: var(--fp-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fp-page .fp-kicker a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--fp-orange);
  text-underline-offset: 3px;
}

.fp-page h1 {
  margin: 0;
  color: var(--fp-text);
  font-family: var(--fp-font);
  font-size: clamp(3.2rem, 9vw, 7.6rem);
  font-weight: 480;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.fp-page .fp-title {
  margin: 18px 0 0;
  color: var(--fp-text);
  font-family: var(--fp-mono);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}

.fp-page .fp-headline {
  max-width: 34ch;
  margin: 18px 0 0;
  color: var(--fp-muted);
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  line-height: 1.45;
}

.fp-page .fp-actions,
.fp-home .fp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.fp-page .fp-portrait {
  position: relative;
  width: 100%;
  max-width: 280px;
  justify-self: end;
  margin: 0;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--fp-border-strong);
  border-radius: 22px;
  overflow: hidden;
  background: var(--fp-media);
}

.fp-page .fp-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fp-page .fp-portrait::before,
.fp-page .fp-portrait::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 0 solid var(--fp-orange);
  pointer-events: none;
}

.fp-page .fp-portrait::before {
  top: 14px;
  left: 14px;
  border-top-width: 1.5px;
  border-left-width: 1.5px;
}

/* Both corner marks sit at the top so they never cut into the name label. */
.fp-page .fp-portrait::after {
  top: 14px;
  right: 14px;
  border-top-width: 1.5px;
  border-right-width: 1.5px;
}

.fp-page .fp-portrait figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(8, 10, 11, 0.7);
  color: #eef0f0;
  font-family: var(--fp-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  max-width: calc(100% - 28px);
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-page .fp-monogram,
.fp-home .fp-monogram {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--fp-dim);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 300;
  letter-spacing: -0.05em;
  background:
    linear-gradient(var(--fp-border) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--fp-border) 1px, transparent 1px) 0 0 / 32px 32px;
}

/* Bio + side column */
.fp-page .fp-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(36px, 5vw, 64px) 0;
}

.fp-page .fp-bio p:not(.fp-label) {
  max-width: 68ch;
  margin: 0 0 1.1em;
  color: var(--fp-text);
  font-size: clamp(1.02rem, 1.3vw, 1.16rem);
  line-height: 1.7;
}

.fp-page .fp-side {
  align-self: start;
  padding: 20px;
  border: 1px solid var(--fp-border-strong);
  border-radius: 18px;
  background: var(--fp-surface);
}

.fp-page .fp-facts {
  margin: 0 0 22px;
}

.fp-page .fp-facts div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--fp-border);
}

.fp-page .fp-facts dt {
  color: var(--fp-muted);
  font-size: 0.86rem;
}

.fp-page .fp-facts dd {
  margin: 0;
  color: var(--fp-text);
  font-family: var(--fp-mono);
  font-size: 0.78rem;
  text-align: right;
}

.fp-page .fp-links {
  display: grid;
  gap: 8px;
}

.fp-page .fp-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--fp-border);
  border-radius: 12px;
  color: var(--fp-text);
  text-decoration: none;
}

.fp-page .fp-link small {
  color: var(--fp-dim);
  font-family: var(--fp-mono);
  font-size: 0.66rem;
}

.fp-page .fp-link:hover {
  border-color: var(--fp-orange);
}

/* Selected work */
.fp-page .fp-work-wrap {
  padding: clamp(24px, 4vw, 48px) 0;
  border-top: 1px solid var(--fp-border);
}

.fp-page .fp-section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4px 16px;
  margin-bottom: 20px;
}

.fp-page .fp-section-head .fp-label {
  grid-column: 1 / -1;
  margin: 0;
}

.fp-page .fp-section-head h2,
.fp-page .fp-cta h2 {
  margin: 0;
  color: var(--fp-text);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 480;
  letter-spacing: -0.035em;
}

.fp-page .fp-section-head a {
  color: var(--fp-muted);
  font-size: 0.9rem;
}

.fp-page .fp-work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.fp-page .fp-work {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--fp-border-strong);
  border-radius: 16px;
  background: var(--fp-surface);
  color: var(--fp-text);
  text-decoration: none;
}

.fp-page .fp-work-media {
  aspect-ratio: 4 / 3;
  background: var(--fp-media);
  overflow: hidden;
}

.fp-page .fp-work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fp-page .fp-work-meta {
  display: grid;
  gap: 4px;
  padding: 12px 14px 14px;
}

.fp-page .fp-work-meta small {
  color: var(--fp-dim);
  font-family: var(--fp-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fp-page .fp-work-meta strong {
  font-size: 1.02rem;
  font-weight: 500;
}

.fp-page .fp-cta {
  margin-top: clamp(20px, 3vw, 36px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--fp-border-strong);
  border-radius: 22px;
  background:
    linear-gradient(var(--fp-border) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--fp-border) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--fp-surface);
}

.fp-page .fp-cta p:not(.fp-label) {
  max-width: 56ch;
  margin: 12px 0 0;
  color: var(--fp-muted);
  line-height: 1.6;
}

/* Homepage block --------------------------------------------------------- */
.fp-home {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 36px) clamp(16px, 4.6vw, 72px);
}

.fp-home .fp-home-inner {
  --fh-pad: clamp(14px, 2vw, 20px);
  display: grid;
  grid-template-columns: clamp(120px, 14vw, 170px) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(16px, 2.6vw, 28px);
  padding: var(--fh-pad);
  border: 1px solid var(--fp-border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--fp-surface);
}

/* The photo runs the full height of the card, flush with its left edge. */
.fp-home .fp-home-photo {
  display: block;
  margin: calc(var(--fh-pad) * -1) 0 calc(var(--fh-pad) * -1) calc(var(--fh-pad) * -1);
  min-height: 150px;
  overflow: hidden;
  border-radius: 17px 0 0 17px;
  background: var(--fp-media);
}

.fp-home .fp-home-photo img {
  object-position: 50% 25%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fp-home h2 {
  margin: 0;
  font-family: var(--fp-font);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 480;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.fp-home h2 a {
  color: var(--fp-text);
  text-decoration: none;
}

.fp-home .fp-title {
  margin: 10px 0 0;
  color: var(--fp-muted);
  font-family: var(--fp-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.fp-home .fp-home-bio {
  max-width: 70ch;
  margin: 8px 0 14px;
  color: var(--fp-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .fp-page .fp-hero,
  .fp-page .fp-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .fp-page .fp-portrait {
    max-width: 250px;
    justify-self: start;
    order: -1;
  }
  .fp-page .fp-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .fp-home .fp-home-inner {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .fp-home .fp-home-photo {
    min-height: 0;
  }
  .fp-page .fp-work-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .fp-page .fp-portrait.is-empty {
    max-width: 240px;
  }
}

/* The homepage avatar is small: a small monogram too. */
.fp-home .fp-monogram {
  font-size: 1.6rem;
  background-size: 12px 12px;
}
