/*
Theme Name: Lucian Journal
Theme URI: https://lucian.page
Author: lucian.page
Author URI: https://lucian.page
Description: Un jurnal editorial românesc despre dezvoltarea unei inteligențe artificiale — memorie, discernământ, responsabilitate. Temă clasică, autonomă, fără dependențe externe.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: lucian-journal
Tags: blog, news, one-column, featured-images, threaded-comments, translation-ready
*/

:root {
  --paper: #F6F1E7;
  --paper-2: #EFE7D6;
  --ink: #26261F;
  --forest: #2F4A3C;
  --ochre: #B4792B;
  --muted: #6E6A5E;
  --line: #D8D0BC;
  --line-soft: #E4DCC9;
  --serif: Georgia, 'Times New Roman', 'Iowan Old Style', 'Palatino Linotype', serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --measure: 700px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--forest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(47, 74, 60, 0.4); }
a:hover { color: var(--ochre); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; border-radius: 2px; }

::selection { background: var(--ochre); color: var(--paper); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 0.4em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 6vw, 4.3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.45rem; line-height: 1.22; }
p { margin: 0 0 1.1em; }

.wrap { width: min(1120px, 92vw); margin-inline: auto; }

.eyebrow {
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ochre); margin: 0 0 0.9em; font-weight: 600;
}

.text-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4em; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.text-link:hover { color: var(--ochre); }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: var(--paper); padding: 0.7em 1.1em; text-decoration: none; }
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.4rem; position: relative;
}
.wordmark { font-family: var(--serif); font-size: 1.55rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; font-weight: 600; }
.wordmark span { color: var(--ochre); }

.site-navigation { display: flex; align-items: center; gap: 0.2rem; }
.site-navigation > a { text-decoration: none; font-size: 0.92rem; padding: 0.55rem 0.85rem; border-radius: 3px; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.site-navigation > a:hover { color: var(--ochre); background: var(--paper-2); }

.header-search summary { list-style: none; cursor: pointer; font-size: 0.92rem; padding: 0.55rem 0.85rem; border-radius: 3px; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; user-select: none; }
.header-search summary::-webkit-details-marker { display: none; }
.header-search summary:hover { color: var(--ochre); background: var(--paper-2); }
.header-search[open] summary { color: var(--ochre); }
.search-panel { position: absolute; right: 0; top: calc(100% + 0.6rem); width: min(420px, 92vw); background: var(--paper); border: 1px solid var(--line); padding: 1.1rem; z-index: 30; box-shadow: 0 14px 40px rgba(38, 38, 31, 0.14); }

.menu-toggle {
  display: none; background: var(--ink); color: var(--paper); border: 0; font-family: var(--sans);
  font-size: 0.92rem; padding: 0.6rem 0.95rem; border-radius: 3px; cursor: pointer; min-height: 44px;
}
.menu-toggle:hover { background: var(--forest); }

/* ---------- Search form ---------- */
.search-form { font-size: 0.95rem; }
.search-form label { display: block; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5em; }
.search-input-row { display: flex; gap: 0.5rem; }
.search-input-row input[type="search"] { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); padding: 0.55rem 0.8rem; font-family: var(--sans); font-size: 0.95rem; border-radius: 2px; }
.search-input-row button { min-height: 44px; border: 0; background: var(--forest); color: var(--paper); font-family: var(--sans); font-size: 0.92rem; padding: 0.55rem 1rem; cursor: pointer; border-radius: 2px; white-space: nowrap; }
.search-input-row button:hover { background: var(--ochre); }

/* ---------- Cover ---------- */
.cover { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding-block: clamp(2rem, 5vw, 4.5rem); }
.cover-caption { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: clamp(2rem, 5vw, 4rem); }
.cover-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.cover-copy h1 { font-size: clamp(2.7rem, 7.5vw, 5.6rem); letter-spacing: -0.025em; line-height: 0.98; }
.cover-copy h1 em { font-style: italic; color: var(--forest); }
.cover-intro { max-width: 34ch; font-size: 1.2rem; line-height: 1.55; color: var(--ink); margin-top: 1.6rem; }
.cover-copy .text-link { margin-top: 0.6rem; }

