:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #59636e;
  --line: #d1d9e0;
  --accent: #0969da;
  --accent-soft: #ddf4ff;
  --code-bg: #eff2f5;
  --focus: rgb(9 105 218 / 28%);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial,
    sans-serif;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 5;
  transform: translateY(-180%);
  border-radius: 6px;
  background: var(--text);
  color: var(--surface);
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: rgb(246 248 250 / 94%);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(860px, calc(100% - 2rem));
  min-height: 3.5rem;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 650;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.nav-link {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 0.32rem 0.65rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-link:hover {
  background: #f3f4f6;
  text-decoration: none;
}

.markdown-body {
  width: min(860px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.6rem 0 2rem;
}

.markdown-body > * {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
}

.eyebrow::before {
  content: "$ ";
  color: #1a7f37;
}

.markdown-body h1 {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.2;
}

.markdown-body h1 + p {
  margin-top: 0.75rem;
  font-size: 1.02rem;
}

.markdown-body h2 {
  margin: 2.5rem 0 0.7rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.45rem;
  font-size: 1.45rem;
  line-height: 1.3;
}

.markdown-body h3 {
  margin: 2rem 0 0.35rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

.markdown-body h3::before {
  content: "## ";
  color: #8c959f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 500;
}

.markdown-body p {
  margin: 0.7rem 0;
}

.markdown-body h3 + p,
.markdown-body h2 + p {
  color: var(--muted);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 0.28rem 0.62rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-links a::before {
  content: "↗";
  margin-right: 0.32rem;
  color: var(--muted);
}

.focus-list,
.project-list {
  max-width: 860px;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.focus-list > li {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 0.85rem 0.95rem;
  color: var(--muted);
}

.focus-list strong {
  color: var(--text);
}

.project-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.project-list > li {
  position: relative;
  min-width: 0;
  padding: 0.82rem 1rem 0.82rem 2rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.project-list > li::before {
  position: absolute;
  top: 0.88rem;
  left: 0.95rem;
  content: "-";
  color: #8c959f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.project-list > li + li {
  border-top: 1px solid var(--line);
}

.project-list strong {
  color: var(--text);
}

.project-list strong a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.96rem;
}

code {
  display: inline-block;
  margin: 0.2rem 0.12rem 0 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--code-bg);
  padding: 0.02rem 0.38rem;
  color: #4c5661;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.site-footer {
  width: min(860px, calc(100% - 2rem));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 1.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .nav,
  .markdown-body,
  .site-footer {
    width: min(100% - 1.25rem, 860px);
  }

  .markdown-body {
    padding-top: 1.8rem;
  }

  .markdown-body h1 {
    font-size: 1.8rem;
  }

  .markdown-body h2 {
    font-size: 1.3rem;
  }

  .focus-list {
    grid-template-columns: 1fr;
  }

  .project-list > li {
    padding: 0.75rem 0.75rem 0.75rem 1.65rem;
  }

  .project-list > li::before {
    top: 0.81rem;
    left: 0.72rem;
  }
}
