:root {
  --bg: #fbfbf9;
  --text: #17171a;
  --text-soft: #3f3f46;
  --muted: #8b8b93;
  --line: #e4e4e0;
  --underline: #c9c9c4;
  --accent: #e4572e;
  color-scheme: light;
}

/* Without JS the page follows the system setting; the toggle sets data-theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1012;
    --text: #ededea;
    --text-soft: #b9b9b6;
    --muted: #7d7d83;
    --line: #26272b;
    --underline: #45464c;
    --accent: #ff7a50;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1012;
  --text: #ededea;
  --text-soft: #b9b9b6;
  --muted: #7d7d83;
  --line: #26272b;
  --underline: #45464c;
  --accent: #ff7a50;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  position: relative;
  max-width: 688px;
  margin: 0 auto;
  padding: 96px 24px 80px;
}

.theme-toggle {
  position: absolute;
  top: 28px;
  right: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--line);
}

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

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

.intro {
  display: flex;
  align-items: center;
  gap: 28px;
}

.portrait {
  width: 112px;
  height: 112px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
}

h1 {
  margin: 0;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.tagline {
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.tagline::before {
  content: '';
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.links {
  margin: 40px 0 0;
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13.5px;
}

.links a {
  color: var(--text);
  text-decoration: none;
}

.links a::after {
  content: '\2197';
  margin-left: 5px;
  color: var(--muted);
  transition: color 0.15s;
}

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

.bio {
  margin-top: 40px;
  color: var(--text-soft);
}

.bio p {
  margin: 0 0 22px;
}

.bio p:nth-child(-n+2) {
  color: var(--text);
}

.bio p:last-child {
  margin-bottom: 0;
}

.bio a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.bio a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 600px) {
  body {
    font-size: 16.5px;
  }
  .page {
    padding: 56px 22px 64px;
  }
  .theme-toggle {
    top: 16px;
    right: 12px;
  }
  .intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .portrait {
    width: 96px;
    height: 96px;
  }
  h1 {
    font-size: 38px;
  }
  .links {
    margin-top: 32px;
    gap: 8px 14px;
    font-size: 12.5px;
  }
  .links a::after {
    margin-left: 3px;
  }
  .bio {
    margin-top: 32px;
  }
}
