:root {
  --bg: #ffffff;
  --bg-head: #303538;
  --text: #3a4145;
  --text-bright: #ffffff;
  --text-title: #2e2e2e;
  --text-muted: #9eabb3;
  --link-hover: #57a3e8;
  --rule: #ebf2f6;
  --footer-bg: #f7fafb;
  --footer-text: #bbc7cc;
  --max: 700px;
}

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

html {
  font-size: 62.5%;
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 1.8rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--link-hover);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Nav —— */
.main-navigation {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  width: 100%;
  padding: 0.8rem 0;
  font-family: 'Open Sans', sans-serif;
}

.main-navigation .nav-inner {
  width: 90%;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
}

.main-navigation ul {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation a {
  display: block;
  padding: 1.2rem 2rem;
  text-decoration: none;
  color: var(--text-bright);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.main-navigation a:hover,
.main-navigation a[aria-current='page'] {
  color: var(--text-bright);
  background: rgba(0, 0, 0, 0.35);
}

/* —— Site head (Casper hero) —— */
.site-head {
  position: relative;
  display: table;
  width: 100%;
  min-height: 280px;
  padding: 8% 0 6%;
  text-align: center;
  color: var(--text-bright);
  background: var(--bg-head) no-repeat center center;
  background-size: cover;
  border-bottom: 1px solid var(--rule);
}

.site-head::after {
  position: absolute;
  bottom: -5px;
  left: 50%;
  display: block;
  width: 7px;
  height: 7px;
  margin-left: -5px;
  content: '';
  border: 1px solid #e7eef2;
  border-radius: 100%;
  background: #fff;
  box-shadow: #fff 0 0 0 5px;
}

.site-head-content {
  position: relative;
  width: 90%;
  max-width: var(--max);
  margin: 0 auto;
}

.blog-logo {
  display: block;
  margin: 0 auto;
}

.blog-logo img {
  display: block;
  max-height: 100px;
  width: auto;
  margin: 0 auto;
}

.social-icons {
  margin: 1.6rem 0 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  color: var(--text-bright);
  text-decoration: none;
}

.social-icons a:hover {
  color: var(--link-hover);
}

.social-icons svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: currentColor;
}

.blog-title {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 700;
  margin: 1.2rem 0 0.4rem;
  letter-spacing: -1px;
  line-height: 1.1;
}

.blog-title a {
  text-decoration: none;
  color: var(--text-bright);
}

.blog-title a:hover {
  color: var(--link-hover);
}

.blog-description {
  font-family: 'Noto Serif', serif;
  font-size: clamp(1.5rem, 2.5vw, 1.8rem);
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  color: var(--text-bright);
  opacity: 0.95;
}

/* —— Content —— */
.content {
  width: 90%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 0 2rem;
}

article.post {
  margin: 0 0 5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--rule);
}

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

.post-meta {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.3rem;
  display: block;
  margin: 0 0 0.6rem;
  color: var(--text-muted);
}

.post-meta a {
  text-decoration: none;
  color: var(--text-muted);
}

.post-meta a:hover {
  text-decoration: underline;
  color: var(--link-hover);
}

.post-title {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.6rem;
  letter-spacing: -0.5px;
  color: var(--text-title);
}

.post-title a {
  text-decoration: none;
  color: var(--text-title);
}

.post-title a:hover {
  color: var(--link-hover);
}

.post-content {
  font-size: 1.8rem;
  line-height: 1.7;
  color: var(--text);
}

.post-content p {
  margin: 0 0 1.4em;
}

.post-content a {
  color: var(--link-hover);
  text-decoration: underline;
}

.post-content strong {
  color: var(--text-title);
  font-weight: 700;
}

.post-content em {
  font-style: italic;
}

.post-content blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 1.6em;
  border-left: 3px solid var(--rule);
  color: var(--text-muted);
  font-style: italic;
}

.post-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.4em 0;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

.post-footer {
  margin-top: 2.4rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.3rem;
  color: var(--text-muted);
}

.post-footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin-right: 0.8rem;
}

.post-footer a:hover {
  color: var(--link-hover);
}

/* —— Pagination —— */
.pagination {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 4rem;
  color: var(--text-muted);
}

.pagination a {
  text-decoration: none;
  color: var(--text-muted);
}

.pagination a:hover {
  color: var(--link-hover);
}

/* —— Sidebar widgets —— */
.site-aside {
  width: 90%;
  max-width: var(--max);
  margin: 0 auto 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.widget {
  margin-bottom: 3rem;
}

.widget-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-title);
  margin: 0 0 1.2rem;
}

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

.widget li {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.4rem;
  margin: 0 0 0.6rem;
  color: var(--text-muted);
}

.widget a {
  text-decoration: none;
  color: var(--text-muted);
}

.widget a:hover {
  color: var(--link-hover);
}

.category-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
  width: 100%;
}

.category-col {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 600px) {
  .category-columns {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

/* —— Footer —— */
.site-footer {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.2rem;
  line-height: 1.7;
  margin: 0;
  padding: 3.5rem 0;
  text-align: center;
  color: var(--footer-text);
  border-top: 1px solid var(--rule);
  background: var(--footer-bg);
}

.site-footer a {
  color: var(--footer-text);
  text-decoration: underline;
}

.site-footer a:hover {
  color: #50585d;
}

/* —— Mobile —— */
.site-head.compact {
  min-height: 200px;
  padding: 5% 0 4%;
}

.site-head.compact .blog-logo img {
  max-height: 72px;
}

.back {
  margin: 0 0 2rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.4rem;
}

.back a {
  color: var(--text-muted);
  text-decoration: none;
}

.back a:hover {
  color: var(--link-hover);
}

@media (max-width: 600px) {
  body {
    font-size: 1.6rem;
  }

  .site-head {
    padding: 18% 0 12%;
    min-height: 220px;
  }

  .main-navigation a {
    padding: 1rem 1.4rem;
    font-size: 1.3rem;
  }

  .post-content {
    font-size: 1.6rem;
  }
}
