:root,
[data-theme="dark"] {
  --accent: #8b6cf0;
  --accent-strong: #b39aff;
  --accent-soft: #2a2240;
  --aqua: #3ecfbf;
  --aqua-soft: #143532;
  --canvas: #12101a;
  --ink: #ece8f5;
  --muted: #a39cb8;
  --line: #2e2940;
  --focus: #8b6cf0;
  --surface: #1a1628;
  --selection: color-mix(in srgb, var(--accent) 36%, var(--canvas));
  --measure: 42rem;
  --space: clamp(1.25rem, 3vw, 2rem);
  color-scheme: dark;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  --accent: #7445e8;
  --accent-strong: #5425c4;
  --accent-soft: #eee7ff;
  --aqua: #0b6e69;
  --aqua-soft: #def8f1;
  --canvas: #f8f7fc;
  --ink: #1d1830;
  --muted: #655f78;
  --line: #ded9eb;
  --focus: #7445e8;
  --surface: color-mix(in srgb, white 72%, var(--accent-soft));
  --selection: color-mix(in srgb, var(--accent) 28%, white);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 0% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    radial-gradient(90% 45% at 100% 0%, color-mix(in srgb, var(--aqua) 8%, transparent), transparent 48%),
    var(--canvas);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--selection);
  color: var(--ink);
}

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

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--canvas);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  width: min(100% - 2rem, var(--measure));
  margin-inline: auto;
}

.site-header {
  padding: 1.75rem 0 0.75rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--accent-strong);
}

.wordmark-mark {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

[data-theme="dark"] .wordmark-mark {
  filter: brightness(1.12) saturate(1.05);
}

.primary-navigation ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-navigation a {
  color: var(--muted);
  text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation a[aria-current="page"] {
  color: var(--ink);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  margin: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.theme-toggle-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-icon--moon,
[data-theme="light"] .theme-toggle-icon--sun {
  display: none;
}

.page-stack {
  padding: var(--space) 0 4.5rem;
}

.page-stack > * + * {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.intro h1,
.page-heading h1,
.prose h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.role-line {
  margin: 0 0 1rem;
  color: var(--accent-strong);
  font-size: 1.05rem;
  font-weight: 600;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.55;
}

.role-list {
  margin: 1.35rem 0 0;
  padding: 1rem 1.1rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.role-list > li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

.role-list > li + li {
  margin-top: 0.65rem;
}

.role-label {
  color: var(--aqua);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.page-stack p,
.prose p {
  margin: 0 0 1rem;
}

.page-stack p:last-child,
.prose p:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
}

.meta {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list > li + li {
  margin-top: 0.85rem;
}

.detail-list > li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-list.numbered {
  counter-reset: step;
}

.detail-list.numbered > li {
  position: relative;
  padding-left: 2rem;
}

.detail-list.numbered > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.link-list > li {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.link-list > li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.cert-list {
  columns: 1;
}

.cert-list > li {
  padding-left: 0.9rem;
  position: relative;
}

.cert-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--aqua);
}

.list-summary {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.prose {
  max-width: 65ch;
}

.prose h2,
.prose h3 {
  margin: 2rem 0 0.75rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.back-link {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.pagination {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer {
  padding: 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-inner {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.footer-inner p {
  margin: 0;
}

.footer-note {
  margin-top: 0.35rem !important;
}

@media (max-width: 520px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-tools {
    width: 100%;
    justify-content: space-between;
  }

  .role-list > li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  body {
    font-size: 1rem;
  }
}
