/* tuechristensen.com — Olive & Camel. Tokens mirror CLAUDE.md. */

/* SELF-HOSTED FONTS (OFL) — woff2 in assets/fonts/.
   Rethink Sans + Work Sans are variable (weight axis); Mukta ships as
   statics. font-display: swap so text paints immediately in the system-ui
   fallback and upgrades when the webfont loads. */

@font-face {
  font-family: "Rethink Sans";
  src: url("assets/fonts/RethinkSans-VF.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/SpaceGrotesk-VF.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("assets/fonts/WorkSans-VF.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mukta";
  src: url("assets/fonts/Mukta-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mukta";
  src: url("assets/fonts/Mukta-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mukta";
  src: url("assets/fonts/Mukta-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mukta";
  src: url("assets/fonts/Mukta-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Ramps — Olive (ink / dark) */
  --espresso-900: #4d4b39;
  --espresso-800: #5c5a45;
  --espresso-700: #6a6650;
  --espresso-600: #7c7860;
  --espresso-500: #8c886f;

  /* Ramps — Camel (warm accent); 300 step is the palette's Tan */
  --mocha-700: #786542;
  --mocha-600: #8c744f;
  --mocha-500: #a08963;
  --mocha-400: #b49c77;
  --mocha-300: #c9b194;
  --mocha-200: #d9c7ab;
  --mocha-100: #e9ddc9;

  /* Ramps — Neutral light (paper + grey); 200 step is the palette's Grey */
  --oat-50: #f3f0e9;
  --oat-100: #ebe7dd;
  --oat-200: #dbdbdb;
  --oat-300: #cac6b8;
  --oat-400: #aba690;

  /* Semantic — surfaces */
  --surface-page: #f3f0e9;
  --surface-card: #fbfaf5;
  --surface-sunken: #ebe7dd;
  --surface-inverse: #5c5a45;

  /* Semantic — text */
  --text-strong: #56533f;
  --text-body: #5f5c4c;
  --text-muted: #847f6e;
  --text-on-dark: #edeae0;
  --text-accent: #786542;

  /* Semantic — lines & borders */
  --line-soft: #e4e0d5;
  --line-base: #d6d1c4;
  --line-strong: #bbb6a2;

  /* Semantic — accent (primary action) */
  --accent: #a08963;
  --accent-hover: #8c744f;
  --accent-press: #786542;
  --accent-soft: #e9ddc9;
  --on-accent: #f7f4ee;
  --accent-ring: rgba(160, 137, 99, 0.55);

  /* Type — families */
  --font-display: "Rethink Sans", system-ui, sans-serif;
  --font-body: "Work Sans", system-ui, sans-serif;
  --font-accent: "Mukta", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --font-nav: "Space Grotesk", system-ui, sans-serif;

  /* Type — scale */
  --text-xs: 0.781rem; /* 12.5px */
  --text-sm: 0.875rem; /* 14px */
  --text-base: 1rem; /* 16px */
  --text-md: 1.125rem; /* 18px */
  --text-lg: 1.375rem; /* 22px */
  --text-xl: 1.75rem; /* 28px */
  --text-2xl: 2.25rem; /* 36px */

  /* Type — weights / line-height / tracking */
  --w-regular: 400;
  --w-medium: 500;
  --w-semibold: 600;
  --w-bold: 700;
  --w-extra: 800;
  --lh-tight: 1.04;
  --lh-snug: 1.18;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;
  --track-tight: -0.02em;
  --track-wide: 0.04em;
  --track-eyebrow: 0.14em;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-slide: 380ms;
  --dur-fade: 200ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden; /* one screen, no scroll */
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}

/* ── Page + card frame ───────────────────────────────────────────────── */

.page {
  height: 100vh; /* fallback for browsers without svh support */
  height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2.5vmin, 32px);
}

.card {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  background: var(--surface-card);
  border: 1px solid var(--line-base);
  border-radius: clamp(16px, 2vmin, 28px);
  padding: clamp(16px, 3vmin, 40px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

/* ── Top carousel nav ────────────────────────────────────────────────── */

.nav__list {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3.5vw, 48px);
  margin: 0;
  padding: 0;
}

.nav__item {
  list-style: none;
}

.nav__btn {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 4px 2px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-nav);
  font-size: clamp(var(--text-sm), 2.2vw, var(--text-md));
  font-weight: var(--w-semibold);
  letter-spacing: var(--track-tight);
  color: var(--text-strong);
}

.nav__btn:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Inactive labels are faded but always visible; active and hovered labels
   come fully forward. */
.nav__label {
  /* Reserve 2-line height so dots sit at the same row across all buttons,
     even when a label wraps. Single-line labels bottom-align toward the dot. */
  min-height: calc(2 * 1.65em); /* 2 × line-height at nav font size */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  opacity: 0.3;
  transition: opacity var(--dur-fade) var(--ease);
}

.nav__btn[aria-current="true"] .nav__label {
  opacity: 1;
}

.nav__list:hover .nav__label,
.nav__list:focus-within .nav__label {
  opacity: 1;
}

.nav__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background-color var(--dur-fade) var(--ease);
}

.nav__btn[aria-current="true"] .nav__dot {
  background: var(--accent);
}

.nav__btn:hover .nav__dot,
.nav__btn:focus-visible .nav__dot {
  background: var(--accent-hover);
}

/* ── Stage ───────────────────────────────────────────────────────────── */

.stage {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 0; /* let the 1fr row shrink instead of overflowing */
}

.slide {
  grid-area: 1 / 1; /* stack every slide in the same cell */
  width: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--dur-slide) var(--ease),
    transform var(--dur-slide) var(--ease);
}

.slide.is-active {
  opacity: 1;
  transform: none;
}

.slide[hidden] {
  display: none;
}

/* Without this, place-items:center on .slide makes .anim-slot shrink to its
   content width, so 90vw-sized charts inside can exceed the card boundary. */
.anim-slot {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

.slide__placeholder {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-lg);
}

/* ── About me ────────────────────────────────────────────────────────── */

.about {
  width: 100%;
  max-width: 1080px;
  padding: 0 clamp(8px, 3vw, 24px);
  /* Text column on the left, photo in its own column top-right. The columns
     size to their content and the group centers, so the gap between text and
     photo stays tight instead of stretching across the card. */
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  text-align: left;
}

/* Prose column — capped so lines stay readable. */
.about__body {
  max-width: 58ch;
}

/* A clean circle in the right column, aligned near the top of the text. */
.about__portrait {
  margin: 0;
  width: clamp(180px, 22vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--mocha-100);
}

.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 6%;
  display: block;
  transform: scaleX(-1); /* mirror the portrait horizontally */
}

.about__heading {
  margin: 0 0 clamp(14px, 2.4vmin, 24px);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: var(--w-extra);
  letter-spacing: var(--track-tight);
  line-height: var(--lh-tight);
  color: var(--text-strong);
}

.about__text {
  margin: 0 0 clamp(12px, 1.8vmin, 18px);
  font-size: var(--text-md);
  line-height: var(--lh-relaxed);
  color: var(--text-body);
  text-wrap: pretty;
}

.about__text:last-child {
  margin-bottom: 0;
}

/* The closing line — quieter and italic. */
.about__text--note {
  margin-top: clamp(16px, 2.4vmin, 26px);
  font-style: italic;
  color: var(--text-muted);
}

/* Stack the portrait above the text on narrow viewports. */
@media (max-width: 720px) {
  .about {
    grid-template-columns: 1fr;
    gap: clamp(14px, 3vmin, 22px);
    justify-items: center;
    text-align: center;
  }
  .about__body {
    order: 2;
    max-width: none;
  }
  .about__portrait {
    order: 1;
    width: clamp(150px, 40vw, 210px);
  }
}

/* ── Bottom bar ──────────────────────────────────────────────────────── */

.bar {
  border-top: 1px solid var(--line-soft);
  padding-top: clamp(12px, 2vmin, 20px);
  margin-top: clamp(8px, 1.5vmin, 16px);
}

.bar__eyebrow {
  margin: 0 0 clamp(8px, 1.5vmin, 14px);
  text-align: center;
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: var(--w-medium);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
}

.bar__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 8px clamp(20px, 5vmin, 56px);
  margin: 0;
  padding: 0;
}

