:root {
  --bg: #12110F;
  --text: #EDE9E2;
  --body: #CFC8BE;
  --muted: #A39C93;
  --line: #2B2823;
  --accent: #E07A4F;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(40px, 9vh, 96px) 24px 64px;
}

/* Profile switch: same accent underline as the identity mark, no pills. */
.switch {
  display: flex;
  gap: 24px;
  margin: 0 0 clamp(24px, 5vh, 40px);
}

.switch-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.2s ease;
}

.stage {
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.stage.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
}

.stage.is-entering {
  opacity: 0;
  transform: translateY(6px);
  transition: none;
}

.switch-btn:hover { color: var(--text); }

.switch-btn[aria-pressed="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

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

.status {
  margin: -12px 0 28px;
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Identity block: avatar left, name right, one accent mark under it. */
.profile {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.avatar {
  width: 88px;
  height: 88px;
  flex: none;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: #292620;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 7vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.handle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.mark {
  width: 28px;
  height: 2px;
  margin-top: 16px;
  background: var(--accent);
  border-radius: 1px;
}

.bio {
  margin: clamp(28px, 5vh, 44px) 0 0;
  max-width: 50ch;
  color: var(--body);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
  text-wrap: pretty;
}

section { margin-top: clamp(36px, 7vh, 64px); }

h2 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.links {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.links li {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.links li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.links li:has(a:hover)::after,
.links li:has(a:focus-visible)::after {
  transform: scaleX(1);
}

.links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 12px 2px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s ease;
}

.links a > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.links .domain {
  flex: none;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
  transition: color 0.18s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.links a:hover > span:first-child,
.links a:focus-visible > span:first-child {
  transform: translateX(4px);
}

.links a:hover .domain,
.links a:focus-visible .domain {
  color: var(--accent);
  transform: translateX(-4px);
}

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

footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 44px 24px 64px;
  color: var(--muted);
  font-size: 0.85rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--body);
}

@media (max-width: 420px) {
  .avatar { width: 72px; height: 72px; }
  .profile { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
