/* ==========================================================================
   Webtor Blog — Design System (matches webtor.io)
   ========================================================================== */

:root {
  --w-bg: #0a0e1a;
  --w-surface: #111827;
  --w-card: #1a2235;
  --w-pink: #e84393;
  --w-pinkL: #fd79a8;
  --w-purple: #6c5ce7;
  --w-purpleL: #a29bfe;
  --w-cyan: #00cec9;
  --w-text: #f1f5f9;
  --w-sub: #94a3b8;
  --w-muted: #64748b;
  --w-line: rgba(255, 255, 255, 0.07);
  --w-radius: 10px;
  --w-max-w: 720px;
}

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

html { scroll-padding-top: 88px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--w-bg);
  color: var(--w-sub);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

a {
  color: var(--w-pinkL);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--w-pink); }

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

/* ---------- Navbar ---------- */
.w-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2.5rem;
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--w-line);
}
.w-navbar-spacer { height: 80px; }

/* ---------- Logo ---------- */
.w-logo {
  font-family: 'Comfortaa', cursive;
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--w-text);
  text-decoration: none;
  letter-spacing: -0.025em;
  top: -1px;
  position: relative;
}
.w-logo:hover { color: var(--w-text); }
.w-logo .accent { color: var(--w-pink); }

/* ---------- Nav Links ---------- */
.w-nav-links {
  display: flex;
  gap: 0.35rem;
  list-style: none;
}
.w-nav-link {
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--w-sub);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.w-nav-link:hover {
  background: rgba(232, 67, 147, 0.1);
  color: var(--w-pinkL);
}
.w-nav-link.active {
  background: rgba(232, 67, 147, 0.15);
  color: var(--w-pinkL);
}

/* ---------- Language Switch ---------- */
.w-lang-switch {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.w-lang-switch a {
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--w-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.w-lang-switch a:hover {
  color: var(--w-text);
  background: rgba(255, 255, 255, 0.06);
}
.w-lang-switch a.active {
  color: var(--w-text);
  background: rgba(232, 67, 147, 0.18);
}

/* ---------- Container ---------- */
.w-container {
  max-width: var(--w-max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ---------- Page Title ---------- */
.w-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--w-text);
  margin-bottom: 2rem;
}

/* ---------- Post Cards ---------- */
.w-post-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.w-post-item {
  display: block;
  background: var(--w-card);
  border: 1px solid var(--w-line);
  border-radius: var(--w-radius);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.w-post-item:hover {
  border-color: rgba(232, 67, 147, 0.3);
  box-shadow: 0 0 20px rgba(232, 67, 147, 0.08);
}
.w-post-item__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--w-text);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}
.w-post-item:hover .w-post-item__title { color: var(--w-pinkL); }
.w-post-item__date {
  font-size: 0.82rem;
  color: var(--w-muted);
}

/* ---------- Prose (Article Content) ---------- */
.w-prose {
  color: var(--w-sub);
  line-height: 1.8;
  font-size: 1.05rem;
}
.w-prose h1, .w-prose h2, .w-prose h3, .w-prose h4 {
  color: var(--w-text);
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}
.w-prose h1 { font-size: 1.8rem; }
.w-prose h2 { font-size: 1.4rem; }
.w-prose h3 { font-size: 1.15rem; }
.w-prose h4 { font-size: 1rem; }
.w-prose p { margin-bottom: 1.25em; }
.w-prose a {
  color: var(--w-pinkL);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(253, 121, 168, 0.3);
}
.w-prose a:hover { text-decoration-color: var(--w-pinkL); }
.w-prose strong { color: var(--w-text); font-weight: 600; }

/* Inline code (not inside pre) */
.w-prose :not(pre) > code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--w-pinkL);
}
/* Code blocks */
.w-prose pre {
  background: var(--w-surface);
  border: 1px solid var(--w-line);
  border-radius: var(--w-radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5em 0;
}
.w-prose pre code {
  font-size: 0.88rem;
  padding: 0;
  background: none;
}

.w-prose blockquote {
  border-left: 3px solid var(--w-pink);
  padding: 0.5rem 1.25rem;
  margin: 1.5em 0;
  color: var(--w-sub);
  background: rgba(232, 67, 147, 0.04);
  border-radius: 0 var(--w-radius) var(--w-radius) 0;
}
.w-prose blockquote p { margin-bottom: 0; }
.w-prose img {
  border-radius: var(--w-radius);
  margin: 1.5em 0;
}
.w-prose ul, .w-prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}
.w-prose li { margin-bottom: 0.4em; }
.w-prose hr {
  border: none;
  border-top: 1px solid var(--w-line);
  margin: 2em 0;
}
.w-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.w-prose th, .w-prose td {
  padding: 0.6rem 1rem;
  border: 1px solid var(--w-line);
  text-align: left;
}
.w-prose th {
  background: var(--w-surface);
  color: var(--w-text);
  font-weight: 600;
}

/* ---------- Badges ---------- */
.w-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.w-badge:hover { opacity: 0.85; }
.w-badge--pink {
  background: rgba(232, 67, 147, 0.15);
  color: var(--w-pinkL);
}
.w-badge--purple {
  background: rgba(108, 92, 231, 0.15);
  color: var(--w-purpleL);
}
.w-badge--cyan {
  background: rgba(0, 206, 201, 0.15);
  color: var(--w-cyan);
}

/* ---------- Article Meta ---------- */
.w-article-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--w-text);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.w-article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.w-article-date {
  font-size: 0.85rem;
  color: var(--w-muted);
}

/* ---------- Related Posts ---------- */
.w-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--w-line);
}
.w-related__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--w-text);
  margin-bottom: 1rem;
}

/* ---------- Footer ---------- */
.w-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  background: var(--w-surface);
  border-top: 1px solid var(--w-line);
}
.w-footer__inner {
  max-width: var(--w-max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.w-footer__left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.w-footer__copy {
  font-size: 0.82rem;
  color: var(--w-muted);
}
.w-footer__links {
  display: flex;
  gap: 1rem;
}
.w-footer__links a {
  font-size: 0.82rem;
  color: var(--w-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.w-footer__links a:hover { color: var(--w-pinkL); }

/* ---------- Gradient Text ---------- */
.w-gradient-text {
  background: linear-gradient(135deg, var(--w-pink), var(--w-purpleL));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- 404 ---------- */
.w-404 {
  text-align: center;
  padding: 6rem 0;
}
.w-404__code {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1rem;
}
.w-404__text {
  font-size: 1.2rem;
  color: var(--w-sub);
  margin-bottom: 2rem;
}
.w-btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.w-btn--pink {
  background: var(--w-pink);
  color: #fff;
}
.w-btn--pink:hover { opacity: 0.88; color: #fff; }

/* ---------- Breadcrumb ---------- */
.w-breadcrumb {
  font-size: 0.85rem;
  color: var(--w-muted);
  margin-bottom: 1.5rem;
}
.w-breadcrumb a {
  color: var(--w-muted);
  text-decoration: none;
}
.w-breadcrumb a:hover { color: var(--w-pinkL); }
.w-breadcrumb span { margin: 0 0.4rem; }

/* ---------- Terms Grid ---------- */
.w-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--w-pink);
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .w-navbar { padding: 8px 1rem; }
  .w-nav-links { gap: 0.15rem; }
  .w-nav-link { padding: 0.35rem 0.65rem; font-size: 0.82rem; }
  .w-article-title { font-size: 1.5rem; }
  .w-post-item { padding: 1rem 1.15rem; }
  .w-post-item__title { font-size: 1.05rem; }
  .w-footer__inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .w-404__code { font-size: 4rem; }
}
