/* ------------------------------------------------------------------
   Tokens. Change the three palette colors (light + dark) to re-skin.
   ------------------------------------------------------------------ */
:root {
  --bg: #f5f0eb;
  --fg: #1a1a1a;
  --accent: #4a2c4f;
  --focus: var(--accent);
  --font-text: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --emphasis-gradient: linear-gradient(135deg, #2c4870 0%, #c89028 25%, #b8473c 50%, #c89028 75%, #2c4870 100%);
  --heading-gradient-90: linear-gradient(90deg, oklch(31% .07 320) 0%, oklch(31% .07 320) 60%, oklch(52% .1 320) 100%);
  --calendly-canvas: #dcd7d2;
  --swatch-dark: var(--accent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #251c1c;
    --fg: #f0e6dc;
    --accent: #d4a574;
    --emphasis-gradient: linear-gradient(135deg, #6a8cb8 0%, #e8b04a 25%, #d96754 50%, #e8b04a 75%, #6a8cb8 100%);
    --heading-gradient-90: linear-gradient(90deg, oklch(75% .08 70) 0%, oklch(75% .08 70) 60%, oklch(98% .05 70) 100%);
    --calendly-canvas: #382e2e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #251c1c;
  --fg: #f0e6dc;
  --accent: #d4a574;
  --emphasis-gradient: linear-gradient(135deg, #6a8cb8 0%, #e8b04a 25%, #d96754 50%, #e8b04a 75%, #6a8cb8 100%);
  --heading-gradient-90: linear-gradient(90deg, oklch(75% .08 70) 0%, oklch(75% .08 70) 60%, oklch(98% .05 70) 100%);
  --calendly-canvas: #382e2e;
  color-scheme: dark;
}

/* ---------------------------------- base ---------------------------------- */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: inherit; }
button { font: inherit; color: inherit; background: none; cursor: pointer; letter-spacing: inherit; }
ul, ol { list-style: none; }
svg { display: block; }
hr { height: 0; color: inherit; border-top-width: 1px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.fg-15 { border-color: color-mix(in srgb, var(--fg) 15%, transparent); }

.site { position: relative; display: flex; min-height: 100vh; flex-direction: column; }
.site-main { display: flex; flex: 1; flex-direction: column; }

.skip {
  position: fixed; left: -999px; top: .5rem; z-index: 50;
  border-radius: .25rem; background: var(--accent); color: var(--bg); padding: .5rem 1rem;
}
.skip:focus { left: .5rem; outline: none; box-shadow: 0 0 0 2px var(--focus); }

/* --------------------------------- header --------------------------------- */
.site-header {
  position: absolute; inset-inline: 0; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
  padding: .75rem 1.5rem;
  font-size: 11px; text-transform: uppercase; letter-spacing: .25em;
}
.brand { transition: opacity .15s; }
.nav { display: none; align-items: center; gap: 2rem; }
.nav a { transition: opacity .15s; }
.nav a:hover { opacity: .6; }
.header-right { display: flex; align-items: center; gap: 1.25rem; }

.theme-toggle-trigger {
  display: flex; height: 2.25rem; width: 2.25rem; align-items: center; justify-content: center;
  border-radius: 9999px; anchor-name: --theme-trigger;
}
.theme-swatch {
  display: block; height: 1.5rem; width: 1.5rem; border-radius: 9999px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .2);
  background: linear-gradient(45deg, var(--swatch-dark) 0%, var(--swatch-dark) 50%, #f5f0eb 50%, #f5f0eb 100%);
}
.theme-toggle-popover {
  position: fixed; inset: auto; margin: .25rem 0 0;
  position-anchor: --theme-trigger; top: anchor(bottom); right: anchor(right);
  min-width: 200px; border-radius: .5rem; padding: .5rem;
  border: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
  background: var(--bg); color: var(--fg);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  text-transform: none; letter-spacing: normal;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .18s ease-out, transform .18s ease-out, overlay .18s ease-out allow-discrete, display .18s ease-out allow-discrete;
}
.theme-toggle-popover:popover-open { opacity: 1; transform: translateY(0); }
@starting-style { .theme-toggle-popover:popover-open { opacity: 0; transform: translateY(-4px); } }
@supports not (anchor-name: --x) {
  .theme-toggle-popover { top: 3.4rem; right: 1.5rem; }
  @media (min-width: 640px) { .theme-toggle-popover { top: 3.4rem; right: 2.5rem; } }
}
.theme-menu-label { padding: .25rem .75rem .75rem; font-size: 11px; text-transform: uppercase; letter-spacing: .2em; opacity: .5; }
.theme-menu-sep { margin: 0 -.5rem .5rem; border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
.theme-menu-list { display: flex; flex-direction: column; gap: .25rem; }
.theme-item {
  display: flex; width: 100%; align-items: center; gap: .75rem;
  border-radius: .375rem; padding: .5rem .75rem; text-align: left; font-size: .875rem;
  transition: background-color .15s;
}
.theme-item:hover, .theme-item:focus, .theme-item[aria-checked="true"] { background: color-mix(in srgb, var(--fg) 5%, transparent); outline: none; }
.theme-item svg { height: 1rem; width: 1rem; flex-shrink: 0; opacity: .8; }
.theme-item .label { flex: 1; }
.theme-item .check { color: var(--accent); visibility: hidden; }
.theme-item[aria-checked="true"] .check { visibility: visible; }

.menu-btn { display: flex; height: 1rem; width: 1.25rem; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 1px; width: 100%; background: var(--fg); }
.mobile-nav {
  position: absolute; inset-inline: 0; top: 100%; display: none; flex-direction: column; gap: 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
  background: var(--bg); padding: 1.5rem;
}
.mobile-nav[data-open] { display: flex; }
@media (min-width: 640px) {
  .site-header { padding-inline: 2.5rem; }
  .nav { display: flex; }
  .menu-btn, .mobile-nav { display: none !important; }
}

/* ---------------------------------- hero ---------------------------------- */
.hero { display: flex; flex: 1; align-items: center; justify-content: center; padding: 8rem 1.5rem 6rem; }
.hero h1 {
  margin-inline: auto; max-width: 22ch; text-align: center;
  font-size: 2rem; font-weight: 700; line-height: 1.08; letter-spacing: -.01em;
  color: var(--accent); text-wrap: balance;
}
.hero h1 a {
  color: var(--fg); text-decoration: underline; text-decoration-thickness: from-font;
  text-underline-offset: 6px; transition: opacity .15s;
}
.hero h1 a:hover { opacity: .7; }
@media (min-width: 640px) { .hero { padding: 11rem 2.5rem 8rem; } .hero h1 { max-width: 26ch; font-size: 3.25rem; } }
@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 4.25rem; } }

@keyframes emphasis-slide { 0% { background-position: 0%; } to { background-position: 200%; } }
.statement-emphasis {
  font-style: italic; cursor: pointer;
  background-image: var(--emphasis-gradient); background-size: 200% 100%; background-repeat: repeat; background-position: 0%;
  color: transparent; -webkit-background-clip: text; background-clip: text;
  animation: 2.625s linear infinite emphasis-slide;
}
@media (max-width: 639px) { .statement-emphasis { animation-duration: 4.5s; } }
@media (prefers-reduced-motion: reduce) { .statement-emphasis { animation: none; } }

/* --------------------------------- footer --------------------------------- */
.site-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
  padding: .75rem 1.5rem; font-size: 11px; text-transform: uppercase; letter-spacing: .25em;
  color: color-mix(in srgb, var(--fg) 40%, transparent);
}
.site-footer .links { display: flex; align-items: center; gap: 1.25rem; }
.site-footer a { transition: color .15s; }
.site-footer a:hover { color: var(--fg); }
@media (min-width: 640px) { .site-footer { padding-inline: 2.5rem; } }

/* --------------------------------- contact -------------------------------- */
.contact { overflow-x: clip; padding: 8rem 1.5rem 6rem; }
.contact-inner { margin-inline: auto; max-width: 42rem; text-align: center; }
.contact .kicker { margin-bottom: 1.5rem; font-size: 11px; text-transform: uppercase; letter-spacing: .3em; opacity: .5; }
.contact h1 {
  margin-bottom: 1.5rem; font-size: 1.875rem; line-height: 1.25; font-weight: 700;
  background-image: var(--heading-gradient-90); color: transparent; -webkit-background-clip: text; background-clip: text;
}
.contact p { margin-bottom: 1rem; font-size: 1rem; line-height: 1.625; opacity: .7; }
.contact p a { color: var(--fg); text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: 4px; }
.calendly-band { margin-top: 3rem; margin-inline: calc(50% - 50vw); width: 100vw; padding-block: 2.5rem; background: var(--calendly-canvas); }
.calendly-band .inner { margin-inline: auto; max-width: 64rem; padding-inline: 1rem; }
.calendly-inline-widget { height: 700px; width: 100%; }
@media (min-width: 640px) {
  .contact { padding: 11rem 2.5rem 6rem; }
  .contact h1 { font-size: 3rem; }
  .contact p { font-size: 1.125rem; }
  .calendly-band .inner { padding-inline: 0; }
}

/* ----------------------------------- CV ----------------------------------- */
.cv-container { margin-inline: auto; width: 100%; max-width: 56rem; padding: 7rem 1.5rem 6rem; }
.cv-download-bar {
  margin-bottom: 2rem; display: flex; flex-direction: column; gap: 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); padding-bottom: 1.5rem;
}
.cv-download-bar .eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .25em; opacity: .6; }
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 9999px; background: var(--accent); color: var(--bg);
  padding: .625rem 1.25rem; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em;
  transition: opacity .15s;
}
.btn-pill:hover { opacity: .85; }
.btn-pill svg { height: 1rem; width: 1rem; }
.cv-page { border-radius: .75rem; background: var(--bg); color: var(--fg); font-family: var(--font-text); -webkit-font-smoothing: antialiased; }
.cv-head { margin-bottom: 1rem; }
.eyebrow-row { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: .25rem; }
.cv-logo { font-size: 12pt; font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.cv-hero-eyebrow { font-size: 9pt; font-weight: 600; text-transform: uppercase; letter-spacing: .17em; color: color-mix(in srgb, var(--fg) 65%, transparent); }
.cv-hero-headline { font-weight: 800; font-size: clamp(24pt, 5vw, 33pt); line-height: 1.1; letter-spacing: -.025em; color: var(--accent); }
.cv-hero-rule { height: 1px; background: color-mix(in srgb, var(--fg) 20%, transparent); border: 0; margin: 1.5rem 0 1rem; }
.cv-rule { height: 1px; background: color-mix(in srgb, var(--fg) 20%, transparent); border: 0; margin: 2.5rem 0; }
.hero-strip { display: flex; flex-direction: column; gap: 1rem; }
.hero-strip .left { font-size: .875rem; line-height: 1.625; }
.hero-strip .role { font-weight: 600; }
.hero-strip .stack { opacity: .7; }
.hero-strip .contact-line { margin-top: .5rem; font-size: .75rem; opacity: .75; }
.hero-strip .contact-line a:hover { text-decoration: underline; }
.hero-strip .right { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .65; }
.cv-ico { width: .9rem; height: .9rem; fill: var(--accent); margin-right: .3rem; vertical-align: -.15rem; display: inline-block; }
.section { margin-bottom: 2rem; }
.role-head { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .25rem; }
.cv-role-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.cv-stealth, .cv-role-meta { font-size: .875rem; font-weight: 500; color: color-mix(in srgb, var(--fg) 60%, transparent); }
.cv-role-sub { font-size: .95rem; font-weight: 400; color: color-mix(in srgb, var(--fg) 75%, transparent); margin: -.25rem 0 1rem; max-width: 42rem; }
.cv-tags { margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; gap: .45rem; }
.cv-tags span {
  display: inline-flex; align-items: center; font-size: .65rem; font-weight: 700; line-height: 1;
  text-transform: uppercase; letter-spacing: .08em; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent); padding: .3rem .5rem; border-radius: .25rem;
}
.cv-entry { margin-bottom: 1rem; display: grid; grid-template-columns: 1fr; gap: .25rem; }
.cv-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); padding-top: .15rem; line-height: 1.4; }
.cv-body { font-size: .95rem; font-weight: 400; line-height: 1.52; color: var(--fg); }
.cv-body a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cv-result { margin-top: .4rem; font-size: .92rem; font-weight: 600; line-height: 1.4; color: var(--accent); }
.cv-result .arrow { font-weight: 700; margin-right: .4rem; }
.cv-closing { margin-top: 2rem; text-align: center; }
.cv-closing .cta { font-size: 1.75rem; font-weight: 800; color: var(--accent); letter-spacing: -.025em; line-height: 1.1; margin-bottom: .75rem; }
.cv-closing .cta .grad { font-style: italic; font-weight: 700; }
.cv-closing .links { font-size: .92rem; font-weight: 400; line-height: 2; color: color-mix(in srgb, var(--fg) 70%, transparent); }
.cv-closing .links a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
br.sm { display: none; }
@media (min-width: 640px) {
  .cv-container { padding: 9rem 2.5rem 6rem; }
  .cv-download-bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .eyebrow-row, .role-head { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .hero-strip { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .hero-strip .right { text-align: right; }
  .cv-entry { grid-template-columns: 160px 1fr; gap: 1.5rem; }
  br.sm { display: inline; }
}

/* ---------------------------------- print --------------------------------- */
@media print {
  header[role="banner"], footer[role="contentinfo"], .cv-download-bar, .mobile-nav { display: none !important; }
  @page { size: 210mm auto; margin: 0; }
  html, body { background: #f5f0eb !important; color: #161616 !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .cv-container { padding: 0 !important; max-width: none !important; margin: 0 !important; width: 210mm !important; }
  .cv-page { width: 210mm !important; padding: 15mm 22mm 14mm !important; background: #f5f0eb !important; color: #161616 !important; margin: 0 auto !important; box-shadow: none !important; }
  .cv-logo { color: #3f2444 !important; font-size: 12pt !important; }
  .cv-hero-eyebrow { color: #5f564f !important; font-size: 9pt !important; }
  .cv-hero-headline { color: #3f2444 !important; font-size: 33pt !important; }
  .cv-hero-rule, .cv-rule { background: #cdc4b6 !important; }
  .cv-ico { fill: #3f2444 !important; }
  .cv-role-title { font-size: 13pt !important; }
  .cv-stealth, .cv-role-meta { color: #5f564f !important; font-size: 9pt !important; }
  .cv-role-sub { color: #5f564f !important; font-size: 9.5pt !important; margin: -3mm 0 4mm !important; }
  .cv-tags { margin: 0 0 6mm !important; gap: 1.8mm !important; }
  .cv-tags span { color: #3f2444 !important; background: #3f244417 !important; font-size: 7pt !important; padding: .9mm 1.8mm !important; }
  .cv-entry { display: grid !important; grid-template-columns: 38mm 1fr !important; column-gap: 8mm !important; margin-bottom: 3.4mm !important; page-break-inside: avoid; }
  .cv-label { color: #3f2444 !important; font-size: 8pt !important; }
  .cv-body { color: #161616 !important; font-size: 9.7pt !important; }
  .cv-body a { color: #3f2444 !important; }
  .cv-result { color: #3f2444 !important; font-size: 9.4pt !important; margin-top: 2.2mm !important; }
  .cv-closing .cta { color: #3f2444 !important; font-size: 20pt !important; }
  .cv-closing .links { color: #5f564f !important; font-size: 9.5pt !important; }
  .cv-closing .links a { color: #3f2444 !important; }
}

/* -------------------------------- edit mode ------------------------------- */
[data-edit] [contenteditable] { outline: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 2px; white-space: pre-wrap; min-width: 1ch; }
[data-edit] [contenteditable]:focus { outline: 2px solid var(--accent); }
[data-edit] .ed-href { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; opacity: .7; }
.ed-tools { display: inline-flex; flex-wrap: wrap; gap: .25rem; margin-left: .4rem; vertical-align: middle; }
.ed-tools button, .ed-x { font: 600 .62rem/1 var(--font-text); letter-spacing: .04em; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: .25rem; padding: .2rem .4rem; }
.ed-tools button:hover, .ed-x:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.ed-x { margin-left: .3rem; padding: .1rem .3rem; }
.ed-section-bar { margin: 0 0 .75rem; }
.ed-link { display: inline-flex; align-items: center; gap: .3rem; margin-right: .6rem; }
.ed-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .6rem 1.5rem; border-top: 1px solid color-mix(in srgb, var(--fg) 15%, transparent); background: var(--bg); font-size: .8rem; }
.ed-bar .ed-status { flex: 1 1 14rem; opacity: .75; }
.ed-bar .ed-status.bad { color: #b8473c; opacity: 1; }
.ed-bar button:not(.btn-pill), .ed-bar a, .ed-bar label, .ed-bar select { font: 600 .72rem/1 var(--font-text); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); background: none; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 9999px; padding: .55rem .9rem; cursor: pointer; }
.ed-bar select { text-transform: none; letter-spacing: normal; font-weight: 500; max-width: 12rem; }
[data-edit] .site-main { padding-bottom: 5rem; }
@media print { .ed-bar, .ed-tools, .ed-x, .ed-section-bar { display: none !important; } }
