/*
Theme Name: Theo Jones
Theme URI: https://theopjones.com/
Author: Theo Jones
Description: A WordPress theme adapted from the Theo Jones static Pelican site.
Version: 1.0.0
Requires at least: 4.9
Tested up to: 6.2
Requires PHP: 7.4
License: CC0 1.0 Universal
License URI: https://creativecommons.org/publicdomain/zero/1.0/
Text Domain: theo-jones
*/

:root {
  --bg: #f8f5f0;
  --ink: #1a1814;
  --ink-mid: #5c5a55;
  --ink-light: #9a9790;
  --accent: #b87333;
  --accent-light: #f0e6d8;
  --card: #ffffff;
  --border: #e0dbd3;
  --font-head: Georgia, 'Times New Roman', serif;
  --font-body: Arial, Helvetica, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --max-width: 800px;
  --border-radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

.top-band-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 2.5rem 0;
}

.top-band {
  display: grid;
  grid-template-columns: 1fr auto;
  background: var(--accent);
  border-radius: 16px;
  overflow: hidden;
}

.top-name {
  padding: 1.75rem 2.5rem;
}

.top-name h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  line-height: 1;
  font-weight: normal;
}

.top-name h1 a {
  color: inherit;
  text-decoration: none;
}

.top-name h1 a:hover {
  opacity: 0.85;
}

.top-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.top-nav {
  background: #1a1814;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.top-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-nav a:hover,
.top-nav .current-menu-item a {
  color: #fff;
}

.top-nav a::before {
  content: '→';
  color: var(--accent);
  font-size: 0.75rem;
}

.top-nav ul {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 2.5rem 4rem;
}

.hero-image-wrap {
  margin-bottom: 1.25rem;
}

.hero-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--border-radius);
  display: block;
}

.home-intro,
.bluesky-section,
.home-custom-section,
.page-header,
.about-content,
.not-found-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.25rem;
}

.home-intro p,
.home-custom-section p,
.about-content p,
.not-found-card p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--ink-mid);
  line-height: 1.7;
  font-weight: 300;
}

.home-intro p:last-child,
.home-custom-section p:last-child,
.about-content p:last-child,
.not-found-card p:last-child {
  margin-bottom: 0;
}

.home-intro a,
.home-custom-section a,
.about-content a,
.not-found-card a {
  color: var(--accent);
  text-decoration: underline;
}

.bluesky-section h2,
.home-custom-section h2,
.section-header h2,
.page-header h1 {
  font-family: var(--font-head);
  color: var(--ink);
}

.bluesky-section h2 {
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
  text-align: center;
}

.home-custom-section h2 {
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0 1rem;
}

.section-bar {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 1.2rem;
  margin: 0;
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

article.h-entry {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.75rem;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

article.h-entry:hover {
  box-shadow: 0 4px 16px rgba(26, 24, 20, 0.06);
  border-color: var(--accent);
}

article.h-entry h2.p-name {
  font-family: var(--font-head);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

article.h-entry h2.p-name a {
  color: var(--ink);
  text-decoration: none;
}

article.h-entry h2.p-name a:hover {
  color: var(--accent);
}

.meta,
article.h-entry .meta {
  font-size: 0.8rem;
  color: var(--ink-light);
  font-weight: 400;
  margin: 0 0 0.75rem;
}

.meta a {
  color: var(--ink-light);
  text-decoration: none;
}

.meta a:hover {
  color: var(--accent);
}

.e-content {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.8;
}

.e-content p {
  margin: 0 0 0.75rem;
}

.e-content p:last-child {
  margin-bottom: 0;
}

.e-content a,
article.post a {
  color: var(--accent);
  text-decoration: underline;
}

.e-content ul,
.e-content ol,
article.post ul,
article.post ol {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--ink-mid);
}

.e-content li,
article.post li {
  margin-bottom: 0.3rem;
}

.e-content blockquote,
article.post blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: var(--accent-light);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--ink-mid);
}

.e-content code,
article.post code {
  background: #f0ede8;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--ink-mid);
}

.e-content pre,
article.post pre {
  background: #1a1814;
  color: #f0ede8;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.25rem 0;
}

.e-content pre code,
article.post pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.85rem;
}

.e-content img,
article.post img {
  border-radius: 6px;
  margin: 0.5rem 0;
}

.post-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-left: 4px solid #b87333;
  border-radius: 6px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #5c5a55;
  line-height: 1.6;
}

.post-warning strong {
  color: var(--ink);
}

