/*
Theme Name: My Private
Theme URI: https://my-private.info/
Author: My Private
Description: A dark, multi-topic personal journal.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: my-private
*/

:root {
  color-scheme: dark;
  --ink: #0d0a0f;
  --surface: #151119;
  --raised: #1c151d;
  --paper: #eee6e8;
  --muted: #c1b3b9;
  --faint: #a4939b;
  --line: #44333d;
  --wine: #b75b70;
  --wine-light: #e09aaa;
  --silver: #bac1cd;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 50% -20rem, #2b1722 0, #151017 38rem, var(--ink) 78rem);
  color: var(--paper);
  font-size: 1rem;
  line-height: 1.7;
}
a { color: var(--wine-light); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: #f0bec8; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--wine-light); outline-offset: 4px; }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { z-index: 100000; top: 1rem; left: 1rem; width: auto; height: auto; padding: .75rem 1rem; clip: auto; background: var(--paper); color: var(--ink); }

.site-header, .site-main, .site-footer { width: min(100% - 3rem, 1180px); margin-inline: auto; }
.site-header { padding-top: 1.1rem; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .85rem; color: var(--paper); text-decoration: none; }
.mark { display: grid; width: 2.5rem; height: 2.5rem; flex: 0 0 auto; place-items: center; border: 1px solid #805062; border-radius: 50% 50% 45% 45%; color: var(--wine-light); font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; box-shadow: 0 0 24px rgb(160 46 75 / 15%); }
.brand-copy { display: grid; line-height: 1.3; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; letter-spacing: .02em; }
.brand-tagline { color: var(--muted); font-size: .8rem; }
.primary-nav { display: flex; align-items: center; gap: 1.4rem; }
.primary-nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.primary-nav a:hover { color: var(--paper); }

.cover { position: relative; display: flex; min-height: clamp(260px, 36vw, 420px); align-items: end; overflow: hidden; margin-top: 1.2rem; border: 1px solid #51404a; border-radius: .35rem; background: var(--surface); isolation: isolate; }
.cover-image, .cover-shade { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.cover-image { object-fit: cover; object-position: center 52%; }
.cover-shade { background: linear-gradient(90deg, rgb(11 8 13 / 88%), rgb(11 8 13 / 49%) 52%, rgb(11 8 13 / 6%)), linear-gradient(0deg, rgb(11 8 13 / 48%), transparent 72%); }
.cover-copy { max-width: 44rem; padding: clamp(1.5rem, 5vw, 3.5rem); }
.eyebrow, .section-kicker, .entry-meta, .topic-heading, .reading-note { color: var(--silver); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .8rem; letter-spacing: .11em; text-transform: uppercase; }
.cover .eyebrow { margin: 0 0 .65rem; color: #e3b6bf; }
.cover-title { max-width: 12ch; margin: 0; color: #fff5f5; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 8vw, 6.2rem); font-weight: 500; letter-spacing: -.055em; line-height: .98; text-shadow: 0 3px 28px #09060a; }
.cover-deck { max-width: 36rem; margin: 1rem 0 0; color: #f0e5e8; font-size: clamp(1rem, 2vw, 1.15rem); text-shadow: 0 2px 12px #09060a; }

.site-main { padding-block: clamp(2.5rem, 6vw, 5rem) 4rem; }
.journal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.journal-feed { min-width: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.section-kicker { margin: 0 0 .4rem; color: var(--wine-light); }
.section-head h1, .section-head h2 { margin: 0; color: var(--paper); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.intro { max-width: 48rem; margin: 1.15rem 0 1.8rem; color: var(--muted); }
.entry-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; border-bottom: 1px solid var(--line); padding: 1.7rem 0 1.9rem; }
.entry-card:first-child { padding-top: .2rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .45rem .9rem; margin: 0; color: var(--silver); font-size: .75rem; letter-spacing: .08em; }
.entry-meta a { color: var(--wine-light); text-decoration: none; }
.entry-title { max-width: 24ch; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.18; }
.entry-title a { color: var(--paper); text-decoration: none; }
.entry-title a:hover { color: var(--wine-light); }
.entry-image { display: block; max-width: 48rem; max-height: 28rem; overflow: hidden; margin-top: .35rem; border: 1px solid var(--line); background: var(--surface); }
.entry-image img { display: block; width: 100%; max-height: 28rem; object-fit: cover; }
.entry-excerpt { max-width: 48rem; margin: 0; color: var(--muted); }
.read-more { width: fit-content; margin-top: .1rem; color: var(--wine-light); font-size: .9rem; text-decoration: none; }
.read-more:hover { text-decoration: underline; }

.topic-rail { position: sticky; top: 1.5rem; border-left: 1px solid var(--line); padding-left: 1.4rem; }
.topic-rail section + section { margin-top: 2rem; }
.topic-heading { margin: 0 0 .9rem; color: var(--wine-light); font-size: .75rem; }
.topic-list, .archive-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.topic-list a, .archive-list a { color: var(--muted); text-decoration: none; }
.topic-list a:hover, .archive-list a:hover { color: var(--paper); }
.topic-list .count { margin-left: .3rem; color: var(--faint); font-size: .8rem; }
.reading-note { margin: 0; color: var(--muted); font-family: inherit; font-size: .95rem; letter-spacing: 0; line-height: 1.7; text-transform: none; }
.empty { margin-top: 1rem; padding: clamp(1.5rem, 5vw, 2.5rem); border: 1px solid var(--line); border-radius: .35rem; background: linear-gradient(140deg, rgb(36 19 27 / 88%), rgb(17 12 16 / 94%)); box-shadow: inset 3px 0 var(--wine), 0 18px 55px rgb(0 0 0 / 24%); }
.empty h2 { margin: 0 0 .5rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: 500; }
.empty p { margin: 0; color: var(--muted); }
.nav-links, .posts-navigation { margin-top: 2rem; }
.nav-links .nav-links, .posts-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; }
.nav-links a, .posts-navigation a { color: var(--wine-light); }

.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.single-entry { min-width: 0; }
.single-column { min-width: 0; }
.back-link { display: inline-block; margin-bottom: 1.2rem; color: var(--muted); font-size: .9rem; text-decoration: none; }
.back-link:hover { color: var(--wine-light); }
.single-entry .entry-header { margin-bottom: 1.5rem; }
.single-entry h1 { max-width: 22ch; margin: .8rem 0 0; color: var(--paper); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.08; }
.single-entry .entry-content { color: #ded4d8; font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; line-height: 1.85; }
.single-entry .entry-content > * { max-width: 46rem; }
.single-entry .entry-content h2, .single-entry .entry-content h3 { margin-top: 2em; color: var(--paper); font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.single-entry .entry-content a { color: var(--wine-light); }
.single-entry .entry-content blockquote { margin-inline: 0; border-left: 2px solid var(--wine); padding-left: 1.2rem; color: var(--muted); font-style: italic; }
.single-entry .entry-content figure { margin-inline: 0; }
.single-entry .entry-content img { border: 1px solid var(--line); }
.single-entry .entry-content figcaption { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .9rem; text-align: center; }
.single-entry .wp-block-post-featured-image { margin: 0 0 2rem; }
.single-entry .wp-block-post-featured-image img { display: block; width: 100%; border: 1px solid var(--line); }
.single-featured { margin: 0 0 2rem; }
.single-featured img { display: block; width: 100%; border: 1px solid var(--line); }
.entry-navigation { display: flex; justify-content: space-between; gap: 1.2rem; margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.entry-navigation a { max-width: 48%; color: var(--muted); text-decoration: none; }
.entry-navigation a:hover { color: var(--wine-light); }

.error-page { max-width: 50rem; min-height: 38vh; margin: 3rem auto; padding: clamp(2rem, 7vw, 5rem); border: 1px solid var(--line); background: linear-gradient(145deg, #21151d, #110d12); }
.error-page h1 { margin: 0 0 1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 500; }
.error-page p { color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-block: 1.2rem 2.5rem; color: var(--faint); font-size: .85rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); text-decoration: none; }

@media (max-width: 820px) {
  .journal-layout, .single-layout { grid-template-columns: minmax(0, 1fr); }
  .topic-rail { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; border-top: 1px solid var(--line); border-left: 0; padding: 1.5rem 0 0; }
  .topic-rail section + section { margin-top: 0; }
}
@media (max-width: 560px) {
  .site-header, .site-main, .site-footer { width: min(100% - 2rem, 1180px); }
  .masthead { align-items: flex-start; flex-direction: column; gap: .85rem; }
  .primary-nav { gap: 1.1rem; }
  .cover { min-height: 300px; }
  .cover-image { object-position: 57% center; }
  .cover-shade { background: linear-gradient(90deg, rgb(11 8 13 / 78%), rgb(11 8 13 / 26%)), linear-gradient(0deg, rgb(11 8 13 / 62%), transparent 80%); }
  .section-head { align-items: flex-start; flex-direction: column; }
  .topic-rail { grid-template-columns: minmax(0, 1fr); }
  .site-footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
