* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #fff;
  color: #000;
  font-family: "Times New Roman", Times, serif;
}

a {
  color: inherit;
}

.site-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.post-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding: 2rem;
}

.post-sidebar nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.site-title {
  font-style: italic;
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 400;
  margin: 0 0 2.5rem;
}

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

.site-title a:hover,
.site-title a:focus-visible,
.post-link:hover .post-link-title,
.post-link:focus-visible .post-link-title {
  text-decoration: underline;
}

.post-list {
  display: grid;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-link {
  display: block;
}

.post-link-title {
  display: inline;
  font-size: 1rem;
}

.post-link[aria-current="page"] .post-link-title {
  font-weight: 700;
}

.post-main {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4rem clamp(2rem, 8vw, 8rem);
}

.post {
  max-width: 46rem;
}

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

.image-post time {
  display: block;
  margin-bottom: 1.5rem;
}

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
}

.post-header h2 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  margin: 0 0 1rem;
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.4;
}

.post-body p {
  margin: 0 0 1.5rem;
}

@media (max-width: 700px) {
  .site-layout {
    grid-template-columns: clamp(7rem, 32vw, 12rem) minmax(0, 1fr);
  }

  .post-sidebar {
    padding: 1.25rem 0.75rem;
    overflow-wrap: anywhere;
  }

  .site-title {
    margin-bottom: 1.25rem;
  }

  .post-main {
    padding: 2.5rem 1rem;
    overflow-wrap: anywhere;
  }
}

.hover-paragraph {
  margin-bottom: 1.5rem;
}

/* Keep revealed text inside the hover area, including its paragraph gap. */
.post-body .paragraph-main {
  margin: 0;
}

.paragraph-main > span {
  display: block;
}

.paragraph-main > .paragraph-hover {
  display: none;
  padding-top: 1.5rem;
  color: #666666;
}

.paragraph-reference {
  display: none;
  font-size: 0.8em;
  animation: reference-fade-in 3s ease-out;
}

@keyframes reference-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}


.post-body .paragraph-reference p {
  margin: 0;
  padding-top: 1.5rem;
}

.reference-original {
  color: #000;
}

.reference-translation {
  color: #666666;
}

.reference-translation q {
  quotes: none;
}

@media (hover: hover) {
  .hover-paragraph.reference-visible:hover > .paragraph-reference {
    display: block;
  }

  .hover-paragraph:hover > .paragraph-main > .paragraph-hover {
    display: block;
  }
}

.home-cow {
  display: block;
  width: min(100%, 24rem);
  height: auto;
}

@media (hover: none) {
  .hover-paragraph[aria-pressed="true"] > .paragraph-reference {
    display: block;
  }

  .hover-paragraph[aria-pressed="true"] > .paragraph-main > .paragraph-hover {
    display: block;
  }
}
