/* ============================================
   LITRL — Temă publicație europeană de tineret
   Syne + Source Serif 4 + DM Sans
   Albastru UE #003399
   ============================================ */

:root {
  /* Light mode */
  --bg: #ffffff;
  --bg-2: #f8f8f6;
  --bg-3: #f0f0ec;
  --border: #e8e8e4;
  --border-2: #d8d8d2;
  --text: #0f0f0e;
  --text-2: #4a4a46;
  --text-3: #8a8a84;
  --accent: #003399;
  --accent-light: #e8eeff;
  --accent-hover: #002277;
  --accent-text: #ffffff;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 16px rgba(0,51,153,0.1), 0 12px 32px rgba(0,0,0,0.08);
  --header-bg: rgba(255,255,255,0.95);

  --syne: 'Syne', system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --max: 1240px;
  --col: 700px;
  --r: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0c;
    --bg-2: #161616;
    --bg-3: #1e1e1e;
    --border: #2a2a2a;
    --border-2: #383838;
    --text: #f2f2f0;
    --text-2: #b0b0a8;
    --text-3: #686864;
    --accent: #4d7fff;
    --accent-light: #0d1a3a;
    --accent-hover: #6690ff;
    --accent-text: #ffffff;
    --card-bg: #161616;
    --card-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
    --card-shadow-hover: 0 4px 16px rgba(77,127,255,0.15), 0 12px 32px rgba(0,0,0,0.25);
    --header-bg: rgba(12,12,12,0.95);
  }
}

[data-theme="dark"] {
  --bg: #0c0c0c;
  --bg-2: #161616;
  --bg-3: #1e1e1e;
  --border: #2a2a2a;
  --border-2: #383838;
  --text: #f2f2f0;
  --text-2: #b0b0a8;
  --text-3: #686864;
  --accent: #4d7fff;
  --accent-light: #0d1a3a;
  --accent-hover: #6690ff;
  --accent-text: #ffffff;
  --card-bg: #161616;
  --card-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
  --card-shadow-hover: 0 4px 16px rgba(77,127,255,0.15), 0 12px 32px rgba(0,0,0,0.25);
  --header-bg: rgba(12,12,12,0.95);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f8f8f6;
  --bg-3: #f0f0ec;
  --border: #e8e8e4;
  --border-2: #d8d8d2;
  --text: #0f0f0e;
  --text-2: #4a4a46;
  --text-3: #8a8a84;
  --accent: #003399;
  --accent-light: #e8eeff;
  --accent-hover: #002277;
  --accent-text: #ffffff;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 16px rgba(0,51,153,0.1), 0 12px 32px rgba(0,0,0,0.08);
  --header-bg: rgba(255,255,255,0.95);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-brand { flex-shrink: 0; }

.site-name {
  font-family: var(--syne);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.site-logo { height: 32px; width: auto; }

.site-nav { flex: 1; }

.site-nav ul,
.site-nav .nav ul {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0.25rem;
}

.site-nav li,
.site-nav .nav li {
  list-style: none !important;
}

.site-nav .nav li a,
.site-nav li a {
  display: block;
  padding: 0.35rem 0.75rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.site-nav .nav li a:hover,
.site-nav li a:hover {
  background: var(--bg-2);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--border-2);
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.btn-subscribe {
  height: 34px;
  padding: 0 1rem;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-subscribe:hover { background: var(--accent-hover); }

.btn-account {
  height: 34px;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-account:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   TAG CHIP
   ============================================ */
.tag-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  font-family: var(--syne);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
}

.tag-chip:hover { background: var(--accent); color: var(--accent-text); }
.tag-chip.small { font-size: 0.62rem; height: 20px; padding: 0 8px; }

/* ============================================
   HERO
   ============================================ */
.hero {
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.hero-link { display: block; }

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.meta-date {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--text-3);
}

.hero-title {
  font-family: var(--syne);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-link:hover .hero-title { color: var(--accent); }

.hero-excerpt {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-byline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}

.byline-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.byline-name { font-weight: 600; }

.hero-image {
  height: 480px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-link:hover .hero-image img { transform: scale(1.02); }

/* ============================================
   POSTS GRID
   ============================================ */
.home-body {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card-img-link { display: block; }

.card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .card-img img { transform: scale(1.04); }

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-title {
  font-family: var(--syne);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  flex: 1;
}

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

.card-excerpt {
  font-family: var(--serif);
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.byline-avatar-sm {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.card-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ============================================
   POST PAGE
   ============================================ */
.post-wrap {
  max-width: var(--max);
  margin: 0 auto;
}

.post-header {
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
}

.post-header-inner {
  max-width: var(--col);
  margin: 0 auto;
}

.post-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.post-title {
  font-family: var(--syne);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.post-subtitle {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text-2);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.post-byline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.byline-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.byline-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.byline-initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--syne);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.byline-info { display: flex; flex-direction: column; }
.byline-name { font-weight: 700; font-size: 0.95rem; }
.byline-bio { font-size: 0.75rem; color: var(--text-3); margin-top: 0.1rem; }
.post-date { font-size: 0.82rem; color: var(--text-3); font-family: var(--sans); }

.post-hero {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  max-height: 540px;
}

.post-hero img { width: 100%; max-height: 540px; object-fit: cover; }

.post-hero figcaption {
  max-width: var(--col);
  margin: 0.5rem auto;
  font-size: 0.78rem;
  color: var(--text-3);
  font-style: italic;
  text-align: center;
  padding: 0 1.5rem;
}

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

/* ============================================
   GHOST CONTENT
   ============================================ */
.gh-content {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
}

.gh-content > * + * { margin-top: 1.5rem; }

.gh-content h2 {
  font-family: var(--syne);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text);
}

.gh-content h3 {
  font-family: var(--syne);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
}

.gh-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.gh-content a:hover { text-decoration-color: var(--accent); }

.gh-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  background: var(--bg-2);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-2);
  font-size: 1.1rem;
}

.gh-content ul, .gh-content ol { padding-left: 1.5rem; }
.gh-content li { margin-bottom: 0.4rem; }

.gh-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem auto;
  width: 30%;
}

.gh-content img { border-radius: 8px; width: 100%; }
.gh-content figure { margin: 2rem 0; }
.gh-content figcaption { text-align: center; font-size: 0.8rem; color: var(--text-3); margin-top: 0.5rem; font-style: italic; font-family: var(--sans); }

.gh-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

.gh-content pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--sans);
}

.gh-content pre code { background: none; border: none; color: var(--text); padding: 0; }

.kg-width-wide { margin-left: -6vw; margin-right: -6vw; }
.kg-width-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }
.kg-width-wide img, .kg-width-full img { width: 100%; }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color 0.15s, color 0.15s;
}

.tag-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   RELATED
   ============================================ */
.related {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 2.5rem 1.5rem 4rem;
}

.related-heading {
  max-width: var(--max);
  margin: 0 auto 1.5rem;
  font-family: var(--syne);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.related-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.related-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.related-img { aspect-ratio: 16/9; overflow: hidden; }
.related-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.related-card:hover .related-img img { transform: scale(1.04); }
.related-body { padding: 1rem; }
.related-body h4 { font-family: var(--syne); font-size: 0.95rem; font-weight: 700; line-height: 1.3; margin: 0.4rem 0; }
.related-body h4 a:hover { color: var(--accent); }
.related-body time { font-size: 0.72rem; color: var(--text-3); }

/* ============================================
   TAXONOMY
   ============================================ */
.taxonomy-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.taxonomy-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.author-header { display: flex; align-items: center; gap: 1.5rem; }

.taxonomy-label {
  font-family: var(--syne);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.taxonomy-title {
  font-family: var(--syne);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.taxonomy-desc { color: var(--text-2); margin-top: 0.5rem; font-family: var(--serif); font-size: 1rem; max-width: 600px; }

.author-avatar-lg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); flex-shrink: 0; }
.author-initials-lg {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent-light); color: var(--accent);
  border: 3px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--syne); font-size: 1.8rem; font-weight: 800; flex-shrink: 0;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 2.5rem 0 0;
}

