/* ==========================================================
   WRITTEN WHISPER - Public site stylesheet
   ========================================================== */

/* --- Teme --- */
:root {
  --bg:     #f9f9f7;
  --fg:     #1a1a1a;
  --muted:  #5a5a5a;
  --border: #d8d8d4;
  --link:   #1a5276;
  --code-bg:#f0f0ec;
  --max:    780px;
}

/* Auto dark (OS preference) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:     #181816;
    --fg:     #e4e4e0;
    --muted:  #999;
    --border: #2e2e2a;
    --link:   #7db8d8;
    --code-bg:#222220;
  }
}

/* Teme manuale */
[data-theme="light"]    { --bg:#f9f9f7; --fg:#1a1a1a; --muted:#5a5a5a; --border:#d8d8d4; --link:#1a5276; --code-bg:#f0f0ec; }
[data-theme="warm"]     { --bg:#fdf6e3; --fg:#2d2005; --muted:#7a6040; --border:#e0d2b0; --link:#8b4513; --code-bg:#f5ead0; }
[data-theme="paper"]    { --bg:#f0ebe0; --fg:#1c1c10; --muted:#6b6050; --border:#cdc5b0; --link:#003580; --code-bg:#e4dece; }
[data-theme="dark"]     { --bg:#181816; --fg:#e4e4e0; --muted:#999;    --border:#2e2e2a; --link:#7db8d8; --code-bg:#222220; }
[data-theme="deep"]     { --bg:#0d1117; --fg:#c9d1d9; --muted:#8b949e; --border:#21262d; --link:#58a6ff; --code-bg:#161b22; }
[data-theme="terminal"] { --bg:#001100; --fg:#00cc44; --muted:#007722; --border:#003311; --link:#00ff88; --code-bg:#001a00; }
[data-theme="ink"]      { --bg:#ffffff; --fg:#000000; --muted:#444444; --border:#000000; --link:#000000; --code-bg:#eeeeee; }
[data-theme="ink"] body { filter: grayscale(1); }

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

body {
  background:  var(--bg);
  color:       var(--fg);
  font-family: ui-monospace, 'Cascadia Code', 'Fira Mono', 'JetBrains Mono',
               'Source Code Pro', Menlo, 'DejaVu Sans Mono', Consolas, monospace;
  font-size:   clamp(1rem, 2.2vw, 1.08rem);
  line-height: 1.85;
  padding:     clamp(1.2rem, 5vw, 2rem) 1rem;
}

a               { color: var(--link); }
a:hover         { opacity: 0.8; }
img             { max-width: 100%; height: auto; display: block; }
.wrap           { max-width: var(--max); margin: 0 auto; }

/* --- Header --- */
header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
}

.header-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.site-logo     { display: block; flex-shrink: 0; }
.site-logo img { height: clamp(36px, 8vw, 64px); width: auto; }

.site-center {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  pointer-events: none;
}
.site-center a,
.site-center p { pointer-events: auto; }

.site-name   { font-size: clamp(1.3rem, 4.5vw, 1.8rem); font-weight: bold; line-height: 1.2; text-align: center; }
.site-name a { color: var(--fg); text-decoration: none; }

.site-desc { color: var(--muted); font-size: 0.88rem; margin-top: 0.3rem; text-align: center; }

.header-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
  font-size: 0.86rem;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
nav a:hover { color: var(--fg); opacity: 1; }

/* --- Controale tema --- */
.theme-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
}
.theme-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.theme-btn:hover { color: var(--fg); border-color: var(--muted); }

.theme-picker-wrap { position: relative; }
.theme-picker {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.5rem;
  z-index: 200;
  gap: 0.35rem;
  flex-wrap: wrap;
  width: 160px;
}
.theme-picker.open { display: flex; }

.ts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 2px;
  user-select: none;
}
.ts:hover, .ts.active { border-color: var(--fg); }
.ts[data-set-theme="auto"]     { background: linear-gradient(135deg, #f9f9f7 50%, #181816 50%); color: #888; }
.ts[data-set-theme="light"]    { background: #f9f9f7; color: #1a1a1a; border-color: #d8d8d4; }
.ts[data-set-theme="warm"]     { background: #fdf6e3; color: #2d2005; border-color: #e0d2b0; }
.ts[data-set-theme="paper"]    { background: #f0ebe0; color: #1c1c10; border-color: #cdc5b0; }
.ts[data-set-theme="dark"]     { background: #181816; color: #e4e4e0; border-color: #2e2e2a; }
.ts[data-set-theme="deep"]     { background: #0d1117; color: #c9d1d9; border-color: #21262d; }
.ts[data-set-theme="terminal"] { background: #001100; color: #00cc44; border-color: #003311; }
.ts[data-set-theme="ink"]      { background: #ffffff; color: #000000; border-color: #000000; }

/* --- Feed --- */
.feed { list-style: none; }

.entry {
  padding: clamp(1rem, 3vw, 1.4rem) 0;
  border-bottom: 1px solid var(--border);
}
.entry:last-child { border-bottom: none; }

.entry-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.04em; }

.entry-permalink { color: var(--muted); text-decoration: none; }
.entry-permalink:hover { color: var(--fg); opacity: 1; }

.entry-note-link { display: block; }

.entry-title { font-size: clamp(1.55rem, 2.8vw, 1.7rem); margin-bottom: 0.5rem; line-height: 1.2; font-weight: bold; }
.entry-title a { color: var(--fg); text-decoration: none; }
.entry-title a:hover { text-decoration: underline; }

.entry-body p          { margin-bottom: 0.7rem; }
.entry-body p:last-child { margin-bottom: 0; }
.entry-body img        { margin: 0.5rem 0; }
.entry-body h1 { font-size: 1.35rem; margin: 1rem 0 0.4rem; line-height: 1.3; }
.entry-body h2 { font-size: 1.15rem; margin: 0.8rem 0 0.3rem; line-height: 1.3; }
.entry-body h3 { font-size: 1.05rem; margin: 0.6rem 0 0.3rem; line-height: 1.3; }
.entry-body ul, .entry-body ol { padding-left: 1.5rem; margin-bottom: 0.6rem; }
.entry-body li { margin-bottom: 0.2rem; }
.entry-body blockquote {
  border-left: 3px solid var(--border);
  padding: 0.4rem 0.85rem;
  color: var(--muted);
  margin: 0.75rem 0;
}
.entry-body h4, .entry-body h5, .entry-body h6 { margin: 0.6rem 0 0.25rem; line-height: 1.3; }
.entry-body h4 { font-size: 1rem; }
.entry-body h5 { font-size: 0.95rem; }
.entry-body h6 { font-size: 0.9rem; }
.entry-body pre {
  background: var(--code-bg);
  padding: 0.75rem 1rem;
  overflow-x: auto;
  margin: 0.6rem 0;
  font-size: 0.88rem;
  border: 1px solid var(--border);
}
.entry-body code {
  background: var(--code-bg);
  padding: 0.1rem 0.3rem;
  font-size: 0.88rem;
  border: 1px solid var(--border);
}
.entry-body pre code { background: none; padding: 0; border: none; }
.entry-body hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.entry-body table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.88rem; display: block; overflow-x: auto; }
.entry-body th { background: var(--code-bg); border: 1px solid var(--border); padding: 0.35rem 0.6rem; text-align: left; font-weight: bold; }
.entry-body td { border: 1px solid var(--border); padding: 0.3rem 0.6rem; vertical-align: top; }
.entry-body tr:nth-child(even) td { background: var(--code-bg); }
.entry-body mark { background: rgba(255,210,0,0.35); color: inherit; padding: 0 0.15rem; }
.entry-body .task-item { list-style: none; margin-left: -1.5rem; padding-left: 0; }
.entry-body .task-item input[type=checkbox] { margin-right: 0.4rem; accent-color: var(--link); cursor: default; }
.entry-body figure { margin: 0.8rem 0; }

.entry-note {
  font-size: 0.98rem;
}
.entry-note p { margin-bottom: 0.4rem; }
.entry-note-link[data-href] {
  cursor: pointer;
  display: block;
  transition: opacity 0.15s;
}
.entry-note-link[data-href]:hover { opacity: 0.75; }

.entry-photo a img     { transition: opacity 0.15s; }
.entry-photo a:hover img { opacity: 0.88; }
.entry-photo .caption  { font-size: 0.85rem; color: var(--muted); font-style: italic; margin-top: 0.4rem; }

figure       { margin: 1rem 0; }
figcaption   { font-size: 0.85rem; color: var(--muted); font-style: italic; margin-top: 0.35rem; }

/* --- Post individual --- */
.post-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.04em; }
.post-title { font-size: clamp(1.55rem, 2.8vw, 1.7rem); font-weight: bold; line-height: 1.2; margin-bottom: 1.2rem; }
.post-body p           { margin-bottom: 0.85rem; }
.post-body p:last-child { margin-bottom: 0; }
.post-body figure      { margin: 1.2rem 0; }
.post-body h1, .post-body h2, .post-body h3,
.post-body h4, .post-body h5, .post-body h6 {
  margin: 1.5rem 0 0.6rem;
  line-height: 1.3;
}
.post-body h1 { font-size: 1.35rem; }
.post-body h2 { font-size: 1.15rem; }
.post-body h3 { font-size: 1.05rem; }
.post-body h4 { font-size: 1rem; }
.post-body h5 { font-size: 0.95rem; }
.post-body h6 { font-size: 0.9rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 0.8rem; }
.post-body li { margin-bottom: 0.2rem; }
.post-body blockquote {
  border-left: 3px solid var(--border);
  padding: 0.5rem 1rem;
  color: var(--muted);
  margin: 1rem 0;
}
.post-body pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.92rem;
  border: 1px solid var(--border);
}
.post-body code {
  background: var(--code-bg);
  padding: 0.1rem 0.35rem;
  font-size: 0.92rem;
  border: 1px solid var(--border);
}
.post-body pre code { background: none; padding: 0; border: none; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.post-photo img { margin-bottom: 0.5rem; }
.post-caption { font-size: 0.85rem; color: var(--muted); font-style: italic; margin-top: 0.4rem; }

.back-link { display: inline-block; margin-top: 2rem; font-size: 0.88rem; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--fg); opacity: 1; }

/* --- Tabele markdown (post + pagini) --- */
.post-body table, .page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.92rem;
  overflow-x: auto;
  display: block;
}
.post-body th, .page-body th {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  text-align: left;
  font-weight: bold;
}
.post-body td, .page-body td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  vertical-align: top;
}
.post-body tr:nth-child(even) td,
.page-body tr:nth-child(even) td { background: var(--code-bg); }

/* --- Task lists --- */
.post-body .task-item,
.page-body .task-item { list-style: none; margin-left: -1.5rem; padding-left: 0; }
.post-body .task-item input[type=checkbox],
.page-body .task-item input[type=checkbox] {
  margin-right: 0.4rem;
  accent-color: var(--link);
  cursor: default;
}

/* --- Mark / highlight --- */
.post-body mark, .page-body mark {
  background: rgba(255, 210, 0, 0.35);
  color: inherit;
  padding: 0 0.15rem;
}
[data-theme="dark"] .post-body mark,
[data-theme="deep"] .post-body mark,
[data-theme="terminal"] .post-body mark,
[data-theme="dark"] .page-body mark,
[data-theme="deep"] .page-body mark,
[data-theme="terminal"] .page-body mark {
  background: rgba(200, 160, 0, 0.3);
}

/* --- Pagini custom --- */
.page-title { font-size: clamp(1.55rem, 2.8vw, 1.7rem); font-weight: bold; line-height: 1.2; margin-bottom: 1.2rem; }
.page-body p           { margin-bottom: 0.85rem; }
.page-body p:last-child { margin-bottom: 0; }
.page-body h1, .page-body h2, .page-body h3,
.page-body h4, .page-body h5, .page-body h6 {
  margin: 1.5rem 0 0.6rem;
  line-height: 1.3;
}
.page-body h1 { font-size: 1.35rem; }
.page-body h2 { font-size: 1.15rem; }
.page-body h3 { font-size: 1.05rem; }
.page-body ul, .page-body ol { padding-left: 1.5rem; margin-bottom: 0.8rem; }
.page-body li { margin-bottom: 0.2rem; }
.page-body blockquote {
  border-left: 3px solid var(--border);
  padding: 0.5rem 1rem;
  color: var(--muted);
  margin: 1rem 0;
}
.page-body pre {
  background: var(--code-bg);
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.92rem;
  border: 1px solid var(--border);
}
.page-body code {
  background: var(--code-bg);
  padding: 0.1rem 0.35rem;
  font-size: 0.92rem;
  border: 1px solid var(--border);
}
.page-body pre code { background: none; padding: 0; border: none; }
.page-body hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.page-body figure { margin: 1.2rem 0; }

/* Card-uri: blockquote cu titlu h3 (pagina Proiecte etc.) */
.page-body blockquote:has(h3) {
  border-left: none;
  border: 1px solid var(--border);
  background: var(--code-bg);
  color: var(--fg);
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
}
.page-body blockquote:has(h3) h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.page-body blockquote:has(h3) p  { margin-bottom: 0.3rem; color: var(--muted); font-size: 0.93rem; }
.page-body blockquote:has(h3) p:last-child { margin-bottom: 0; }
.page-body blockquote:has(h3) a {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.85rem;
}
.page-body blockquote:has(h3) a:hover { opacity: 0.8; }

/* --- Paginare --- */
.pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
}
.pag-btn {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
}
.pag-btn:hover { border-color: var(--muted); color: var(--fg); opacity: 1; }
.pag-info { color: var(--muted); font-size: 0.82rem; }

/* --- Cautare --- */
.search-form { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.search-form input[type=search] {
  flex: 1; min-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg);
  font: inherit; font-size: 0.95rem; color: var(--fg);
  -webkit-appearance: none; appearance: none;
}
.search-form input[type=search]:focus { outline: 2px solid var(--link); outline-offset: -1px; }
.search-form button {
  padding: 0.5rem 1rem;
  background: var(--fg); color: var(--bg);
  border: none; font: inherit; font-size: 0.9rem;
  cursor: pointer; min-height: 44px;
}
.search-form button:hover { opacity: 0.8; }
.search-count  { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
.search-excerpt { font-size: 0.92rem; color: var(--muted); margin-top: 0.3rem; }

/* --- Comentarii --- */
.comments {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.comments-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
}
.comment-list { list-style: none; }
.comment {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}
.comment-author { font-size: 0.92rem; font-weight: bold; }
.comment-author.is-admin { color: var(--link); }
.comment-date   { font-size: 0.75rem; color: var(--muted); }
.comment-body   { font-size: 0.95rem; line-height: 1.65; }
.comment-body p { margin-bottom: 0.3rem; }

/* Raspunsuri */
.comment-replies { margin-left: 1.5rem; border-left: 2px solid var(--border); padding-left: 1rem; margin-top: 0.5rem; }
.comment-replies .comment { border-bottom: none; padding: 0.6rem 0; }

.reply-details {
  margin-top: 0.4rem;
}
.reply-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  list-style: none;
  display: inline;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.reply-details summary::-webkit-details-marker { display: none; }
.reply-details summary::marker { display: none; }
.reply-details summary:hover { color: var(--fg); }

.reply-form { margin-top: 0.75rem; }
.reply-form textarea {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  background: var(--bg);
  font: inherit;
  font-size: 0.93rem;
  color: var(--fg);
  resize: vertical;
  min-height: 80px;
}
.reply-form textarea:focus { outline: 2px solid var(--link); outline-offset: -1px; }
.reply-submit {
  margin-top: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: var(--fg);
  color: var(--bg);
  border: none;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.reply-submit:hover { opacity: 0.8; }

.comment-notice {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0,128,0,0.08);
  border: 1px solid rgba(0,128,0,0.2);
  font-size: 0.9rem;
}
.comment-error {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.9rem;
  background: rgba(200,0,0,0.06);
  border: 1px solid rgba(200,0,0,0.2);
  font-size: 0.88rem;
}

.comment-form    { margin-top: 1.5rem; }
.comment-fields  { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
.cfield          { display: flex; flex-direction: column; gap: 0.25rem; }
.cfield label    { font-size: 0.8rem; color: var(--muted); }
.cfield .opt     { font-weight: normal; }
.cfield input,
.cfield textarea {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  background: var(--bg);
  font: inherit;
  font-size: 0.93rem;
  color: var(--fg);
  -webkit-appearance: none; appearance: none;
}
.cfield input:focus,
.cfield textarea:focus { outline: 2px solid var(--link); outline-offset: -1px; }
.cfield textarea { resize: vertical; min-height: 110px; }
.comment-submit {
  margin-top: 0.75rem;
  padding: 0.45rem 1.1rem;
  background: var(--fg);
  color: var(--bg);
  border: none;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
}
.comment-submit:hover { opacity: 0.8; }

/* --- Buton sus --- */
#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
#back-to-top.visible { opacity: 1; visibility: visible; }
#back-to-top:hover { color: var(--fg); border-color: var(--muted); }

/* --- Empty / errors --- */
.empty { color: var(--muted); }
.e404  { color: var(--muted); margin-top: 2rem; }

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  margin-top: clamp(2rem, 6vw, 3rem);
  padding-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}
footer a { color: var(--muted); }

/* --- Timp de citire --- */
.read-time { font-variant-numeric: tabular-nums; }

/* --- Badge status programat --- */
.badge-scheduled {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0,100,200,0.12);
  color: #004080;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 0.3rem;
}
[data-theme="dark"] .badge-scheduled,
[data-theme="deep"] .badge-scheduled,
[data-theme="terminal"] .badge-scheduled {
  background: rgba(100,180,255,0.15);
  color: #7db8d8;
}

/* --- Footnotes --- */
.footnotes {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.footnotes ol {
  padding-left: 1.5rem;
}
.footnotes li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}
.footnote-back {
  margin-left: 0.4rem;
  font-size: 0.9em;
  text-decoration: none;
  color: var(--muted);
}
.footnote-back:hover { color: var(--fg); }
sup a {
  font-size: 0.75em;
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
  color: var(--link);
}

/* --- Syntax highlighting --- */
.tok-kw  { color: #0070bb; }
.tok-str { color: #1a7240; }
.tok-cmt { color: #888; font-style: italic; }
.tok-num { color: #c0392b; }
.tok-fn  { color: #7d4a8d; }
.tok-var { color: #d35400; }
.tok-op  { color: var(--fg); }

[data-theme="dark"] .tok-kw,
[data-theme="deep"] .tok-kw,
[data-theme="terminal"] .tok-kw   { color: #79b8ff; }
[data-theme="dark"] .tok-str,
[data-theme="deep"] .tok-str,
[data-theme="terminal"] .tok-str  { color: #85e89d; }
[data-theme="dark"] .tok-cmt,
[data-theme="deep"] .tok-cmt,
[data-theme="terminal"] .tok-cmt  { color: #6a737d; }
[data-theme="dark"] .tok-num,
[data-theme="deep"] .tok-num,
[data-theme="terminal"] .tok-num  { color: #f97583; }
[data-theme="dark"] .tok-fn,
[data-theme="deep"] .tok-fn,
[data-theme="terminal"] .tok-fn   { color: #b392f0; }
[data-theme="dark"] .tok-var,
[data-theme="deep"] .tok-var,
[data-theme="terminal"] .tok-var  { color: #ffab70; }

/* --- Webmentions (public) --- */
.webmentions {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.webmentions-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.wm-list { list-style: none; }
.wm-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.wm-item:last-child { border-bottom: none; }
.wm-meta {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}
.wm-author { font-size: 0.9rem; font-weight: bold; color: var(--fg); }
.wm-date   { font-size: 0.75rem; color: var(--muted); }
.wm-excerpt { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.3rem; line-height: 1.6; }
.wm-source { font-size: 0.8rem; color: var(--muted); text-decoration: none; }
.wm-source:hover { color: var(--fg); }

/* --- Arhiva --- */
.archive-title { font-size: clamp(1.55rem, 2.8vw, 1.7rem); font-weight: bold; line-height: 1.2; margin-bottom: 1.5rem; }
.archive-group { margin-bottom: 2rem; }
.archive-month { font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.archive-list { list-style: none; }
.archive-item { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.2rem 0; font-size: 0.93rem; }
.archive-date { color: var(--muted); font-size: 0.82rem; white-space: nowrap; min-width: 5rem; }
.archive-type { font-size: 0.72rem; text-transform: uppercase; color: var(--muted); min-width: 3rem; }
.archive-item a { color: var(--fg); text-decoration: none; }
.archive-item a:hover { text-decoration: underline; }

/* --- Honeypot anti-spam (invizibil garantat) --- */
.ww-hp { display: none !important; }

/* --- Scrollbar --- */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* --- Progress bar --- */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: var(--link);
  z-index: 999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* --- Lightbox --- */
.lightbox-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); z-index: 1000;
  align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 94vw; max-height: 92vh; object-fit: contain; display: block; }
.lightbox-close { position: absolute; top: 1rem; right: 1.2rem; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; background: none; border: none; }

/* --- Copy link --- */
.copy-link-btn {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-family: inherit; font-size: 0.72rem;
  padding: 0; margin-left: 0.6rem;
  vertical-align: middle;
  transition: color 0.15s;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.copy-link-btn:hover { color: var(--fg); }
.copy-link-btn.copied { color: var(--fg); text-decoration: none; }

/* --- Responsive --- */
@media (max-width: 480px) {
  nav { gap: 0 0.8rem; font-size: 0.82rem; }
  .comment-fields { grid-template-columns: 1fr; }
  #back-to-top { bottom: 1rem; right: 1rem; }
}

/* --- Comentarii Fediverse --- */
.comment-fedi-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.35rem;
  border: 1px solid var(--border);
}
.comment-fedi-badge {
  font-size: 0.68rem;
  background: var(--border);
  color: var(--muted);
  border-radius: 3px;
  padding: 0 0.3rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

