/* ===============================
   BASE (GLOBAL STYLES)
================================== */

:root {
  --space: clamp(1rem, 2vw, 2rem);
  --gap: clamp(1.5rem, 4vw, 3rem);
  --radius: 12px;
  --content-width: 70ch;

  --shadow-soft: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-strong: 0 4px 20px rgba(0,0,0,0.08);
}

/* Body */
.site-wrapper {
  margin: 0;
  max-width: 1350px;
  margin: 0 auto;
  font-family: 'Roboto Serif', serif;
  line-height: 1.8;
  color: #444;
}

body.site-body {
  background: #f4f7f9;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* Header */
.site-header {
  max-width: 1350px;
  margin: 0 auto;
  min-height: 60px;
  background: #fff;
  border-bottom: 1px solid #eee;
  justify-content: space-between;
}

.site-header .container {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Typography */
h1, h2, h3 {
  color: #1a237e;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

p {
  margin: 1rem 0;
  font-size: 18px;
  font-family: 'Roboto Serif', serif;
  line-height: 1.8;
  color: #444;
}

p + p {
  margin-top: 1rem;
}

h2 + p,
h3 + p,
h4 + p {
  margin-top: 0.5rem;
}

/* Lists */
ol {
  padding-left: 1.2rem;
}

ol li {
  margin-bottom: 0.5rem;
  font-size: 18px;
  font-family: 'Roboto Serif', serif;
  line-height: 1.8;
}

ul {
  margin: 1.5rem 0;
  padding-left: 1.2rem;
}

ul li {
  margin-bottom: 0.5rem;
  font-size: 18px;
  font-family: 'Roboto Serif', serif;
  line-height: 1.8;
}

/* Content rhythm */
.post-content {
  max-width: 70ch;
  margin: 0 auto;
}

hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid #ccc;
}

.post-body > * + * {
  margin-top: 1.2rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout */
.site-wrapper {
  max-width: 1350px;
  margin: 0 auto;
  padding: var(--space);
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .site-wrapper {
    grid-template-columns: 280px 1fr;
  }
}

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

/* Sidebar */
.sidebar {
  position: sticky;
  width: 100%;
  max-width: 280px;
  align-self: start;
  background: #fff;
  padding: var(--space);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* Content box */
.content-box {
  background: #fff;
  padding: var(--space);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  width: 100%;
}

/* Mobile overrides */
@media (max-width: 900px) {
  .sidebar {
    position: relative;
  }
  .content-box {
    max-width: 100%;
  }
}

/* Misc */
* {
  box-sizing: border-box;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}
.sidebar-author-photo {
  width: 100%;
  max-width: 160px;
  border-radius: 50%;
  display: block;
  margin: 0 auto var(--space);
  box-shadow: var(--shadow-soft);
}

.sidebar-tagline {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
  text-align: center;
}

.sidebar-search-form {
  display: flex;
  gap: 0.5rem;
}

.sidebar-search-input {
  flex: 1;
  padding: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid #ccc;
}

.sidebar-search-button {
  padding: 0.5rem 1rem;
  background: #1a237e;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;}

.sidebar-search-button:hover {
  background: #263959;
}
/* Homepage Grid */
.home-grid {
  display: grid;
  gap: var(--gap);
  max-width: 1350px;
  margin: 0 auto;}

@media (min-width: 900px) {
  .home-grid {    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));  }
}

/* Card */
.home-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Thumbnail */
.home-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* Content */
.home-card-content {
  padding: var(--space);
}

.home-card-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  color: #1a237e;
}

.home-card-title a {
  text-decoration: none;
  color: inherit;
}

.home-card-title a:hover {
  text-decoration: underline;
}

.home-card-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.8rem;
}

.home-card-excerpt {
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
}
