/* Customize panel (review tool) and the page options it controls.
   Options are attributes on <html>: data-c-accent, data-c-headings, data-c-body, data-c-labels,
   data-c-corners, data-c-spacing, data-c-canvas, data-c-logos, data-c-text, data-c-motion, data-c-hide.
   html[data-c-*] selectors outrank the looks' [data-look] rules, so options apply on top of any look. */

/* ---------- Accent color ---------- */

html[data-c-accent="blue"] { --c-accent: #0066cc; }
html[data-c-accent="espresso"] { --c-accent: #3b281d; }
html[data-c-accent="black"] { --c-accent: #171717; }
html[data-c-accent="green"] { --c-accent: #1e681d; }
html[data-c-accent="terracotta"] { --c-accent: #b0461b; }
html[data-c-accent="violet"] { --c-accent: #57068c; }

html[data-c-accent] .pill--blue,
html[data-c-accent] .pill--blue:hover { background: var(--c-accent); color: #fff; }
html[data-c-accent] .pill--blue:hover { filter: brightness(1.18); }
/* Links on light surfaces; the Ledger espresso panel keeps its own light link */
html[data-c-accent] .text-link { color: var(--c-accent); text-decoration-color: currentColor; }
html[data-c-accent][data-look="ledger"] .role__body li::before { background: var(--c-accent); }

/* ---------- Fonts ---------- */

html[data-c-headings="serif"] { --font-display: "Fraunces", Georgia, serif; }
html[data-c-headings="elegant"] { --font-display: "Instrument Serif", Georgia, serif; }
html[data-c-headings="friendly"] { --font-display: "Nunito", "Helvetica Neue", Arial, sans-serif; }

html[data-c-headings] :is(.hero__title, .contact__title, .display, .section-title, .feature-card__statement,
  .skill-card__title, .role__title, .edu__school, .feature-card__visual) { font-family: var(--font-display); }
html[data-c-headings="serif"] :is(.hero__title, .contact__title, .display, .section-title, .feature-card__statement,
  .skill-card__title, .role__title, .edu__school) { font-weight: 500; letter-spacing: -0.015em; }
html[data-c-headings="elegant"] :is(.hero__title, .contact__title, .display, .section-title, .feature-card__statement,
  .skill-card__title, .role__title, .edu__school) { font-weight: 400; letter-spacing: -0.01em; }
html[data-c-headings="friendly"] :is(.hero__title, .contact__title, .display, .section-title, .feature-card__statement,
  .skill-card__title, .role__title, .edu__school) { font-weight: 700; letter-spacing: -0.02em; }

html[data-c-body="serif"] { --font-text: "Source Serif 4", Georgia, serif; }
html[data-c-body="friendly"] { --font-text: "Nunito", "Helvetica Neue", Arial, sans-serif; }
html[data-c-body] body,
html[data-c-body] :is(.hero__lede, .contact .hero__lede) { font-family: var(--font-text); }
html[data-c-body] :is(.body, .role__body li, .hero__lede, .glance dd, .callout__sub, .art-piece__title) { letter-spacing: normal; }

/* ---------- Small labels ----------
   !important: these override a dozen look-specific label rules at once. */

html[data-c-labels] :is(.kicker, .hero__kicker, .feature-card__kicker, .role__dates, .edu__dates, .glance dt,
  .glance__title, .media__label, .art-piece__meta, .logo-strip__title, .callout__title, .status-label) {
  font-family: var(--font-text) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
html[data-c-labels="caps"] :is(.kicker, .hero__kicker, .feature-card__kicker, .role__dates, .edu__dates, .glance dt,
  .glance__title, .media__label, .art-piece__meta, .logo-strip__title, .callout__title, .status-label) {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}
html[data-c-labels="plain"] :is(.kicker, .hero__kicker, .feature-card__kicker, .role__dates, .edu__dates, .glance dt,
  .glance__title, .media__label, .art-piece__meta, .logo-strip__title, .callout__title, .status-label) {
  font-size: 14px !important;
  font-weight: 500 !important;
}
html[data-c-labels="mono"] :is(.kicker, .hero__kicker, .feature-card__kicker, .role__dates, .edu__dates, .glance dt,
  .glance__title, .media__label, .art-piece__meta, .logo-strip__title, .callout__title, .status-label) {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

/* ---------- Corners ---------- */

html[data-c-corners="sharp"] :is(.feature-card, .skill-card, .glance, .media, .anchor-nav ul) { border-radius: 4px; }
html[data-c-corners="soft"] :is(.feature-card, .skill-card, .glance, .media, .anchor-nav ul) { border-radius: 14px; }
html[data-c-corners="round"] :is(.feature-card, .skill-card, .glance, .media, .anchor-nav ul) { border-radius: 28px; }
html[data-c-corners="sharp"][data-look="ledger"] .highlights { border-radius: 4px; }
html[data-c-corners="soft"][data-look="ledger"] .highlights { border-radius: 14px; }
html[data-c-corners="round"][data-look="ledger"] .highlights { border-radius: 32px; }
html[data-c-corners="sharp"] .pill { border-radius: 6px; }
html[data-c-corners="soft"] .pill,
html[data-c-corners="round"] .pill { border-radius: 9999px; }

/* ---------- Spacing and background ---------- */

html[data-c-spacing="compact"] { --space: 0.62; }
html[data-c-spacing="airy"] { --space: 1.35; }

html[data-c-canvas="warm"] {
  --color-gallery-white: #fbf8f3;
  --color-studio-mist: #f3ede5;
  --ledger-paper: #fbf8f3;
  --paper-canvas: #f7f4ee;
}
html[data-c-canvas="cool"] {
  --color-gallery-white: #f7f9fb;
  --color-studio-mist: #edf1f5;
  --ledger-paper: #f7f9fb;
  --paper-canvas: #f4f6f8;
}

/* ---------- Logos ---------- */

html[data-c-logos="color"] .logo-strip__logo { filter: none; opacity: 1; }
html[data-c-logos="hidden"] :is(.logo-strip, .org-logo, .feature-card__logo) { display: none; }

/* ---------- Text size ---------- */

html[data-c-text="large"] :is(.body, .role__body li, .glance dd) { font-size: 18px !important; line-height: 1.5 !important; }
html[data-c-text="large"] :is(.hero__lede) { font-size: 22px !important; }
html[data-c-text="large"] :is(.role__org span, .callout__sub, .art-piece__title) { font-size: 16px !important; }

/* ---------- Motion ---------- */

html[data-c-motion="off"] { scroll-behavior: auto !important; }
html[data-c-motion="off"] .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---------- Show / hide parts ---------- */

html[data-c-hide~="highlights"] :is(#highlights, li:has(> a[href="#highlights"])),
html[data-c-hide~="skills"] :is(#skills, li:has(> a[href="#skills"])),
html[data-c-hide~="art"] :is(#art, li:has(> a[href="#art"])),
html[data-c-hide~="glance"] .glance,
html[data-c-hide~="index"] .anchor-nav,
html[data-c-hide~="photos"] :is(.media--hero, .media--portrait) { display: none; }

html[data-c-hide~="photos"] .editorial__text { grid-column: 1 / -1; max-width: 760px; }

/* Ledger's section grid: let the remaining cells share the row when some are hidden */
@media (min-width: 1024px) {
  html[data-c-hide][data-look="ledger"] .anchor-nav ul {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   The panel itself: neutral tool UI, independent of the page look
   ========================================================================== */

.cz-fab,
.cz-panel {
  --cz-ink: #1d1d1f;
  --cz-muted: #5f5f66;
  --cz-line: #e3e3e8;
  --cz-soft: #f4f4f6;
  --cz-accent: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: normal;
  color: var(--cz-ink);
  text-transform: none;
}

/* Round chat bubble in the bottom-right corner */
.cz-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.cz-fab:hover { transform: scale(1.05); background: #000; }
.cz-fab:focus-visible { outline: 2px solid #0071e3; outline-offset: 3px; }
.cz-fab__open,
.cz-fab__close { line-height: 0; }
.cz-fab .cz-fab__close,
.cz-fab.is-open .cz-fab__open { display: none; }
.cz-fab.is-open .cz-fab__close { display: block; }

/* "Try different looks" nudge beside the bubble, until the picker is first opened */
.cz-nudge {
  position: fixed;
  right: 86px;
  bottom: 30px;
  z-index: 80;
  padding: 8px 12px;
  border-radius: 14px 14px 4px 14px;
  background: #fff;
  color: #1d1d1f;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  letter-spacing: normal;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(0, 0, 0, 0.14);
  pointer-events: none;
}
.cz-nudge[hidden] { display: none; }

.cz-panel {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 79;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-height: min(700px, calc(100vh - 112px));
  max-height: min(700px, calc(100dvh - 112px));
  overflow: hidden;
  border-radius: 20px 20px 6px 20px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 18px 50px rgba(0, 0, 0, 0.2);
}
.cz-panel[hidden] { display: none; }

.cz-panel :focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; border-radius: 6px; }

.cz-head {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 14px 52px 14px 16px;
  background: #1d1d1f;
  color: #fff;
}
.cz-avatar {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.cz-title { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.cz-title:focus { outline: none; }
.cz-intro { margin: 1px 0 0; color: rgba(255, 255, 255, 0.72); font-size: 12px; }

.cz-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}
.cz-close:hover { background: rgba(255, 255, 255, 0.24); }
.cz-close:focus-visible { outline-color: #fff; }

.cz-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 16px 16px;
  background: #fff;
}

.cz-group { margin: 0; padding: 10px 0; border: 0; min-width: 0; }

/* Each question arrives as a chat message; answers are chips under it */
.cz-msg {
  display: block;
  float: none;
  width: fit-content;
  max-width: 88%;
  margin: 0 0 8px;
  padding: 9px 13px;
  border-radius: 16px 16px 16px 4px;
  background: var(--cz-soft);
  color: var(--cz-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}
.cz-msg--foot { margin-bottom: 10px; }
.cz-group .cz-options,
.cz-group > .cz-rate,
.cz-group > .cz-btn,
.cz-group > .cz-favs,
.cz-group > .cz-notes { margin-left: 12px; }

.cz-legend {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cz-ink);
}

.cz-options { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-group--wide .cz-options { flex-direction: column; align-items: stretch; }
.cz-rate .cz-options { flex-direction: row; }

.cz-options input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.cz-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #d2d2d7;
  color: var(--cz-ink);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.cz-group--wide .cz-chip { border-radius: 10px; }
.cz-chip:hover { background: var(--cz-soft); }
.cz-options input:checked + .cz-chip { background: #0071e3; color: #fff; box-shadow: none; }
.cz-options input:focus-visible + .cz-chip { outline: 2px solid #0071e3; outline-offset: 2px; }
.cz-options input[type="checkbox"] + .cz-chip::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.cz-options input[type="checkbox"]:checked + .cz-chip::before {
  background: currentColor;
  box-shadow: inset 0 0 0 1.5px currentColor, inset 0 0 0 3.5px #0071e3;
}

.cz-hint { color: var(--cz-muted); font-weight: 400; }
.cz-options input:checked + .cz-chip .cz-hint { color: rgba(255, 255, 255, 0.75); }

.cz-swatch { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.cz-options input:checked + .cz-chip .cz-swatch { box-shadow: 0 0 0 2px #fff; }

.cz-rate {
  margin-left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}
.cz-rate__name { font-weight: 600; min-width: 56px; }
.cz-rate .cz-chip { padding: 6px 10px; border-radius: 9999px; }

.cz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9999px;
  background: var(--cz-soft);
  color: var(--cz-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cz-btn:hover { background: var(--cz-line); }
.cz-btn--primary { background: #0071e3; color: #fff; }
.cz-btn--primary:hover { background: #0062c4; }

.cz-favs { margin: 10px 0 0; padding: 0; list-style: none; }
.cz-fav {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--cz-line);
}
.cz-fav__text { flex: 1; color: var(--cz-muted); }
.cz-fav__text strong { color: var(--cz-ink); }
.cz-link {
  padding: 2px 4px;
  border: 0;
  background: none;
  color: #0066cc;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cz-notes,
.cz-summary {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--cz-line);
  border-radius: 10px;
  background: #fff;
  color: var(--cz-ink);
  font: inherit;
  resize: vertical;
}
.cz-summary {
  background: var(--cz-soft);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  white-space: pre;
  overflow-x: auto;
}

.cz-foot {
  padding: 12px 16px 12px;
  border-top: 1px solid var(--cz-line);
  background: #fbfbfc;
}
.cz-actions { display: flex; gap: 8px; margin-left: 12px; }

.cz-preview { margin: 8px 0 0 12px; }
.cz-preview > summary {
  width: fit-content;
  padding: 4px 0;
  color: var(--cz-muted);
  font-weight: 600;
  cursor: pointer;
}
.cz-preview > .cz-summary { margin-top: 6px; }
.cz-status { margin: 6px 0 0 12px; color: #1e681d; font-weight: 600; }
.cz-status:empty { display: none; }

/* Keep the page's last content clear of the floating button */
.js .footer__inner { padding-bottom: 76px; }

@media (max-width: 600px) {
  .cz-panel {
    left: 8px;
    right: 8px;
    bottom: 80px;
    width: auto;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
  }
  .cz-fab { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  .cz-nudge { right: 76px; bottom: 26px; }
  .cz-rate { flex-direction: column; align-items: flex-start; }
}

@media print {
  .cz-fab, .cz-panel, .cz-nudge { display: none !important; }
}
