/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.7;
  color: #222;
  background: #fff;
  margin: 0;
  padding: 0;
}

/* Wrapper */
.wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid #e8e8e8;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #222;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-title:hover { color: #555; }

.site-nav .page-link {
  color: #555;
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav .page-link:hover { color: #222; }

/* Post list (home) */
.home h2.post-list-heading {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

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

.post-list li {
  margin-bottom: 2rem;
}

.post-meta {
  font-size: 0.85rem;
  color: #888;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.post-list h3 { margin: 0.25rem 0 0.5rem; }

.post-link {
  font-size: 1.3rem;
  font-weight: 700;
  color: #222;
  text-decoration: none;
}

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

.post-excerpt {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

/* Post */
.post-header { margin-bottom: 2rem; }

.post-title {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.post-content h2 { font-size: 1.4rem; margin-top: 2.5rem; }
.post-content h3 { font-size: 1.15rem; margin-top: 2rem; }

.post-content a { color: #1a6bb5; }
.post-content a:hover { color: #0d4a82; }

.post-content blockquote {
  border-left: 4px solid #e8e8e8;
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  color: #555;
  font-style: italic;
}

.post-content code {
  background: #f5f5f5;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.875em;
}

.post-content pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* Responsive iframe wrapper */
.iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin: 2rem 0;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
}

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

/* Chart wrapper */
.chart-container {
  position: relative;
  width: 100%;
  margin: 2rem 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid #e8e8e8;
  padding: 1.5rem 0;
  margin-top: 3rem;
  font-size: 0.85rem;
  color: #888;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* Utility */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .post-title { font-size: 1.5rem; }
}

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #f0f0f0;
  color: #555;
  padding: 0.15em 0.6em;
  border-radius: 3px;
  text-transform: lowercase;
}

/* Articles page */
.articles-heading {
  font-size: 2rem;
  margin: 0 0 1.5rem;
}

.articles-search {
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #1a6bb5;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tag-filter {
  font-size: 0.8rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #f0f0f0;
  color: #555;
  border: 1px solid #ddd;
  padding: 0.25em 0.75em;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tag-filter:hover {
  background: #e0e0e0;
}

.tag-filter.active {
  background: #222;
  color: #fff;
  border-color: #222;
}

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

.article-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.article-item:last-child {
  border-bottom: none;
}

.no-results {
  color: #888;
  font-style: italic;
}
