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

/* ---- Tokens ---- */
:root {
  --bg: #ffffff;
  --text: #37352f;
  --muted: #888;
  --accent: #1a6ef5;
  --border: #e8e8e6;
  --tag-bg: #f0f0ee;
  --tag-text: #555;
  --max-width: 680px;
}

html.dark {
  --bg: #191919;
  --text: #e2e2df;
  --muted: #666;
  --accent: #6aadff;
  --border: #2c2c2c;
  --tag-bg: #252525;
  --tag-text: #aaa;
}

/* ---- Base ---- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}

/* ---- Top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.topbar-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--muted);
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s;
}

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

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

/* ---- Hero ---- */
.hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.hero-text h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.role {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.location {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.open-badge {
  color: #3a9e5f;
  font-weight: 500;
}

html.dark .open-badge {
  color: #5ec98a;
}

.bio {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1rem;
  max-width: 520px;
}

/* ---- Hero links (inline, look like links not buttons) ---- */
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
}

.hero-links a {
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.hero-links a:hover {
  text-decoration: underline;
}

/* ---- Divider ---- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ---- Section headings ---- */
h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ---- What I Build ---- */
.build-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.build-list li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.build-label {
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.build-detail {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---- Skill filters ---- */
.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.skill-tag {
  background: var(--tag-bg);
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  color: var(--tag-text);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.skill-tag.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filter-hint {
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.2em;
  margin-top: 0.25rem;
}

/* ---- Projects ---- */
.projects {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.project {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.3rem;
}

.project-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.project-header a {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-header a:hover {
  text-decoration: underline;
}

.project p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

/* ---- Timeline ---- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.job {
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.2rem;
}

.job-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.job-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.job p {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---- Toolkit ---- */
.toolkit {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toolkit-row {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.toolkit dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 55px;
  flex-shrink: 0;
}

.toolkit dd {
  font-size: 0.875rem;
  color: var(--text);
}

/* ---- Hobbies ---- */
.hobbies {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hobbies li {
  font-size: 0.9rem;
  color: var(--text);
}

.hobbies strong {
  font-weight: 600;
}

/* ---- Contact ---- */
.contact-text {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 520px;
}

.contact-text a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.contact-text a:hover {
  text-decoration: underline;
}

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .container {
    padding: 2rem 1.25rem 4rem;
  }

  .hero {
    flex-direction: column;
    gap: 1rem;
  }

  .job-header {
    flex-direction: column;
    gap: 0.1rem;
  }

  .project-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .toolkit-row {
    flex-direction: column;
    gap: 0.15rem;
  }
}