.cover-aside { display: flex; flex-direction: column; align-items: flex-start; }
.memory-mark { position: relative; width: min(280px, 70vw); aspect-ratio: 1; margin-bottom: 1.6rem; }
.mark-line { position: absolute; background: var(--ink); }
.line-one { top: 18%; left: 22%; width: 58%; height: 1px; transform: rotate(-24deg); }
.line-two { top: 52%; left: 22%; width: 58%; height: 1px; transform: rotate(-24deg); }
.mark-orbit { position: absolute; border: 1px solid var(--forest); border-radius: 50%; opacity: 0.55; }
.orbit-one { inset: 14% 26%; }
.orbit-two { inset: 28% 8%; border-color: var(--ochre); }
.mark-dot { position: absolute; top: 46%; left: 46%; width: 10px; height: 10px; background: var(--ochre); border-radius: 50%; }
.mark-letter { position: absolute; bottom: 10%; right: 12%; font-family: var(--serif); font-style: italic; font-size: 4rem; color: var(--forest); line-height: 1; }
.margin-note { font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; color: var(--muted); border-left: 2px solid var(--ochre); padding-left: 1rem; margin: 0; }
.margin-note em { color: var(--forest); }

.cover-bottom { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: clamp(2rem, 5vw, 4rem); padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); justify-content: space-between; }

/* ---------- Journal section ---------- */
.journal-section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--ink); padding-bottom: 0.8rem; margin-bottom: 2rem; }
.section-heading h2 { margin: 0; }
.journal-layout { display: grid; grid-template-columns: 1.45fr 1fr; gap: clamp(2rem, 4vw, 4rem); }

.featured-entry .entry-meta { margin-bottom: 1rem; }
.featured-entry h3 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 0.8rem; }
.featured-entry h3 a { color: var(--ink); text-decoration: none; }
.featured-entry h3 a:hover { color: var(--forest); }
.featured-image { display: block; margin: 1.4rem 0; }
.featured-image img { width: 100%; }
.entry-summary { max-width: 52ch; color: var(--ink); }

.recent-entries { border-left: 1px solid var(--line); padding-left: clamp(1.2rem, 3vw, 2.4rem); display: flex; flex-direction: column; gap: 0.4rem; }
.recent-entry { padding-block: 1.1rem; border-bottom: 1px solid var(--line-soft); position: relative; }
.recent-entry h3 { font-size: 1.28rem; margin-bottom: 0.35rem; }
.recent-entry h3 a { color: var(--ink); text-decoration: none; }
.recent-entry h3 a:hover { color: var(--forest); }
.recent-entry p { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 46ch; }
.entry-arrow { position: absolute; top: 1.1rem; right: 0; text-decoration: none; font-size: 1.1rem; color: var(--ochre); min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: flex-end; }
.quiet-note { color: var(--muted); max-width: 40ch; }

/* ---------- Topic index ---------- */
.topic-index { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding-block: 1.6rem; display: flex; gap: 2rem; align-items: baseline; flex-wrap: wrap; }
.topic-index .eyebrow { margin: 0; }
.topic-index > div { display: flex; gap: 0.4rem 1.6rem; flex-wrap: wrap; }
.topic-index a { text-decoration: none; font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: var(--ink); padding: 0.4rem 0; }
.topic-index a:hover { color: var(--ochre); }

