/* ===========================================================
   Reddy Mohith — portfolio
   Brand: Deep Teal / Coral / Butter Yellow / Cream / Warm Gray
   Fonts: Sora (display) + Inter (body)
   =========================================================== */

:root {
  --teal: #0D3B3E;
  --coral: #FF6B5B;
  --butter: #FFD166;
  --cream: #FFF8F0;
  --card: #FFFDF9;
  --placeholder: #F1E7DA;
  --gray: #8C8579;

  --hairline: rgba(13, 59, 62, 0.16);
  --hairline-strong: rgba(13, 59, 62, 0.25);
  --divider-on-teal: rgba(255, 248, 240, 0.24);

  --max: 1440px;
  --max-narrow: 1180px;

  /* Usable page width for full-bleed sections — equal to the viewport
     normally, but narrowed while the admin side panel is open so a
     full-bleed background stops at the panel's edge instead of running
     underneath it. */
  --page-w: 100vw;
}
body.admin-has-chrome { --page-w: calc(100vw - var(--admin-sidepanel-w)); }
body.admin-has-chrome.admin-panel-collapsed { --page-w: calc(100vw - var(--admin-sidepanel-w-collapsed)); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--teal);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--coral); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img { max-width: 100%; display: block; }

::selection { background: var(--butter); color: var(--teal); }

.display {
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

/* -----------------------------------------------------------
   Book cover intro
   ----------------------------------------------------------- */

#cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
  cursor: pointer;
  background: radial-gradient(120% 90% at 50% 12%, var(--card) 0%, var(--cream) 42%, #F3E6D6 100%);
  perspective: 1700px;
  transition: opacity 700ms ease;
}

#cover.is-opening,
#cover.is-zooming { pointer-events: none; }
#cover.is-hidden { display: none; }
#cover.is-fading { opacity: 0; transition: opacity 450ms ease; }

.book-float {
  animation: om-float 7s ease-in-out infinite;
}

#cover.is-opening .book-float,
#cover.is-zooming .book-float { animation: none; }

.book-wrap {
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(.22, .61, .36, 1);
}

.book {
  position: relative;
  width: 330px;
  height: 452px;
  max-width: 78vw;
  max-height: 62vh;
  transform-style: preserve-3d;
  transform-origin: left center;
  transform: translateX(0) scale(1);
  transition: transform 650ms cubic-bezier(.4, 0, .2, 1);
}

/* Book opens (spine shifts to viewer's center) before it zooms. */
#cover.is-opening .book,
#cover.is-zooming .book { transform: translateX(50%) scale(1); }

/* Once open, it zooms toward the viewer, centered on the now-centered spine. */
#cover.is-zooming .book {
  transform: translateX(50%) scale(7);
  transition: transform 780ms cubic-bezier(.4, 0, .2, 1);
}

.book-page {
  position: absolute;
  inset: 0;
  background: var(--card);
  box-shadow: 0 20px 40px -22px rgba(13, 59, 62, 0.35);
}

/* Right-hand page: sits where the closed book already is. */
.book-page-right {
  border-radius: 4px 9px 9px 4px;
}

/* Left-hand page: mirrored, unfurls from the spine as the book opens. */
.book-page-left {
  left: auto;
  right: 100%;
  width: 100%;
  border-radius: 9px 4px 4px 9px;
  transform-origin: right center;
  transform: scaleX(0);
  opacity: 0;
  transition: transform 650ms cubic-bezier(.4, 0, .2, 1), opacity 500ms ease;
}

#cover.is-opening .book-page-left,
#cover.is-zooming .book-page-left {
  transform: scaleX(1);
  opacity: 1;
}

.book-cover {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 650ms cubic-bezier(.4, 0, .2, 1), box-shadow 500ms ease;
  border-radius: 4px 10px 10px 4px;
  background: var(--teal);
  box-shadow: inset -1px 0 0 rgba(255, 248, 240, 0.14), 0 30px 60px -26px rgba(13, 59, 62, 0.55);
  overflow: hidden;
  backface-visibility: hidden;
  padding: 40px 34px;
  color: var(--cream);
}

/* Cover swings open on its spine to reveal the blank page underneath. */
#cover.is-opening .book-cover,
#cover.is-zooming .book-cover {
  transform: rotateY(-158deg);
  box-shadow: none;
}

.book-cover .spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 16px;
  background: var(--coral);
}

.book-text {
  position: relative;
  height: 100%;
  margin-left: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1;
  transition: opacity 200ms ease;
}

#cover.is-opening .book-text,
#cover.is-zooming .book-text { opacity: 0; }

.book-cover .eyebrow {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--butter);
}

.book-cover .dot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--coral);
  margin-bottom: 30px;
}

.book-cover .title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 46px;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--cream);
}

.book-cover .tagline {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 248, 240, 0.68);
  max-width: 26ch;
}

.click-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}

