:root {
  --accent: #a66224;
  --ink: #171717;
  --muted: #686868;
  --line: #dedbd6;
  --soft: #f6f4f1;
  --paper: #ffffff;
  --content-width: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.site-shell {
  width: min(calc(100% - 40px), var(--content-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 32px;
}

.languages {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}

.language-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 21px;
  filter: grayscale(0.55);
  transition: border-color 150ms ease, background 150ms ease, filter 150ms ease;
}

.language-button:hover {
  background: var(--soft);
  filter: grayscale(0);
}

.language-button.is-active {
  border-color: var(--accent);
  filter: grayscale(0);
}

.profile {
  padding: clamp(58px, 9vw, 108px) 0 clamp(52px, 8vw, 88px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.profile h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(44px, 8vw, 86px);
  font-weight: 680;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.profile-summary {
  max-width: 700px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 23px);
}

.profile-details {
  margin-top: 20px;
}

.profile-education,
.profile-meta {
  margin: 0;
  font-size: 15px;
}

.profile-education {
  color: var(--ink);
  font-weight: 600;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
  color: var(--muted);
}

.profile-meta a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 4px;
}

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

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 22px;
}

.profile-links a {
  color: var(--ink);
  font-size: 15px;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

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

main {
  padding: clamp(50px, 8vw, 84px) 0;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.area-card {
  position: relative;
  min-height: 260px;
  padding: 30px 28px 64px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease;
}

.area-card:last-child {
  border-right: 0;
}

.area-card:hover {
  background: var(--soft);
}

.area-number {
  display: block;
  margin-bottom: 40px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.area-card h3 {
  margin: 0 0 14px;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.area-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.area-arrow {
  position: absolute;
  right: 26px;
  bottom: 23px;
  color: var(--accent);
  font-size: 21px;
  transition: transform 160ms ease;
}

.area-card:hover .area-arrow {
  transform: translateX(4px);
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 60px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-tab {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.section-tab:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.section-tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.section-tab.home-tab {
  margin-right: auto;
}

.markdown-content {
  max-width: 780px;
}

.markdown-content h1 {
  margin: 0 0 50px;
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 670;
  letter-spacing: -0.05em;
  line-height: 1;
}

.markdown-content h2 {
  margin: 58px 0 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.markdown-content h3 {
  margin: 36px 0 12px;
  font-size: 19px;
  font-weight: 690;
}

.markdown-content p {
  margin: 0 0 17px;
  color: #292929;
}

.markdown-content .stack {
  margin-top: -7px;
  color: var(--accent);
  font-size: 14px;
  font-style: normal;
  font-weight: 680;
}

.markdown-content ul {
  margin: 0 0 24px;
  padding-left: 22px;
}

.markdown-content li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.markdown-content li::marker {
  color: var(--accent);
}

.markdown-content strong {
  font-weight: 700;
}

.loading,
.error-message {
  color: var(--muted);
}

footer {
  display: flex;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 34%, transparent);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 28px), var(--content-width));
    padding-top: 14px;
  }

  .profile {
    padding-top: 48px;
  }

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

  .area-card {
    min-height: 0;
    padding: 25px 20px 56px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .area-card:last-child {
    border-bottom: 0;
  }

  .area-number {
    margin-bottom: 22px;
  }

  .section-tabs {
    margin-bottom: 44px;
  }

  .section-tab.home-tab {
    width: 100%;
    margin-right: 0;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
