/* ─── Reset & Base ─────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  background: #f1f1f1;
  color: #1a1a1a;
  font-family: Lato, Georgia, "Noto Serif", serif;
  line-height: 1.6;
}

a {
  color: #1a1a1a;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

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

/* ─── Layout ────────────────────────────────────────────────────── */

.site-wrapper {
  display: flex;
  align-items: flex-start;
  max-width: 1260px;
  margin: 0 auto;
}

/* ─── Sidebar ───────────────────────────────────────────────────── */

.sidebar {
  display: none;
}

.sidebar-inner {
  padding: 2.5rem 1.75rem 1.5rem;
}

.site-title {
  font-family: "Noto Sans", sans-serif;
  font-size: 1.467rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.site-title a {
  color: #1a1a1a;
}

.site-description {
  font-family: "Noto Sans", sans-serif;
  font-size: 0.875rem;
  color: rgba(26, 26, 26, 0.7);
  margin: 0;
}

/* ─── Sidebar widgets ───────────────────────────────────────────── */

.widget-area {
  padding: 0.5rem 1.75rem 2.5rem;
}

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-family: "Noto Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
  padding-bottom: 0.5rem;
  margin: 0 0 0.6rem;
}

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

.widget li {
  border-bottom: 1px solid rgba(26, 26, 26, 0.06);
  padding: 0.35rem 0;
}

.widget li a {
  font-family: "Noto Sans", sans-serif;
  font-size: 0.875rem;
  color: #1a1a1a;
}

/* ─── Main content ──────────────────────────────────────────────── */

.site-main {
  width: 100%;
  min-width: 0;
}

.site-content {
  background: #fff;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
  padding: 2rem 7.6923%;
  min-height: 100vh;
}

/* ─── Page header (list pages) ──────────────────────────────────── */

.page-header {
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.page-title {
  font-family: "Noto Sans", sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  margin: 0;
}

/* ─── Post entries (list view) ──────────────────────────────────── */

.post-entry {
  border-bottom: 2px solid rgba(26, 26, 26, 0.2);
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
}

.post-entry:last-of-type {
  border-bottom: none;
}

.entry-title {
  font-family: "Noto Sans", sans-serif;
  font-size: 1.733rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.entry-title a {
  color: #1a1a1a;
}

/* ─── Entry meta (single post header) ──────────────────────────── */

.entry-meta {
  font-family: "Noto Sans", sans-serif;
  font-size: 0.8rem;
  color: rgba(26, 26, 26, 0.7);
  margin-bottom: 1rem;
}

.entry-meta a {
  color: rgba(26, 26, 26, 0.7);
}

/* ─── Entry content ─────────────────────────────────────────────── */

.entry-content {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.entry-content a {
  text-decoration: underline;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: "Noto Sans", sans-serif;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.entry-content h1 { font-size: 1.6rem; }
.entry-content h2 { font-size: 1.35rem; }
.entry-content h3 { font-size: 1.15rem; }
.entry-content h4 { font-size: 1rem; }

.entry-content p {
  margin: 0 0 1.25rem;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-content blockquote {
  border-left: 4px solid #707070;
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: rgba(26, 26, 26, 0.75);
  font-style: italic;
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content pre {
  background: #f8f8f8;
  border: 1px solid #eaeaea;
  border-radius: 3px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1.5rem 0;
}

.entry-content code {
  font-family: "Inconsolata", "Courier New", monospace;
  font-size: 0.875em;
  background: #f8f8f8;
  border: 1px solid #eaeaea;
  border-radius: 2px;
  padding: 0.1em 0.3em;
}

.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 1em;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.5rem 1.5rem;
  padding: 0;
}

.entry-content li {
  margin-bottom: 0.35rem;
}

.entry-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
}

.entry-content hr {
  border: none;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  margin: 2rem 0;
}

/* ─── Responsive YouTube embeds ────────────────────────────────── */

.youtube-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  background: #000;
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── Entry footer (list view) ──────────────────────────────────── */

.entry-footer {
  font-family: "Noto Sans", sans-serif;
  font-size: 0.8rem;
  color: rgba(26, 26, 26, 0.7);
  margin-top: 0.75rem;
}

.entry-footer a {
  color: rgba(26, 26, 26, 0.7);
}

.more-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: #1a1a1a;
  text-decoration: none;
}

.more-link:hover {
  text-decoration: underline;
}

/* ─── Single post ───────────────────────────────────────────────── */

.post-single .entry-title {
  font-size: 1.733rem;
  margin-bottom: 0.5rem;
}

.post-single .entry-content {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

/* ─── Post navigation ───────────────────────────────────────────── */

.post-navigation {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-family: "Noto Sans", sans-serif;
  font-size: 0.85rem;
}

.nav-next {
  text-align: right;
}

/* ─── Pagination ────────────────────────────────────────────────── */

.pagination {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  padding-top: 1.5rem;
  font-family: "Noto Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.next-page {
  margin-left: auto;
}

/* ─── Footer ────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  padding: 1.5rem 7.6923%;
  font-family: "Noto Sans", sans-serif;
  font-size: 0.8rem;
  color: rgba(26, 26, 26, 0.7);
  background: #fff;
}

/* ─── Search widget & page ──────────────────────────────────────── */

.search-form {
  display: flex;
}

.search-input {
  font-family: "Noto Sans", sans-serif;
  font-size: 0.875rem;
  width: 100%;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(26, 26, 26, 0.2);
  border-radius: 2px;
  background: #f8f8f8;
  color: #1a1a1a;
  outline: none;
}

.search-input:focus {
  border-color: rgba(26, 26, 26, 0.5);
  background: #fff;
}

.search-form--page .search-input {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 2rem;
}

.search-result {
  border-bottom: 2px solid rgba(26, 26, 26, 0.2);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
}

.search-result:last-child {
  border-bottom: none;
}

.search-result-summary {
  font-size: 0.9rem;
  color: rgba(26, 26, 26, 0.7);
  margin: 0.4rem 0 0;
}

.search-no-results {
  color: rgba(26, 26, 26, 0.6);
  font-family: "Noto Sans", sans-serif;
}

/* ─── Tag list (taxonomy terms page) ───────────────────────────── */

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

.tag-list-item {
  font-family: "Noto Sans", sans-serif;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.06);
  break-inside: avoid;
}

.tag-count {
  color: rgba(26, 26, 26, 0.45);
  font-size: 0.8rem;
  margin-left: 0.25em;
}

/* ─── Responsive: two-column layout at 960px ────────────────────── */

@media screen and (min-width: 60em) {
  .sidebar {
    display: block;
    flex: 0 0 29.4118%;
    background: #fff;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }

  .site-main {
    flex: 1 1 70.5882%;
  }
}

/* Archive page */
.archive-listing {
  margin-top: 1rem;
}

.archive-year {
  margin-bottom: 2.5rem;
}

.archive-year-heading {
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
}

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

.archive-post-item {
  display: flex;
  gap: 1rem;
  padding: 0.2rem 0;
  line-height: 1.5;
}

.archive-post-date {
  color: var(--color-meta);
  font-size: 0.875rem;
  white-space: nowrap;
  min-width: 4.5rem;
  padding-top: 0.1rem;
}

@media screen and (min-width: 75em) {
  .site-content {
    padding: 2.5rem 10%;
  }

  .site-title {
    font-size: 2.133rem;
  }

  .entry-title {
    font-size: 2.6rem;
  }

  .post-single .entry-title {
    font-size: 2.6rem;
  }
}
