/* ===========================================================
   Portfolio — shared design system
   Branding: warm editorial palette from the inspiration deck
   (off-white canvas, taupe/charcoal headings, mint/sand/
   mustard/orange accents, Fraunces display + Inter body)
   =========================================================== */

:root {
  /* surfaces */
  --bg:        #F3F1EC;   /* main off-white canvas        */
  --bg-tan:    #E7DEC9;   /* warm tan section (cover page) */
  --bg-ink:    #46453F;   /* dark charcoal section        */
  --card:      #FBFAF7;   /* raised card surface          */

  /* ink / text */
  --ink:       #2C2B27;   /* primary text                 */
  --muted:     #8A867B;   /* secondary text               */
  --on-ink:    #EFEDE6;   /* text on dark sections        */

  /* brand accents (straight from the deck) */
  --taupe:     #8A7C68;   /* big display headings         */
  --sand:      #D9CDB4;
  --graybrown: #7C7468;
  --mint:      #5FBEA6;
  --mustard:   #EEC24E;
  --orange:    #E8763C;

  /* lines */
  --line:      #DED9CD;
  --line-soft: #E8E4DA;

  /* type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* layout */
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 64px);
}

/* ----------------------------- reset ---------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --------------------------- utilities -------------------------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
}
.accent-mint    { color: var(--mint); }
.accent-orange  { color: var(--orange); }
.accent-mustard { color: var(--mustard); }
.accent-taupe   { color: var(--taupe); }

/* ----------------------- editorial meta bar --------------------- */
.metabar {
  display: flex; justify-content: center; align-items: center;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.metabar .mb-center { font-weight: 600; color: var(--ink); }

/* ------------------------------ nav ----------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin-inline: auto;
  padding: 16px var(--gutter);
}
.brand { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -.01em; }
.brand .dot { color: var(--orange); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink);
  position: relative; padding: 4px 0; transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--orange); transition: width .25s ease;
}
.nav-links a:hover { color: var(--orange); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--orange); }
/* nav buttons should keep their own colors, not the nav link color, and no underline */
.nav-links a.btn::after { display: none; }
.nav-links a.btn-linkedin, .nav-links a.btn-linkedin:hover { color: #fff; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: var(--bg); }

/* hamburger (mobile) */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* ----------------------------- button --------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 14.5px;
  padding: 11px 20px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
  transition: transform .15s ease, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--orange); border-color: var(--orange); }
.btn-linkedin { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.btn-linkedin:hover { background: #08518f; border-color: #08518f; }
.btn svg { width: 17px; height: 17px; }

/* ------------------------- page hero head ----------------------- */
.pagehead { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); }
.pagehead .display {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--taupe);
  font-size: clamp(56px, 12vw, 132px);
  line-height: .92; letter-spacing: -.02em;
  font-optical-sizing: auto;
}
.pagehead .lede {
  font-family: var(--serif); font-size: clamp(19px, 2.4vw, 26px);
  line-height: 1.45; color: var(--ink); max-width: 46ch; margin-top: 22px;
}

/* section rhythm */
section.block { padding: clamp(36px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.block-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 34px; }
.block-head h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 4vw, 44px); letter-spacing: -.01em; color: var(--ink);
}
.block-head .num { font-family: var(--serif); font-size: 18px; color: var(--orange); }

/* ----------------------------- grid ----------------------------- */
.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ----------------------------- cards ---------------------------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(44,43,39,.4); border-color: var(--sand); }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card .tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 11px; border-radius: 999px; margin-bottom: 14px;
}
/* accent edge variants */
.edge { border-top: 4px solid var(--sand); }
.edge-mint    { border-top-color: var(--mint); }
.edge-orange  { border-top-color: var(--orange); }
.edge-mustard { border-top-color: var(--mustard); }
.edge-taupe   { border-top-color: var(--taupe); }
.edge-gray    { border-top-color: var(--graybrown); }

