/* ============================================================
   "Wispr Flow" warm-editorial theme overlay
   Loaded AFTER home.css / style.css so it only overrides tokens
   and a few surfaces. Sage desk + cream paper sheet + editorial
   serif + warm terracotta accent + fluid scaling for large displays.
   Tags and brand icons keep their colour.
   ============================================================ */

/* ---- Fluid scaling: everything grows on bigger displays ----
   Root font scales with viewport; smooth scrolling site-wide. */
html {
  font-size: clamp(16px, 0.5vw + 9.5px, 24px);
  scroll-behavior: smooth;
}

/* ---- Shared warm palette (home.css token names) ---- */
:root {
  --paper:        #dfe0d0;   /* sage desk */
  --paper-card:   #faf9ec;   /* cream paper */
  --paper-sink:   #f1efdd;
  --paper-glass:  rgba(250, 249, 236, 0.85);

  --ink:    #211d17;
  --body:   #4b463b;
  --muted:  #837c6c;
  --faint:  #9a927f;

  --line:        rgba(40, 34, 22, 0.13);
  --line-soft:   rgba(40, 34, 22, 0.07);
  --line-strong: rgba(40, 34, 22, 0.22);

  /* warm terracotta accent */
  --clay:       #a8542d;
  --clay-deep:  #84411f;
  --link:       #9a4a26;
  --link-hover: #763619;

  --shadow-soft: 0 1px 2px rgba(40,34,22,0.05), 0 10px 30px rgba(40,34,22,0.07);
  --shadow-lift: 0 2px 8px rgba(40,34,22,0.07), 0 20px 50px rgba(40,34,22,0.11);

  --wrap: clamp(1120px, 64vw + 360px, 1640px);

  /* soft peach primary */
  --lav:      #f0d5c1;
  --lav-deep: #e8c4a6;
}

/* ---- Inner-page token names (style.css) ---- */
:root {
  --bg-color: #dfe0d0;
  --text-color: #211d17;
  --heading-color: #211d17;
  --accent-color: #837c6c;
  --link-color: #9a4a26;
  --secondary-accent: #a8542d;
  --accent-deep: #84411f;
  --glass-bg: #faf9ec;
  --glass-border: rgba(40, 34, 22, 0.13);
  --glass-hover-bg: #f5f2e2;
  --glass-hover-border: rgba(40, 34, 22, 0.22);
  --title-gradient: linear-gradient(105deg, #a8542d 0%, #c4794a 100%);
  --accent-gradient: linear-gradient(90deg, #a8542d 0%, #c4794a 100%);
}

/* ============================================================
   HOME (index.html / blog.html) - cream sheet on the sage desk
   ============================================================ */
body { background: var(--paper) !important; background-image: none !important; }

main#top {
  display: block;
  background: var(--paper-card);
  max-width: var(--wrap);
  margin: clamp(20px, 3vw, 48px) auto clamp(28px, 4vw, 64px);
  border-radius: clamp(22px, 2vw, 36px);
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--line-soft);
  padding: clamp(20px, 3vw, 56px) 0;
  overflow: clip;
}
main#top .wrap { max-width: min(100%, 1180px); }

.hero h1, .sec-head h2, .card-title, .entry-title { letter-spacing: -0.02em; }

/* ---- Hero: circular headshot + editorial intro ---- */
.hero-inner {
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4vw, 56px);
  flex-direction: row-reverse;   /* photo left, text right */
  text-align: left;
}
.hero-text { flex: 0 1 600px; }
.hero-portrait {
  width: clamp(150px, 15vw, 210px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 5px solid #fffef7;
  box-shadow: 0 10px 30px rgba(40,34,22,0.16), 0 2px 6px rgba(40,34,22,0.10);
  background: var(--paper-sink);
  align-self: flex-start;        /* sit up near the name */
  margin-top: 0.3rem;
}
.hero-portrait img { object-position: 50% 6%; }
@media (max-width: 700px) {
  .hero-portrait { align-self: center; margin-top: 0; width: clamp(120px, 33vw, 150px); }
}

.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.4rem); font-weight: 600; line-height: 1.02; }
.hero .subtitle {
  font-size: clamp(0.66rem, 0.9vw, 0.78rem);
  letter-spacing: 0.14em;
  color: var(--clay-deep);
  margin-bottom: 1.1rem;
}
.hero .bio { font-size: clamp(1rem, 1.2vw, 1.12rem); color: var(--body); }
.sec-num { color: var(--clay-deep); }

@media (max-width: 700px) {
  /* Stack the hero with the circular headshot on top, intro below.
     column-reverse because the DOM order is text-then-portrait, and we
     want the photo first on phones (matches the desktop photo-beside-name
     intent). flex:0 1 auto kills the desktop 600px flex-basis, which would
     otherwise become a 600px *height* in a column flexbox and leave a huge
     empty gap between the buttons and the photo. */
  .hero-inner {
    flex-direction: column-reverse;
    justify-content: flex-start;
    text-align: center;
    gap: clamp(16px, 5vw, 24px);
  }
  .hero-text { flex: 0 1 auto; width: 100%; text-align: center; }
  .hero .bio { margin-inline: auto; }
  .links { justify-content: center; }
}

/* Primary pill (Resume) + submit button -> soft peach. */
.pill.primary, .submit-btn {
  background: var(--lav) !important;
  border-color: var(--lav-deep) !important;
  color: #3a2316 !important;
}
.pill.primary:hover, .submit-btn:hover {
  background: var(--lav-deep) !important;
  color: #2a1810 !important;
}

