/*
Theme Name: Windthefrog
Theme URI: https://windthefrog.us
Author: Don Burnside
Author URI: https://donburnside.com
Description: A personal publishing theme. Words, sounds, links, photos — your stream, your domain, your rules. Designed for long-form essays, short takes, linked lists, podcast episodes, and photos. Federation-ready with the ActivityPub plugin.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: windthefrog
Tags: blog, custom-colors, custom-logo, featured-images, post-formats, translation-ready
*/

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

:root {
  --wtf-bg:           #f7f4ef;
  --wtf-surface:      #ffffff;
  --wtf-ink:          #1a1814;
  --wtf-ink-mid:      #5a5650;
  --wtf-ink-light:    #9a9590;
  --wtf-rule:         #e2ded7;
  --wtf-accent:       #b84a2e;
  --wtf-accent-soft:  #f0e8e4;
  --wtf-font-body:    'Lora', Georgia, 'Times New Roman', serif;
  --wtf-font-mono:    'JetBrains Mono', 'Fira Mono', 'Courier New', monospace;
  --wtf-measure:      680px;
}

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

body {
  background-color: var(--wtf-bg);
  color: var(--wtf-ink);
  font-family: var(--wtf-font-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── DARK MODE ────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --wtf-bg:          #171512;
    --wtf-surface:     #1e1b18;
    --wtf-ink:         #ede9e2;
    --wtf-ink-mid:     #a09a92;
    --wtf-ink-light:   #6a6560;
    --wtf-rule:        #2e2b28;
    --wtf-accent-soft: #2a1f1c;
  }
}

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--wtf-font-body);
  font-weight: 600;
  line-height: 1.3;
  color: var(--wtf-ink);
}

/* Global type scale */
h1 { font-size: 2rem;    }
h2 { font-size: 1.5rem;  }
h3 { font-size: 1.2rem;  }
h4 { font-size: 1.05rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.85rem; }

/* Content headings — scoped so they never outsize the post title.
   Markdown # becomes h1, ## becomes h2, etc. inside entry-content.
   We cap them all below the stream entry-title (1.5rem). */
.entry-content h1,
.entry-summary h1  { font-size: 1.35rem; margin: 2rem 0 0.6rem; }

.entry-content h2,
.entry-summary h2  { font-size: 1.2rem;  margin: 1.75rem 0 0.55rem; }

.entry-content h3,
.entry-summary h3  { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }

.entry-content h4,
.entry-summary h4  { font-size: 0.95rem; margin: 1.25rem 0 0.4rem; }

/* Single post — post title is h1 at 2.2rem, content headings stay below it */
.single .entry-content h1 { font-size: 1.5rem;  margin: 2.5rem 0 0.75rem; }
.single .entry-content h2 { font-size: 1.35rem; margin: 2.25rem 0 0.65rem; }
.single .entry-content h3 { font-size: 1.15rem; margin: 2rem 0 0.55rem; }
.single .entry-content h4 { font-size: 1rem;    margin: 1.5rem 0 0.5rem; }

