* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background-color: #1a1f2e;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2d3548;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

header h1 a {
  color: #f0f0f0;
  text-decoration: none;
}

header h1 a:hover {
  color: #64b5f6;
}

main {
  margin-bottom: 3rem;
}

h2,
h3 {
  margin-bottom: 0.5rem;
  color: #f5f5f5;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

p {
  margin-bottom: 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

li {
  margin: 0.35rem 0;
}

pre,
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

code {
  background-color: #1b2233;
  color: #e8e8e8;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  font-size: 0.95em;
}

pre {
  background-color: #1b2233;
  color: #e8e8e8;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid #2d3548;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.highlight {
  background-color: #1b2233;
  border: 1px solid #2d3548;
  border-radius: 10px;
  overflow: hidden;
}

.highlight pre {
  margin: 0;
  border: none;
  background: #1b2233 !important;
}

.highlight {
  margin: 1.25rem 0;
}

.highlight+p,
pre+p {
  margin-top: 1.5rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

a {
  color: #64b5f6;
  text-decoration: none;
}

a:hover {
  color: #90caf9;
  text-decoration: underline;
}

time {
  color: #9e9e9e;
  font-size: 0.9rem;
  display: inline;
}

article,
section {
  margin-bottom: 2rem;
}

.post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 1rem;
}

.post-row h3 {
  margin: 0;
}

.post-row time {
  justify-self: end;
  white-space: nowrap;
}

.post-desc {
  margin: 0.35rem 0 0;
  color: #c4c9d4;
}

.back-link {
  color: #757575;
  font-size: 0.85rem;
  display: inline-block;
  text-decoration: none;
}

.back-link:hover {
  color: #9e9e9e;
  text-decoration: none;
}

article h3 a {
  color: #f5f5f5;
}

article h3 a:hover {
  color: #64b5f6;
}

footer {
  padding-top: 1rem;
  border-top: 1px solid #2d3548;
  text-align: center;
  color: #9e9e9e;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  body {
    padding: 1rem 0.75rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .post-row time {
    font-size: 0.8rem;
  }
}

.hn-comments {
  margin-top: 4rem;
  padding: 1.5rem;
  background: #23293b;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.hn-header h3,
.hn-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f5f5f5;
}

.hn-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hn-points {
  font-size: 0.85rem;
  font-weight: 600;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.comment {
  position: relative;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

.comment-author {
  font-weight: 600;
  color: #f5f5f5;
}

.comment-date {
  color: #757575;
  font-size: 0.75rem;
}

.comment-body {
  font-size: 1rem;
  color: #c4c9d4;
  line-height: 1.6;
  word-break: break-word;
}

.comment.reply {
  margin-top: 1.25rem;
  margin-left: 1.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid rgba(100, 181, 246, 0.3);
}

.hn-footer {
  margin-top: 2rem;
  text-align: left;
}

.hn-more-btn {
  font-size: 0.85rem;
  color: #9e9e9e;
  transition: all 0.2s;
}

.hn-more-btn:hover {
  color: #64b5f6;
  text-decoration: underline;
}

.hn-no-comments,
.hn-error {
  color: #9e9e9e;
  font-style: italic;
  text-align: center;
  padding: 3rem 0;
}

@media (max-width: 600px) {
  .hn-comments {
    padding: 1rem;
    margin-top: 3rem;
    border-radius: 10px;
    margin-left: 0;
    margin-right: 0;
  }

  .hn-header h3,
  .hn-header h4 {
    font-size: 1rem;
  }
}