/* engelhard.dev — reference stylesheet
   Design tokens first, then layout. Mobile-first: the only breakpoint-free
   layout mechanism used is flex-wrap, so sections stack on narrow screens
   without media queries. */

:root {
  --bg:            #faf8f5;  /* warm off-white page ground */
  --ink:           #24211d;  /* primary text */
  --ink-body:      #322e29;  /* long-form body copy */
  --ink-secondary: #4a443d;  /* supporting paragraphs */
  --ink-muted:     #6b645b;  /* de-emphasized copy (earlier career) */
  --ink-faint:     #8b8378;  /* section labels, dates, meta */
  --ink-nav:       #5f5850;  /* header nav links */
  --accent:        #6d3f9e;  /* purple: eyebrow, role titles, link hover */
  --selection:     #e4daf3;
  --rule:          rgba(36, 33, 29, 0.12);
  --rule-soft:     rgba(36, 33, 29, 0.09);
  --header-bg:     rgba(250, 248, 245, 0.86);

  --serif: Newsreader, Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, sans-serif;

  --measure: 1080px;   /* page max width */
  --gutter:  28px;     /* page side padding */
  --label-w: 150px;    /* section label column */
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration-color: rgba(36, 33, 29, 0.35);
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--selection); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-header__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-nav { display: flex; gap: 22px; font-size: 13.5px; letter-spacing: 0.01em; }
.site-nav a { color: var(--ink-nav); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

/* ---------- page shell ---------- */

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter) 96px;
}

/* Every section below the hero is label + content, wrapping to one column
   when the content column can no longer hold its 320px basis. */
.section {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 4vw, 48px);
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--rule);
}
.section--last { padding-bottom: 0; }
.section__label {
  margin: 0;
  flex: 0 0 var(--label-w);
  padding-top: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.section__body { flex: 1 1 320px; min-width: 0; }

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 80px);
}
.hero__text { flex: 1 1 380px; min-width: 0; }
.hero__eyebrow {
  margin: 0 0 22px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero__title {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.hero__lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(17px, 2vw, 19.5px);
  line-height: 1.6;
  color: var(--ink-secondary);
  text-wrap: pretty;
}
.hero__pronouns { margin: 26px 0 0; font-size: 13px; color: var(--ink-faint); }
.hero__portrait {
  flex: 1 1 240px;
  min-width: 220px;
  max-width: 320px;
  margin-left: auto;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* placeholder styling — delete once a real portrait is dropped in */
.hero__portrait--empty {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(36, 33, 29, 0.25);
  background: repeating-linear-gradient(135deg, rgba(36,33,29,0.03) 0 8px, transparent 8px 16px);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---------- prose ---------- */

.prose {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 62ch;
  font-size: clamp(16.5px, 1.7vw, 18px);
  line-height: 1.7;
  color: var(--ink-body);
  text-wrap: pretty;
}
.prose p { margin: 0; }
.prose--now { gap: 20px; }

/* ---------- experience ---------- */

.roles { display: flex; flex-direction: column; gap: 40px; max-width: 64ch; }
.role { display: flex; flex-direction: column; gap: 10px; }
.role__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.role__company {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(23px, 2.6vw, 27px);
  letter-spacing: -0.012em;
}
.role__dates { font-size: 13px; letter-spacing: 0.02em; color: var(--ink-faint); white-space: nowrap; }
.role__title { margin: 0; font-size: 14.5px; letter-spacing: 0.01em; color: var(--accent); }
.role__blurb {
  margin: 4px 0 0;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-secondary);
  text-wrap: pretty;
}
.roles__earlier {
  margin: 4px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
  text-wrap: pretty;
}

/* ---------- contact ---------- */

.contact__body { display: flex; flex-direction: column; gap: 28px; max-width: 62ch; }
.contact__pitch {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}
.links { display: flex; flex-direction: column; }
.links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  border-top: 1px solid var(--rule);
  font-size: 17px;
  text-decoration: none;
}
.links a:last-child { border-bottom: 1px solid var(--rule); }
.links__kind {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--rule); }
.site-footer__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---------- scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .75s cubic-bezier(.2,.65,.2,1), transform .75s cubic-bezier(.2,.65,.2,1);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