a {
  color: var(--wtf-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { text-decoration: none; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 3px solid var(--wtf-accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--wtf-ink-mid);
}

code, pre {
  font-family: var(--wtf-font-mono);
  font-size: 0.85em;
}
pre {
  background: var(--wtf-surface);
  border: 1px solid var(--wtf-rule);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
code {
  background: var(--wtf-surface);
  border: 1px solid var(--wtf-rule);
  border-radius: 3px;
  padding: 0.1em 0.4em;
}
pre code { background: none; border: none; padding: 0; }

hr {
  border: none;
  border-top: 1px solid var(--wtf-rule);
  margin: 2rem 0;
}

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

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2em;
}
li { margin-bottom: 0.4em; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.wtf-container {
  max-width: var(--wtf-measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── SITE HEADER ──────────────────────────────────────────── */
.site-header {
  max-width: var(--wtf-measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  border-bottom: 1px solid var(--wtf-rule);
}

.site-branding { margin-bottom: 1.25rem; }

.site-title {
  font-family: var(--wtf-font-mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin: 0;
}
.site-title a {
  color: var(--wtf-ink);
  text-decoration: none;
}
.site-title a:hover { color: var(--wtf-accent); }
.site-title .accent { color: var(--wtf-accent); }

.site-description {
  font-family: var(--wtf-font-mono);
  font-size: 0.72rem;
  color: var(--wtf-ink-light);
  letter-spacing: 0.03em;
  margin-top: 0.3rem;
}

/* Custom logo */
.custom-logo-link { display: inline-block; margin-bottom: 0.75rem; }
.custom-logo { max-height: 48px; width: auto; }

/* ── NAVIGATION ───────────────────────────────────────────── */
.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.main-navigation a {
  font-family: var(--wtf-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--wtf-ink-mid);
  text-decoration: none;
  transition: color 0.15s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: var(--wtf-ink);
}

/* ── POST STREAM ──────────────────────────────────────────── */
.stream { padding: 0; }

.hentry {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--wtf-rule);
}
.hentry:last-child { border-bottom: none; }

/* ── POST META ────────────────────────────────────────────── */
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.post-date {
  font-family: var(--wtf-font-mono);
  font-size: 0.68rem;
  color: var(--wtf-ink-light);
  letter-spacing: 0.04em;
}
.post-date a { color: var(--wtf-ink-light); text-decoration: none; }
.post-date a:hover { color: var(--wtf-accent); }

.post-format-badge {
  font-family: var(--wtf-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.18em 0.65em;
  border-radius: 2px;
  font-weight: 500;
}

/* Format badge colors */
.badge-standard, .badge-essay { background: var(--wtf-accent-soft); color: var(--wtf-accent); }
.badge-aside, .badge-note     { background: var(--wtf-rule); color: var(--wtf-ink-mid); }
.badge-link                   { background: var(--wtf-rule); color: var(--wtf-ink-mid); }
.badge-image, .badge-gallery  { background: #e8eaf0; color: #3a4a7a; }
.badge-video                  { background: #f0e8f0; color: #6a3a7a; }
.badge-audio, .badge-podcast  { background: #e8f0e8; color: #3a6b3a; }
.badge-quote                  { background: var(--wtf-rule); color: var(--wtf-ink-mid); }
.badge-status                 { background: var(--wtf-rule); color: var(--wtf-ink-mid); }
.badge-chat                   { background: var(--wtf-rule); color: var(--wtf-ink-mid); }

@media (prefers-color-scheme: dark) {
  .badge-image, .badge-gallery { background: #1a1e2e; color: #7a8aba; }
  .badge-video                 { background: #1e1a2e; color: #aa7aba; }
  .badge-audio, .badge-podcast { background: #1a2e1a; color: #7ab87a; }
}

/* ── POST TITLES ──────────────────────────────────────────── */
.entry-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.65rem;
}
.entry-title a {
  color: var(--wtf-ink);
  text-decoration: none;
}
.entry-title a:hover { color: var(--wtf-accent); }

/* ── POST CONTENT ─────────────────────────────────────────── */
.entry-content { font-size: 1rem; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 { font-size: 1.25rem; margin-top: 2rem; }
.entry-content h3 { font-size: 1.1rem; margin-top: 1.75rem; }

.entry-summary { font-size: 1rem; color: var(--wtf-ink); }
.entry-summary > * + * { margin-top: 1.2em; }

/* ── READ MORE ────────────────────────────────────────────── */
.more-link,
.read-more-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--wtf-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--wtf-accent);
  text-decoration: none;
}
.more-link:hover,
.read-more-link:hover { text-decoration: underline; }

/* ── FORMAT: ASIDE / NOTE ─────────────────────────────────── */
.format-aside .entry-content,
.format-status .entry-content {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--wtf-ink-mid);
}

/* ── FORMAT: LINK ─────────────────────────────────────────── */
.format-link .entry-title { font-size: 1.2rem; }
.format-link .entry-title a::after {
  content: ' ↗';
  font-size: 0.85em;
  color: var(--wtf-accent);
  font-style: normal;
}
.format-link .entry-content,
.format-link .entry-summary {
  font-size: 0.95rem;
  color: var(--wtf-ink-mid);
}

/* ── FORMAT: QUOTE ────────────────────────────────────────── */
.format-quote blockquote {
  font-size: 1.2rem;
  line-height: 1.6;
  border-left-width: 4px;
}
.format-quote .quote-source {
  font-family: var(--wtf-font-mono);
  font-size: 0.72rem;
  color: var(--wtf-ink-light);
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
}

/* ── FORMAT: IMAGE / PHOTO ────────────────────────────────── */
.format-image .post-thumbnail,
.format-gallery .post-thumbnail {
  margin-bottom: 0.85rem;
  border-radius: 3px;
  overflow: hidden;
}
.format-image .post-thumbnail img,
.format-gallery .post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}
.post-caption {
  font-size: 0.8rem;
  color: var(--wtf-ink-light);
  font-style: italic;
  margin-top: 0.4rem;
}

/* ── FEATURED IMAGE (non-image posts) ────────────────────── */
.post-thumbnail-standard {
  margin-bottom: 1rem;
  border-radius: 3px;
  overflow: hidden;
}
.post-thumbnail-standard img { width: 100%; height: auto; }

/* ── RESPONSIVE EMBED WRAPPER ─────────────────────────────── */
.wtf-embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 4px;
  margin: 1rem 0;
  background: var(--wtf-surface);
}
.wtf-embed-wrap iframe,
.wtf-embed-wrap embed,
.wtf-embed-wrap object {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* Podcast embed — shorter ratio */
.wtf-embed-wrap--audio {
  padding-bottom: 0;
  height: 200px;
}

/* ── PODCAST PLAYER CARD ──────────────────────────────────── */
.wtf-podcast-card {
  margin: 1rem 0;
  background: var(--wtf-surface);
  border: 1px solid var(--wtf-rule);
  border-radius: 4px;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.wtf-podcast-card .embed-art {
  width: 72px; height: 72px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--wtf-accent), #7a2018);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.wtf-podcast-card .embed-info { flex: 1; min-width: 0; }
.wtf-podcast-card .embed-show {
  font-family: var(--wtf-font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wtf-ink-light);
  margin-bottom: 0.25rem;
}
.wtf-podcast-card .embed-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--wtf-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── TAGS / CATEGORIES ────────────────────────────────────── */
.post-tags {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.post-tags a {
  font-family: var(--wtf-font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--wtf-ink-light);
  text-decoration: none;
  padding: 0.15em 0.5em;
  border: 1px solid var(--wtf-rule);
  border-radius: 2px;
  transition: all 0.15s;
}
.post-tags a:hover {
  color: var(--wtf-accent);
  border-color: var(--wtf-accent);
}
.post-tags a::before { content: '#'; }

/* ── SINGLE POST ──────────────────────────────────────────── */
.single .entry-title { font-size: 2.2rem; margin-bottom: 1rem; } /* h1 on single */
.single .entry-content { font-size: 1.05rem; }
.single .entry-content p { margin-bottom: 1.4em; }
.single .entry-content h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
.single .entry-content h3 { font-size: 1.15rem; margin: 2rem 0 0.6rem; }

/* Post navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--wtf-rule);
}
.post-navigation a {
  font-family: var(--wtf-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--wtf-ink-mid);
  text-decoration: none;
  max-width: 45%;
}
.post-navigation a:hover { color: var(--wtf-accent); }
.nav-previous::before { content: '← '; }
.nav-next::after { content: ' →'; }

/* ── PAGES ────────────────────────────────────────────────── */
.page .entry-title { font-size: 2rem; margin-bottom: 1.5rem; }

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination,
.posts-navigation {
  padding: 2.5rem 0;
  text-align: center;
  font-family: var(--wtf-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.pagination .page-numbers,
.posts-navigation a {
  color: var(--wtf-ink-mid);
  text-decoration: none;
  padding: 0.4em 0.75em;
  border: 1px solid var(--wtf-rule);
  border-radius: 2px;
  margin: 0 0.2rem;
  transition: all 0.15s;
}
.pagination .current,
.pagination .page-numbers:hover,
.posts-navigation a:hover {
  color: var(--wtf-accent);
  border-color: var(--wtf-accent);
}

/* ── COMMENTS ─────────────────────────────────────────────── */
.comments-area {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--wtf-rule);
}
.comments-title {
  font-size: 1rem;
  font-family: var(--wtf-font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  color: var(--wtf-ink-light);
}
.comment-body {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--wtf-rule);
}
.comment-author .fn { font-weight: 600; }
.comment-meta {
  font-family: var(--wtf-font-mono);
  font-size: 0.68rem;
  color: var(--wtf-ink-light);
  margin-bottom: 0.75rem;
}
.comment-content p { font-size: 0.95rem; }

/* Comment form */
.comment-form label {
  display: block;
  font-family: var(--wtf-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wtf-ink-mid);
  margin-bottom: 0.4rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--wtf-surface);
  border: 1px solid var(--wtf-rule);
  border-radius: 3px;
  color: var(--wtf-ink);
  font-family: var(--wtf-font-body);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.15s;
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--wtf-accent);
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input[type="submit"],
.submit {
  font-family: var(--wtf-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--wtf-accent);
  color: white;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.comment-form input[type="submit"]:hover,
.submit:hover { opacity: 0.85; }

/* ── WIDGETS / SIDEBAR ────────────────────────────────────── */
.widget-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--wtf-rule); }
.widget { margin-bottom: 2rem; }
.widget-title {
  font-family: var(--wtf-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wtf-ink-light);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--wtf-rule);
}
.widget ul { list-style: none; padding: 0; }
.widget ul li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--wtf-rule);
  font-size: 0.9rem;
}
.widget ul li:last-child { border-bottom: none; }

/* ── SITE FOOTER ──────────────────────────────────────────── */
.site-footer {
  max-width: var(--wtf-measure);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--wtf-rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-info {
  font-family: var(--wtf-font-mono);
  font-size: 0.68rem;
  color: var(--wtf-ink-light);
  letter-spacing: 0.04em;
}
.site-info a { color: var(--wtf-ink-light); }
.site-info a:hover { color: var(--wtf-accent); }

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.25rem;
}
.footer-nav a {
  font-family: var(--wtf-font-mono);
  font-size: 0.68rem;
  color: var(--wtf-ink-light);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.footer-nav a:hover { color: var(--wtf-accent); }

/* ── 404 / SEARCH ─────────────────────────────────────────── */
.error-404 .page-title,
.search .page-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.search-form {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 0.65rem 0.85rem;
  background: var(--wtf-surface);
  border: 1px solid var(--wtf-rule);
  border-radius: 3px;
  color: var(--wtf-ink);
  font-family: var(--wtf-font-body);
  font-size: 0.9rem;
}
.search-form button {
  font-family: var(--wtf-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: var(--wtf-accent);
  color: white;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 3px;
  cursor: pointer;
}

/* ── UTILITY ──────────────────────────────────────────────── */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px; width: 1px;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}
.skip-link { display: none; }
.aligncenter { text-align: center; margin: 0 auto; }
.alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--wtf-ink-light); font-style: italic; margin-top: 0.4rem; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 720px) {
  html { font-size: 16px; }
  .site-header,
  .stream,
  .site-footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  .single .entry-title { font-size: 1.6rem; }
  .post-navigation { flex-direction: column; }
  .post-navigation a { max-width: 100%; }
  .wtf-podcast-card { flex-direction: column; }
  .wtf-podcast-card .embed-art { width: 56px; height: 56px; }
}
