@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/*
 * =============================================================================
 * style.css - Dark Theme Stylesheet for blog.overt.org
 * =============================================================================
 *
 * A clean dark theme with light sans-serif text, inspired by daringfireball.net.
 *
 * Color scheme:
 *   - Background: #1a1a1a (dark gray)
 *   - Text: #e0e0e0 (light gray)
 *   - Links: #6cb4ee (soft blue)
 *   - Muted text: #888 (for dates, metadata)
 *
 * Layout:
 *   - Two-column: main content (flexible) + sidebar (250px)
 *   - Responsive: stacks vertically on mobile
 *
 * =============================================================================
 */

:root {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --link-color: #6cb4ee;
  --link-hover-color: #8ec8f6;
  --muted-color: #888;
  --border-color: #333;
  --code-bg: #2a2a2a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* =============================================================================
   Header
   ============================================================================= */

.site-header {
  margin-bottom: 40px;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
}

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

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

/* =============================================================================
   Layout - Two Column
   ============================================================================= */

.content-wrapper {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.main-content {
  flex: 1;
  min-width: 0; /* Prevents flex item from overflowing */
}

.sidebar {
  width: 90px;
  flex-shrink: 0;
}

/* =============================================================================
   Links
   ============================================================================= */

a {
  color: var(--link-color);
  text-decoration: none;
}

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

/* =============================================================================
   Posts (on homepage and single pages)
   ============================================================================= */

.post {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.post:last-child {
  border-bottom: none;
}

.post-header {
  margin-bottom: 20px;
}

.post-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

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

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

.single-post .post-title {
  font-size: 2rem;
}

.post-date {
  color: var(--muted-color);
  font-size: 0.9rem;
}

.post-content {
  margin-bottom: 20px;
}

.post-content p {
  margin-bottom: 1em;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1em 0;
}

.post-content figure {
  margin: 1.5em 0;
}

.post-content figure img {
  margin: 0;
}

.post-content figcaption {
  font-size: 0.9em;
  color: var(--muted-color);
  font-style: italic;
  margin-top: 0.5em;
}

/* WordPress alignment classes */
.post-content figure.aligncenter {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.post-content figure.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1em;
}

.post-content figure.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.post-content figure.alignnone {
  /* Default block display, no special alignment */
}

.post-content blockquote {
  border-left: 3px solid var(--border-color);
  margin: 1em 0;
  padding-left: 1em;
  color: var(--muted-color);
}

.post-content pre,
.post-content code {
  background-color: var(--code-bg);
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 0.9em;
}

.post-content pre {
  padding: 1em;
  overflow-x: auto;
  margin: 1em 0;
}

.post-content code {
  padding: 0.2em 0.4em;
}

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

.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

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

.post-content li {
  margin-bottom: 0.5em;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--muted-color);
}

/* =============================================================================
   Archives Sidebar
   ============================================================================= */

.archives-nav h3 {
  font-size: 1rem;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.archives-nav h3 a {
  color: var(--muted-color);
}

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

.archive-years li {
  padding: 3px 0;
}

.archive-years a {
  color: var(--text-color);
}

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

/* =============================================================================
   Archives Page (full listing)
   ============================================================================= */

.archive-year-section {
  margin-bottom: 40px;
}

.archive-year-section h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.archive-list {
  list-style: none;
}

.archive-list li {
  margin: 8px 0;
  display: flex;
  gap: 15px;
  align-items: baseline;
}

.archive-list time {
  color: var(--muted-color);
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: 50px;
}

/* =============================================================================
   Pagination
   ============================================================================= */

.pagination {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination-info {
  color: var(--muted-color);
  font-size: 0.9rem;
}

.pagination-prev.disabled,
.pagination-next.disabled {
  visibility: hidden;
}

/* =============================================================================
   Comments (archived from WordPress)
   ============================================================================= */

.archived-comments {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.comment {
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--code-bg);
  border-radius: 4px;
}

.comment-meta {
  font-size: 0.85rem;
  color: var(--muted-color);
  margin-bottom: 10px;
}

.comment-meta strong {
  color: var(--text-color);
}

/* =============================================================================
   Footer
   ============================================================================= */

.site-footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--muted-color);
  font-size: 0.85rem;
  text-align: center;
}

/* =============================================================================
   Video Embeds
   ============================================================================= */

.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1em 0;
}

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

/* Native video elements */
.post-content video {
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  background-color: #000;
}

/* =============================================================================
   Responsive Design
   ============================================================================= */

@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    order: 2;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
  }

  /* Show archives in a compact horizontal layout on mobile */
  .archive-years {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 15px;
  }

  .archive-years li {
    padding: 0;
  }
}
