@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --bg: #fff;
  --text: #111;
  --muted: #777;
  --muted-link: #4444443d;
  --line: #e6e6e6;
  --card: #fafafa;
  --accent: #14205c;
  --muted-bg: #506dff1f;
}

html[data-theme="dark"] {
  --bg: #0d0f14;
  --text: #f4f4f4;
  --muted: #a5a5a5;
  --muted-link: #ebe6e634;
  --line: #2b2f3a;
  --card: #151923;
  --accent: #8ea2ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Merriweather", serif;
  font-size: 18px;
  line-height: 1.65;
}

.site-header {
  min-height: 72px;
  height: auto;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 42px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  color: var(--accent);
  text-decoration: none;
}

.logo-img {
  height: 55px;
  max-width: 190px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}

.site-header a,
.site-header button {
  color: var(--text);
  background: transparent;
  border: 0;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.site-header a:hover,
.site-header button:hover {
  color: var(--accent);
  background: var(--muted-bg);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  padding: 6px 11px;
  cursor: pointer;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px;
}

.post-card {
  margin-bottom: 62px;
}

.post-title {
  font-size: 24px;
  line-height: 1.3;
}

.post-title:before {
  content: "#";
  color: #b7c0d1;
  margin-right: 4px;
}

.post-title a {
  color: var(--text);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--accent);
  background-color: var(--muted-bg);
  text-decoration: none;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
}

.excerpt {
  max-width: 980px;
}

.read-more,
.btn {
  background: var(--muted-link);
  color: var(--text);
  padding: 3px 8px;
  text-decoration: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.read-more:hover,
.btn:hover {
  background: var(--muted-bg);
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}

.sidebar {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}

.tag {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  text-decoration: none;
  margin-right: 8px;
}

.article {
  max-width: 980px;
}

.article h1 {
  font-size: 32px;
}

.article img {
  max-width: 100%;
  height: auto;
}

.cover {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.comment {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.form-row {
  margin: 14px 0;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 150px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

.notice {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}

.pagination a {
  margin-right: 12px;
}

.site-footer {
  width: 100%;
  border-top: 1px solid var(--line);
  padding: 18px 42px;
  background: var(--bg);
  color: var(--muted);
  text-align: center;
  z-index: 999;
}

.tox-tinymce {
  border: 1px solid var(--line) !important;
}

pre {
  background: var(--card);
  padding: 16px;
  overflow: auto;
}

blockquote {
  border-left: 4px solid var(--line);
  padding-left: 18px;
  color: var(--muted);
}

@media (max-width: 800px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding: 10px 18px;
    flex-wrap: wrap;
  }

  .logo-img {
    height: 48px;
    max-width: 160px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a,
  .site-nav button {
    width: 100%;
    text-align: left;
    padding: 8px 0;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-left: 0;
    padding-left: 0;
  }

  .container {
    padding: 36px 18px;
  }

  .post-title {
    font-size: 22px;
  }

  .article h1 {
    font-size: 28px;
  }

  .site-footer {
    padding: 16px 18px;
    font-size: 14px;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}