:root {
  --bg: #080a14;
  --card: #0f1324;
  --muted: #b8bfd6;
  --text: #f4f6ff;
  --line: #273052;
  --accent: #d4a84f;
  --accent-2: #9d7aff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1a2040 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.65;
}

a { color: inherit; }

.blog-header {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
}

.nav-link:hover { color: var(--text); }

.blog-wrap,
.post-wrap,
.admin-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

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

.blog-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.blog-hero p {
  color: var(--muted);
  max-width: 760px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.post-preview,
.post-card,
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem;
}

.post-preview h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.meta {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.excerpt {
  margin: 0.5rem 0 1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.2rem 0.55rem;
}

.btn,
button {
  display: inline-block;
  background: linear-gradient(120deg, var(--accent), #f5d889);
  color: #1c1405;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  padding: 0.58rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.empty,
.error {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 1rem;
}

.post-card {
  max-width: 780px;
  margin: 0 auto;
}

.post-card h1 {
  margin-top: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.2;
}

.content p,
.content ul { margin: 0 0 1rem; }

.content ul { padding-left: 1.2rem; }

.cta {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
}

@media (max-width: 860px) {
  .admin-grid { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.75rem 0 0.35rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a0e1d;
  color: var(--text);
  padding: 0.6rem 0.7rem;
  font: inherit;
}

textarea { min-height: 220px; resize: vertical; }

.inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.notice {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

.list button {
  margin-right: 0.4rem;
  margin-top: 0.5rem;
}
