/* ==========================================================================
   Jesse D. Peters — Executive Portfolio
   Editorial / premium / credibility-first. Hand-built, no framework.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces (warm-tinted, never pure #fff/#000) */
  --paper:        #F6F1E7;   /* warm cream, primary bg */
  --paper-2:      #FBF7EE;   /* lifted cream */
  --paper-3:      #EFE7D7;   /* sunk cream for subtle bands */
  --ink:          #13202B;   /* deep navy-ink, dark bands */
  --ink-2:        #18293708; /* not used directly */
  --ink-deep:     #0F1A23;   /* deepest ink */
  --ink-surface:  #1B2E3D;   /* lifted surface on ink */

  /* Text */
  --text:         #1C2A33;   /* body on paper */
  --text-muted:   #51616C;   /* muted on paper (>=4.5:1 on cream) */
  --text-faint:   #6E7C85;
  --on-ink:       #ECE4D5;   /* text on ink */
  --on-ink-muted: #A7B4BD;   /* muted on ink */

  /* Accent — desaturated clay */
  --accent:       #BE5230;
  --accent-deep:  #9E4124;
  --accent-soft:  rgba(190, 82, 48, .12);

  /* Lines */
  --line:         rgba(19, 32, 43, .14);
  --line-strong:  rgba(19, 32, 43, .26);
  --line-on-ink:  rgba(236, 228, 213, .16);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --maxw:    1200px;
  --measure: 64ch;
  --gutter:  clamp(1.25rem, 4vw, 3.25rem);
  --section: clamp(4.5rem, 9vw, 9rem);
  --radius:  4px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;            /* belt-and-suspenders against bleed */
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }
.eyebrow {
  font-size: .76rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}
.eyebrow.on-ink { color: #E0855F; }
.lede {
  font-size: clamp(1.12rem, .55rem + 1vw, 1.4rem);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: var(--measure);
}

/* Headings */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.04; letter-spacing: -.01em; color: var(--ink); }
.display {
  font-size: clamp(2.5rem, 1rem + 4.6vw, 4.5rem);
  font-weight: 460;
  letter-spacing: -.02em;
  line-height: 1.0;
}
.h2 { font-size: clamp(1.95rem, 1rem + 2.6vw, 3.2rem); letter-spacing: -.018em; }
.h3 { font-size: clamp(1.3rem, 1rem + 1vw, 1.85rem); }
em, .italic { font-style: italic; }

