﻿/* NeelBots — shared site styles
   Keep this file lean; page-specific tweaks can live in small additions below. */

:root {
  --color-bg: #0f1419;
  --color-surface: #1a2332;
  --color-surface-2: #243044;
  --color-text: #e7ecf3;
  --color-muted: #9aa8bc;
  --color-accent: #3d9cf0;
  --color-accent-hover: #62b0f5;
  --color-border: #2e3d52;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", ui-monospace, monospace;
  --max-width: 720px;
  --max-width-wide: 960px;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  background-image:
    radial-gradient(ellipse at top left, rgba(61, 156, 240, 0.08), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(61, 156, 240, 0.05), transparent 45%);
}

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

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

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

/* --- Layout --- */

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner,
.site-footer__inner,
.container {
  width: min(100% - 2rem, var(--max-width-wide));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
}

.logo:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.logo span {
  color: var(--color-accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--color-text);
}

main {
  flex: 1;
  padding: 2.5rem 0 3.5rem;
}

.container--narrow {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* --- Typography --- */

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.75rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.muted {
  color: var(--color-muted);
}

/* --- Components --- */

.hero {
  padding: 1rem 0 2rem;
}

.hero__tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: #0a0f14;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #0a0f14;
}

.btn--ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

/* --- Blog --- */

.post-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.post-list__item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.post-list__item:first-child {
  border-top: 1px solid var(--color-border);
}

.post-list__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.35rem;
}

.post-list__title {
  font-size: 1.2rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.post-list__title a {
  color: var(--color-text);
  text-decoration: none;
}

.post-list__title a:hover {
  color: var(--color-accent);
}

.post-list__excerpt {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.98rem;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.article-header .post-list__meta {
  margin-bottom: 0.75rem;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.article-body pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

.article-body pre code {
  background: none;
  padding: 0;
}

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

.article-nav {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.placeholder-note {
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--color-muted);
  margin-top: 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
