:root {
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --text: #1b1f24;
  --muted: #5b6472;
  --accent: #3457d5;
  --accent-contrast: #ffffff;
  --border: #e3e6ea;
  --chip-bg: #eef1f8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --card-bg: #1d2026;
    --text: #eef0f3;
    --muted: #9aa3b2;
    --accent: #7c93ff;
    --accent-contrast: #12131a;
    --border: #2b2f37;
    --chip-bg: #262a33;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.loading {
  color: var(--muted);
  text-align: center;
}

.state {
  text-align: center;
  padding: 8px 0;
}

.state h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.state p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.state code {
  background: var(--chip-bg);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
}

.state--error h2 {
  color: #c0392b;
}

.state--empty h2 {
  color: var(--text);
}

.card-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
}

@media (max-width: 480px) {
  .card-header {
    grid-template-columns: auto 1fr;
  }

  .locale-toggle {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

.heading h1 {
  margin: 0;
  font-size: 24px;
}

.heading .title {
  margin: 2px 0 0;
  color: var(--accent);
  font-weight: 600;
}

.heading .location {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.locale-toggle {
  display: flex;
  min-width: max-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.locale-toggle button {
  border: none;
  background: transparent;
  color: var(--text);
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.locale-toggle button.active {
  background: var(--accent);
  color: var(--accent-contrast);
}

.bio {
  margin: 24px 0 0;
  line-height: 1.6;
  color: var(--text);
}

.section {
  margin-top: 28px;
}

.section h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 12px;
}

.skill-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-group {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.skill-group .category {
  min-width: 100px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
}

.experience-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.experience-item {
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

.experience-item .role-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 600;
}

.experience-item .period {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}

.experience-item .highlight {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
}

.links a:hover {
  background: var(--chip-bg);
}
