:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #eaeaea;
  background: #0e0e0e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
}

main {
  width: 100%;
  max-width: 520px;
  text-align: center;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.handle {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: #777;
}

h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

hr {
  border: none;
  border-top: 1px solid #2a2a2a;
  margin: 1.5rem auto;
  width: 100%;
}

.bio {
  margin: 0 0 1.5rem;
  color: #cfcfcf;
}

.bio a {
  color: #eaeaea;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.bio a:hover {
  color: #fff;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1rem;
  font-size: 0.95rem;
}

.blog-link {
  color: #cfcfcf;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.blog-link:hover {
  color: #fff;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.socials a {
  color: #cfcfcf;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.socials a:hover {
  color: #fff;
}

.socials span {
  color: #fff;
}

.landscape {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1.25rem 0 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
  font-size: 14px;
  line-height: 1.1;
  color: #f2f2f2;
  white-space: pre;
  overflow: hidden;
  text-align: center;
  user-select: none;
  box-sizing: border-box;
}

.landscape .star {
  color: #fff48a;
  text-shadow: 0 0 6px rgba(255, 232, 120, 0.85),
    0 0 12px rgba(255, 220, 90, 0.4);
}

.landscape .moon {
  color: #fff4b8;
}

.landscape .dist {
  color: #4a5666;
}

.landscape .mtn {
  color: #e8e8e8;
}

.landscape .tree {
  color: #3d7c54;
}

.landscape .water {
  color: #1d4d8a;
}

.landscape .sun {
  color: #ff8c42;
  text-shadow: 0 0 8px rgba(255, 140, 66, 0.55);
}

.landscape .boat {
  color: #e8e8e8;
}

.landscape .cloud {
  color: #6f7682;
}

.handle a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.handle a:hover {
  color: #aaa;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #1a1a1a;
}

.post-list a {
  color: #cfcfcf;
  text-decoration: none;
}

.post-list a:hover {
  color: #fff;
}

.post-list .date {
  color: #666;
  font-size: 0.85rem;
  white-space: nowrap;
}

.blog-layout {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

/* Override the global centered, vertically-justified main for the blog index. */
.blog-layout main {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: left;
  justify-content: flex-start;
}

.blog-layout hr {
  margin: 1.5rem 0;
}

.blog-rail {
  flex: 0 0 9.5rem;
  position: sticky;
  top: 2rem;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.5;
}

.rail-title {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #555;
}

.rail-group {
  margin-bottom: 1.1rem;
}

.rail-group-name {
  margin: 0 0 0.35rem;
  color: #eaeaea;
  font-weight: 600;
}

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

.rail-list li {
  padding: 0.15rem 0;
}

.rail-list a {
  color: #777;
  text-decoration: none;
}

.rail-list a:hover {
  color: #cfcfcf;
}

@media (max-width: 720px) {
  .blog-layout {
    display: block;
    max-width: 520px;
  }

  .blog-rail {
    display: none;
  }
}

.post-empty {
  color: #666;
  font-style: italic;
  justify-content: center !important;
  border-bottom: none !important;
}

.post-main {
  max-width: 640px;
}

.post-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.post-date {
  margin: 0.4rem 0 0;
  color: #777;
  font-size: 0.85rem;
}

.post-content {
  text-align: left;
  margin-top: 0.5rem;
}

.post-content p {
  margin: 1rem 0;
  line-height: 1.7;
}

.post-content h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.post-content h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
}

.post-content a {
  color: #cfcfcf;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content a:hover {
  color: #fff;
}

.post-content code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #1a1a1a;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.post-content pre {
  background: #1a1a1a;
  padding: 0.9rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 2px solid #333;
  color: #b8b8b8;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #1a1a1a;
  font-size: 0.9rem;
}

.post-nav .next {
  margin-left: auto;
  text-align: right;
}

@media (max-width: 640px) {
  .landscape {
    font-size: 10px;
  }
}

.ghgrid {
  margin: 1.5rem auto;
  width: 100%;
  text-align: center;
}

.ghgrid[hidden] {
  display: none;
}

.ghgrid-cal {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
  font-size: 12px;
  line-height: 1.15;
  letter-spacing: 0.06em;
  white-space: pre;
  color: #232323;
  user-select: none;
}

.ghgrid-cal .month {
  color: #777;
}

.ghgrid-cal .l0 {
  color: #232323;
}

.ghgrid-cal .l1 {
  color: #21402e;
}

.ghgrid-cal .l2 {
  color: #2f5d41;
}

.ghgrid-cal .l3 {
  color: #3d7c54;
}

.ghgrid-cal .l4 {
  color: #589b6e;
}

.ghgrid-caption {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: #777;
}

.ghgrid-caption a {
  color: #777;
  text-decoration: none;
}

.ghgrid-caption a:hover {
  color: #cfcfcf;
}