.click-hint .dot-sm {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.click-hint {
  opacity: 1;
  transition: opacity 200ms ease;
}

#cover.is-opening .click-hint { opacity: 0; }

@keyframes om-float {
  0%, 100% { transform: translateY(-10px); }
  50% { transform: translateY(12px); }
}

@keyframes om-fadeup {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .book-float { animation: none; }
  html { scroll-behavior: auto; }
  .book, .book-cover, .book-page-left, .book-text, .click-hint, #cover.is-fading { transition: none !important; }
}

/* -----------------------------------------------------------
   Site shell
   ----------------------------------------------------------- */

#site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#site.is-hidden { display: none; }
#site.is-visible { animation: om-fadeup 600ms ease both; }

/* Keeps the footer pinned to the bottom of the viewport on short pages
   (e.g. the admin sign-in screen) instead of collapsing up under the
   content. Explicit width:100% matters here: main/footer both center
   themselves with margin:0 auto + max-width, and as flex items of #site,
   auto margins on the cross axis override stretch — without a full-width
   basis to center *within*, they'd shrink to fit their own content instead
   of the page, which is what made the footer visually creep to the middle. */
main { flex: 1 0 auto; width: 100%; }
footer.site-footer { width: 100%; }

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 240, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 40px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.wordmark .dot-sm {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
}

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  opacity: 0.68;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 3px;
  transition: opacity .2s ease, color .2s ease, border-color .2s ease;
}

.nav-link:hover { opacity: 1; color: var(--coral); }

.nav-link.is-active {
  opacity: 1;
  border-bottom-color: var(--coral);
}

.btn-logout {
  padding: 9px 17px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.btn-logout:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--cream);
}

.nav-toggle {
  display: none;
}

main { max-width: var(--max); margin: 0 auto; padding: 0 40px; }
main.narrow { max-width: var(--max-narrow); }
main.tight { max-width: 1000px; }
main.resume-main { max-width: 1100px; }

/* -----------------------------------------------------------
   Buttons / kickers
   ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.btn-primary {
  background: var(--teal);
  color: var(--cream);
}
.btn-primary:hover { background: var(--coral); color: var(--cream); }

.btn-outline {
  border: 1.5px solid var(--hairline-strong);
  color: var(--teal);
}
.btn-outline:hover { background: var(--butter); border-color: var(--butter); }

/* Editor-driven button-size presets (content.buttonSizes[path]). */
.btn-size-sm { padding: 10px 18px; font-size: 13px; }
.btn-size-lg { padding: 18px 30px; font-size: 17px; }
.btn-size-xl { padding: 22px 38px; font-size: 19px; }

.kicker {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.kicker-on-cream { color: var(--gray); }
.kicker-on-teal { color: var(--butter); }

/* -----------------------------------------------------------
   Home
   ----------------------------------------------------------- */

/* The graphic is taken out of normal flow entirely (positioned, top-right)
   so the text underneath it — eyebrow, headline, then the paragraph+button
   row — stacks with its own tight, fixed spacing regardless of how tall
   the graphic is, and the paragraph+buttons row can still share one
   bottom-aligned line the way the reference shows, rather than the
   buttons being tied to the graphic's own height instead. */
.hero {
  position: relative;
  padding: 64px 0 56px;
}

.hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  /* Scales with viewport width (like the headline's own font-size) rather
     than a fixed pixel size — a fixed size that clears the text column
     comfortably on a wide screen ends up big enough, relative to a
     narrower desktop window, to collide with the button row below it. */
  max-width: clamp(220px, 24vw, 430px);
  aspect-ratio: 1 / 1;
}

.hero-visual svg { width: 100%; height: 100%; display: block; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  max-width: 60%;
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  flex-shrink: 0;
}

.hero-headline {
  max-width: 62%;
  margin: 18px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 6vw, 92px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-headline mark {
  background: none;
  color: var(--coral);
  display: inline-block;
  background-image: linear-gradient(to top, var(--butter) 0 0.14em, transparent 0.14em);
}

.hero-footer {
  display: grid;
  /* The buttons' column starts at the same boundary the headline's own
     max-width already draws (62%), rather than trailing right behind
     wherever the paragraph's text happens to end — that's what "start
     from the line" meant: a fixed, headline-aligned start point, not a
     gap relative to the paragraph. */
  grid-template-columns: minmax(0, 62%) minmax(0, 1fr);
  align-items: end;
  column-gap: 24px;
  margin-top: 28px;
}

.hero-footer p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  opacity: .8;
  max-width: 55ch;
  text-wrap: pretty;
}

.hero-actions {
  justify-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skills-ticker {
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 64px, black calc(100% - 64px), transparent);
  mask-image: linear-gradient(to right, transparent, black 64px, black calc(100% - 64px), transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 26s linear infinite;
}

.ticker-group {
  display: flex;
  align-items: center;
  flex: none;
}

.ticker-item {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--teal);
  white-space: nowrap;
  padding: 0 26px;
}

.ticker-sep {
  color: var(--gray);
  opacity: .5;
  font-size: 12px;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

.skills-edit-list { display: none; }
.admin-edit-mode .skills-edit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 0 4px;
}
.admin-edit-mode .skills-edit-list [data-edit] {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline);
  font-size: 13px;
  font-weight: 600;
}

.worked-with { margin-top: 56px; margin-bottom: 56px; }

.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.logo-placeholder {
  flex: 1 1 160px;
  min-width: 140px;
  height: 72px;
  border-radius: 12px;
  background-color: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, rgba(140, 133, 121, 0.16) 0 10px, transparent 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.currently-band {
  background: var(--teal);
  color: var(--cream);
  border-radius: 32px;
  padding: 56px 48px;
}

.currently-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.currently-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--divider-on-teal);
}

.currently-item .label {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.currently-item .body { font-size: 15px; line-height: 1.65; opacity: .74; text-wrap: pretty; }

.link-underline {
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1.5px solid var(--hairline-strong);
  padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease;
}
.link-underline:hover { color: var(--coral); border-color: var(--coral); }

.projects-panel-wrap { padding: 96px 0 8px; }

.projects-panel {
  background: var(--butter);
  border-radius: 32px;
  padding: 56px 48px;
}

.projects-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.projects-panel-head h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 56px);
  letter-spacing: -0.045em;
}