/* Section header block */
.section-head { max-width: 56ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .eyebrow { display: inline-block; margin-bottom: 1rem; }
.section-head .h2 { margin-bottom: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-body);
  font-weight: 600; font-size: .98rem;
  padding: .82rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  will-change: transform;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #FFF6F1; }
.btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(19,32,43,.04); }
.btn--on-ink { background: var(--on-ink); color: var(--ink); }
.btn--on-ink:hover { background: #fff; }
.btn--ghost-ink { background: transparent; color: var(--on-ink); border-color: var(--line-on-ink); }
.btn--ghost-ink:hover { border-color: var(--on-ink); background: rgba(236,228,213,.06); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: baseline; gap: .55rem; font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.01em; color: var(--ink); }
.brand .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: .92rem; font-weight: 500; color: var(--text-muted);
  position: relative; padding-block: .3rem;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px;
  background: var(--accent); transition: right .3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-cta { display: flex; align-items: center; gap: 1.25rem; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px auto; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav-panel { display: none; }

@media (max-width: 880px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-panel {
    display: block;
    position: fixed; inset: 76px 0 0 0; z-index: 99;
    background: var(--paper);
    padding: 2rem var(--gutter) 3rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
    border-top: 1px solid var(--line);
    overflow-y: auto;
  }
  body.nav-open .nav-panel { opacity: 1; transform: none; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-panel a:not(.btn) { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 500; color: var(--ink); padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav-panel .btn { margin-top: 1.75rem; width: 100%; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--paper); overflow: hidden; }
.hero::before {  /* faint warm wash top-right */
  content: ""; position: absolute; top: -20%; right: -10%; width: 50vw; height: 50vw;
  background: radial-gradient(circle at center, var(--accent-soft), transparent 62%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: 100svh;
  padding-block: 130px clamp(3rem, 7vw, 6rem);
}
.hero-copy { max-width: 34rem; }
.hero .eyebrow { display: inline-block; margin-bottom: 1.6rem; }
.hero h1 { margin-bottom: 1.5rem; }
.hero h1 .accent-word { font-style: italic; color: var(--accent); }
.hero-lede { font-size: clamp(1.08rem, .6rem + .8vw, 1.32rem); color: var(--text-muted); line-height: 1.55; max-width: 46ch; margin-bottom: 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.4rem; }
.hero-proof { font-size: .9rem; color: var(--text-faint); letter-spacing: .01em; }
.hero-proof strong { color: var(--text); font-weight: 600; }

.hero-figure { position: relative; justify-self: end; width: 100%; max-width: 420px; }
.hero-figure img { width: 100%; height: auto; border-radius: 6px; position: relative; z-index: 2; filter: grayscale(1) contrast(1.02); }
.hero-figure::after {  /* offset accent frame */
  content: ""; position: absolute; z-index: 1; inset: 22px -22px -22px 22px;
  border: 1.5px solid var(--accent); border-radius: 6px;
}
.hero-badge {
  position: absolute; z-index: 3; left: -18px; bottom: 30px;
  background: var(--ink); color: var(--on-ink);
  padding: .85rem 1.1rem; border-radius: 5px;
  box-shadow: 0 18px 40px -22px rgba(19,32,43,.6);
  max-width: 220px;
}
.hero-badge b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; display: block; line-height: 1; color: #fff; }
.hero-badge span { font-size: .76rem; color: var(--on-ink-muted); letter-spacing: .02em; }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; padding-block: 118px 0; gap: 3rem; }
  .hero-copy { max-width: none; }
  .hero-figure { justify-self: start; max-width: 340px; margin-bottom: 1.5rem; }
  .hero-figure::after { inset: 16px -16px -16px 16px; }
}

/* ---------- Metrics band (ink) ---------- */
.band-ink { background: var(--ink); color: var(--on-ink); position: relative; }
.band-ink .h2, .band-ink h3 { color: #fff; }
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-on-ink);
  border-block: 1px solid var(--line-on-ink);
}
.metric { background: var(--ink); padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1.2rem, 2.5vw, 2rem); }
.metric .num {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.4rem, 1rem + 3.4vw, 3.7rem); line-height: 1;
  color: #fff; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.metric .num .small { font-size: .55em; }
.metric .num .accent { color: #E0855F; }
.metric .lbl { margin-top: .8rem; font-size: .96rem; color: var(--on-ink-muted); line-height: 1.4; }
.metrics-note { margin-top: 1.6rem; font-size: .85rem; color: var(--on-ink-muted); }
@media (max-width: 760px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .metrics { grid-template-columns: 1fr; } }

/* ---------- Approach / disciplines ---------- */
.disciplines {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.discipline { padding: clamp(2rem, 3.5vw, 3rem) clamp(1.3rem, 2.5vw, 2.4rem) 0; border-bottom: 1px solid var(--line); }
.discipline + .discipline { border-left: 1px solid var(--line); }
.discipline .idx { font-family: var(--font-display); font-size: 1.05rem; color: var(--accent); font-weight: 600; letter-spacing: .04em; }
.discipline h3 { margin: 1.4rem 0 .9rem; }
.discipline p { color: var(--text-muted); max-width: 36ch; padding-bottom: clamp(2rem, 3.5vw, 3rem); }
@media (max-width: 820px) {
  .disciplines { grid-template-columns: 1fr; }
  .discipline + .discipline { border-left: 0; }
}

/* ---------- Selected work (visual case studies, zigzag) ---------- */
.cases { display: flex; flex-direction: column; gap: clamp(3rem, 7vw, 6.5rem); }
.case {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: center;
}
.case-media {
  position: relative; margin: 0;
  border-radius: 8px; overflow: hidden;
  background: var(--paper-3);
  box-shadow: 0 30px 60px -34px rgba(19,32,43,.5);
}
.case-media img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; display: block; }
.case-media .case-no {
  position: absolute; top: 0; left: 0; z-index: 2;
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  color: #fff; background: var(--ink); padding: .45rem .8rem; border-radius: 0 0 8px 0;
  letter-spacing: .03em;
}
.case-body .kicker { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.case-body h3 { font-size: clamp(1.7rem, 1rem + 2vw, 2.6rem); margin: .65rem 0 .25rem; }
.case-body .role { font-size: .98rem; color: var(--text-muted); margin-bottom: 1.2rem; }
.case-body p { color: var(--text); max-width: 46ch; }
.case-body p + p { margin-top: .9rem; }
.case-result { display: flex; gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 1.6rem; flex-wrap: wrap; }
.case-result .stat .rnum { font-family: var(--font-display); font-size: clamp(1.7rem, 1rem + 1.7vw, 2.4rem); color: var(--accent); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; display: block; }
.case-result .stat .rlbl { font-size: .82rem; color: var(--text-muted); margin-top: .4rem; max-width: 18ch; }
.case-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.tag { font-size: .76rem; letter-spacing: .02em; color: var(--text-muted); border: 1px solid var(--line-strong); border-radius: 100px; padding: .3rem .8rem; }
/* alternate sides on wide screens */
.case:nth-child(even) .case-media { order: 2; }
.case:nth-child(even) .case-body { order: 1; }
@media (max-width: 820px) {
  .cases { gap: 3rem; }
  .case { grid-template-columns: 1fr; gap: 1.5rem; }
  .case:nth-child(even) .case-media { order: 0; }
  .case:nth-child(even) .case-body { order: 0; }
}

/* ---------- Career timeline (compact) ---------- */
.timeline { border-top: 1px solid var(--line); }
.tl-row {
  display: grid; grid-template-columns: 8.5rem 1fr 13rem; gap: 1.5rem;
  align-items: start;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
}
.tl-row .yr { font-variant-numeric: tabular-nums; color: var(--text-faint); font-size: .92rem; font-weight: 500; padding-top: .15rem; }
.tl-row .role { font-weight: 600; color: var(--ink); }
.tl-row .role .co { font-family: var(--font-display); font-weight: 600; }
.tl-row .tl-result { color: var(--text-muted); font-size: .93rem; margin-top: .3rem; max-width: 62ch; }
.tl-row .place { color: var(--text-muted); font-size: .92rem; text-align: right; padding-top: .15rem; }
@media (max-width: 720px) {
  .tl-row { grid-template-columns: 1fr; gap: .35rem; padding: 1.2rem 0; }
  .tl-row .place { text-align: left; }
  .tl-row .yr { order: -1; }
}

/* ---------- Logo wall (ink) ---------- */
.logos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px; background: var(--line-on-ink);
  border: 1px solid var(--line-on-ink);
}
.logo-cell {
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.4rem, 2.5vw, 2.2rem) clamp(1rem, 2vw, 1.6rem);
  aspect-ratio: 16 / 9;
  min-width: 0;   /* let 1fr tracks shrink instead of overflowing the grid */
}
.logo-cell img {
  max-height: 46px; width: auto; max-width: 100%;
  object-fit: contain;
  opacity: .72;
  /* logos are light grayscale -> render as soft mono on ink */
  filter: grayscale(1) brightness(1.7) contrast(.9);
  transition: opacity .3s var(--ease);
}
.logo-cell:hover img { opacity: 1; }
@media (max-width: 1000px) { .logos { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .logos { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 400px) { .logos { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Speaking & recognition ---------- */
.speak-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.sema {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.3rem); line-height: 1.12; color: var(--ink);
  letter-spacing: -.015em; margin-bottom: 1.6rem; max-width: 22ch;
}
.sema b { color: var(--accent); font-weight: 600; }
.talks { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.talks li { padding: .95rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; align-items: baseline; }
.talks li .ttl { font-weight: 600; color: var(--ink); font-family: var(--font-display); font-size: 1.08rem; }
.talks li .sub { color: var(--text-muted); font-size: .9rem; }
.reco h3 { font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; font-family: var(--font-body); font-weight: 700; color: var(--text-muted); margin-bottom: 1.1rem; }
.reco ul { list-style: none; padding: 0; }
.reco li { padding: .65rem 0; border-bottom: 1px solid var(--line); color: var(--text); }
.reco li span { display: block; color: var(--text-faint); font-size: .85rem; }
@media (max-width: 820px) { .speak-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-figure { position: relative; }
.about-figure img { width: 100%; height: auto; border-radius: 6px; background: var(--paper-3); }
.about-figure figcaption { font-size: .82rem; color: var(--text-faint); margin-top: .9rem; }
.about-body p { max-width: var(--measure); color: var(--text); }
.about-body p + p { margin-top: 1.1rem; }
.about-sub { font-family: var(--font-body); font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin: 2.2rem 0 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip { font-size: .85rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 100px; padding: .4rem .9rem; }
.edu { display: grid; gap: .5rem; margin-top: 0; }
.edu li { list-style: none; color: var(--text); }
.edu li b { font-weight: 600; }
.edu li span { color: var(--text-muted); }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; gap: 2.5rem; } .about-figure { max-width: 460px; } }

/* ---------- Contact (ink footer) ---------- */
.contact { background: var(--ink-deep); color: var(--on-ink); }
.contact .display { color: #fff; max-width: 16ch; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: end; }
.contact .lede { color: var(--on-ink-muted); margin-top: 1.4rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.contact-list { list-style: none; padding: 0; border-top: 1px solid var(--line-on-ink); }
.contact-list li { border-bottom: 1px solid var(--line-on-ink); padding: 1rem 0; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.contact-list .k { color: var(--on-ink-muted); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.contact-list .v { color: #fff; font-weight: 500; }
.contact-list a.v:hover { color: #E0855F; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; align-items: start; } }

.site-foot { border-top: 1px solid var(--line-on-ink); }
.site-foot .container { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding-block: 1.8rem; }
.site-foot, .site-foot a { color: var(--on-ink-muted); font-size: .85rem; }
.site-foot a:hover { color: #fff; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* inline text link */
.inline-link { color: var(--accent); font-weight: 600; border-bottom: 1.5px solid var(--accent-soft); padding-bottom: 1px; transition: border-color .2s var(--ease); }
.inline-link:hover { border-bottom-color: var(--accent); }
.inline-link .arr { display: inline-block; transition: transform .25s var(--ease); }
.inline-link:hover .arr { transform: translateX(3px); }

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