:root {
  color-scheme: light;
  --background: #fdfdfc;
  --surface-hover: #f2f2ef;
  --text: #282826;
  --muted: #6f6f6b;
  --border: #deded9;
  --link: #0d63ce;
  --quote: #8b8b87;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #161615;
  --surface-hover: #242422;
  --text: #eeeeec;
  --muted: #b5b5b0;
  --border: #494946;
  --link: #70b8ff;
  --quote: #9b9b96;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  transition: background-color 180ms ease, color 180ms ease;
}

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

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 52px 0 48px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, transform 100ms ease;
}

.icon-button:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.icon-button:active {
  transform: translateY(1px) scale(0.97);
}

.icon-button:focus-visible,
a:focus-visible,
.copy-contact:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

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

:root[data-theme="dark"] .moon-icon {
  display: block;
}

.hero {
  padding-bottom: 52px;
}

h1,
h2,
p,
blockquote,
dl,
dd,
figure {
  margin: 0;
}

h1 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
}

.prose {
  padding-bottom: 52px;
  font-size: 16px;
  line-height: 1.82;
}

.prose p + p {
  margin-top: 22px;
}

.prose a,
.contact-list a {
  color: var(--text);
  text-decoration-color: var(--border);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.prose a:hover,
.contact-list a:hover {
  color: var(--link);
  text-decoration-color: currentColor;
}

.external-icon {
  display: inline-block;
  margin-left: 2px;
  font-size: 12px;
  text-decoration: none;
}

blockquote {
  margin-top: 25px;
  padding: 1px 0 1px 18px;
  border-left: 3px solid var(--border);
  color: var(--quote);
  font-style: italic;
}

.contact-section {
  padding-bottom: 52px;
}

h2 {
  padding-bottom: 20px;
  font-size: 16px;
  font-weight: 500;
}

.contact-list {
  display: grid;
  gap: 14px;
}

.contact-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: baseline;
  font-size: 15px;
  line-height: 1.6;
}

.contact-row dt {
  color: var(--muted);
}

.contact-list a,
.copy-contact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.copy-contact {
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.copy-contact:hover {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-list span {
  font-size: 12px;
}

.copy-status {
  min-height: 22px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.photo-frame {
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-hover);
}

.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 40px, 640px);
  }

  .site-header {
    padding: 34px 0 40px;
  }

  .hero,
  .prose,
  .contact-section {
    padding-bottom: 44px;
  }

  .contact-row {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}

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

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