/* The Hot Mess - CSS
   Colors and fonts set via CSS custom properties in base.njk from site.json
*/
:root { --max-width: 1200px; --content-width: 720px; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-sans); background-color: var(--color-background); color: var(--color-text); line-height: 1.6; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: 16px 0; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 60px; width: auto; }
.logo-text { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--color-primary); text-decoration: none; }
.main-nav { display: flex; gap: 32px; }
.main-nav a { color: var(--color-text); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--color-primary); }

/* Hero */
.hero { padding: 80px 0; text-align: center; }
.hero h1 { font-family: var(--font-serif); font-size: 3rem; color: var(--color-primary); margin-bottom: 16px; }
.tagline { font-size: 1.25rem; color: var(--color-text-muted); max-width: 600px; margin: 0 auto 40px; }
.subscribe-form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; max-width: 480px; margin: 0 auto; }
.subscribe-form input[type="email"] { flex: 1; min-width: 240px; padding: 14px 20px; border: 2px solid var(--color-border); border-radius: 8px; font-size: 1rem; font-family: var(--font-sans); background: var(--color-surface); color: var(--color-text); transition: border-color 0.2s; }
.subscribe-form input[type="email"]:focus { outline: none; border-color: var(--color-primary); }
.subscribe-form button { padding: 14px 32px; background: var(--color-primary); color: #1a1a1a; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.subscribe-form button:hover { background: var(--color-primary-dark); }
.subscribe-form button:disabled { opacity: 0.7; cursor: not-allowed; }
.subscribe-note { margin-top: 12px; font-size: 0.875rem; color: var(--color-text-muted); }

/* Posts Section */
.posts-section { padding: 60px 0; }
.posts-section h2 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 32px; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 32px; }
.post-card { background: var(--color-surface); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition: transform 0.2s, box-shadow 0.2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.post-card img { width: 100%; height: 200px; object-fit: cover; }
.post-card-content { padding: 24px; }
.post-card h3 { font-family: var(--font-serif); font-size: 1.25rem; margin-bottom: 8px; color: var(--color-primary); }
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.post-card .excerpt { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 12px; }
.post-card .meta { font-size: 0.85rem; color: var(--color-text-muted); }
.no-posts { grid-column: 1 / -1; text-align: center; color: var(--color-text-muted); padding: 40px; }
.view-all { text-align: center; margin-top: 40px; }
.btn { display: inline-block; padding: 12px 24px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.btn-outline { border: 2px solid var(--color-primary); color: var(--color-primary); background: transparent; }
.btn-outline:hover { background: var(--color-primary); color: #1a1a1a; }

/* Footer */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 32px 0; margin-top: 60px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-content p { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-content a { color: var(--color-primary); text-decoration: none; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--color-text-muted); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-primary); }

/* Post Page */
.post-header { padding: 60px 0 40px; text-align: center; }
.post-header h1 { font-family: var(--font-serif); font-size: 2.5rem; color: var(--color-primary); max-width: var(--content-width); margin: 0 auto 16px; }
.post-meta { color: var(--color-text-muted); }
.post-meta .separator { margin: 0 8px; }
.post-featured-image { max-width: 900px; margin: 0 auto 40px; padding: 0 24px; }
.post-featured-image img { width: 100%; border-radius: 12px; }
.post-content { max-width: var(--content-width); margin: 0 auto; padding: 0 24px 60px; }
.post-content p { margin-bottom: 1.5em; font-size: 1.1rem; line-height: 1.8; }
.post-content h2 { font-family: var(--font-serif); font-size: 1.75rem; margin: 2em 0 0.75em; color: var(--color-primary); }
.post-content h3 { font-family: var(--font-serif); font-size: 1.35rem; margin: 1.5em 0 0.5em; }
.post-content ul, .post-content ol { margin-bottom: 1.5em; padding-left: 1.5em; }
.post-content li { margin-bottom: 0.5em; }
.post-content blockquote { border-left: 4px solid var(--color-primary); padding-left: 24px; margin: 2em 0; font-style: italic; color: var(--color-text-muted); }
.post-content a { color: var(--color-primary); }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5em 0; }
.post-content code { background: var(--color-border); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.post-content pre { background: #1a1a1a; color: var(--color-text); padding: 20px; border-radius: 8px; overflow-x: auto; margin: 1.5em 0; }
.post-content pre code { background: none; padding: 0; }

/* Post Tags */
.post-tags { max-width: var(--content-width); margin: 0 auto; padding: 0 24px 24px; }
.tag { display: inline-block; padding: 4px 12px; background: var(--color-border); color: var(--color-text-muted); border-radius: 20px; text-decoration: none; font-size: 0.85rem; margin-right: 8px; margin-bottom: 8px; transition: all 0.2s; }
.tag:hover { background: var(--color-primary); color: #1a1a1a; }

/* Share Buttons */
.share-buttons { display: flex; gap: 12px; justify-content: center; padding: 32px 0; border-top: 1px solid var(--color-border); max-width: var(--content-width); margin: 40px auto 0; }
.share-btn { padding: 10px 20px; border-radius: 6px; border: none; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: opacity 0.2s; }
.share-btn:hover { opacity: 0.85; }
.share-btn.twitter { background: #1DA1F2; color: white; }
.share-btn.facebook { background: #4267B2; color: white; }
.share-btn.linkedin { background: #0077B5; color: white; }
.share-btn.copy { background: var(--color-border); color: var(--color-text); }

/* Like Button */
.like-section { text-align: center; padding: 24px 0; }
.like-btn { background: none; border: 2px solid var(--color-primary); color: var(--color-primary); padding: 12px 24px; border-radius: 30px; font-size: 1rem; cursor: pointer; transition: all 0.2s; }
.like-btn:hover, .like-btn.liked { background: var(--color-primary); color: #1a1a1a; }
.like-count { margin-top: 8px; color: var(--color-text-muted); font-size: 0.9rem; }

/* Comments */
.comments-section { max-width: var(--content-width); margin: 0 auto; padding: 40px 24px; }
.comments-section h3 { font-family: var(--font-serif); margin-bottom: 24px; }
.comment-form input[type="text"] { width: 100%; padding: 12px 16px; border: 2px solid var(--color-border); border-radius: 8px; font-family: var(--font-sans); font-size: 1rem; margin-bottom: 12px; background: var(--color-surface); color: var(--color-text); }
.comment-form input[type="text"]:focus { outline: none; border-color: var(--color-primary); }
.comment-form textarea { width: 100%; padding: 16px; border: 2px solid var(--color-border); border-radius: 8px; font-family: var(--font-sans); font-size: 1rem; resize: vertical; min-height: 120px; margin-bottom: 12px; background: var(--color-surface); color: var(--color-text); }
.comment-form textarea:focus { outline: none; border-color: var(--color-primary); }
.comment-form button { padding: 12px 24px; background: var(--color-primary); color: #1a1a1a; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.comment-form button:hover { background: var(--color-primary-dark); }
.comment-form button:disabled { opacity: 0.7; cursor: not-allowed; }
.comments-list { margin-top: 32px; }
.comment { padding: 20px; background: var(--color-surface); border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--color-border); }
.comment-author { font-weight: 600; margin-bottom: 4px; }
.comment-date { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 12px; }
.comment-text { line-height: 1.6; }

/* Archive Page */
.archive-section { padding: 60px 0; }
.archive-header { margin-bottom: 40px; }
.archive-header h1 { font-family: var(--font-serif); font-size: 2.5rem; color: var(--color-primary); margin-bottom: 12px; }
.archive-description { color: var(--color-text-muted); font-size: 1.1rem; }
.posts-list { max-width: var(--content-width); }
.post-list-item { display: flex; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--color-border); }
.post-list-item:first-child { padding-top: 0; }
.post-list-meta { flex-shrink: 0; width: 140px; color: var(--color-text-muted); font-size: 0.9rem; }
.post-list-content h2 { font-family: var(--font-serif); font-size: 1.35rem; margin-bottom: 8px; }
.post-list-content h2 a { color: var(--color-text); text-decoration: none; }
.post-list-content h2 a:hover { color: var(--color-primary); }
.post-list-content p { color: var(--color-text-muted); font-size: 0.95rem; }

/* Page Content */
.page-content { padding: 60px 0; }
.page-header { margin-bottom: 40px; }
.page-header h1 { font-family: var(--font-serif); font-size: 2.5rem; color: var(--color-primary); }
.page-body { max-width: var(--content-width); }
.page-body p { margin-bottom: 1.5em; font-size: 1.1rem; line-height: 1.8; }
.page-body h2 { font-family: var(--font-serif); font-size: 1.75rem; margin: 2em 0 0.75em; color: var(--color-primary); }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.25rem; }
  .tagline { font-size: 1.1rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .main-nav { gap: 20px; }
  .site-header .container { flex-direction: column; gap: 16px; }
  .post-header h1 { font-size: 2rem; }
  .share-buttons { flex-wrap: wrap; }
  .post-list-item { flex-direction: column; gap: 8px; }
  .post-list-meta { width: auto; }
}