:root {
  color-scheme: light;
  --background: #ffffff;
  --text: #111111;
  --muted: #555555;
  --link: #0000ee;
  --bar: #b7b7b7;
  --venue: #008000;
  --surface: #f6f6f6;
  --surface-border: #dedede;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #111111;
  --text: #eeeeee;
  --muted: #aaaaaa;
  --link: #8ab4ff;
  --bar: #666666;
  --venue: #7ee787;
  --surface: #181818;
  --surface-border: #333333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Avenir Next, Avenir, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
}

.article-page main {
  max-width: 740px;
}

.topbar {
  margin-bottom: 36px;
  font-size: 15px;
}

.wordmark {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--text);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: baseline;
  gap: 11px;
  flex-wrap: wrap;
}

.theme-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.intro {
  position: relative;
}

.portrait {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 50%;
  float: right;
  margin: 0 0 16px 24px;
  filter: grayscale(10%);
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

.identity {
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: 0;
}

p {
  margin: 0 0 14px;
}

section,
footer {
  margin-top: 32px;
}

ul {
  margin: 0;
  padding-left: 24px;
}

li {
  margin: 0 0 6px;
}

.entry {
  margin-bottom: 10px;
  padding-left: 9px;
  border-left: 3px solid var(--bar);
}

.entry p {
  margin-bottom: 0;
  line-height: 1.35;
}

.project-list {
  display: grid;
  gap: 11px;
}

.project-item {
  border-bottom: 1px solid var(--surface-border);
  display: grid;
  gap: 12px;
  grid-template-columns: 82px minmax(0, 1fr);
  padding-bottom: 11px;
}

.project-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-item img {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--surface-border);
  display: block;
  height: auto;
  object-fit: cover;
  width: 80px;
}

.project-copy h3 {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 0;
}

.project-copy p {
  line-height: 1.42;
  margin: 1px 0 0;
}

.project-meta {
  color: var(--muted);
  font-size: 14px;
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-list li {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 0 0 4px;
  line-height: 1.45;
}

.archive-list time {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  white-space: nowrap;
}

.archive-list time::after {
  content: "-";
  margin-left: 5px;
}

.archive-list span {
  color: var(--muted);
}

.archive-note::before {
  content: "(";
}

.archive-note::after {
  content: ")";
}

.archive-detail {
  padding-left: 54px;
}

.venue {
  color: var(--venue);
}

.location {
  color: var(--muted);
  margin: 2px 0 0;
}

.post {
  color: #333333;
  font-family: Georgia, "Times New Roman", Times, serif;
  padding-bottom: 24px;
}

:root[data-theme="dark"] .post {
  color: var(--text);
}

.post-header {
  margin-bottom: 34px;
}

.post-header h1 {
  color: inherit;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.08;
  max-width: 720px;
}

.post-subtitle {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
  margin-top: 8px;
}

.post-meta {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  margin-top: 6px;
}

.post-body {
  max-width: 690px;
}

.post-body > h2 {
  color: inherit;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 38px 0 18px;
}

.post-body p {
  line-height: 1.65;
  margin-bottom: 26px;
}

blockquote {
  border-bottom: 1px solid var(--surface-border);
  border-top: 1px solid var(--surface-border);
  color: inherit;
  font-size: 20px;
  font-style: italic;
  line-height: 1.55;
  margin: 30px auto;
  max-width: 620px;
  padding: 18px 26px;
  text-align: center;
}

blockquote p {
  margin-bottom: 0;
}

.post-break {
  color: inherit;
  font-family: Georgia, "Times New Roman", Times, serif;
  letter-spacing: 0.18em;
  margin: 18px 0 36px;
  text-align: center;
}

.post-figure {
  margin: 24px auto 28px;
}

.post-figure img {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
}

.post-figure figcaption {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  margin-top: 7px;
  text-align: center;
}

.post-figure.is-hero {
  margin-top: 0;
  max-width: 700px;
}

.post-figure.is-wide {
  max-width: 760px;
}

.post-figure.is-comic {
  max-width: 460px;
}

.post-formula {
  color: inherit;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 25px;
  line-height: 1.35;
  margin: 8px auto 22px;
  overflow-x: auto;
  padding: 4px 0;
  text-align: center;
  white-space: nowrap;
}

.post-formula span + span {
  margin-left: 18px;
}

.post-formula sub {
  font-size: 0.68em;
  line-height: 0;
}

.comments {
  border-top: 1px solid var(--surface-border);
  margin-top: 44px;
  padding-top: 28px;
}

.comments h2 {
  color: inherit;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 18px;
}

.music span {
  color: var(--muted);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--muted);
}

footer p {
  color: var(--text);
}

.contact-links {
  color: var(--muted);
}

@media (max-width: 560px) {
  main {
    padding: 36px 20px;
  }

  .topbar {
    margin-bottom: 34px;
  }

  .portrait {
    float: none;
    display: block;
    margin: 0 0 18px;
  }

  h1 {
    font-size: 28px;
  }

  .post-header h1 {
    font-size: 32px;
  }

  .project-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .project-item img {
    width: 62px;
  }

  .archive-list li {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2px 5px;
  }

  .archive-detail {
    padding-left: 0;
  }
}