.projects-panel-note {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: 34ch;
  text-align: right;
}

.projects-panel-note p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  opacity: .75;
}

.projects-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.projects-panel-card {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border-radius: 20px;
  padding: 32px 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.projects-panel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgba(13, 59, 62, 0.35);
}

.kicker-mini {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
}

.projects-panel-card .card-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.025em;
}

.projects-panel-card .card-body { font-size: 15px; line-height: 1.6; opacity: .78; text-wrap: pretty; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
}

.about-panel-wrap { padding: 96px 0 0; }

.about-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: center;
}

/* A little short of the column's true right edge — filling it completely
   (the previous change) left the text and facts running flush against it
   with no breathing room at all. */
.about-panel-text { max-width: 94%; }


.about-panel-headline {
  margin: 18px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  max-width: 20ch;
  text-wrap: pretty;
}

.about-panel-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.7;
  opacity: .82;
  /* Fill the column's real width instead of an arbitrary character cap —
     the column is already sized sensibly by the surrounding grid. */
  max-width: 100%;
  text-wrap: pretty;
}

.about-panel-copy p { margin: 0; }

.about-panel-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 36px;
}

.testimonials-wrap { padding: 56px 0 0; }

.newsletter-embed-wrap { padding: 72px 0 0; }

/* max-width was in `ch`, a unit relative to *this element's own* font size
   — not the much larger heading's — so it was being measured against plain
   body-text sizing and came out far narrower than intended, wrapping the
   heading onto two lines. A plain pixel value, generous enough for the
   heading alone now that there's no subheading under it to keep narrow for
   readability, fixes that regardless of either element's font size. */
.newsletter-embed-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.newsletter-embed-head h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.03em;
}

.newsletter-embed-frame {
  display: flex;
  justify-content: center;
  width: 100%;
  /* Sized close to the actual form's own natural width (not a much wider
     guess) so there's no leftover blank space beside it; centering
     whatever's actually mounted inside turns any small remaining mismatch
     into an even margin on both sides rather than a one-sided gap, since
     the exact width of a pasted third-party embed isn't something this can
     know in advance. Scaled up slightly as its own visual size after that —
     zoom (unlike transform:scale) grows the element's real layout footprint
     along with its appearance, so nothing needs to be re-measured to avoid
     it overlapping what follows. */
  max-width: 460px;
  margin: 0 auto;
  border: none;
  border-radius: 18px;
  zoom: 1.12;
  /* min-height (set inline) only reserves space before the embed's script
     loads — real injected content (not a fixed-size iframe any more) needs
     to be able to grow taller than that without getting clipped. */
  overflow: visible;
}
.newsletter-embed-frame.placeholder-img {
  aspect-ratio: auto;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.testimonial-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 36px 32px;
  border: 1.5px solid var(--hairline);
  border-radius: 22px;
}

.testimonial-quote-mark {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 0.6;
  color: var(--coral);
}

.testimonial-card blockquote {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.testimonial-card figcaption { font-size: 14px; color: var(--gray); }

.cta-slab-wrap { padding: 96px 0 96px; }

.cta-slab {
  background: var(--teal);
  color: var(--cream);
  border-radius: 32px;
  padding: 64px 56px;
  position: relative;
  overflow: hidden;
}

.cta-slab .circle-a {
  position: absolute; right: -70px; bottom: -110px;
  width: 300px; height: 300px; border-radius: 50%;
  background: var(--coral); opacity: .92;
}
.cta-slab .circle-b {
  position: absolute; right: 150px; bottom: -180px;
  width: 270px; height: 270px; border-radius: 50%;
  background: var(--butter); opacity: .92;
}

.cta-slab .inner { position: relative; max-width: 28ch; }
.cta-slab h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.0;
  letter-spacing: -0.045em;
  color: var(--cream);
}
.cta-slab p { margin: 20px 0 0; font-size: 17px; line-height: 1.6; opacity: .72; max-width: 40ch; color: var(--cream); }
.cta-slab .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-slab .btn-primary { background: var(--cream); color: var(--teal); }
.cta-slab .btn-primary:hover { background: var(--butter); color: var(--teal); }
.cta-slab .btn-outline { border-color: rgba(255, 248, 240, 0.35); color: var(--cream); }
.cta-slab .btn-outline:hover { border-color: var(--cream); background: rgba(255, 248, 240, 0.12); }

/* -----------------------------------------------------------
   Page intros (Projects / Lab / Writing / Now)
   ----------------------------------------------------------- */

.page-intro { padding: 96px 0 0; }

.page-intro h1 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: -0.045em;
}

.page-intro .lede {
  margin: 22px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.025em;
  max-width: 30ch;
}

.page-intro .body {
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.7;
  opacity: .8;
  max-width: 62ch;
  text-wrap: pretty;
}

.eyebrow-date {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}

