* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #1F5BFF;
  --yellow: #fcf494;
  --ink: #171717;
  --muted: #6b6b6b;
  --line: #ececec;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
}

html { -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Source Code Pro', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  padding: 0 1.25rem;
  max-width: 56rem;
  margin: 0 auto;
  overflow-x: hidden;
}

header {
  padding: 3rem 0 1.25rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

header h1 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

header h1 a {
  color: var(--ink);
  text-decoration: none;
  background: var(--yellow);
  padding: 0.2rem 0.5rem;
}

header h1 a:hover {
  background: var(--blue);
  color: #fff;
}

nav {
  margin-top: 1.25rem;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: lowercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

nav a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

main {
  min-height: calc(100vh - 14rem);
  margin-bottom: 4rem;
}

main h1, main h2, main h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

main h1 { font-size: 2rem; }
main h2 { font-size: 1.5rem; }
main h3 { font-size: 1.15rem; }

main p {
  margin-bottom: 1.5rem;
}

main a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--blue);
}

main a:hover {
  background: var(--blue);
  color: #fff;
  border-bottom-color: var(--blue);
}

main ul, main ol {
  margin: 0 0 1.5rem 1.5rem;
}

main li { margin-bottom: 0.4rem; }

main blockquote {
  border-left: 3px solid var(--blue);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1.5rem 0;
  color: var(--muted);
}

main code {
  font-family: inherit;
  background: var(--bg-soft);
  padding: 0.1rem 0.35rem;
  font-size: 0.92em;
  border: 1px solid var(--line);
}

main pre {
  background: var(--ink);
  color: #e3e3e3;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

main pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}

footer {
  background: var(--ink);
  color: var(--yellow);
  padding: 3rem 1.5rem 5rem;
  margin-top: 4rem;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.8;
}

footer p { margin: 0; }

footer a {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 4px;
}

footer a:hover {
  color: #fff;
}

.posts { margin-top: 1rem; }

.post-preview {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.post-preview:last-child { border-bottom: none; }

.post-preview h2,
.post-preview h3 {
  margin-bottom: 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.post-preview h2 a,
.post-preview h3 a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 0;
}

.post-preview h2 a:hover,
.post-preview h3 a:hover {
  background: var(--yellow);
  color: var(--ink);
}

.post-preview time {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-preview p {
  margin-top: 0.6rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.highlight {
  background: var(--yellow);
  padding: 0.15rem 0.4rem;
}

strong {
  font-weight: 600;
  background: var(--yellow);
  padding: 0 0.2rem;
}

.bold { font-weight: 600; }

main img {
  width: 100%;
  height: auto;
  margin: 1.75rem auto;
  display: block;
}

main p img { margin: 1rem auto; }

.tags, .post-tags {
  margin: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag {
  display: inline-block;
  background: transparent;
  color: var(--muted);
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 0;
  text-transform: lowercase;
}

a.tag:hover,
.tag:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.tags-cloud {
  margin: 1.5rem 0 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags-cloud .tag {
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
}

.years-archive { margin: 1rem 0; }

.year-section { margin-bottom: 3rem; }

.year-header {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.year-header::before {
  content: "// ";
  color: var(--blue);
}

.posts-by-year .post-preview {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  margin: 3rem 0 0;
  font-size: 0.9rem;
}

.pagination a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--blue);
  padding-bottom: 2px;
}

.pagination a:hover {
  background: var(--blue);
  color: #fff;
}

@media (max-width: 600px) {
  body { padding: 0 1rem; }
  header { padding: 2rem 0 1rem; margin-bottom: 1.75rem; }
  header h1 { font-size: 1.15rem; }
  main h1 { font-size: 1.5rem; }
  main h2 { font-size: 1.25rem; }
  .year-header { font-size: 1.75rem; }
}
