:root {
  --background: #eeeeee;
  --text: #131313;
  --muted: #64635f;
  --rule: #cfcdc6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 180ms ease, color 180ms ease;
}

body.dark-theme {
  --background: #131313;
  --text: #eeeeee;
  --muted: #aaa9a5;
  --rule: #3d3d3d;
}

.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10;
  padding: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.toggle-track {
  display: block;
  width: 48px;
  height: 26px;
  padding: 3px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--text);
}

.toggle-knob {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--background);
  transition: transform 180ms ease;
}

.dark-theme .toggle-knob { transform: translateX(20px); }

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

.page {
  width: min(100% - 48px, 760px);
  margin: 0 auto;
  padding: 72px 0 48px;
}

.site-header {
  margin-bottom: 70px;
  text-align: center;
}

h1 {
  margin: 0;
  line-height: 0;
}

.name-image {
  display: block;
  width: min(100%, 380px);
  height: auto;
  margin: 0 auto;
}

.name-image-dark { display: none; }
.dark-theme .name-image-light { display: none; }
.dark-theme .name-image-dark { display: block; }

.name-image-light {
  display: block;
}

p { margin: 0 0 1.45em; }

.intro {
  max-width: 930px;
  font-weight: 500;
}

strong { font-weight: 500; }

.statements {
  margin: 2.4em 0;
}

.statements p { margin-bottom: 1.15em; }

section {
  margin-top: 3.7em;
  padding-top: 0.7em;
  border-top: 1px solid var(--rule);
}

h2,
h3 {
  margin: 0;
  font-size: 1em;
  font-weight: 500;
  line-height: 1.4;
}

h2 {
  margin-bottom: 1.8em;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

h2 span,
h3 span {
  color: var(--muted);
  font-weight: 400;
}

h2 span::before,
h3 span::before {
  content: " ";
}

.work-item { margin-bottom: 2.25em; }
.work-item p { margin-top: 0.3em; }

.closing {
  margin: 2.7em 0 0;
  font-weight: 500;
}

@media (max-width: 900px) {
  body { font-size: 16px; }

  .page {
    width: min(100% - 48px, 760px);
    padding-top: 56px;
  }

  .site-header { margin-bottom: 60px; }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
    line-height: 1.55;
  }

  .page {
    width: calc(100% - 40px);
    padding: 42px 0 32px;
  }

  .site-header { margin-bottom: 56px; }

  .name-image { width: min(100%, 300px); }

  p { margin-bottom: 1.35em; }
  section { margin-top: 3em; }
  h2 { margin-bottom: 1.45em; }

  h2 span,
  h3 span { display: block; }

  h2 span::before,
  h3 span::before { content: none; }

  .theme-toggle {
    top: 14px;
    right: 12px;
  }
}

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