/*
Theme Name: Jonathan
Theme URI: https://jonathan-milton.com
Author: Jonathan
Description: A minimalist personal theme for writing, music, and art. White background, clean typography, content-forward.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jonathan
*/

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #222;
  background: #fff;
}

a {
  color: #1a4d6e;
  text-decoration: underline;
}

a:hover {
  color: #222;
}

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

/* ─── Layout ─────────────────────────────────────────────── */
.site-wrapper {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 100vh;
}

.content-with-sidebar {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.content-main {
  flex: 1;
  min-width: 0;
}

@media (max-width: 700px) {
  .content-with-sidebar {
    flex-direction: column;
    gap: 40px;
  }
}

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid #ddd;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.site-title {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 0 16px 0;
}

.site-title a {
  color: #222;
  text-decoration: none;
}

.site-title a:hover {
  color: #222;
}

/* ─── Navigation ─────────────────────────────────────────── */
.site-nav {
  font-size: 14px;
  line-height: 2;
}

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav li {
  display: inline;
}

.site-nav li + li::before {
  content: "/";
  color: #666;
  margin: 0 8px;
}

.site-nav a {
  color: #1a4d6e;
  text-decoration: underline;
}

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

.site-nav .current-menu-item a,
.site-nav .current_page_item a {
  color: #222;
  text-decoration: none;
  font-weight: 600;
}

/* ─── Section Labels ─────────────────────────────────────── */
.section-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  margin: 0 0 24px 0;
}

/* ─── Post Cards (listings) ──────────────────────────────── */
.post-card {
  margin-bottom: 36px;
}

.post-card-thumbnail {
  display: block;
  margin-bottom: 14px;
  line-height: 0;
}

.post-card-thumbnail img {
  width: 100%;
  height: auto;
}

.post-card-title {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.post-card-title a {
  color: #222;
  text-decoration: none;
}

.post-card-title a:hover {
  text-decoration: underline;
}

.post-card-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.post-card-meta a {
  color: #1a4d6e;
  font-size: 13px;
}

.post-card-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: #222;
}

.post-card-excerpt .read-more {
  color: #1a4d6e;
  font-size: 15px;
}

/* ─── Single Post ────────────────────────────────────────── */
.back-link {
  font-size: 13px;
  display: inline-block;
  margin-bottom: 20px;
}

.single-post-title {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.single-post-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 28px;
}

.single-post-meta a {
  color: #1a4d6e;
}

.post-content {
  font-size: 16px;
  line-height: 1.75;
  color: #222;
}

.post-content p {
  margin: 0 0 20px 0;
}

.post-content h2 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 22px;
  font-weight: 400;
  margin: 36px 0 16px 0;
}

.post-content h3 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 18px;
  font-weight: 400;
  margin: 28px 0 12px 0;
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px 24px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content blockquote {
  border-left: 2px solid #ddd;
  margin: 0 0 20px 0;
  padding: 0 0 0 20px;
  color: #444;
  font-style: italic;
}

.post-content img {
  margin: 24px 0;
}

.post-content .wp-block-embed,
.post-content .wp-block-video {
  margin: 24px 0;
}

/* Responsive video embeds */
.post-content .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.post-content .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ─── Pages ──────────────────────────────────────────────── */
.page-content {
  max-width: 640px;
}

.page-title {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 28px 0;
}

.page-content .entry-content {
  font-size: 16px;
  line-height: 1.75;
}

.page-content .entry-content p {
  margin: 0 0 20px 0;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  min-width: 160px;
  padding-top: 4px;
}

.sidebar-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  margin: 0 0 16px 0;
}

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

.sidebar .category-list li {
  margin-bottom: 10px;
}

.sidebar .category-list a {
  font-size: 14px;
  color: #1a4d6e;
}

.sidebar .category-list a:hover {
  color: #222;
}

.sidebar .category-list .current-cat a {
  color: #222;
  text-decoration: none;
  font-weight: 600;
}

.sidebar .cat-count {
  font-size: 12px;
  color: #666;
  margin-left: 6px;
}

/* ─── Newsletter ─────────────────────────────────────────── */
.newsletter-bar {
  padding: 16px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 40px;
}

.newsletter-bar-inner {
  font-size: 14px;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-form input[type="email"] {
  font-family: inherit;
  font-size: 14px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  outline: none;
  width: 220px;
  background: #fff;
  color: #222;
}

.newsletter-form input[type="email"]:focus {
  border-color: #999;
}

.newsletter-form button {
  font-family: inherit;
  font-size: 14px;
  padding: 6px 16px;
  background: #222;
  color: #fff;
  border: none;
  cursor: pointer;
}

.newsletter-form button:hover {
  background: #444;
}

.newsletter-thanks {
  font-size: 14px;
  color: #666;
  padding: 16px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 40px;
}

/* ─── Photo Gallery ──────────────────────────────────────── */
.wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 0 0 24px 0;
}

.wp-block-gallery figure {
  margin: 0;
}

.wp-block-gallery figcaption {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid #ddd;
  margin-top: 60px;
  padding-top: 20px;
  font-size: 13px;
  color: #666;
  text-align: center;
}

/* ─── Archive / Category Headings ────────────────────────── */
.archive-header {
  margin-bottom: 32px;
}

.archive-title {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 8px 0;
}

.archive-description {
  font-size: 14px;
  color: #666;
}

/* ─── Pagination ─────────────────────────────────────────── */
.pagination {
  margin-top: 40px;
  font-size: 14px;
}

.pagination a {
  color: #1a4d6e;
  margin-right: 16px;
}

/* ─── Contact Form (Contact Form 7 or WPForms) ──────────── */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea,
.wpforms-form input[type="text"],
.wpforms-form input[type="email"],
.wpforms-form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  width: 100%;
  outline: none;
  margin-bottom: 16px;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
  border-color: #999;
}

.wpcf7 input[type="submit"],
.wpforms-form button[type="submit"] {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 24px;
  background: #222;
  color: #fff;
  border: none;
  cursor: pointer;
}

.wpcf7 input[type="submit"]:hover,
.wpforms-form button[type="submit"]:hover {
  background: #444;
}

/* ─── WooCommerce Minimal Overrides ──────────────────────── */
.woocommerce ul.products li.product {
  border-bottom: 1px solid #ddd;
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 20px;
  font-weight: 400;
}

.woocommerce ul.products li.product .price {
  font-size: 15px;
  font-weight: 600;
  color: #222;
}

.woocommerce a.button,
.woocommerce button.button {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 20px;
  background: #222 !important;
  color: #fff !important;
  border: none;
  border-radius: 0;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: #444 !important;
}

/* ─── WordPress Core Block Tweaks ────────────────────────── */
.wp-block-separator {
  border: none;
  border-top: 1px solid #ddd;
  margin: 32px 0;
}

.has-text-align-center {
  text-align: center;
}

/* ─── 404 ────────────────────────────────────────────────── */
.error-404 {
  max-width: 480px;
}

.error-404 h1 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 16px 0;
}

.error-404 p {
  font-size: 15px;
  color: #666;
}

/* ─── Utility ────────────────────────────────────────────── */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