/* ---------- Voices ---------- */
.voices { padding-block: clamp(2.5rem, 6vw, 5rem); display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.voices-intro h2 { margin-bottom: 1rem; }
.voices-intro h2 em { font-style: italic; color: var(--forest); }
.voice-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.voice-status { display: block; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ochre); margin-bottom: 0.7em; }
.voice-notes h3 { font-size: 2rem; }
.voice-notes h3 span { color: var(--ochre); }
.voice-notes p { color: var(--muted); max-width: 40ch; }
.reserved-voice { position: relative; }
.reserved-voice::before { content: ''; position: absolute; inset: -1rem -1rem; border: 1px dashed var(--line); pointer-events: none; }
.reserved-voice { padding: 0; }

/* ---------- Archive / index / search ---------- */
.archive-main, .not-found { padding-block: clamp(2rem, 5vw, 4rem); }
.page-heading { border-bottom: 1px solid var(--ink); padding-bottom: 1.6rem; margin-bottom: 2rem; }
.page-heading h1 { margin-bottom: 0.3em; }
.page-heading > p:not(.eyebrow) { color: var(--muted); max-width: 52ch; }
.page-heading .search-form { margin-top: 1.4rem; max-width: 460px; }
.archive-description { color: var(--muted); max-width: 60ch; margin-bottom: 1rem; }

.post-list { display: flex; flex-direction: column; }
.list-entry { display: grid; grid-template-columns: 150px 1fr auto; gap: 1.4rem; padding-block: 1.6rem; border-bottom: 1px solid var(--line); align-items: start; }
.list-entry:last-child { border-bottom: 0; }
.list-entry .entry-meta { grid-column: 1; }
.list-entry-body h2 { font-size: 1.55rem; margin-bottom: 0.35rem; }
.list-entry-body h2 a { color: var(--ink); text-decoration: none; }
.list-entry-body h2 a:hover { color: var(--forest); }
.list-entry-body p { color: var(--muted); max-width: 60ch; margin-bottom: 0.6rem; }
.list-thumbnail img { width: 150px; height: 150px; object-fit: cover; }

.entry-meta { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; display: inline-flex; flex-wrap: wrap; gap: 0.3em; }
.entry-meta a { color: var(--forest); text-decoration: none; }
.entry-meta a:hover { color: var(--ochre); }
.entry-meta time { color: var(--muted); }

/* ---------- Pagination ---------- */
.pagination, .nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 2.4rem; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 0.8rem; border: 1px solid var(--line); color: var(--ink); text-decoration: none; border-radius: 2px; }
.page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
a.page-numbers:hover { border-color: var(--forest); color: var(--forest); }

/* ---------- Single ---------- */
.single-entry { padding-top: clamp(1.5rem, 4vw, 3rem); }
.article-head { max-width: var(--measure); margin-inline: auto; margin-bottom: 2rem; }
.article-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
.article-byline { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.article-byline > span:first-child { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--forest); }
.article-figure { max-width: 860px; margin: 0 auto 2.2rem; }
.article-body { max-width: var(--measure); margin-inline: auto; font-size: 1.125rem; line-height: 1.75; }
.article-body > * + * { margin-top: 1.3em; }
.article-body h2, .article-body h3, .article-body h4 { margin-top: 1.6em; }
.article-body a { text-decoration-thickness: 1px; }
.article-body blockquote { margin: 1.8em 0; padding: 0.2em 0 0.2em 1.4em; border-left: 3px solid var(--ochre); font-family: var(--serif); font-style: italic; font-size: 1.35rem; line-height: 1.5; color: var(--forest); }
.article-body blockquote p { margin: 0; }
.article-body figure { margin: 2em 0; }
.article-body figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.6em; }
.article-body code, .article-body pre { font-family: 'SF Mono', 'Cascadia Mono', Consolas, 'Courier New', monospace; font-size: 0.88em; }
.article-body pre { background: var(--paper-2); border: 1px solid var(--line); padding: 1.2rem; overflow-x: auto; border-radius: 2px; }
.article-body code { background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 2px; }
.article-body pre code { background: none; padding: 0; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-foot { max-width: var(--measure); margin: 2.4rem auto 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.article-tags a { font-size: 0.82rem; text-decoration: none; border: 1px solid var(--line); padding: 0.3rem 0.7rem; border-radius: 999px; margin-right: 0.4rem; color: var(--muted); }
.article-tags a:hover { color: var(--forest); border-color: var(--forest); }
.page-links { max-width: var(--measure); margin: 2rem auto 0; }

.post-navigation { max-width: var(--measure); margin: 3rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--ink); padding-top: 1.4rem; }
.nav-prev, .nav-next { min-height: 44px; }
.nav-next { text-align: right; }
.post-navigation a { text-decoration: none; font-family: var(--serif); font-size: 1.05rem; color: var(--ink); line-height: 1.35; display: inline-block; }
.post-navigation a:hover { color: var(--forest); }
.post-navigation span { display: block; font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ochre); margin-bottom: 0.3em; }