.bar__links li {
  list-style: none;
}

.bar a {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--w-medium);
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--dur-fade) var(--ease);
}

.bar a:hover,
.bar a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bar a:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.bar__ext {
  color: var(--text-muted);
  font-size: 0.85em;
}

/* ── Reduced motion ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .slide,
  .nav__label,
  .nav__dot,
  .bar a {
    transition: none;
  }
  .slide {
    transform: none;
  }
}

/* ── Theme overrides (testing only — will be removed) ───────────────── */

[data-theme="blush-plum"] {
  --surface-page:   #F5EFED;
  --surface-card:   #FDFAF9;
  --surface-sunken: #EDE4E1;
  --accent:         #9E6B72;
  --accent-hover:   #88555C;
  --accent-soft:    #EDD8DA;
  --accent-ring:    rgba(158, 107, 114, 0.55);
  --text-strong:    #3D2B2E;
  --text-body:      #4F3A3D;
  --text-muted:     #7D6266;
  --text-accent:    #9E6B72;
  --line-soft:      #E4D7D8;
  --line-base:      #D4C4C5;
  --line-strong:    #B8A5A6;
  --mocha-700:      #7A4F54;
  --espresso-800:   #3D2B2E;
  --espresso-900:   #2E1E20;
}

/* Navy & Grey — Color Hunt #162D41 · #1B3B57 · #365470 · #DDDDDD.
   Sober slate-navy ink on a cool light paper, with a grey neutral line. */
