:root {
  --background: #f7f6f2;
  --surface: #eeece5;
  --text: #1d1d1a;
  --muted: #69685f;
  --line: #cbc8bc;
  --accent: #36594a;
  --max-width: 700px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --background: #191a18;
  --surface: #242622;
  --text: #eceae1;
  --muted: #aaa99f;
  --line: #3a3b36;
  --accent: #9ab8a9;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.52;
  transition: background-color 250ms ease, color 250ms ease;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
}

a:hover {
  text-decoration-color: currentColor;
}

button {
  color: inherit;
  font: inherit;
}

::selection {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.site-header {
  position: relative;
  z-index: 10;
  padding: 32px 24px 0;
}

.header-inner,
.page,
.footer-inner {
  width: min(100%, var(--max-width));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 24px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-family: "Manrope", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.name {
  font-size: 1.5625rem;
  font-weight: 1000;
  letter-spacing: -0.01em;
}

.wordmark small {
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 500;
}

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

.language-button,
.theme-button,
.text-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.language-button {
  padding: 2px;
  font-family: "Manrope", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.theme-button {
  padding: 2px;
}

.theme-track {
  position: relative;
  display: block;
  width: 38px;
  height: 18px;
  border: 1px solid var(--text);
  border-radius: 999px;
}

.theme-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 200ms ease;
}

[data-theme="dark"] .theme-thumb {
  transform: translateX(20px);
}

.page {
  padding: 76px 24px 90px;
}

.intro {
  display: block;
  padding-bottom: 8px;
}

.project-meta,
.research-label,
.research-link,
.writing-list small,
footer {
  font-family: "Manrope", sans-serif;
}

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

.intro-text {
  max-width: 100%;
}

.intro-text p {
  margin: 0 0 18px;
}

.intro-text a {
  font-weight: 500;
}

.content-section {
  display: block;
  margin-top: 46px;
  padding: 0;
  border: 0;
}

.section-heading {
  margin-bottom: 8px;
}

h2 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.project-list {
  border: 0;
}

.project {
  position: relative;
  display: block;
  padding: 3px 0 8px 18px;
  border: 0;
  text-decoration: none;
}

.project::before,
.writing-list a::before {
  position: absolute;
  left: 1px;
  content: "•";
}

.project h3,
.featured-research h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.project h3 {
  display: inline;
  font-size: 1.1875rem;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.18em;
}

.project p {
  max-width: 620px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.project-meta {
  display: none;
}

.arrow {
  display: none;
}

.featured-research {
  position: relative;
  display: block;
  padding: 3px 0 8px 18px;
  background: transparent;
  text-decoration: none;
}

.featured-research::before {
  position: absolute;
  margin-left: -17px;
  content: "•";
}

.research-label {
  display: inline;
  margin: 0 0 0 8px;
  color: var(--muted);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured-research h3 {
  display: inline;
  max-width: none;
  font-size: 1.1875rem;
  line-height: 1.45;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.18em;
}

.featured-research > p {
  max-width: 620px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.research-stats {
  display: none;
}

.research-stats span {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.research-stats strong {
  font-size: 1.75rem;
  font-weight: 400;
}

.research-stats small {
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: 0.625rem;
}

.research-link {
  display: none;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.writing-list {
  border: 0;
}

.writing-list a {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  padding: 3px 0 4px 18px;
  border: 0;
  text-decoration: none;
}

.writing-list a > span {
  transition: color 180ms ease;
}

.writing-list a:hover > span {
  color: var(--accent);
}

.writing-list small {
  color: var(--muted);
  font-size: 0.625rem;
  white-space: nowrap;
}

.contact-section {
  padding-bottom: 0;
}

.contact-copy {
  max-width: 100%;
  margin: 0 0 14px;
  font-size: 1.1875rem;
  letter-spacing: 0;
  line-height: 1.52;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.0625rem;
}

footer {
  padding: 0 28px 34px;
  color: var(--muted);
  font-size: 0.625rem;
  letter-spacing: 0.02em;
}

.footer-inner {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  text-decoration: none;
}

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

@media (max-width: 780px) {
  body {
    font-size: 1.125rem;
  }

  .site-header {
    padding: 24px 20px 0;
  }

  .page {
    padding: 64px 20px 60px;
  }

  .content-section {
    margin-top: 40px;
    padding: 0;
  }

  .section-heading {
    display: block;
  }

  footer {
    padding: 0 20px 25px;
  }
}

@media (max-width: 540px) {
  .wordmark small {
    display: none;
  }

  .header-actions {
    gap: 12px;
  }

  .project-meta {
    display: none;
  }

  .featured-research {
    margin: 0;
    padding: 3px 0 8px 18px;
  }

  .research-label {
    margin-bottom: 0;
  }

  .research-stats {
    gap: 0;
    justify-content: space-between;
  }

  .research-stats span {
    display: grid;
    gap: 0;
  }

  .writing-list a {
    display: block;
  }

  .contact-copy {
    font-size: 1.125rem;
  }
}
@media (max-width: 500px) {
  html {
    font-size: 3.6vw;
  }
  body {
    font-size: 3.6vw;
  }
  .name {
    font-size: 5vw;
  }
  .site-header {
    padding: 4.8vw 4vw 0;
  }
  .header-inner {
    padding: 0;
  }
  .page {
    padding: 12.8vw 4vw 12vw;
  }
  .theme-track {
    width: 7.6vw;
    height: 3.6vw;
  }
  [data-theme="dark"] .theme-thumb {
    transform: translateX(4vw);
  }

  .theme-thumb {
      top: 0.4vw;
      left: 0.4vw;
      width: 2.4vw;
      height: 2.4vw;
  }
  .intro-text p {
    margin: 0 0 3.6vw;
  }
  .content-section {
    margin-top: 8vw;
    padding: 0;
  }
  .project {
    padding: 0.6vw 0 1.6vw 3.6vw;
  }
  .featured-research {
    margin: 0;
    padding: 0.6vw 0 1.6vw 3.6vw;
  }
  .research-label {
    margin: 0 0 0 1.6vw;
  }
  .writing-list a {
    padding: 0.6vw 0 0.8vw 3.6vw;
  }
  .contact-copy {
    margin: 0 0 2.8vw;
  }
  .footer-inner {
    padding-top: 4vw;
  }
  footer {
    padding: 0 4vw 5vw;
  }

}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
