:root {
  color-scheme: light;
  --paper: #f6f1e8;
  --ink: #17212b;
  --muted: #5b6670;
  --line: #d7cdbf;
  --accent: #0e6b67;
  --accent-dark: #084e4b;
  --control: rgb(255 255 255 / 48%);
  --glow: rgb(14 107 103 / 10%);
  --shadow: rgb(23 33 43 / 12%);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101516;
  --ink: #f2eee6;
  --muted: #aab4b5;
  --line: #344143;
  --accent: #7bd0c8;
  --accent-dark: #a7e6df;
  --control: rgb(255 255 255 / 5%);
  --glow: rgb(54 177 166 / 13%);
  --shadow: rgb(0 0 0 / 34%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 18%, var(--glow), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: color 180ms ease, background-color 180ms ease;
}

.site-header {
  width: min(68rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding-top: 1.4rem;
}

.controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.language-switch,
.theme-toggle {
  background: var(--control);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 0.35rem 1.5rem var(--shadow);
  backdrop-filter: blur(12px);
}

.language-switch {
  display: flex;
  padding: 0.2rem;
}

.language-switch button,
.theme-toggle {
  color: var(--muted);
  border: 0;
  font: inherit;
  cursor: pointer;
}

.language-switch button {
  min-width: 3.1rem;
  padding: 0.42rem 0.7rem;
  background: transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.language-switch button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
}

.theme-toggle {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  place-items: center;
  background: var(--control);
  color: var(--ink);
  font-size: 1rem;
}

.language-switch button:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: 3px;
}

main {
  width: min(68rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 6.5rem) 0 3rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.avatar {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 1.5rem 4rem var(--shadow);
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.16em;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.lede {
  max-width: 40rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.8;
}

.slogan {
  margin: 1.25rem 0 0;
  font-weight: 700;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

nav a {
  padding: 0.72rem 1rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--control);
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--accent-dark);
  border-color: var(--accent);
  transform: translateY(-1px);
}

nav a:focus-visible {
  outline: 3px solid rgb(14 107 103 / 22%);
  outline-offset: 3px;
}

footer {
  width: min(68rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

@media (max-width: 42rem) {
  .site-header {
    padding-top: 1rem;
  }

  main {
    padding-top: 2.25rem;
  }

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

  .avatar {
    width: 8rem;
  }

  h1 {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  nav a {
    transition: none;
  }
}
