/* ===================================================================
   Justin Kolker — Editorial / Executive theme
   =================================================================== */

:root {
  --bg:        #fbf9f6;  /* warm paper        */
  --bg-alt:    #f3efe8;  /* sectioned surface */
  --ink:       #1b1a17;  /* near-black text   */
  --muted:     #5d574d;  /* secondary text    */
  --line:      #e4ddd2;  /* hairlines         */
  --accent:    #1c6b5b;  /* deep emerald      */
  --accent-ink:#13503f;

  --maxw: 1080px;
  --pad: clamp(1.25rem, 5vw, 3rem);

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

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav__brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; letter-spacing: .01em; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.nav__links a { font-size: .92rem; color: var(--muted); transition: color .2s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  color: var(--accent) !important;
  font-weight: 500;
}
.nav__links .nav__cta { position: relative; }
@media (max-width: 620px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .98rem; font-weight: 500;
  padding: .8rem 1.5rem; border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--accent-ink); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 12vh, 8rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
  width: 100%;
}
.hero__content { max-width: 680px; }
.hero__media { justify-self: center; }
.hero__portrait {
  width: clamp(220px, 64vw, 340px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 32px 64px -34px rgba(28,26,23,.5);
}
@media (min-width: 880px) {
  .hero__grid { grid-template-columns: 1fr auto; gap: clamp(3rem, 6vw, 5rem); }
  .hero__media { justify-self: end; }
  .hero__portrait { width: clamp(300px, 30vw, 380px); }
}
.hero__eyebrow {
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 1.5rem;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 1.75rem;
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__lede {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 2.5rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(var(--muted), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- sections ---------- */
.section { padding-block: clamp(4.5rem, 11vh, 8rem); }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: 3.5rem; }
.section__label {
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 1rem;
}
.section__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.85rem, 4vw, 2.9rem); line-height: 1.12;
  letter-spacing: -0.01em; max-width: 22ch;
}

/* ---------- about ---------- */
.about__grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.about__body p { margin-bottom: 1.25rem; max-width: 64ch; }
.about__body p:last-child { margin-bottom: 0; }
@media (min-width: 880px) {
  .about__grid { grid-template-columns: 0.55fr 1fr; gap: 4rem; }
  .about__grid .section__label { padding-top: .6rem; }
}

/* ---------- expertise cards ---------- */
.cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 1.85rem 2.1rem;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.section--alt .card { background: var(--bg); }
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(28,26,23,.35);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.card__num { font-family: var(--serif); font-size: .95rem; color: var(--accent); font-weight: 600; }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.32rem; margin: .85rem 0 .6rem; line-height: 1.2; }
.card p { color: var(--muted); font-size: .98rem; }

/* ---------- timeline ---------- */
.timeline { list-style: none; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.timeline__item {
  position: relative; padding-left: 3rem;
  display: grid; gap: .35rem 2.5rem; grid-template-columns: 1fr;
  padding-bottom: 3rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: 3px; top: 7px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.section--alt .timeline__item::before { background: var(--bg-alt); }
.timeline__year { display: block; font-size: .82rem; letter-spacing: .04em; color: var(--accent); font-weight: 600; }
.timeline__org { display: block; font-size: .9rem; color: var(--muted); margin-top: .15rem; }
.timeline__body h3 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; margin-bottom: .4rem; }
.timeline__body p { color: var(--muted); max-width: 60ch; }
@media (min-width: 760px) {
  .timeline__item { grid-template-columns: 200px 1fr; }
}

/* ---------- credentials ---------- */
.badges { list-style: none; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.badge {
  display: flex; align-items: center; gap: 1.1rem;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 1.4rem 1.6rem; background: var(--bg);
}
.badge__mark {
  flex: none; display: grid; place-items: center;
  min-width: 64px; height: 48px; padding-inline: .6rem;
  font-family: var(--serif); font-weight: 600; font-size: 1.05rem;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-radius: 10px;
}
.badge__name { font-size: .95rem; color: var(--muted); line-height: 1.45; }

/* ---------- contact ---------- */
.section--contact { text-align: center; }
.contact__inner { max-width: 640px; margin-inline: auto; }
.contact__inner .section__label { display: inline-block; }
.contact__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
}
.contact__lede { color: var(--muted); font-size: 1.12rem; margin-bottom: 2.4rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 2rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; align-items: center; font-size: .9rem; color: var(--muted); }
.footer__inner span:first-child { font-family: var(--serif); color: var(--ink); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .06s; }
.reveal:nth-child(3) { transition-delay: .12s; }
.reveal:nth-child(4) { transition-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll-line { animation: none; }
  .btn:hover, .card:hover { transform: none; }
}