/* -----------------------------------------------------------
   Projects grid + filters
   ----------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--hairline);
}

.filter-btn {
  padding: 9px 17px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline-strong);
  background: transparent;
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.filter-btn:hover { border-color: var(--teal); }
.filter-btn.is-active { background: var(--teal); color: var(--cream); border-color: var(--teal); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 40px;
  padding-bottom: 40px;
}

.project-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--hairline);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  transition: border-color .25s ease, transform .25s ease;
  width: 100%;
}
.project-card:hover { border-color: var(--teal); transform: translateY(-4px); }

.placeholder-img {
  aspect-ratio: 16 / 10;
  background-color: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, rgba(140, 133, 121, 0.16) 0 10px, transparent 10px 20px);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.placeholder-img.large { aspect-ratio: 16 / 9; border-radius: 22px; padding: 22px; }
.placeholder-img.portrait { aspect-ratio: 4 / 5; border-radius: 20px; padding: 18px; background-color: var(--gray);
  background-image: repeating-linear-gradient(135deg, rgba(255, 248, 240, 0.2) 0 10px, transparent 10px 20px); }

.placeholder-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--gray);
  background: var(--cream);
  padding: 6px 9px;
  border-radius: 7px;
}

.placeholder-img.large .placeholder-tag { font-size: 12px; padding: 8px 11px; border-radius: 8px; }
.placeholder-img.portrait .placeholder-tag { color: var(--cream); background: rgba(13, 59, 62, 0.75); }

.project-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px 24px;
}

.project-body .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-body .name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.status-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--butter);
  white-space: nowrap;
}

.project-body .blurb { font-size: 15px; line-height: 1.6; opacity: .78; text-wrap: pretty; }
.project-body .stack { font-size: 13px; color: var(--gray); }
.project-body .cta { font-weight: 600; font-size: 14px; color: var(--coral); margin-top: 4px; }

.empty-state {
  padding: 60px 0;
  color: var(--gray);
  font-size: 15px;
}

/* -----------------------------------------------------------
   Case study
   ----------------------------------------------------------- */

.back-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  transition: color .2s ease;
}
.back-link:hover { color: var(--coral); }

.case-header h1 {
  margin: 28px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 80px);
  letter-spacing: -0.045em;
}

.case-header .lede {
  margin: 20px 0 0;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.3;
  letter-spacing: -0.025em;
  max-width: 30ch;
}

/* ---- Documents (PRDs, specs...) — sits above everything else ---- */
.case-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.case-doc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--hairline-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
}
.case-doc::before { content: "📄"; font-size: 13px; }
.case-doc a { color: inherit; }
.case-add-doc-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px dashed var(--hairline-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
}
.case-add-doc-btn:hover { border-color: var(--coral); color: var(--coral); }

/* ---- Categories — same treatment as the /projects filter pills, so the
   two stay visually tied to each other. ---- */
.case-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.case-cat-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline-strong);
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
}

/* ---- Meta badges (went live / updated / stack / links) — outlined, no fill ---- */
.case-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.case-meta-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--hairline-strong);
  min-width: 100px;
}
.case-meta-badge .k { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); }
.case-meta-badge .v { font-size: 14px; font-weight: 600; color: var(--teal); }
.case-meta-badge .v a, .case-meta-badge a.v { color: var(--teal); border-bottom: 1.5px solid var(--hairline-strong); }
.case-meta-badge .v a:hover, .case-meta-badge a.v:hover { color: var(--coral); border-color: var(--coral); }

/* ---- Image carousel ---- */
.case-carousel {
  width: var(--page-w);
  margin-left: calc(50% - (var(--page-w) / 2));
  margin-right: calc(50% - (var(--page-w) / 2));
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(40px, 1fr) minmax(0, 1100px) minmax(40px, 1fr);
  align-items: center;
  gap: 22px;
}
.case-carousel-peek {
  grid-row: 1;
  height: 260px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--placeholder) center / cover no-repeat;
  opacity: .55;
  cursor: pointer;
  transition: opacity .2s ease;
  border: none;
  padding: 0;
}
.case-carousel-peek:hover { opacity: .85; }
.case-carousel-peek.left { grid-column: 1; justify-self: end; width: 100%; }
.case-carousel-peek.right { grid-column: 3; justify-self: start; width: 100%; }
.case-carousel-main {
  grid-column: 2;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: var(--placeholder);
}
.case-carousel-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.case-carousel-slide.is-active { opacity: 1; pointer-events: auto; }
.case-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 248, 240, 0.9);
  color: var(--teal);
  font-size: 18px;
  z-index: 2;
  box-shadow: 0 6px 18px -8px rgba(13, 59, 62, 0.4);
}
.case-carousel-arrow:hover { background: var(--cream); }
.case-carousel-arrow.prev { left: 16px; }
.case-carousel-arrow.next { right: 16px; }
.case-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.case-carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hairline-strong); }
.case-carousel-dot.is-active { background: var(--coral); }

/* ---- Sections, boxed with a light brand tint ---- */
.case-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 56px;
  padding-bottom: 40px;
}

.case-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 28px 28px;
  border-radius: 18px;
}

.case-section.case-tint-1 { background: rgba(13, 59, 62, 0.05); }
.case-section.case-tint-2 { background: rgba(255, 107, 91, 0.07); }
.case-section.case-tint-3 { background: rgba(255, 209, 102, 0.16); }

/* The trailing notes box: heading stacks above its body full-width, rather
   than sitting beside it the way every other section does. */
.case-section.case-notes {
  grid-template-columns: 1fr;
  gap: 12px;
}

.case-section h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.case-section .body { font-size: 17px; line-height: 1.75; opacity: .82; max-width: 100%; text-wrap: pretty; }

.case-flows { display: flex; flex-direction: column; gap: 22px; }
.case-flow-block { display: flex; flex-direction: column; gap: 10px; }
.case-flow-label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); }

