/* ── Tokens ──────────────────────────────────────────────── */
:root {
  color-scheme: light;

  --bg: #faf8f5;
  --bg-raised: #ffffff;
  --bg-card: #ffffff;
  --line: #e6e0d8;
  --line-strong: #cfc6b9;
  --fg: #17161a;
  --muted: #6b6870;
  --accent: #c2410c;
  --accent-2: #ea6a13;
  --accent-soft: rgba(194, 65, 12, 0.09);

  --wrap: 1120px;
  --radius: 16px;
  --radius-lg: 24px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient wash, kept subtle so it never fights the content. */
body::before {
  content: "";
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 70vh;
  background: radial-gradient(50% 60% at 72% 0%, rgba(234, 106, 19, 0.13), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav a:hover {
  color: var(--fg);
}
.nav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-raised);
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
}
.nav-toggle .bars::before {
  transform: translateY(-5px);
}
.nav-toggle .bars::after {
  transform: translateY(5px);
}
.nav-toggle[aria-expanded="true"] .bars {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .bars::before {
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .bars::after {
  transform: rotate(-45deg);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
  box-shadow: 0 10px 24px -12px rgba(194, 65, 12, 0.75);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -14px rgba(194, 65, 12, 0.85);
}

.btn-ghost {
  color: var(--fg);
  border-color: var(--line);
  background: var(--bg-raised);
}
.btn-ghost:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 6vw, 72px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(32px, 6vw, 72px);
  align-items: stretch;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.1rem);
  font-weight: 700;
  margin-bottom: 22px;
}

.accent {
  background: linear-gradient(100deg, #ea6a13, #c2410c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  max-width: 56ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.social {
  display: flex;
  gap: 10px;
  margin-top: 32px;
}
.social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.social a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
}
.social svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Portrait: a single framed card that spans the same height as the copy beside it. */
.hero-media {
  position: relative;
  min-width: 0;
}

.portrait-frame {
  position: relative;
  height: 100%;
  min-height: 420px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--bg-raised);
  box-shadow: 0 34px 60px -34px rgba(70, 45, 20, 0.45);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: -12% -10% -6%;
  border-radius: 40px;
  background: radial-gradient(60% 55% at 70% 25%, rgba(234, 106, 19, 0.18), transparent 70%);
  z-index: -1;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: 20px;
  filter: saturate(1.02) contrast(1.03);
}

/* ── Sections ────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(56px, 8vw, 104px) 0;
}
.section-tight {
  padding-block: clamp(24px, 4vw, 40px);
}

.section-head {
  margin-bottom: 40px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  max-width: 20ch;
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ── Stats ───────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stats li {
  display: grid;
  gap: 6px;
  padding: 28px 24px;
  background: var(--bg-card);
}
.stats strong {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.stats span {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── About ───────────────────────────────────────────────── */
.about-grid,
.credentials-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
.about-grid .section-head,
.credentials-grid .section-head {
  position: sticky;
  top: 104px;
  margin-bottom: 0;
}

.about-body p {
  color: var(--muted);
  margin-bottom: 18px;
  max-width: 62ch;
}

.pillars {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}
.pillars li {
  position: relative;
  padding: 20px 22px 20px 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pillars li:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.pillar-icon {
  position: absolute;
  left: 22px;
  top: 22px;
  font-size: 11px;
  color: var(--accent);
}
.pillars h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.pillars p {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
}

/* ── Timeline ────────────────────────────────────────────── */
.timeline {
  display: grid;
  gap: 8px;
  border-left: 1px solid var(--line);
  padding-left: 0;
  margin-left: 6px;
}

.job {
  position: relative;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0 28px 32px;
}
.job::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 36px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  outline: 4px solid var(--bg);
}
.job.is-current::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.job-when {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--accent);
}
.job-where {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.job-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.job-summary {
  color: var(--muted);
  font-size: 15px;
  max-width: 62ch;
}

.bullets {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}
.bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 66ch;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}
.bullets strong {
  color: var(--fg);
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}
.tags li {
  font-size: 12.5px;
  color: var(--muted);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
}

/* ── Cards ───────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.card .tags {
  margin-top: 14px;
}

/* ── Credentials ─────────────────────────────────────────── */
.credentials-body {
  display: grid;
  gap: 32px;
}
.cred-block h3 {
  font-size: 0.95rem;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.list {
  display: grid;
  gap: 11px;
}
.list li {
  font-size: 14.5px;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
}
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.list strong {
  color: var(--fg);
  font-weight: 600;
}

/* ── Contact ─────────────────────────────────────────────── */
.contact-card {
  padding: clamp(32px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(90% 130% at 12% 0%, rgba(234, 106, 19, 0.12), transparent 60%),
    var(--bg-card);
}
.contact-card h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  max-width: 18ch;
  margin-bottom: 16px;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ── Reveal on scroll ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 980px) {
  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
    background: rgba(250, 248, 245, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-140%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav.is-open {
    transform: none;
  }
  .nav a {
    padding: 12px 4px;
    font-size: 16px;
    border-radius: 8px;
  }
  .nav-toggle {
    display: grid;
    position: relative;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-media {
    order: -1;
    width: min(72vw, 260px);
    justify-self: center;
  }
  .portrait-frame {
    aspect-ratio: 1;
    height: auto;
    min-height: 0;
  }

  .about-grid,
  .credentials-grid {
    grid-template-columns: 1fr;
  }
  .about-grid .section-head,
  .credentials-grid .section-head {
    position: static;
    margin-bottom: 32px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .job {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-left: 26px;
  }
}

@media (max-width: 560px) {
  .brand-name {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .hero-media {
    width: min(64vw, 230px);
  }
  .cta-row .btn {
    flex: 1 1 auto;
  }
}

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

@media print {
  body::before,
  .site-header,
  .social,
  .cta-row,
  .site-footer {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}

