:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-secondary: #52514e;
  --ink-muted: #898781;
  --hairline: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --series-1: #2a78d6;
  --ring-track: #cde2fb;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-secondary: #c3c2b7;
    --ink-muted: #898781;
    --hairline: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --series-1: #3987e5;
    --ring-track: #184f95;
  }
}

* {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-height: 100vh;
  padding: 0 16px 40px;
  box-sizing: border-box;
}

#warn-box {
  color: red;
}

/* ---- header ---- */

#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}

#header-brand {
  font-weight: 700;
  font-size: 15px;
}

#header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#header-user {
  color: var(--ink-secondary);
  font-size: 14px;
}

/* ---- buttons ---- */

button {
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: 6px;
  background: var(--series-1);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
button:hover {
  filter: brightness(0.94);
}

#logout-button {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid var(--border);
}

/* ---- login ---- */

#form-box {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  gap: 10px;
  width: 320px;
  box-sizing: border-box;
  margin-top: 15vh;
}

input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
  box-sizing: border-box;
}
input:focus {
  outline: 2px solid var(--series-1);
  outline-offset: -1px;
  border-color: transparent;
}

/* ---- profile card ---- */

#profile-box,
.section {
  width: min(880px, 100%);
}

#profile-box {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 32px;
  box-sizing: border-box;
}

#avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

#profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#username {
  font-size: 20px;
  font-weight: 700;
}

#full-name {
  color: var(--ink-secondary);
  font-size: 14px;
}

#joined {
  color: var(--ink-muted);
  font-size: 13px;
}

#profile-stats {
  display: flex;
  gap: 24px;
  padding-left: 24px;
  border-left: 1px solid var(--hairline);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  color: var(--ink-muted);
  font-size: 13px;
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
}

/* ---- chart sections ---- */

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  box-sizing: border-box;
}

.section-title {
  margin: 0;
  align-self: flex-start;
  font-size: 15px;
  font-weight: 600;
}

svg {
  max-width: 100%;
  overflow: visible;
}

/* the bar chart stretches to fill its section, the ring keeps its fixed size */
.projects-svg {
  width: 100%;
  height: auto;
}

/* bar chart */
.chart-bar {
  fill: var(--series-1);
}
.chart-bar:hover {
  filter: brightness(1.08);
}
.axis-line {
  stroke: var(--baseline);
  stroke-width: 1;
}
.bar-name {
  fill: var(--ink-muted);
  font-size: 10px;
}
.bar-amount {
  fill: var(--ink-secondary);
  font-size: 9px;
}

/* skill ring */
#skill-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.select-skill {
  height: 26px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid var(--border);
  font-size: 13px;
}
.select-skill:hover {
  filter: none;
  background: var(--page);
}
.select-skill.active {
  background: var(--series-1);
  color: #fff;
  border-color: transparent;
}

.ring-track {
  fill: none;
  stroke: var(--ring-track);
}
.ring-progress {
  fill: none;
  stroke: var(--series-1);
}
.ring-name {
  fill: var(--ink);
  font-size: 16px;
  font-weight: 700;
}
.ring-amount {
  fill: var(--ink-secondary);
  font-size: 12px;
}