.pagination a {
  height: 36px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.15s;
}

.pagination a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.page-number { font-size: 0.82rem; color: var(--text-3); }

/* ============================================
   ERROR
   ============================================ */
.error-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 1rem;
  padding: 4rem 2rem;
}

.error-code {
  font-family: var(--syne);
  font-size: 6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.error-wrap h1 { font-family: var(--syne); font-size: 1.8rem; font-weight: 700; }
.error-wrap a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

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

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-name {
  font-family: var(--syne);
  font-size: 1.2rem;
  font-weight: 800;
  display: block;
  margin-bottom: 0.3rem;
}

.footer-desc { font-size: 0.85rem; color: var(--text-2); }

.footer-nav ul,
.footer-nav .nav ul {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-nav .nav a,
.footer-nav a { font-size: 0.82rem; color: var(--text-2); transition: color 0.15s; }
.footer-nav .nav a:hover,
.footer-nav a:hover { color: var(--accent); }

.footer-bottom { font-size: 0.75rem; color: var(--text-3); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .hero-image { height: 300px; }
  .hero-content { padding: 2rem 0 1rem; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .header-inner { padding: 0 1rem; gap: 1rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .home-body { padding: 1.5rem 1rem 3rem; }
  .post-header { padding: 2rem 1rem 1.5rem; }
  .post-content-wrap { padding: 2rem 1rem 3rem; }
  .related { padding: 2rem 1rem 3rem; }
  .taxonomy-wrap { padding: 0 1rem 3rem; }
  .footer-top { flex-direction: column; }
}