.flow-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.flow-chip {
  padding: 11px 16px;
  border-radius: 11px;
  background: var(--teal);
  color: var(--cream);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 26px;
}

.tech-item { display: flex; flex-direction: column; gap: 7px; }
.tech-item .label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); }
.tech-item .items { font-size: 15px; line-height: 1.6; opacity: .8; }

/* -----------------------------------------------------------
   Lab
   ----------------------------------------------------------- */

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 56px;
  padding-bottom: 40px;
}

.lab-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--card);
  border: 1.5px solid var(--hairline);
  min-height: 290px;
}

.lab-card .tag { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.lab-card .title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 22px; line-height: 1.25; letter-spacing: -0.025em; text-wrap: pretty; }
.lab-card p.body { margin: 0; font-size: 15px; line-height: 1.65; opacity: .78; text-wrap: pretty; }
.lab-card .foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(13, 59, 62, 0.14);
}
.lab-card .result { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; color: var(--teal); }
.lab-card .cta { font-weight: 600; font-size: 14px; color: var(--coral); }

/* -----------------------------------------------------------
   Writing
   ----------------------------------------------------------- */

.newsletter-widgets {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 48px;
  /* Room to breathe before whatever comes after — the site footer, on a
     Writing page with nothing else below the widgets. */
  margin-bottom: 56px;
  /* Inset from the page's full content width on both sides — the heading
     and intro above stay at the full width, only the widgets themselves
     are narrower. */
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-widget {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  padding: 28px;
  border-radius: 20px;
  background: var(--teal);
  color: var(--cream);
}

.newsletter-widget-side { display: flex; flex-direction: column; gap: 10px; }

.newsletter-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  margin-bottom: 4px;
}
/* currentColor tracks whatever text color a widget's background picked
   (see contrastTextColor() in admin.js), so these overlays stay visible
   whether the widget ends up dark or light. */
.newsletter-cover.placeholder-img { background-color: color-mix(in srgb, currentColor 14%, transparent); }
.newsletter-cover .placeholder-tag { color: currentColor; background: color-mix(in srgb, currentColor 14%, transparent); }

.newsletter-name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; }
.newsletter-publisher { font-size: 13px; opacity: .65; }
.newsletter-desc { font-size: 13px; line-height: 1.6; opacity: .8; }

.newsletter-widget-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  padding-left: 32px;
}

.newsletter-items { display: flex; flex-direction: column; }

.newsletter-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  color: inherit;
}
.newsletter-item:hover .title { color: var(--coral); }
.newsletter-item .date { font-size: 12px; opacity: .6; white-space: nowrap; }
.newsletter-item .title { font-size: 15px; font-weight: 600; transition: color .2s ease; }

.newsletter-status { font-size: 13px; opacity: .65; padding: 14px 0; }

/* The feed URL is a real editable field (so the admin can change it), but
   it's an implementation detail — hidden from regular visitors, and only
   shown while actively editing the page. */
.newsletter-rss-input {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  font-size: 11px;
  opacity: .55;
}
.admin-edit-mode .newsletter-rss-input { display: flex; }
.newsletter-rss-input .v { font-size: 12px; word-break: break-all; }

.newsletter-more {
  align-self: flex-start;
  margin-top: 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--coral);
}
.newsletter-more:hover { opacity: .8; }

@media (max-width: 700px) {
  .newsletter-widget { grid-template-columns: 1fr; }
  .newsletter-widget-main { border-left: none; padding-left: 0; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); padding-top: 24px; }
}

.article-list { margin-top: 56px; border-top: 1px solid var(--hairline); padding-bottom: 40px; }

.article-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 90px;
  gap: 32px;
  align-items: baseline;
  padding: 26px 6px;
  border-bottom: 1px solid var(--hairline);
  transition: color .2s ease;
}
.article-row:hover { color: var(--coral); }

.article-row .cat { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.article-row .title { font-family: 'Sora', sans-serif; font-weight: 600; font-size: clamp(18px, 2vw, 23px); line-height: 1.32; letter-spacing: -0.025em; text-wrap: pretty; }
.article-row .date { font-size: 13px; color: var(--gray); text-align: right; }

/* -----------------------------------------------------------
   About
   ----------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 76px;
  align-items: start;
  padding: 96px 0 40px;
}

.about-grid h1 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(38px, 5.4vw, 74px);
  letter-spacing: -0.045em;
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 34px;
  font-size: 18px;
  line-height: 1.75;
  opacity: .84;
  max-width: 62ch;
  text-wrap: pretty;
}

.about-copy p { margin: 0; }
.about-copy p.emphasis {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  opacity: 1;
}

.about-side { display: flex; flex-direction: column; gap: 16px; }

.about-fact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}
.about-fact .label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--coral); }
.about-fact .items {
  font-size: 15px;
  line-height: 1.7;
  opacity: .8;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* -----------------------------------------------------------
   Resume
   ----------------------------------------------------------- */

.resume-page {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  padding: 96px 0 60px;
  align-items: start;
  position: relative;
}

.resume-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 32px 28px;
}

.resume-card h2 {
  margin: 0 0 20px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}

.resume-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: sticky;
  top: 24px;
}

.resume-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
}

.resume-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--butter), var(--coral));
  margin-bottom: 18px;
}
.resume-photo.placeholder-img { border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; }

.resume-profile h1 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.resume-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--coral);
  margin-top: 4px;
}

