/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, p, a, button, input, textarea, span, li {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-dark); }
ul, ol { padding-left: 1.1em; margin: 0; }
button { font: inherit; cursor: pointer; }

/*
  Palette derived from the portrait photo (5 core shades):
    --bg          warm cream / soft sunlit background
    --bg-alt      warm beige stone / fountain stone
    --card        off-white (slightly cooler than bg, for cards)
    --ink         deep espresso / chocolate jacket
    --accent      warm coffee taupe (jacket mid-tone)
  Plus a few derived helpers (line, accent-soft, ink-soft, muted).
*/
:root {
  /* Both block tones near-white with the slightest warm tint —
     the alternation is barely-there, just a soft rhythm. */
  --bg: #faf6ee;
  --bg-alt: #fefcf6;
  --card: #ffffff;
  --ink: #2a1f18;
  --ink-soft: #4a3829;
  --muted: #87775c;
  --accent: #6e5446;
  --accent-dark: #4a3829;
  --accent-soft: #f1eadc;
  --accent-cool: #547083;
  --line: #ece4d3;
  --shadow: 0 12px 40px -20px rgba(42, 31, 24, 0.22);
  --radius: 14px;
  --max: 1080px;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 36px; }
.section-head h2 {
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0.08em;
  color: var(--ink);
  position: relative;
  padding-bottom: 14px;
}
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 56px; height: 2px; background: var(--accent-cool);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.brand-mark {
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.nav-list { display: flex; gap: 26px; list-style: none; padding: 0; margin: 0; }
.nav-list a {
  color: var(--ink-soft); font-size: 0.85rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.nav-list a:hover { color: var(--accent); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 6px;
  width: 40px; height: 40px; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.mobile-menu {
  display: flex; flex-direction: column; gap: 4px; padding: 8px 24px 18px;
  border-top: 1px solid var(--line);
}
.mobile-menu a {
  padding: 12px 6px; color: var(--ink); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 80px;
  background: var(--bg-alt);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr minmax(280px, 360px);
  gap: 40px;
  align-items: center;
}
.hero-photo {
  margin: 0;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-photo img {
  width: 100%;
  height: auto;
  display: block;
}
.hero h1 {
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--ink);
}
.hero .role {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}
.hero-card-row {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.hero-card-row:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-card-row:first-child { padding-top: 0; }
.hero-card .label {
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.hero-card a, .hero-card span:not(.label) {
  font-size: 0.95rem; color: var(--ink); font-weight: 500;
}
.hero-card a:hover { color: var(--accent); }

/* ---------- Section body ---------- */
.section-body p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.75; max-width: 820px; }
.section-body strong { color: var(--ink); font-weight: 600; }

/* ---------- Cases ---------- */
.cases-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.case-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-cool);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.case-item p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.case-item strong { color: var(--ink); font-weight: 700; }

/* ---------- Jobs / Experience ---------- */
.jobs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 36px; }
.job {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.job:last-child { border-bottom: 0; padding-bottom: 0; }
.job h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.job-role {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 10px;
  text-transform: none;
  letter-spacing: 0.02em;
}
.job-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin: 14px 0 8px;
}
.job-bullets { padding-left: 1.15em; margin: 0; }
.job-bullets li {
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.7;
  margin-bottom: 8px;
}
.job-bullets li::marker { color: var(--accent); }

/* ---------- Skills ---------- */
.skills-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.skills-list > li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.skills-list p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.75; }
.skills-list strong { color: var(--ink); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 24px 0;
}
.footer-grid {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 0.85rem; color: var(--muted);
}
.footer-grid p { margin: 0; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(200px, 240px) 1fr;
    grid-template-areas:
      "photo text"
      "photo card";
    gap: 28px 32px;
    align-items: start;
  }
  .hero-photo { grid-area: photo; align-self: stretch; }
  .hero-text { grid-area: text; align-self: end; }
  .hero-card { grid-area: card; align-self: start; }
}

@media (max-width: 720px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "photo" "text" "card";
    gap: 24px;
  }
  .hero-photo { max-width: 280px; }
}

@media (max-width: 920px) {
  .nav-list { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu[hidden] { display: none; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 64px; }
}

@media (min-width: 921px) {
  .mobile-menu { display: none !important; }
}

@media (max-width: 480px) {
  .footer-grid { flex-direction: column; align-items: flex-start; }
  .case-item, .skills-list > li { padding: 18px 20px; }
}