[data-theme="navy-grey"] {
  --surface-page:   #EDF0F2;
  --surface-card:   #F8FAFB;
  --surface-sunken: #E0E5E9;
  --accent:         #1B3B57;
  --accent-hover:   #162D41;
  --accent-soft:    #D5DFE7;
  --accent-ring:    rgba(27, 59, 87, 0.55);
  --text-strong:    #14283A;
  --text-body:      #2C3F4E;
  --text-muted:     #5C6E7C;
  --text-accent:    #1B3B57;
  --line-soft:      #DEE3E7;
  --line-base:      #C9D1D7;
  --line-strong:    #A7B3BB;
  --mocha-100:      #D5DFE7;
  --mocha-700:      #365470;
  --espresso-800:   #1B3B57;
  --espresso-900:   #162D41;
}

/* Dusk & Citrus — Color Hunt #343B65 · #4E677D · #F6DF85 · #E26A3A.
   Retro indigo ink, warm cream paper, orange as the one action color. */
[data-theme="dusk-citrus"] {
  --surface-page:   #F2F0EB;
  --surface-card:   #FBFAF6;
  --surface-sunken: #E8E4DA;
  --accent:         #E26A3A;
  --accent-hover:   #C8552A;
  --accent-soft:    #FBE6CF;
  --accent-ring:    rgba(226, 106, 58, 0.55);
  --text-strong:    #2A2F50;
  --text-body:      #3A3F5C;
  --text-muted:     #6B6F86;
  --text-accent:    #C8552A;
  --line-soft:      #E4E0D6;
  --line-base:      #D2CDBF;
  --line-strong:    #B3AE9C;
  --mocha-100:      #FBE6CF;
  --mocha-700:      #C8552A;
  --espresso-800:   #343B65;
  --espresso-900:   #2A2F50;
}

/* Azure — Color Hunt #22489E · #177DD5 · #3FA9FA · #B9DCF4.
   Bright blue action on a pale blue-white paper. */
[data-theme="azure"] {
  --surface-page:   #EEF3F9;
  --surface-card:   #F9FBFE;
  --surface-sunken: #DEEAF6;
  --accent:         #177DD5;
  --accent-hover:   #1466B0;
  --accent-soft:    #CFE5F8;
  --accent-ring:    rgba(23, 125, 213, 0.55);
  --text-strong:    #15294F;
  --text-body:      #233A63;
  --text-muted:     #5A6E90;
  --text-accent:    #1466B0;
  --line-soft:      #DCE7F2;
  --line-base:      #C5D6E8;
  --line-strong:    #A1B7D1;
  --mocha-100:      #CFE5F8;
  --mocha-700:      #22489E;
  --espresso-800:   #22489E;
  --espresso-900:   #15294F;
}

/* ── Theme picker (temporary, for testing) ───────────────────────────── */

.theme-picker {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--line-base);
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  overflow: hidden;
  max-width: 42px; /* padding (20px) + one swatch (22px) */
  transition: max-width .3s ease-in .2s; /* delay before collapsing */
}
.theme-picker:hover,
.theme-picker:focus-within {
  max-width: 200px;
  transition: max-width .25s var(--ease); /* no delay when opening */
}

.theme-picker__swatch {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.theme-picker__swatch:hover { transform: scale(1.15); }
.theme-picker__swatch.is-active {
  order: -1; /* always first so it's visible when collapsed */
  border-color: var(--text-strong);
}

.theme-picker__swatch--olive { background: #a08963; }
.theme-picker__swatch--blush { background: #9e6b72; }
.theme-picker__swatch--navy  { background: #1b3b57; }
.theme-picker__swatch--dusk  { background: #e26a3a; }
.theme-picker__swatch--azure { background: #177dd5; }

/* ── Small / short viewports: relax the no-scroll rule ───────────────── */

@media (max-width: 559px), (max-height: 559px) {
  html,
  body {
    overflow: auto;
  }
  .page {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }
  .card {
    height: auto;
    min-height: calc(100vh - 2 * clamp(12px, 2.5vmin, 32px));
    min-height: calc(100svh - 2 * clamp(12px, 2.5vmin, 32px));
    /* Extra horizontal padding so content clears the border-radius on small screens */
    padding-inline: 20px;
  }
  /* Dots-only nav on phones — 5 labels at 14px won't fit 390px */
  .nav__label {
    display: none;
  }
  .nav__list {
    gap: clamp(16px, 8vw, 40px);
  }
}