.tag-mint    { background: color-mix(in srgb, var(--mint) 18%, white); color: #2f7d6b; }
.tag-orange  { background: color-mix(in srgb, var(--orange) 18%, white); color: #b1521f; }
.tag-mustard { background: color-mix(in srgb, var(--mustard) 26%, white); color: #97751a; }
.tag-taupe   { background: color-mix(in srgb, var(--taupe) 22%, white); color: #6a5d49; }

/* ------------------------- stat / metric ------------------------ */
.metric { text-align: left; }
.metric .big {
  font-family: var(--serif); font-weight: 400; line-height: 1;
  font-size: clamp(40px, 6vw, 62px); color: var(--ink);
}
.metric .label { color: var(--muted); font-size: 14.5px; margin-top: 8px; }

/* progress bars (Money Stats motif) */
.bar-row { margin-bottom: 26px; }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.bar-top .name { font-family: var(--serif); font-size: 19px; }
.bar-top .val { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-track { height: 12px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }

/* --------------------------- timeline --------------------------- */
.timeline { position: relative; }
.tl-item { position: relative; padding: 0 0 38px 34px; border-left: 2px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -9px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--orange);
}
.tl-item .role { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.tl-item .org { color: var(--ink); font-weight: 600; }
.tl-item .period { font-size: 13px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin: 4px 0 12px; }
.tl-item ul.bullets { margin-top: 10px; }
.tl-item ul.bullets li { position: relative; padding-left: 18px; color: var(--muted); margin-bottom: 6px; font-size: 15.5px; }
.tl-item ul.bullets li::before { content: "—"; position: absolute; left: 0; color: var(--mint); }

/* ----------------------------- chips ---------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 14px; font-weight: 500; padding: 8px 15px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  transition: transform .15s, border-color .2s;
}
.chip:hover { transform: translateY(-2px); border-color: var(--orange); }

/* --------------------------- list items ------------------------- */
.media { display: flex; gap: 18px; align-items: flex-start; }
.media .thumb {
  flex: 0 0 64px; height: 64px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; font-family: var(--serif);
  font-size: 26px; color: #fff;
}
.media .thumb img { width: 100%; height: 100%; object-fit: cover; }
.media .thumb.book { flex-basis: 62px; height: 90px; border-radius: 8px; box-shadow: 0 6px 16px -8px rgba(44,43,39,.5); }
.media h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.media .by { color: var(--muted); font-size: 14px; }
.media p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* --------------------------- about row -------------------------- */
.about { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.photo-frame {
  aspect-ratio: 4/5; border-radius: 18px; overflow: hidden;
  background: var(--sand); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--graybrown);
  font-family: var(--serif); text-align: center;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; image-orientation: none; }
.photo-frame .photo-fallback { padding: 20px; }
.about .bio p { font-size: 18px; margin-bottom: 16px; }
.about .bio p:first-child { font-family: var(--serif); font-size: 22px; line-height: 1.5; color: var(--ink); }

/* ----------------------------- CTA ------------------------------ */
.cta {
  margin: clamp(48px,8vw,90px) 0 0; background: var(--bg-ink); color: var(--on-ink);
  border-radius: 24px; padding: clamp(36px, 6vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 4vw, 40px); max-width: 18ch; }
.cta p { color: color-mix(in srgb, var(--on-ink) 75%, transparent); margin-top: 8px; }
.cta .btn { border-color: var(--on-ink); color: var(--on-ink); }
.cta .btn-linkedin { border-color: #0A66C2; }

/* ---------------------------- footer ---------------------------- */
.footer {
  border-top: 1px solid var(--line); margin-top: clamp(48px,8vw,90px);
  padding: 40px 0;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer .brand { font-size: 18px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--orange); }
.footer .copy { font-size: 13px; color: var(--muted); }

/* --------------------------- carousel --------------------------- */
.carousel { position: relative; }
.car-track {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 6px 2px 18px; -webkit-overflow-scrolling: touch;
}
.car-track::-webkit-scrollbar { height: 8px; }
.car-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.deck-slide {
  flex: 0 0 min(680px, 86%); scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.deck-frame {
  aspect-ratio: 16/9; background: var(--bg-ink); color: var(--on-ink);
  display: grid; place-items: center; text-align: center; padding: 24px;
}
.deck-frame .ph { font-family: var(--serif); }
.deck-frame .ph span { display:block; font-size: 13px; color: color-mix(in srgb, var(--on-ink) 65%, transparent); margin-top:8px; font-family: var(--sans); }
.deck-frame img, .deck-frame iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }
.deck-meta { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.deck-meta h3 { font-family: var(--serif); font-size: 19px; }
.deck-meta p { color: var(--muted); font-size: 14px; }
.car-nav { display: flex; gap: 10px; margin-top: 6px; }
.car-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink);
  background: transparent; cursor: pointer; font-size: 20px; line-height: 1; color: var(--ink);
  transition: background .2s, color .2s, transform .15s;
}
.car-btn:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }

/* ---------------------------- forms ----------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--mint); outline-offset: 1px; border-color: var(--mint); }
input[type=file] { font: inherit; font-size: 14px; color: var(--muted); }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-pill { flex: 1; min-width: 140px; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill label {
  display: block; text-align: center; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink); font-size: 15px; margin: 0;
  transition: border-color .2s, background .2s;
}
.radio-pill input:checked + label { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 10%, white); }
.note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: color-mix(in srgb, var(--orange) 14%, white); color: #b1521f; border: 1px solid color-mix(in srgb, var(--orange) 35%, white); }
.alert-ok { background: color-mix(in srgb, var(--mint) 16%, white); color: #2f7d6b; border: 1px solid color-mix(in srgb, var(--mint) 38%, white); }

/* admin deck list rows */
.admin-deck { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: var(--card); }
.admin-deck .ad-thumb { flex: 0 0 96px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--bg-ink); display: grid; place-items: center; color: var(--on-ink); font-size: 11px; }
.admin-deck .ad-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-deck .ad-body { flex: 1; min-width: 0; }
.admin-deck .ad-body h4 { font-family: var(--serif); font-size: 17px; }
.admin-deck .ad-body p { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-deck .ad-actions { display: flex; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 15px; color: var(--ink); transition: background .15s, border-color .15s; }
.icon-btn:hover { border-color: var(--orange); }
.icon-btn.danger:hover { background: color-mix(in srgb, var(--orange) 14%, white); border-color: var(--orange); color: #b1521f; }

/* ---------------------- reveal-on-scroll ------------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------- responsive --------------------------- */
@media (max-width: 860px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .about  { grid-template-columns: 1fr; gap: 28px; }
  .photo-frame { max-width: 300px; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links .btn { margin-top: 12px; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .metabar .mb-center { display: none; }
}