.card-warning {
  font-size: 0.78rem;
  color: #8a6d3b;
  font-weight: 400;
  margin: 0 0 0.5rem;
  font-style: italic;
}

article.post {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 2.5rem;
}

article.post h1 {
  font-family: var(--font-head);
  font-size: 2rem;
  margin: 0 0 0.6rem;
  line-height: 1.2;
  color: var(--ink);
}

article.post .meta {
  font-size: 0.82rem;
  margin-bottom: 2rem;
}

article.post h2 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}

article.post h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink);
}

article.post p {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--ink-mid);
  line-height: 1.85;
  font-weight: 400;
}

.comments-area {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 2rem 2.5rem;
  margin-top: 1rem;
}

.comments-title,
.comment-reply-title {
  font-family: var(--font-head);
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 1rem;
}

.comment-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.comment-list .children {
  list-style: none;
  margin: 1rem 0 0 1.25rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-light);
}

.comment,
.pingback,
.trackback {
  margin-bottom: 1.25rem;
}

.comment-body {
  color: var(--ink-mid);
  font-size: 0.95rem;
  line-height: 1.75;
}

.comment-body p {
  margin: 0 0 0.75rem;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comment-meta {
  margin-bottom: 0.65rem;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 0.9rem;
}

.comment-author .avatar {
  border-radius: 50%;
  margin: 0;
}

.comment-author .fn {
  font-style: normal;
  font-weight: 700;
}

.comment-metadata,
.comment-awaiting-moderation {
  font-size: 0.78rem;
  color: var(--ink-light);
  margin-top: 0.25rem;
}

.comment-awaiting-moderation {
  display: block;
  color: #8a6d3b;
  font-style: italic;
}

.comment-metadata a,
.comment-body a,
.reply a,
.logged-in-as a,
.comment-notes a {
  color: var(--accent);
}

.reply {
  margin-top: 0.65rem;
  font-size: 0.82rem;
}

.no-comments {
  color: var(--ink-light);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.comment-respond {
  margin-top: 1.5rem;
}

.comment-form p {
  margin: 0 0 1rem;
}

.comment-notes,
.logged-in-as {
  color: var(--ink-light);
  font-size: 0.84rem;
}

.comment-form label {
  display: block;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.comment-form-cookies-consent label {
  display: inline;
  color: var(--ink-mid);
  font-size: 0.84rem;
  font-weight: 400;
  margin-bottom: 0;
}

.comment-form-cookies-consent input {
  margin-top: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0.65rem 0.75rem;
}

.comment-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: 2px solid var(--accent-light);
  border-color: var(--accent);
}

.form-submit {
  margin-bottom: 0;
}

.comment-submit {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1.15rem;
}

.comment-submit:hover,
.comment-submit:focus {
  background: #9a5f20;
}

.page-header {
  margin-bottom: 0.75rem;
}

.page-header h1 {
  font-size: 1.4rem;
  margin: 0;
}

.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 1rem 0;
  color: var(--ink-light);
  font-size: 0.82rem;
}

.pagination a,
.nav-links a,
.page-numbers.current {
  font-size: 0.85rem;
  color: var(--card);
  background: var(--accent);
  text-decoration: none;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.pagination a:hover,
.nav-links a:hover {
  background: #9a5f20;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-light);
  font-weight: 300;
  border-top: 1px solid var(--border);
  line-height: 1.8;
}

.site-footer p {
  margin: 0 0 1rem;
}

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

.site-footer a:hover {
  text-decoration: underline;
}

.badges-section {
  margin-top: 1rem;
}

.badges-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.badges-row img {
  height: 15px;
  width: 88px;
  object-fit: contain;
  border-radius: 2px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

@media (max-width: 600px) {
  .top-band-wrap {
    padding: 1rem 1.25rem 0;
  }

  .top-band {
    grid-template-columns: 1fr;
    border-radius: 12px;
  }

  .top-name {
    padding: 1.5rem;
  }

  .top-nav {
    padding: 1.25rem 1.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
  }

  .wrap {
    padding: 1rem 1.25rem 3rem;
  }

  article.post {
    padding: 1.5rem;
  }

  .comments-area {
    padding: 1.5rem;
  }

  article.h-entry {
    padding: 1.25rem 1.5rem;
  }
}

@media print {
  body {
    background: #fff;
  }

  .top-band {
    border-radius: 0;
  }

  article.h-entry,
  article.post {
    break-inside: avoid;
  }
}
