/* ==========================================================================
   monicavendituoli.com
   Palette: https://coolors.co/palette/606c38-283618-fefae0-dda15e-bc6c25
   ========================================================================== */

:root {
  /* Brand ramp */
  --moss:      #606c38;
  --pine:      #283618;
  --cornsilk:  #fefae0;
  --wheat:     #dda15e;
  --clay:      #bc6c25;

  /* Semantic tokens — light (default) */
  --bg:           #fefae0;
  --bg-raised:    #fffdf2;
  --bg-sunken:    #f6f0d4;
  --text:         #283618;
  --text-muted:   #55603c;
  --text-subtle:  #7a8158;
  --accent:       #bc6c25;
  --accent-hover: #9c5719;
  --accent-soft:  rgba(188, 108, 37, 0.10);
  --rule:         rgba(40, 54, 24, 0.14);
  --rule-strong:  rgba(40, 54, 24, 0.28);
  --tag-bg:       rgba(96, 108, 56, 0.12);
  --tag-text:     #4b5530;
  --shadow:       0 1px 2px rgba(40,54,24,.06), 0 8px 24px -12px rgba(40,54,24,.18);
  --shadow-lift:  0 2px 4px rgba(40,54,24,.08), 0 18px 40px -18px rgba(40,54,24,.30);
  --focus:        #bc6c25;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --measure: 68ch;
  --page: 1080px;
  --page-narrow: 760px;
  --radius: 12px;
  --radius-lg: 18px;
  --step: clamp(1rem, 0.6rem + 1.2vw, 1.35rem);
}

