:root {
  --bg: #f8fafc;
  --fg: #222;
  --accent: #4da9e2;
  --link: #126bb1;
  --card: #fff;
  --primary: #222;
  --surface: #fff;
  --gray: #666;
  --background: #f8fafc;
}

body.dark {
  --bg: #10151c;
  --fg: #f4f8fb;
  --accent: #4da9e2;
  --link: #74c7ff;
  --card: #181d23;
  --primary: #f4f8fb;
  --surface: #181d23;
  --gray: #aaa;
  --background: #10151c;
}

body {
  background: var(--bg);
  color: var(--fg);
  transition: background .3s, color .3s;
}

html, body {
  background: var(--bg); /* was var(--background), now consistent with variable */
  color: var(--fg);      /* was var(--primary) */
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 18px;
  margin: 0; padding: 0;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s;
}
a:hover, a:focus {
  color: var(--fg);
  text-decoration: underline;
}


.site-header,
.site-footer {
  background: var(--background);
  color: var(--gray);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.4rem;
}
.site-brand {
  font-weight: 600;
  font-size: 1.13rem;
  letter-spacing: 0.03em;
}
.site-brand a { color: var(--primary); }
.site-nav {
  display: flex;
  gap: 1.7em;
  font-size: 1.03rem;
  align-items: center;
}
.site-nav a { color: var(--primary); font-weight: 500; opacity: 0.92;}
.site-nav a:hover { color: var(--accent); opacity: 1; }
.nav-theme-toggle {
  font-size: 1.2em;
  opacity: 0.8;
  margin-left: 1em;
  cursor: pointer;
}

main {
  margin: 0 auto 3.5rem auto;
  max-width: 760px;
  min-height: 65vh;
  padding: 0 0 1.5rem 0;
}

.hero-block {
  margin-top: 2.4rem;
  text-align: center;
}

.hero-block h1 {
  font-size: 2.6rem;
  font-weight: 500;
  margin-bottom: 0.7rem;
  margin-top: 0;
  letter-spacing: -0.01em;
}

.hero-block .subtitle {
  font-size: 1.13rem;
  color: var(--gray);
  font-weight: 400;
  margin-bottom: 2.1rem;
  margin-top: 0;
}


.hero-image {
  width: 75%;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 6px 40px #c9ecf129;
  display: block;
  object-fit: cover;
  border-radius: 1.4em;
}

.hero-caption {
  font-size: 0.75rem;
  color: var(--gray);
  margin-bottom: 2.8rem;
  font-style: italic;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.6rem;
  margin-top: 2.7rem;
  letter-spacing: 0.01em;
  text-align: left;
}

.recent-list {
  margin: 0;
  padding: 0;
  list-style: none;
  margin-bottom: 2.2rem;
}
.recent-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-radius: 1em;
  padding: 1.05em 1.4em;
  margin-bottom: 1.05em;
  gap: 1.2em;
  box-shadow: 0 2px 14px #2221;
}
.recent-meta {
  flex: 1 1 70%;
}
.recent-list h2, .recent-list h3 {
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 0.32em 0;
}
.recent-date, .recent-tag {
  color: #888;
  font-size: 0.98em;
  margin-right: 1em;
}
.recent-image {
  width: 65px; height: 65px;
  object-fit: cover;
  border-radius: 0.9em;
  background: #d4eef8;
  flex-shrink: 0;
}

.view-more-btn {
  display: block;
  margin: 1.5em auto 0 auto;
  padding: 0.8em 2.2em;
  border: none;
  border-radius: 2em;
  background:var(--bg);
  color: var(--gray);
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 8px #eee;
  transition: background 0.17s, color 0.16s;
  text-align: center;
}
.view-more-btn:hover, .view-more-btn:focus {
  background: var(--accent);
  color: var(--card);
  outline: none;
}

.site-footer {
  padding: 2.5rem 0 2rem 0;
  background: var(--background);
  color: #999;
  font-size: 1rem;
  max-width: 900px;
  margin: 0 auto;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2em;
  flex-wrap: wrap;
  margin-bottom: 0.9em;
}
.footer-links a {
  color: #999;
  margin-left: 1.2em;
  font-size: 0.97em;
}
.footer-links a:hover { color: var(--accent); }
.footer-row-bottom {
  justify-content: flex-start;
  gap: 2em;
  font-size: 0.97em;
}

@media (max-width: 800px) {
  .hero-block h1 { font-size: 2rem; }
  main { max-width: 97vw; }
  .nav-row { max-width: 97vw; }
}

.recent-meta-row {
  display: flex;
  gap: 1em;
  align-items: center;
  font-size: 1em;
  margin-bottom: 0.18em;
}

.recent-date, .recent-tag {
  color: #888;
  font-size: 0.98em;
  margin-right: 0;
}

.large-image {
  width: 96px;
  height: 96px;
  border-radius: 1.2em;
}

.post-hero-image {
  margin: 2rem auto 1.5rem auto;
  text-align: center;
}

.post-hero-image img {
  max-width: 600px;   /* Limits width to 600px */
  width: 100%;        /* Responsive: never exceeds container */
  height: auto;
  border-radius: 1.1em;
  box-shadow: 0 6px 32px #c9ecf129;
  display: block;
  margin: 0 auto;
}

.footer-links svg {
  width: 1.3em;
  height: 1.3em;
  vertical-align: middle;
  fill: #999;
  margin-right: 0.4em;
  transition: fill 0.15s;
}
.footer-links a:hover svg { fill: var(--accent); }

.pagination {
  display: flex;
  gap: 2em;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  font-size: 1.1em;
}
.pagination a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 0.3em 1em;
  border-radius: 1em;
  transition: background .12s;
}
.pagination a:hover {
  background: #eee;
}

.card { background: var(--card); }
a { color: var(--link); }