:root {
  --bg: #020617;
  --bg-alt: rgba(15, 23, 42, 0.9);
  --card-bg: rgba(15, 23, 42, 0.9);
  --border-subtle: rgba(148, 163, 184, 0.3);
  --accent-cyan: #22d3ee;
  --accent-violet: #a855f7;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.8);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: radial-gradient(circle at top left, #1d283a, #020617 55%) fixed;
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
}

a:hover {
  color: var(--accent-violet);
}

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

/* Header bar for blog pages */
.site-header {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  padding: 18px 20px;
  margin-bottom: 28px;
  background: linear-gradient(120deg, rgba(15,23,42,0.95), rgba(17,24,39,0.98));
  box-shadow: var(--shadow-soft);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  mix-blend-mode: screen;
  pointer-events: none;
}

.site-header.has-hero::before {
  background-size: cover;
  background-position: center;
  filter: saturate(140%) contrast(105%);
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 1;
}

.site-header-logo {
  width: 52px;
  height: 52px;
  padding: 6px;
  border-radius: 999px;
  background: radial-gradient(circle at 0% 0%, rgba(34,211,238,0.35), transparent 65%),
              radial-gradient(circle at 100% 100%, rgba(168,85,247,0.4), transparent 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148,163,184,0.5);
  backdrop-filter: blur(16px);
}

.site-header-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.site-header-text h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-header-text p {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--text-main);
  opacity: 0.9;
}

/* Blog layout */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
}

.article-card {
  background: linear-gradient(135deg, rgba(15,23,42,0.96), rgba(15,23,42,0.9));
  border-radius: 18px;
  padding: 22px 22px 26px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148,163,184,0.25);
}

.article-meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.article-title {
  font-size: 1.8rem;
  margin: 0 0 18px;
  line-height: 1.2;
}

.article-hero {
  margin-bottom: 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.4);
  background: radial-gradient(circle at top, rgba(34,211,238,0.2), transparent 60%);
}

.article-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.article-body {
  font-size: 0.98rem;
  color: var(--text-main);
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.3;
}

.article-body h2 {
  font-size: 1.25rem;
}

.article-body h3 {
  font-size: 1.1rem;
}

.article-body p {
  margin: 0 0 0.9em;
}

.article-body ul,
.article-body ol {
  padding-left: 1.2em;
  margin: 0 0 1em;
}

.article-body li + li {
  margin-top: 0.3em;
}

/* Other articles panel */
.other-articles {
  background: radial-gradient(circle at top left, rgba(34,211,238,0.12), transparent 60%),
              radial-gradient(circle at bottom right, rgba(168,85,247,0.12), transparent 55%),
              var(--bg-alt);
  border-radius: 18px;
  padding: 18px 16px 18px;
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 680px);
}

.other-articles-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.other-articles-title {
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.other-articles-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.other-articles-list {
  overflow-y: auto;
  padding-right: 6px;
}

.other-article-item {
  display: flex;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 12px;
  margin-bottom: 4px;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.other-article-item:last-child {
  margin-bottom: 0;
}

.other-article-item:hover {
  background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(168,85,247,0.16));
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15,23,42,0.7);
}

.other-article-thumb {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.4);
}

.other-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.other-article-text {
  flex: 1;
  min-width: 0;
}

.other-article-title {
  font-size: 0.9rem;
  margin: 0 0 2px;
  color: var(--text-main);
}

.other-article-title a {
  color: inherit;
}

.other-article-title a:hover {
  color: var(--accent-cyan);
}

.other-article-date {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

/* Landing page */
.landing-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.landing-card {
  position: relative;
  max-width: 680px;
  width: 100%;
  border-radius: 26px;
  padding: 32px 26px 30px;
  background:
    radial-gradient(circle at top left, rgba(34,211,238,0.24), transparent 60%),
    radial-gradient(circle at bottom right, rgba(168,85,247,0.28), transparent 60%),
    linear-gradient(135deg, rgba(15,23,42,0.96), rgba(15,23,42,0.94));
  box-shadow: 0 30px 80px rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.3);
  overflow: hidden;
}

.landing-glow {
  position: absolute;
  inset: -40%;
  opacity: 0.3;
  background:
    radial-gradient(circle at 0% 0%, rgba(34,211,238,0.5), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(168,85,247,0.5), transparent 55%);
  pointer-events: none;
}

.landing-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 1;
}

.landing-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.landing-logo-row .badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border: 1px solid rgba(148,163,184,0.4);
  color: var(--text-muted);
  background: rgba(15,23,42,0.85);
}

.landing-logo-row img {
  height: 40px;
  width: auto;
}

.landing-main-line {
  font-size: 2.2rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.landing-main-line span {
  background: linear-gradient(120deg, var(--accent-cyan), var(--accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: radial-gradient(circle at 0% 0%, rgba(34,211,238,0.4), transparent 55%),
              radial-gradient(circle at 100% 100%, rgba(168,85,247,0.55), transparent 55%),
              linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  color: #0b1120;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(8,47,73,0.95);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.landing-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 20px 55px rgba(15,23,42,1);
}

.landing-cta:active {
  transform: translateY(0);
  box-shadow: 0 10px 25px rgba(15,23,42,0.9);
}

.landing-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .other-articles {
    max-height: none;
    order: -1;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px 12px 40px;
  }
  .landing-card {
    padding: 26px 20px 24px;
  }
  .landing-main-line {
    font-size: 1.8rem;
  }
}
