:root {
  --bg: #f4efe7;
  --bg-strong: #efe7dc;
  --surface: rgba(255, 255, 255, 0.62);
  --ink: #1f2924;
  --muted: #5c665f;
  --line: rgba(31, 41, 36, 0.14);
  --accent: #b76d3c;
  --accent-soft: rgba(183, 109, 60, 0.08);
  --shadow: 0 20px 60px rgba(36, 35, 32, 0.08);
  --page-width: min(1180px, calc(100vw - 2rem));
}

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

html {
  scroll-behavior: smooth;
}

#experience,
#competencies,
#skills,
#community {
  scroll-margin-top: 5.25rem;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(183, 109, 60, 0.08), transparent 24%),
    linear-gradient(180deg, #f7f2eb 0%, var(--bg) 26%, #f5f0e8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
ul {
  margin: 0;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(244, 239, 231, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.topbar.is-scrolled {
  background: rgba(244, 239, 231, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 40px rgba(36, 35, 32, 0.05);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--page-width);
  margin: 0 auto;
  padding: 1rem 0;
}

.topbar__name,
.topbar__nav {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar__name {
  font-size: 0.9rem;
  font-weight: 800;
}

.topbar__nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.topbar__nav a {
  transition: color 160ms ease;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  color: var(--ink);
}

.page {
  width: var(--page-width);
  margin: 0 auto;
  padding: 3.2rem 0 4rem;
}

.intro {
  padding: 1.5rem 0 2.8rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section__label,
.rail__label {
  margin-bottom: 0.9rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.intro h1,
.section__header h2,
.role__meta h3,
.competency h3,
.skill-group h3,
.community-grid h3 {
  font-family: "Newsreader", serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.intro h1 {
  max-width: 14ch;
  font-size: clamp(2.45rem, 5vw, 4.2rem);
  line-height: 0.95;
  margin-top: 0.15rem;
}

.summary {
  max-width: 58rem;
  margin-top: 1.25rem;
  font-size: 1.14rem;
  line-height: 1.8;
  color: var(--muted);
}

.summary--accent {
  max-width: 54rem;
  margin-top: 0.7rem;
  font-size: 1rem;
  color: var(--ink);
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.contact-strip span,
.contact-strip a {
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.68rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  font-size: 0.92rem;
}

.contact-strip a {
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.contact-strip a:hover,
.contact-strip a:focus-visible {
  transform: translateY(-1px);
  background: white;
  border-color: rgba(31, 41, 36, 0.22);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 3rem;
  padding-top: 2.5rem;
}

.rail {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  display: grid;
  gap: 1rem;
}

.rail__card {
  padding: 1.2rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rail__card--profile {
  display: grid;
  gap: 0.85rem;
  justify-items: start;
}

.rail__photo {
  width: 92px;
  height: 92px;
  border-radius: 1.25rem;
  object-fit: cover;
  object-position: center 18%;
  box-shadow: 0 10px 24px rgba(36, 35, 32, 0.12);
}

.rail__caption {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}

.rail__list,
.rail__links,
.role__points,
.plain-list {
  padding-left: 1.15rem;
}

.rail__list,
.rail__links {
  display: grid;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.rail__links a {
  text-decoration: underline;
  text-decoration-color: rgba(31, 41, 36, 0.22);
  text-underline-offset: 0.18em;
}

.main-column {
  display: grid;
  gap: 2.75rem;
}

.section {
  padding-bottom: 2.6rem;
  border-bottom: 1px solid var(--line);
}

.section--compact {
  padding-bottom: 0;
  border-bottom: 0;
}

.section__header {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
}

.section__header h2 {
  max-width: 20ch;
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  line-height: 1.02;
}

.prose {
  display: grid;
  gap: 1rem;
  max-width: 46rem;
}

.prose p,
.role__points li,
.competency p,
.skill-group p,
.plain-list li {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--muted);
}

.role {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 2rem;
  padding: 1.9rem 0;
  border-top: 1px solid var(--line);
}

.role:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.role__meta {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.role__date {
  margin-bottom: 0.1rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.role__meta h3,
.competency h3,
.skill-group h3,
.community-grid h3 {
  font-size: 1.34rem;
  line-height: 1.1;
}

.education-heading {
  font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
  line-height: 1.25 !important;
  max-width: none !important;
}

.role__company,
.role__location {
  color: var(--muted);
  line-height: 1.55;
}

.role__company {
  font-size: 1.03rem;
  font-weight: 700;
  color: var(--ink);
}

.role__location {
  font-size: 0.96rem;
}

.role__points {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}

.competency-list,
.skill-groups,
.community-grid {
  display: grid;
  gap: 1rem;
}

.competency,
.skill-group,
.community-grid > div {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.competency:first-child,
.skill-group:first-child,
.community-grid > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.plain-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.7rem 0 0;
}

.is-revealed {
  opacity: 1;
  transform: none;
}

.js .section,
.js .role,
.js .rail__card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.js .is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .section,
  .js .role,
  .js .rail__card,
  .contact-strip a,
  .topbar {
    transition: none;
  }
}

@media (max-width: 980px) {
  .content-grid,
  .role {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .topbar__nav {
    display: none;
  }

  .page {
    width: min(100vw - 1.25rem, 1180px);
    padding-top: 2rem;
  }

  .intro h1 {
    font-size: clamp(2.2rem, 9.4vw, 3.15rem);
  }

  .summary {
    font-size: 1rem;
  }

  .section__header h2 {
    max-width: none;
    font-size: clamp(1.5rem, 7.2vw, 2.1rem);
  }

  .rail__card--profile {
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
  }

  .rail__photo {
    width: 88px;
    height: 88px;
    border-radius: 1rem;
  }

  .rail__caption {
    font-size: 1rem;
    line-height: 1.55;
  }

  .rail {
    grid-template-columns: 1fr;
  }

  .content-grid {
    gap: 2rem;
  }
}