.resume-tagline {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray);
  max-width: 30ch;
}

.resume-location-pill {
  margin-top: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--placeholder);
  font-size: 12px;
  font-weight: 600;
}

.resume-profile-section {
  width: 100%;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  text-align: left;
}

.resume-profile-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 12px;
}

.resume-skill-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.resume-skill-pill {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.resume-skill-pill.tint-1 { background: rgba(13, 59, 62, 0.1); color: var(--teal); }
.resume-skill-pill.tint-2 { background: rgba(255, 107, 91, 0.14); color: var(--coral); }
.resume-skill-pill.tint-3 { background: rgba(255, 209, 102, 0.28); color: var(--teal); }

.resume-links { display: flex; flex-direction: column; gap: 8px; }
.resume-link-row {
  padding: 10px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .2s ease, color .2s ease;
}
.resume-link-row:hover { border-color: var(--coral); color: var(--coral); }

.resume-stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.resume-about { display: flex; flex-direction: column; gap: 14px; }
.resume-about p { margin: 0; font-size: 15px; line-height: 1.75; opacity: .85; }

.resume-exp { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: start; }

.resume-exp-nav { display: flex; flex-direction: column; gap: 4px; }
.resume-exp-nav-btn {
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
  background: none;
}
.resume-exp-nav-btn:hover { color: var(--teal); }
.resume-exp-nav-btn.is-active { color: var(--coral); border-left-color: var(--coral); background: rgba(255, 107, 91, 0.06); }

/* A connected timeline (dot + line per entry) rather than separate boxes —
   only the visible ~1.5 entries show at once, the rest scroll within this
   box instead of pushing the rest of the page down. */
.resume-roles { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.resume-role-card { display: flex; gap: 14px; }
.resume-role-rail { display: flex; flex-direction: column; align-items: center; width: 14px; flex-shrink: 0; }
.resume-role-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.resume-role-rail::after { content: ""; flex: 1; width: 2px; background: var(--hairline-strong); margin-top: 4px; }
.resume-role-card:last-child .resume-role-rail::after { display: none; }
.resume-role-body { flex: 1; min-width: 0; padding-bottom: 26px; }
.resume-role-card:last-child .resume-role-body { padding-bottom: 4px; }

.resume-exp-role { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; }
.resume-exp-meta { margin-top: 4px; font-size: 13px; color: var(--gray); }
.resume-exp-bullets { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.resume-exp-bullets li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.65; opacity: .85; }
.resume-exp-bullets li::before { content: "▸"; position: absolute; left: 0; color: var(--coral); }

.resume-quests { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.resume-quest-card { position: relative; padding: 28px; border-radius: 20px; }
/* Soft default cycling background, same idea as .case-tint-N on case-study
   sections — used only while a quest has no color of its own; picking one
   via the panel's "Box color" control switches it to that color mixed into
   cream instead (see the inline style branch in app.js). */
.resume-quest-tint-1 { background: #E7EEDC; }
.resume-quest-tint-2 { background: #DCE8F5; }
.resume-quest-tint-3 { background: #F5E6D6; }
.resume-quest-link {
  position: absolute; top: 18px; right: 18px;
  font-size: 14px; color: var(--gray);
  transition: color .2s ease;
}
.resume-quest-link:hover { color: var(--coral); }
.resume-quest-no { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.06em; color: var(--gray); margin-bottom: 10px; }
.resume-quest-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin-bottom: 8px; }
.resume-quest-body { font-size: 15px; line-height: 1.55; opacity: .74; }

.resume-education { display: flex; flex-direction: column; gap: 14px; }
.resume-edu-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; border-radius: 16px; }
.resume-edu-school { font-weight: 700; font-size: 15px; }
/* One school can list several degrees/certs — each its own row within the
   same card, addable/duplicable/reorderable independently of the school
   entry itself (matching how a company's roles work within Experience). */
.resume-edu-degrees { display: flex; flex-direction: column; gap: 4px; }
.resume-edu-degree-row { display: flex; flex-direction: column; gap: 2px; }
.resume-edu-degree { font-size: 14px; opacity: .85; }
/* A degree can list more than one date range (e.g. non-contiguous terms) —
   each its own duplicable/removable line, independent of the degree name. */
.resume-edu-dates-list { display: flex; flex-direction: column; gap: 2px; }
.resume-edu-dates { font-size: 13px; color: var(--gray); }

/* -----------------------------------------------------------
   Now
   ----------------------------------------------------------- */

.now-list { display: flex; flex-direction: column; margin-top: 52px; border-top: 1px solid var(--hairline); padding-bottom: 40px; }

.now-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 36px;
  align-items: baseline;
  padding: 26px 4px;
  border-bottom: 1px solid var(--hairline);
}

.now-row .label { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--coral); }
.now-row .body { font-size: 17px; line-height: 1.7; opacity: .82; text-wrap: pretty; }

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */

footer.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 40px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-copy { font-size: 14px; color: var(--gray); }

.footer-social { display: flex; flex-wrap: wrap; gap: 26px; font-size: 14px; color: var(--gray); }
.footer-social a { color: var(--gray); transition: color .2s ease; }
.footer-social a:hover { color: var(--coral); }

/* -----------------------------------------------------------
   Responsive
   ----------------------------------------------------------- */

@media (max-width: 900px) {
  .header-inner { padding: 16px 24px; }
  main, main.narrow, main.tight, main.resume-main { padding-left: 24px; padding-right: 24px; }
  .currently-band { padding: 40px 28px; border-radius: 24px; }
  footer.site-footer { padding-left: 24px; padding-right: 24px; }

  /* No room to float the graphic beside the text at this width — it drops
     into the normal flow instead, reordered to sit after the copy rather
     than wherever it happens to fall as the first element in markup. */
  .hero { padding-top: 64px; display: flex; flex-direction: column; }
  .hero-eyebrow { max-width: none; order: 0; }
  .hero-headline { max-width: none; order: 1; }
  .hero-footer { order: 2; display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
  .hero-footer p { max-width: none; }
  .hero-visual { position: static; order: 3; max-width: 320px; margin: 40px auto 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 64px; }
  .case-section, .now-row { grid-template-columns: 1fr; gap: 12px; }
  .case-carousel { grid-template-columns: 1fr; }
  .case-carousel-peek { display: none; }
  .case-carousel-arrow.prev { left: 8px; }
  .case-carousel-arrow.next { right: 8px; }
  .article-row { grid-template-columns: 1fr; gap: 6px; }
  .article-row .date { text-align: left; }
  .cta-slab { padding: 40px 28px; border-radius: 24px; }
  .page-intro { padding-top: 64px; }
  .resume-page { grid-template-columns: 1fr; padding-top: 64px; }
  .resume-profile { position: static; }
  .resume-exp { grid-template-columns: 1fr; }
  .resume-exp-nav { flex-direction: row; flex-wrap: wrap; }
  .resume-quests { grid-template-columns: 1fr; }

  .projects-panel { padding: 40px 28px; border-radius: 24px; }
  .projects-panel-head { flex-direction: column; align-items: flex-start; }
  .projects-panel-note { align-items: flex-start; text-align: left; }
  .projects-panel-grid { grid-template-columns: 1fr; }

  .about-panel-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-panel-facts { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  nav.site-nav { gap: 14px; }
  .nav-links { display: none; gap: 16px; }
  .btn-logout { display: none; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  header.site-header.is-menu-open {
    position: relative;
  }
  header.site-header.is-menu-open nav.site-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--hairline);
  }
  header.site-header.is-menu-open .nav-links,
  header.site-header.is-menu-open .btn-logout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

/* -----------------------------------------------------------
   Admin editor (desktop only — see js/admin.js)
   ----------------------------------------------------------- */

.admin-editable {
  outline: 1.5px dashed transparent;
  outline-offset: 3px;
  border-radius: 4px;
  transition: outline-color .15s ease, background-color .15s ease;
  cursor: text;
}
.admin-edit-mode .admin-editable:hover { outline-color: rgba(255, 107, 91, 0.45); }
.admin-edit-mode .admin-editable:focus {
  outline-color: var(--coral);
  outline-style: solid;
  background: rgba(255, 209, 102, 0.16);
}

.admin-list-item { position: relative; }
/* A carousel slide needs to stay absolutely positioned (stacked on top of
   its siblings) even once admin.js also marks it as a list item — the two
   classes have equal specificity, so without this the later admin-list-item
   rule above would win and collapse the carousel's layout while editing. */
.case-carousel-slide.admin-list-item { position: absolute; }

/* decorateLists() appends the generic "+ Add" button as a plain, normally-
   positioned child of the images list container — everywhere else that's
   fine, but here every slide is absolutely positioned and fills the whole
   box, so a statically-positioned sibling paints *underneath* all of them
   regardless of DOM order, making the button both invisible and
   unclickable (this is what actually blocked adding more than one image,
   not a missing feature). Pull it out to a fixed, visible spot above
   every slide instead. */
.case-carousel-main [data-edit-images] > .admin-add-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 6;
  background: var(--cream);
  box-shadow: 0 6px 18px -6px rgba(13, 59, 62, 0.4);
}

.admin-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--cream);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s ease, background .15s ease;
}
.admin-list-item:hover .admin-remove-btn { opacity: 1; }
.admin-remove-btn:hover { background: var(--coral); }

.admin-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1.5px dashed var(--hairline-strong);
  color: var(--gray);
  font-weight: 600;
  font-size: 14px;
  min-height: 48px;
}
.admin-add-btn:hover { border-color: var(--coral); color: var(--coral); }

