/*
 * Clean, literary blog styles
 * Minimalist, text-focused, readable
 */

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

html {
  font-size: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Crimson Text', Georgia, serif;
  font-weight: 400;
  line-height: 1.7;
  color: #2c2c2c;
  background: #fafafa;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin: 0;
}

a {
  color: #1a5f7a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

blockquote {
  margin: 1.5em 0;
  padding: 0.5em 0 0.5em 1.5em;
  border-left: 3px solid #ddd;
  color: #555;
  font-style: italic;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em 0;
}

/* Image alignment */
.post-content img.align-left {
  float: left;
  margin: 0.5em 1.5em 1em 0;
}
.post-content img.align-right {
  float: right;
  margin: 0.5em 0 1em 1.5em;
}
.post-content img.align-center {
  display: block;
  float: none;
  margin: 1.5em auto;
}

/* Figure and caption styles */
.post-content figure {
  margin: 1.5em 0;
  padding: 0;
}
.post-content figure.align-left {
  float: left;
  margin: 0.5em 1.5em 1em 0;
}
.post-content figure.align-right {
  float: right;
  margin: 0.5em 0 1em 1.5em;
}
.post-content figure.align-center {
  display: table;
  margin: 1.5em auto;
}
.post-content figure img {
  display: block;
  margin: 0;
}
.post-content figcaption {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
  text-align: center;
  margin-top: 0.5em;
}

/* Clear floats after post content */
.post-content::after {
  content: "";
  display: table;
  clear: both;
}

/* Layout */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Homepage two-column layout */
.home-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  width: 90vw;
  max-width: 1100px;
  margin: 0 auto;
  margin-left: 50%;
  transform: translateX(-50%);
  align-items: start;
}

.home-layout .posts-column {
  min-width: 0;
}

.home-layout .sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-panel {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.about-panel h3,
.links-panel h3 {
  margin-top: 0;
  font-family: 'Chau Philomene One', sans-serif;
  font-size: 1.2rem;
  font-weight: normal;
  margin-bottom: 1rem;
}

.subscribe-panel {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.subscribe-panel h3 {
  margin-top: 0;
  font-family: 'Chau Philomene One', sans-serif;
  font-size: 1.2rem;
  font-weight: normal;
  margin-bottom: 0.5rem;
}

.subscribe-panel p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.sidebar-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-subscribe-form input {
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.sidebar-subscribe-form input:focus {
  outline: none;
  border-color: #1a5f7a;
}

.sidebar-subscribe-form button {
  padding: 0.6rem 1rem;
  background: #1a5f7a;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
}

.sidebar-subscribe-form button:hover {
  background: #15516a;
}

.sidebar-subscribe-message {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.links-panel {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

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

.links-panel li {
  margin-bottom: 0.6rem;
}

.links-panel a {
  color: #1a5f7a;
  font-size: 0.9rem;
  line-height: 1.3;
  display: inline-block;
}

.home-layout .posts-list {
  margin-top: 0;
}

.home-layout .posts-list .post-preview:first-child {
  padding-top: 0;
}

.home-layout .posts-list .post-preview:first-child .post-title {
  margin-top: 0;
}

.about-content {

}

.about-headshot {
  width: 80px;
  height: auto;
  border-radius: 4px;
  float: left;
  margin: 0 1rem 0.5rem 0;
}

.about-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #444;
}

@media (max-width: 800px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .about-panel {
    position: static;
    order: -1;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
  }
}

/* Header */
.site-header {
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid #eee;
  margin-bottom: 3rem;
}

.site-title {
  font-family: 'Chau Philomene One', sans-serif;
  font-size: 2.75rem;
  color: #2c2c2c;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-title:hover {
  text-decoration: none;
  color: #1a5f7a;
}

.site-tagline {
  margin: 0.5rem 0 0;
  color: #666;
  font-size: 1rem;
  font-style: italic;
}

.site-nav {
  margin-top: 1.5rem;
}

.site-nav a {
  margin: 0 1rem;
  color: #555;
  font-size: 0.9rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

.site-nav a:hover {
  color: #1a5f7a;
}

/* Main content */
.site-main {
  min-height: 60vh;
  padding-bottom: 3rem;
}

/* Posts list (homepage) */
.posts-list {
  margin-top: 1rem;
}

.post-preview {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #eee;
}

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

.post-preview .post-title {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

.post-preview .post-title a {
  color: #2c2c2c;
}

.post-preview .post-title a:hover {
  color: #1a5f7a;
}

.post-date {
  display: block;
  color: #888;
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.post-excerpt {
  color: #555;
  margin-bottom: 0.75rem;
}

.post-tags {
  margin-top: 0.5rem;
}

.tag {
  display: inline-block;
  background: #f0f0f0;
  color: #555;
  padding: 0.2em 0.6em;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  text-decoration: none;
}

.tag:hover {
  background: #e0e0e0;
  text-decoration: none;
}

/* Single post */
.post-full {
  margin-bottom: 3rem;
}

.post-header {
  margin-bottom: 2rem;
  text-align: center;
}

.post-header .post-title {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.post-content {
  margin-bottom: 2rem;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  margin-top: 2em;
}

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

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

.post-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.post-footer .post-tags span {
  color: #888;
  margin-right: 0.5rem;
}

.post-nav {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

/* Comments section */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.comments-section h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

/* Archive */
.archive-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.archive-item {
  display: flex;
  align-items: baseline;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.archive-date {
  flex-shrink: 0;
  width: 140px;
  color: #888;
  font-size: 0.85rem;
}

.archive-item a {
  color: #2c2c2c;
}

/* Footer */
.site-footer {
  border-top: 1px solid #eee;
  padding: 3rem 0;
  background: #fff;
}

.newsletter-signup {
  max-width: 400px;
  margin: 0 auto 2rem;
  text-align: center;
}

.newsletter-signup h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.newsletter-signup p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

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

.subscribe-form input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
}

.subscribe-form input:focus {
  outline: none;
  border-color: #1a5f7a;
}

.subscribe-form button {
  padding: 0.6rem 1.2rem;
  background: #1a5f7a;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
}

.subscribe-form button:hover {
  background: #15516a;
}

.subscribe-message {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.copyright {
  text-align: center;
  color: #999;
  font-size: 0.85rem;
  margin: 0;
}

/* Error page */
.error-page {
  text-align: center;
  padding: 3rem 0;
}

.error-page h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.error-page p {
  color: #666;
  margin-bottom: 1.5rem;
}

/* No posts message */
.no-posts {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 3rem 0;
}

/* Responsive */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .site-header {
    padding: 2rem 0 1.5rem;
    margin-bottom: 2rem;
  }

  .post-preview {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }

  .archive-item {
    flex-direction: column;
  }

  .archive-date {
    width: auto;
    margin-bottom: 0.25rem;
  }

  .subscribe-form {
    flex-direction: column;
  }
}