.related { max-width: var(--measure); margin: 3.5rem auto 0; }
.related h2 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.related-entry h3 { font-size: 1.15rem; margin: 0.5rem 0 0.4rem; }
.related-entry h3 a { color: var(--ink); text-decoration: none; }
.related-entry h3 a:hover { color: var(--forest); }
.related-entry p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- Page ---------- */
.page-entry { padding-top: clamp(1.5rem, 4vw, 3rem); }
.page-entry .article-head { margin-bottom: 2rem; }

/* ---------- Empty / not found ---------- */
.empty-state { border: 1px dashed var(--line); padding: clamp(1.6rem, 4vw, 2.6rem); margin-top: 1rem; }
.empty-state h2, .empty-state h3 { margin-bottom: 0.4em; }
.empty-state p { color: var(--muted); max-width: 52ch; }
.not-found h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.not-found h1 em { font-style: italic; color: var(--forest); }
.not-found > p { color: var(--muted); max-width: 52ch; }
.not-found .search-form { margin: 1.4rem 0; max-width: 460px; }
.not-found .text-link { display: inline-block; margin-top: 0.4rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--ink); margin-top: clamp(3rem, 7vw, 6rem); padding-block: 2.6rem; display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 2rem; align-items: start; }
.footer-identity .wordmark { font-size: 1.3rem; }
.footer-identity p { color: var(--muted); margin-top: 0.8rem; font-size: 0.92rem; line-height: 1.6; }
.site-footer nav { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; }
.site-footer nav a { text-decoration: none; color: var(--ink); font-size: 0.95rem; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer nav a:hover { color: var(--ochre); }
.footer-baseline { display: flex; flex-direction: column; align-items: flex-end; gap: 0.8rem; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; text-align: right; }
.back-top { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.back-top:hover { color: var(--ochre); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .cover-layout, .journal-layout, .voices { grid-template-columns: 1fr; }
  .voice-notes { grid-template-columns: 1fr; }
  .cover-aside { flex-direction: row; gap: 2rem; align-items: center; }
  .memory-mark { width: 180px; margin-bottom: 0; }
  .list-entry { grid-template-columns: 1fr; }
  .list-thumbnail img { width: 100%; height: auto; }
  .footer { grid-template-columns: 1fr; }
  .footer-baseline { align-items: flex-start; text-align: left; }
}

@media (max-width: 760px) {
  .js .menu-toggle { display: inline-flex; }
  .js .site-navigation { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border: 1px solid var(--line); z-index: 40; padding: 0.6rem; display: none; }
  .js .site-navigation.is-open { display: flex; }
  .site-navigation > a { min-height: 48px; padding: 0.7rem 0.9rem; font-size: 1.05rem; }
  .header-search summary { min-height: 48px; width: 100%; justify-content: space-between; font-size: 1.05rem; }
  .search-panel { position: static; width: 100%; box-shadow: none; border: 0; border-top: 1px solid var(--line); margin-top: 0.4rem; }
  .cover-bottom { gap: 0.8rem; }
  .related-grid { grid-template-columns: 1fr; }
  .post-navigation { grid-template-columns: 1fr; }
  .nav-next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
