@import url("https://cdn.jsdelivr.net/gh/aaaakshat/cm-web-fonts@latest/fonts.css");

:root {
  font-family: "Computer Modern Serif", "Latin Modern Roman", "CMU Serif", serif;
  font-size: 18px;
  line-height: 1.55;
  color: #1c1c1a;
  background: rgb(250, 250, 250);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: rgb(250, 250, 250);
}

body {
  width: min(76rem, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
  color: #1c1c1a;
  background: rgb(250, 250, 250);
}

a {
  color: #1c1c1a;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #8b6a00;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-header {
  border-bottom: 1px solid #aaa9a5;
  padding-bottom: 0.8rem;
}

.site-header-copy {
  min-width: 0;
}

.site-header-banner {
  width: 100%;
  height: clamp(3.6rem, 6vw, 4.9rem);
  margin: 0 0 0.85rem;
  overflow: hidden;
  background: #171716;
  line-height: 0;
}

.site-header-banner img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: fill;
}

.site-title {
  margin: 0 0 0.45rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: normal;
  line-height: 1;
}

.site-title a {
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-nav a {
  padding-block: 0.08rem;
}

.site-nav a[aria-current="page"] {
  font-weight: bold;
  text-decoration-thickness: 2px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 2.4rem;
  margin-top: 2rem;
}

main {
  min-width: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

main > h1,
main section > h1:not(.visually-hidden) {
  margin-top: 0;
  font-size: 2rem;
  font-weight: normal;
}

h2 {
  margin-top: 2rem;
}

code,
pre,
.post-meta,
.post-list-date,
.event-date {
  font-family: "Computer Modern Typewriter", "Latin Modern Mono", "CMU Typewriter Text", monospace;
}

pre {
  overflow-x: auto;
  padding: 0.8rem;
  border: 1px solid #b8b7b2;
  background: #f3f3f1;
}

img {
  max-width: 100%;
  height: auto;
}

blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 2px solid #aaa9a5;
}

.event-inbox {
  border-top: 1px solid #aaa9a5;
}

.event-item {
  border-bottom: 1px solid #c3c2bd;
  scroll-margin-top: 1rem;
}

.event-item > summary {
  display: grid;
  grid-template-columns: minmax(8rem, 0.8fr) minmax(0, 1.4fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.75rem 0;
  cursor: pointer;
  list-style: none;
}

.event-item > summary::-webkit-details-marker {
  display: none;
}

.event-item > summary::before {
  content: "›";
  grid-column: 1;
  grid-row: 1;
  width: 0;
  transform: translateX(-0.85rem);
}

.event-item[open] > summary::before {
  content: "⌄";
}

.event-title {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: bold;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-summary {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  color: #5f5f5b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-date {
  grid-column: 3;
  grid-row: 1;
  font-size: 0.82rem;
  white-space: nowrap;
}

.event-body {
  max-width: 46rem;
  padding: 0 0 1rem;
}

.event-back {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  cursor: pointer;
}

.post-list {
  margin-top: 0;
  padding-left: 1.2rem;
}

.post-list li {
  margin-bottom: 1rem;
}

.post-list p {
  margin: 0.2rem 0;
}

.post-list-date {
  margin-left: 0.45rem;
  color: #666660;
  font-size: 0.82rem;
}

.post-header h1 {
  margin-bottom: 0.25rem;
}

.post-meta {
  margin-top: 0;
  color: #666660;
  font-size: 0.82rem;
}

.note-index {
  margin-top: 0;
}

.note-index dt {
  font-weight: bold;
}

.note-index dd {
  margin: 0.15rem 0 1rem 1rem;
  color: #555551;
}

.comments {
  margin-top: 3rem;
}

.site-index {
  min-width: 0;
  padding-left: 1rem;
  border-left: 1px solid #aaa9a5;
}

.site-index > h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: normal;
}

.site-index h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}

.site-index section + section {
  margin-top: 1.35rem;
}

.site-index ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-index li {
  margin: 0.18rem 0;
}

.site-index li a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.index-more {
  margin-top: 0.35rem;
}

.index-more summary {
  cursor: pointer;
}

.index-more ul {
  margin-top: 0.35rem;
}

.empty-state {
  margin: 0;
  color: #666660;
}

.event-inbox:has(.event-item:target) .event-item:not(:target) {
  display: none;
}

.event-item:target {
  border-top: 1px solid #c3c2bd;
}

button,
input,
textarea,
select {
  color: inherit;
  border-color: #aaa9a5;
  background: #f3f3f1;
}

::selection {
  color: #1c1c1a;
  background: #f2d879;
}

@media (max-width: 760px) {
  body {
    width: min(100% - 1.25rem, 76rem);
    margin-top: 0.8rem;
  }

  .site-header-banner {
    margin-bottom: 0.5rem;
  }

  .site-header-banner img {
    width: 100%;
  }

  .page-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
  }

  .site-index {
    padding: 1.15rem 0 0;
    border-top: 1px solid #aaa9a5;
    border-left: 0;
  }

  .event-item > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 1rem;
  }

  .event-title {
    grid-column: 1;
  }

  .event-date {
    grid-column: 2;
  }

  .event-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 760px) {
  .site-header-banner {
    height: clamp(3rem, 14vw, 3.8rem);
    margin-bottom: 0.7rem;
  }
}