.admin-drop-target { outline: 2px dashed var(--coral) !important; outline-offset: 3px; }

[draggable="true"].admin-list-item { cursor: grab; }

.admin-editable-image { position: relative; }
.admin-edit-mode .admin-editable-image { cursor: pointer; }
.admin-edit-mode .admin-editable-image:hover::after {
  content: "Click to change image";
  position: absolute;
  inset: 0;
  background: rgba(13, 59, 62, 0.55);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  padding: 12px;
  border-radius: inherit;
}

.admin-edit-mode .admin-editable-image-draggable { cursor: grab; }
.admin-edit-mode .admin-editable-image-draggable:active { cursor: grabbing; }
.admin-edit-mode .admin-editable-image-draggable:hover::after { content: "Drag to reposition · click to change image"; }

.admin-list-item-handled { padding-top: 30px; }
.admin-drag-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  background: rgba(13, 59, 62, 0.06);
  border-radius: 8px 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray);
  cursor: grab;
  z-index: 4;
}
.admin-drag-handle:hover { background: rgba(255, 107, 91, 0.12); color: var(--coral); }
.admin-list-item.admin-dragging { opacity: .4; }

.admin-btn:disabled { opacity: .35; cursor: default; }
.admin-btn:disabled:hover { background: rgba(255, 248, 240, 0.12); }

