:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #5f5f5f;
  --rule: #e6e6e6;
  --tag-bg: #f2f2f2;
  --tag-daily-bg: #e7f3ea;
  --tag-daily-text: #1e5b2e;
  --link: #111111;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #ececec;
    --muted: #a3a3a3;
    --rule: #2a2a2a;
    --tag-bg: #232323;
    --tag-daily-bg: #1c3323;
    --tag-daily-text: #9fd6ad;
    --link: #ececec;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 2.5rem 1.5rem 3rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
  font-size: 0.95rem;
}
.nav .brand { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.nav nav a { margin-left: 1.1rem; color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--text); }

.intro { margin: 0 0 3rem; font-size: 1.125rem; }

h2 {
  margin: 2.75rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.projects { list-style: none; margin: 0; padding: 0; }
.projects li { margin: 0 0 1.1rem; }
.projects li > a { font-weight: 600; }
.projects p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.975rem; }

.tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  vertical-align: 0.1em;
  white-space: nowrap;
}
.tag.daily { background: var(--tag-daily-bg); color: var(--tag-daily-text); }

.legend dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
  font-size: 0.925rem;
}
.legend dt { font-weight: 600; }
.legend dd { margin: 0; color: var(--muted); }

footer {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}
footer a { color: var(--muted); }

@media (max-width: 30rem) {
  body { padding: 1.5rem 1.1rem 2.5rem; font-size: 1rem; }
  .nav { margin-bottom: 2rem; }
  .intro { font-size: 1.0625rem; margin-bottom: 2.25rem; }
  .legend dl { grid-template-columns: 1fr; gap: 0; }
  .legend dd { margin-bottom: 0.5rem; }
}

.share { position: relative; }
.share-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; display: flex; flex-direction: column; min-width: 150px;
  background: var(--bg); border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 10px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.share-menu[hidden] { display: none; }
.nav nav .share-menu a { margin-left: 0; padding: 7px 10px; border-radius: 6px; color: var(--text); }
.nav nav .share-menu a:hover { background: color-mix(in srgb, var(--muted) 15%, transparent); }
