:root {
  --text: #111;
  --muted: #666;
  --line: #e5e5e5;
  --link: #0645ad;
  --visited: #5a3596;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.page {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.site-header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 2.1rem;
  line-height: 1.2;
  font-weight: 600;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
}

.subtitle {
  margin-bottom: 16px;
  color: var(--muted);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

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

a:visited {
  color: var(--visited);
}

a:hover,
a:focus {
  text-decoration: underline;
}

main {
  padding-top: 28px;
}

section {
  padding: 0 0 28px;
}

section + section {
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

p {
  margin-bottom: 12px;
}

ul,
ol {
  padding-left: 22px;
  margin-bottom: 0;
}

li + li {
  margin-top: 10px;
}

.dated-list {
  list-style: none;
  padding-left: 0;
}

.dated-list li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
}

.date,
.muted,
.note,
footer {
  color: var(--muted);
}

.date {
  white-space: nowrap;
}

.publication-list li + li,
.item-list li + li {
  margin-top: 14px;
}

.note {
  margin-top: 12px;
  font-size: 0.95rem;
}

footer {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 28px, 860px);
    padding-top: 28px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .dated-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