:root {
  --admin-sidepanel-w: 320px;
  --admin-sidepanel-w-collapsed: 56px;
}

.admin-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 248, 240, 0.12);
  color: var(--cream);
  font-weight: 600;
  font-size: 13px;
  transition: background .15s ease;
  white-space: nowrap;
}
.admin-btn:hover { background: rgba(255, 248, 240, 0.22); }
.admin-btn-primary { background: var(--coral); }
.admin-btn-primary:hover { background: var(--butter); color: var(--teal); }
.admin-btn-ghost { opacity: .75; }
.admin-btn-danger { background: rgba(255, 107, 91, 0.85); }
.admin-btn-danger:hover { background: var(--coral); }

/* Body/site layout shift so the fixed sidepanel never covers content. */
body.admin-has-chrome #site { margin-right: var(--admin-sidepanel-w); transition: margin-right .15s ease; }
body.admin-has-chrome.admin-panel-collapsed #site { margin-right: var(--admin-sidepanel-w-collapsed); }

.admin-topbar-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  padding: 0 4px;
}

.admin-topbar-status {
  font-size: 12px;
  color: var(--cream);
  opacity: .8;
  min-width: 60px;
  text-align: right;
}

/* ---- Side panel ---- */
.admin-sidepanel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--admin-sidepanel-w);
  z-index: 390;
  background: var(--card);
  border-left: 1px solid var(--hairline-strong);
  box-shadow: -8px 0 24px -16px rgba(13, 59, 62, 0.4);
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
  transition: width .15s ease;
}
body.admin-panel-collapsed .admin-sidepanel { width: var(--admin-sidepanel-w-collapsed); }
body.admin-panel-collapsed .admin-sidepanel .admin-panel-actions-row,
body.admin-panel-collapsed .admin-sidepanel .admin-page-select,
body.admin-panel-collapsed .admin-sidepanel .admin-topbar-brand,
body.admin-panel-collapsed .admin-sidepanel .admin-panel-body {
  display: none;
}

.admin-panel-header {
  position: sticky;
  top: 0;
  padding: 14px 20px;
  font-family: 'Sora', sans-serif;
  background: var(--teal);
  color: var(--cream);
  border-bottom: 1px solid var(--hairline-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.admin-panel-collapsed .admin-panel-header { padding: 14px 10px; align-items: center; }

.admin-panel-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-collapse-btn {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(255, 248, 240, 0.12);
  color: var(--cream);
  font-size: 13px;
}
.admin-collapse-btn:hover { background: rgba(255, 248, 240, 0.22); }

.admin-panel-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-page-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 248, 240, 0.3);
  background: rgba(255, 248, 240, 0.1);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
}
.admin-page-select option { color: var(--teal); }

.admin-panel-body {
  padding: 6px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-panel-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-panel-section:last-child { border-bottom: none; }
details.admin-panel-section > summary { cursor: pointer; }
details.admin-panel-section > summary::-webkit-details-marker { display: none; }

.admin-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
}

.admin-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--teal);
}
.admin-panel-row input[type="text"],
.admin-panel-row input[type="number"],
.admin-panel-row select {
  width: 130px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--cream);
  font-size: 13px;
  color: var(--teal);
}
.admin-panel-row input[type="color"] {
  width: 36px;
  height: 30px;
  border: none;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  background: none;
}
.admin-panel-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--coral);
  cursor: pointer;
}
.admin-panel-row-stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.admin-panel-row-stacked input { width: 100%; }

.admin-embed-textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--cream);
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.admin-stepper { display: flex; align-items: center; gap: 4px; }
.admin-stepper input[type="number"] { width: 64px; text-align: center; }
.admin-stepper-btn {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--cream);
  color: var(--teal);
  font-size: 14px;
  line-height: 1;
}
.admin-stepper-btn:hover { border-color: var(--coral); color: var(--coral); }

.admin-align-group { display: flex; gap: 4px; }
.admin-align-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  background: var(--cream);
  color: var(--teal);
  font-size: 13px;
}
.admin-align-btn:hover { border-color: var(--coral); }
.admin-align-btn.is-active { background: var(--coral); border-color: var(--coral); color: var(--cream); }

.admin-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-panel-actions .admin-btn {
  color: var(--teal);
  background: var(--cream);
  border: 1px solid var(--hairline-strong);
}
.admin-panel-actions .admin-btn:hover { border-color: var(--coral); }
.admin-panel-actions .admin-btn-danger {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--cream);
}
.admin-panel-actions .admin-btn-danger:hover { background: #e5493a; }

.admin-color-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.admin-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  text-transform: capitalize;
}
.admin-color-row input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}
/* Browsers draw the swatch as an inset rectangle by default — clipping the
   outer input to a circle alone leaves its corners showing through, so the
   swatch itself (and its wrapper) need the same radius applied directly. */
.admin-color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; }
.admin-color-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
.admin-color-row input[type="color"]::-moz-color-swatch { border: none; border-radius: 50%; }

.admin-favicon-row { display: flex; align-items: center; gap: 12px; }
.admin-favicon-preview {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--hairline-strong);
}
.admin-favicon-preview.placeholder-img { aspect-ratio: auto; padding: 0; }

@media (max-width: 899px) {
  .admin-sidepanel { display: none !important; }
  body.admin-has-chrome #site { margin-right: 0; }
}