/* Dark theme — applied by system pref unless user forced light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:           #1c2611;
    --bg-raised:    #24301a;
    --bg-sunken:    #16200d;
    --text:         #f2eed8;
    --text-muted:   #c3c8a8;
    --text-subtle:  #98a07a;
    --accent:       #e0a05c;
    --accent-hover: #f0b878;
    --accent-soft:  rgba(224, 160, 92, 0.14);
    --rule:         rgba(254, 250, 224, 0.16);
    --rule-strong:  rgba(254, 250, 224, 0.32);
    --tag-bg:       rgba(221, 161, 94, 0.16);
    --tag-text:     #ddb98a;
    --shadow:       0 1px 2px rgba(0,0,0,.30), 0 8px 24px -12px rgba(0,0,0,.55);
    --shadow-lift:  0 2px 4px rgba(0,0,0,.35), 0 18px 40px -18px rgba(0,0,0,.65);
    --focus:        #e0a05c;
  }
}

/* Dark theme — forced by the toggle */
:root[data-theme="dark"] {
  --bg:           #1c2611;
  --bg-raised:    #24301a;
  --bg-sunken:    #16200d;
  --text:         #f2eed8;
  --text-muted:   #c3c8a8;
  --text-subtle:  #98a07a;
  --accent:       #e0a05c;
  --accent-hover: #f0b878;
  --accent-soft:  rgba(224, 160, 92, 0.14);
  --rule:         rgba(254, 250, 224, 0.16);
  --rule-strong:  rgba(254, 250, 224, 0.32);
  --tag-bg:       rgba(221, 161, 94, 0.16);
  --tag-text:     #ddb98a;
  --shadow:       0 1px 2px rgba(0,0,0,.30), 0 8px 24px -12px rgba(0,0,0,.55);
  --shadow-lift:  0 2px 4px rgba(0,0,0,.35), 0 18px 40px -18px rgba(0,0,0,.65);
  --focus:        #e0a05c;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, .97rem + .15vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.2vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .45vw, 1.35rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 3px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

::selection { background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: min(100% - 2.5rem, var(--page));
  margin-inline: auto;
}
.wrap--narrow { width: min(100% - 2.5rem, var(--page-narrow)); }

.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section + .section { border-top: 1px solid var(--rule); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  padding: .3rem 0;
}
.nav__brand:hover { color: var(--accent); }
.nav__brand .dot { color: var(--accent); }

.nav__links {
  order: 2;
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  display: block;
  padding: .45rem .7rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.nav__links a:hover { background: var(--tag-bg); color: var(--text); }
.nav__links a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.theme-toggle {
  order: 3;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: .35rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { background: var(--tag-bg); color: var(--text); border-color: var(--rule-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav__toggle {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  place-items: center;
}
.nav__toggle svg { width: 20px; height: 20px; }

@media (max-width: 700px) {
  .nav__toggle { display: grid; order: 3; }
  .theme-toggle { order: 2; margin-left: 0; }
  .nav__brand { order: 1; }
  .nav__links {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .1rem;
    padding-bottom: .8rem;
  }
  .nav { flex-wrap: wrap; padding-block: .6rem; }
  .nav__links[hidden] { display: none; }
  .nav__links a { padding: .6rem .8rem; border-radius: 8px; }
}

/* --------------------------------------------------------------------------
   Hero (About page)
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(2.75rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}

@media (max-width: 720px) {
  .hero__grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

.hero__photo {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 4px solid var(--bg-raised);
  box-shadow: var(--shadow-lift);
}

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .8rem;
}

.hero h1 { margin-bottom: .35em; }

.hero__role {
  font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.bio { max-width: var(--measure); }
.bio p { font-size: var(--step); line-height: 1.7; }
.bio p:first-of-type::first-letter { /* no drop cap — kept subtle */ }

.bio strong { font-weight: 600; color: var(--text); }

/* --------------------------------------------------------------------------
   Buttons & social
   -------------------------------------------------------------------------- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .62rem 1.15rem;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary {
  background: var(--accent);
  color: #fffdf5;
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: var(--accent-hover); color: #fffdf5; transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { background: var(--tag-bg); color: var(--text); transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--rule-strong); }

.card h3 { margin-bottom: .4rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }

.card__meta {
  font-size: .82rem;
  color: var(--text-subtle);
  margin-bottom: .7rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  align-items: center;
}

.card p { font-size: .95rem; color: var(--text-muted); }

.card__foot {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.tag {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  padding: .34rem .75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  transition: background-color .15s ease, border-color .15s ease;
}
.chip-link:hover { background: var(--accent-soft); border-color: var(--accent); }
.chip-link svg { width: 14px; height: 14px; }

/* Section intro */
.section__head { max-width: var(--measure); margin-bottom: 2rem; }
.section__head p { color: var(--text-muted); }

.anchor-offset { scroll-margin-top: 90px; }

/* Work page: sticky sub-nav */
.subnav {
  position: sticky;
  top: 68px;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav ul {
  display: flex;
  gap: .3rem;
  list-style: none;
  margin: 0;
  padding: .55rem 0;
  white-space: nowrap;
}
.subnav a {
  display: block;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}
.subnav a:hover { background: var(--tag-bg); color: var(--text); }
.subnav a.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Page header band */
.page-head {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.75rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-sunken);
}
.page-head p { max-width: var(--measure); color: var(--text-muted); font-size: var(--step); }

/* Notice / callout */
.note {
  border-left: 3px solid var(--moss);
  background: var(--tag-bg);
  padding: .9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .92rem;
  color: var(--text-muted);
}

/* Embedded post wrapper (LinkedIn/X iframes) */
.embed {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
}
.embed iframe { display: block; width: 100%; border: 0; }

/* --------------------------------------------------------------------------
   Prose (blog posts)
   -------------------------------------------------------------------------- */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose li { margin-bottom: .4em; }
.prose blockquote {
  margin: 1.8em 0;
  padding: .2em 0 .2em 1.3em;
  border-left: 3px solid var(--wheat);
  color: var(--text-muted);
  font-style: italic;
}
.prose img { border-radius: var(--radius); margin-block: 1.8em; }
.prose code {
  background: var(--tag-bg);
  padding: .12em .38em;
  border-radius: 5px;
  font-size: .9em;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-sunken);
  padding-block: 2.75rem;
  margin-top: 3rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.footer__social { display: flex; gap: .5rem; }
.footer__social a {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--text-muted);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.footer__social a:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.footer__social svg { width: 18px; height: 18px; }
.footer__meta { font-size: .87rem; color: var(--text-subtle); }

/* X / Twitter embed grid */
.tweet-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  align-items: start;
}
.tweet-grid blockquote.twitter-tweet {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 1rem 1.1rem;
  font-size: .93rem;
}
.tweet-grid .twitter-tweet-rendered { border: 0; padding: 0; background: none; }
