/*
Theme Name: Middling Industries
Theme URI: https://middling.industries
Author: Mike Fourcher
Description: A clean, editorial personal blog theme for Middling Industries — The World Leader In Mediumness.
Version: 1.0
License: GNU General Public License v2 or later
Tags: blog, personal, two-column, custom-sidebar
*/

/* =============================================
   CSS Variables & Base Reset
   ============================================= */
:root {
  --ink: #1a1a18;
  --paper: #f5f2eb;
  --accent: #c0392b;
  --accent-light: #e8d5d3;
  --muted: #7a7568;
  --border: #d8d3c8;
  --sidebar-bg: #eeeae0;
  --link: #2c4a7c;
  --link-hover: #c0392b;

  --font-display: 'Bevan', Georgia, serif;
  --font-body: 'Cardo', Georgia, serif;
  --font-ui: 'DM Sans', system-ui, sans-serif;

  --max-width: 1100px;
  --content-width: 680px;
  --sidebar-width: 280px;
  --gap: 2rem;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
a:hover { color: var(--link-hover); }

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

/* =============================================
   Google Fonts Import
   ============================================= */

/* =============================================
   Site Header
   ============================================= */
.site-header {
  border-bottom: 3px solid var(--ink);
  padding: 1.5rem 0 1rem;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-branding { line-height: 1; }

.site-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.site-title:hover { color: var(--accent); }

.site-tagline {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* =============================================
   Navigation
   ============================================= */
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* =============================================
   Layout Wrapper
   ============================================= */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: calc(var(--gap) * 2);
  align-items: start;
}

.content-area { min-width: 0; }

/* =============================================
   Featured Post (Latest)
   ============================================= */
.featured-post {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--ink);
}

.featured-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.featured-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.featured-post .post-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}

.featured-post .post-category {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 0.25rem;
  display: inline-block;
}
.featured-post .post-category:hover { color: var(--accent); }

.featured-post .post-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}
.featured-post .post-title a {
  color: var(--ink);
  text-decoration: none;
}
.featured-post .post-title a:hover { color: var(--accent); }

.featured-post .post-meta {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.featured-post .post-excerpt {
  font-size: 1rem;
  line-height: 1.75;
  color: #333330;
}

.featured-post .read-more {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.featured-post .read-more:hover { color: var(--accent); }

/* =============================================
   Post List (Older Posts)
   ============================================= */
.posts-list-section h2 {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.posts-list-section h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

.posts-list li {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.post-list-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.posts-list li a {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
  transition: color 0.15s;
}
.posts-list li a:hover { color: var(--accent); }

.posts-list .post-date {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-list-excerpt {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}

/* =============================================
   Newsletter CTA
   ============================================= */
.newsletter-cta {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.newsletter-cta p {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  margin: 0;
}

.newsletter-cta a {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--paper);
  text-decoration: none;
  border: 1.5px solid var(--paper);
  padding: 0.5rem 1rem;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.newsletter-cta a:hover {
  background: var(--paper);
  color: var(--ink);
}

/* =============================================
   Sidebar
   ============================================= */
.sidebar {
  position: sticky;
  top: 5rem;
}

.sidebar-widget {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-widget:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-widget h3 {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--ink);
}

/* Social links */
.social-links { list-style: none; }
.social-links li { margin-bottom: 0.2rem; }
.social-links a {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.social-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.social-links .icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

/* Link list */
.link-list { list-style: none; }
.link-list li { margin-bottom: 0.2rem; }
.link-list a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.3;
}

/* Web projects */
.projects-list { list-style: none; }
.projects-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.projects-list li:last-child { border-bottom: none; }
.projects-list a {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  display: block;
}
.projects-list a:hover { color: var(--accent); }
.projects-list .project-desc {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.05rem;
  font-style: italic;
}

/* =============================================
   Single Post Content
   ============================================= */
.post-content {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 5px;
}

.post-content img {
  margin-top: 5px;
  max-width: 100%;
  height: auto;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font-display);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

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

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: var(--muted);
}

/* =============================================
   Newsletter Form (sidebar)
   ============================================= */
.newsletter-blurb {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
  font-style: italic;
}

.eo-form input[type="email"] {
  width: 100%;
  padding: 0.45rem 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  border: 1.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  margin-bottom: 0.4rem;
  outline: none;
  transition: border-color 0.15s;
}
.eo-form input[type="email"]:focus {
  border-color: var(--ink);
}
.eo-form button {
  width: 100%;
  padding: 0.45rem 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.eo-form button:hover { background: var(--accent); }
.eo-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.eo-message {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  margin-top: 0.4rem;
  min-height: 1rem;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
  border-top: 2px solid var(--ink);
  padding: 1.5rem 0;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-inner p {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--muted);
}
.footer-inner a {
  color: var(--muted);
  font-size: 0.72rem;
}
.footer-inner a:hover { color: var(--accent); }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  .site-main {
    grid-template-columns: 1fr;
    gap: var(--gap);
  }
  .sidebar { position: static; }
  .featured-post .post-title { font-size: 1.5rem; }
  .header-inner { flex-direction: column; gap: 0.75rem; }
}