/* Soften secondary pills / inputs onto the cream. */
.pill, .skill-pill, .modern-input, .modern-textarea { background: #fffef6; }

/* Entry hover tint + accent bar -> terracotta. */
.entry.is-clickable:hover { background: rgba(168,84,45,0.05); }
.entry.is-clickable::before { background: var(--clay); }

/* ============================================================
   INNER PAGES (style.css) - cream cards on the sage desk
   ============================================================ */
.bg-mesh {
  background:
    radial-gradient(80% 36% at 50% -10%, rgba(168,84,45,0.05) 0%, transparent 72%),
    var(--bg-color) !important;
}

body.home:not(:has(main#top)) {
  background: transparent !important;
  max-width: clamp(820px, 82vw, 1200px);
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
}
/* Page title header in its own cream card. */
body.home:not(:has(main#top)) > header {
  background: var(--paper-card);
  border: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft) !important;
  border-radius: clamp(18px, 1.6vw, 26px);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 3.2vw, 2.4rem) clamp(1.4rem, 3vw, 2.4rem) !important;
  margin-bottom: clamp(1.3rem, 2.6vw, 2rem) !important;
}
/* Each section -> a cream card. */
body.home:not(:has(main#top)) section {
  background: var(--paper-card);
  border: 1px solid var(--line-soft);
  border-radius: clamp(18px, 1.6vw, 26px);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 3vw, 2.6rem) clamp(1.4rem, 3vw, 2.5rem) !important;
  margin: clamp(1.3rem, 2.6vw, 2rem) 0 !important;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
@media (hover: hover) {
  body.home:not(:has(main#top)) section:hover { box-shadow: var(--shadow-lift); }
}

/* Inner-page primary buttons -> peach. */
body.home .btn-pill.primary, body.home .submit-btn {
  background: var(--lav) !important;
  border-color: var(--lav-deep) !important;
  color: #3a2316 !important;
}

/* Callout boxes a touch deeper so they read on the cream cards. */
.content-box, .glass { background: #f3f0df !important; }

/* Timeline entries become cream cards on the sage (dot-and-rail stays). */
body.home:not(:has(main#top)) .timeline-card {
  background: var(--paper-card);
  border: 1px solid var(--line-soft);
  border-radius: clamp(14px, 1.4vw, 20px);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.1rem, 2.2vw, 1.5rem) clamp(1.2rem, 2.4vw, 1.7rem) !important;
  transition: box-shadow 0.25s ease;
}
@media (hover: hover) {
  body.home:not(:has(main#top)) .timeline-card:hover { box-shadow: var(--shadow-lift); }
}
/* ...flat when nested inside a section card (undergrad page). */
body.home:not(:has(main#top)) section .timeline-card {
  background: none; border: none; box-shadow: none;
  padding-left: 0 !important; padding-right: 0 !important;
}

/* ============================================================
   DOCK + SPOTLIGHT - warm cream pill, terracotta active state.
   ============================================================ */
.nav-dock {
  background: rgba(250, 249, 236, 0.82) !important;
  border: 1px solid rgba(40, 34, 22, 0.10) !important;
  box-shadow:
    0 8px 24px rgba(40, 34, 22, 0.10),
    0 22px 60px rgba(40, 34, 22, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}
.nav-dock-item { color: var(--ink); }
@media (hover: hover) {
  .nav-dock-item:hover { background: rgba(168, 84, 45, 0.10); color: var(--clay-deep); }
}
.nav-dock-item.active {
  background: var(--clay) !important;
  color: #fff8f1 !important;
  box-shadow: 0 2px 8px rgba(168, 84, 45, 0.30) !important;
}
.nav-dock-item.active:hover { background: var(--clay-deep) !important; color: #fff8f1 !important; }
.nav-dock-divider { background: rgba(40, 34, 22, 0.12); }
.nav-dock-search .nav-dock-shortcut { background: rgba(40, 34, 22, 0.07); color: var(--muted); }

@media (max-width: 700px) {
  .nav-dock { background: rgba(250, 249, 236, 0.94) !important; }
  .nav-dock-item.active { background: rgba(168, 84, 45, 0.16) !important; color: var(--clay-deep) !important; box-shadow: none !important; }
  .nav-dock-item.active:hover { background: rgba(168, 84, 45, 0.22) !important; color: var(--clay-deep) !important; }
}

.spotlight {
  background: rgba(250, 249, 236, 0.94) !important;
  border-color: rgba(40, 34, 22, 0.12) !important;
}
.spotlight-input { color: var(--ink); }
.spotlight-input::placeholder { color: var(--muted); }
.spotlight-icon, .spotlight-hint, .spotlight-footer, .spotlight-footer kbd { color: var(--muted); }
.spotlight-item-title { color: var(--ink); }
.spotlight-item-desc, .spotlight-empty { color: var(--muted); }
.spotlight-item.active { background: rgba(168, 84, 45, 0.10) !important; }
.spotlight-item-group { color: var(--muted); background: rgba(40, 34, 22, 0.05); }
.spotlight-item.active .spotlight-item-group {
  color: var(--clay-deep) !important;
  background: rgba(168, 84, 45, 0.14) !important;
}

/* ---- Photo interaction: no zoom/lightbox, small lift on hover ---- */
.hero-portrait {
  cursor: default;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.hero-portrait img { cursor: default; }
.hero-portrait:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 16px 38px rgba(40, 34, 22, 0.22), 0 3px 8px rgba(40, 34, 22, 0.12);
  border-color: #ffffff;
}
@media (prefers-reduced-motion: reduce) {
  .hero-portrait { transition: none; }
  .hero-portrait:hover { transform: none; }
}
