/* ─── Hollow Blog — Design Tokens ─── */
:root {
  --bg:         #0a0d0c;
  --surface:    #0f1413;
  --surface-2:  #131a18;
  --border:     #283130;
  --border-sub: #1a2120;
  --green:      #2f9e6f;
  --green-dim:  rgba(47,158,111,0.12);
  --green-border: rgba(47,158,111,0.25);
  --text:       #f2f4f1;
  --text-2:     #b2bcb7;
  --text-3:     #8a9490;
  --text-4:     #5a6663;
  --text-5:     #3a4340;
  --font-head:  "Space Grotesk", "Inter", -apple-system, system-ui, sans-serif;
  --font-body:  "Inter", "Geist", -apple-system, system-ui, sans-serif;
  --radius:     18px;
  --radius-sm:  8px;
  --radius-btn: 6px;
  --radius-pill: 100px;
  --max-w:      920px;
  --max-w-post: 720px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* ─── Nav (exact hollow.host) ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 12, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid #283130;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark {
  width: 26px;
  height: 26px;
  background: url("https://hollow.host/img/logo.png") center/contain no-repeat;
  display: block;
  flex-shrink: 0;
}
.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}
.site-header .nav-links a {
  color: #b2bcb7;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
  font-family: var(--font-body);
}
.site-header .nav-links a:hover,
.site-header .nav-links a.nav-blog-active {
  color: var(--text);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-primary {
  background: #2f9e6f;
  color: #fff;
  box-shadow: inset 0 1px rgba(255,255,255,0.18), 0 1px rgba(0,0,0,0.2);
}
.btn-primary:hover {
  background: #43b785;
  box-shadow: inset 0 1px rgba(255,255,255,0.22), 0 4px 24px rgba(47,158,111,0.3);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
}
.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: #b2bcb7;
  border-radius: 6px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); }

/* ─── Topo background (exact hollow.host) ─── */
body { position: relative; }
.page-backdrop-grid {
  position: fixed;
  inset: 0;
  background: url("https://hollow.host/img/topo.svg") center/cover no-repeat;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.page-wrap {
  position: relative;
  z-index: 1;
}

/* ─── Layout ─── */
.container-blog { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-post { max-width: var(--max-w-post); margin: 0 auto; padding: 0 24px; }
.container-admin { max-width: 1020px; margin: 0 auto; padding: 0 24px; }

/* ─── Hero ─── */
.hero {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--border-sub);
}
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
  display: inline-block;
}
.label-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  letter-spacing: 0.04em;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.hero p {
  font-size: 16px;
  color: var(--text-3);
  line-height: 1.6;
  max-width: 560px;
}

/* ─── Filter Bar ─── */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding: 40px 0 24px;
}
.cat-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-btn {
  background: var(--surface);
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  transition: all 0.2s;
}
.cat-btn:hover { border-color: var(--text-4); color: var(--text-2); }
.cat-btn.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  font-weight: 500;
}
.search-wrap {
  position: relative;
  width: 220px;
  flex-shrink: 0;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px 9px 38px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--green); }
.search-input::placeholder { color: var(--text-4); }

/* ─── Featured Card ─── */
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.featured-card:hover { border-color: var(--green); }
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 12px;
}
.featured-card h2 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.featured-card p {
  font-size: 15px;
  color: var(--text-3);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 16px;
}
.card-meta {
  font-size: 12px;
  color: var(--text-4);
  display: flex;
  justify-content: space-between;
}
.card-meta .read-link { color: var(--green); font-weight: 500; }

/* ─── Post Grid ─── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding-bottom: 80px;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.post-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}
.post-card-banner {
  height: 160px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border-sub);
}
.post-card-body { padding: 24px 24px 20px; }
.post-card-cat {
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}
.post-card-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.post-card-excerpt {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Single Post ─── */
.post-header { padding: 64px 0 0; }
.back-btn {
  background: none;
  border: none;
  color: var(--green);
  font-size: 14px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  transition: opacity 0.2s;
}
.back-btn:hover { opacity: 0.8; }
.post-cat {
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}
.post-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.post-meta {
  font-size: 14px;
  color: var(--text-4);
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-sub);
}
.post-banner {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 32px;
  max-height: 400px;
  object-fit: cover;
}
.post-content {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.8;
  padding-bottom: 48px;
}
.post-content p { margin-bottom: 1.2em; }
.post-content strong { color: var(--text); font-weight: 600; }
.post-content em { font-style: italic; }
.post-content code {
  background: rgba(47,158,111,0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #5ce4a0;
}
.post-content h2, .post-content h3 {
  font-family: var(--font-head);
  color: var(--text);
  margin: 2em 0 0.6em;
}
.post-content h2 { font-size: 24px; }
.post-content h3 { font-size: 20px; }
.post-content ul, .post-content ol {
  margin: 0 0 1.2em 1.4em;
  color: var(--text-2);
}
.post-content li { margin-bottom: 0.4em; }
.post-content blockquote {
  border-left: 3px solid var(--green);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-3);
}
.post-content a { color: var(--green); text-decoration: underline; }
.post-content a:hover { opacity: 0.8; }
.post-footer {
  border-top: 1px solid var(--border-sub);
  padding: 32px 0 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ─── CTA Banner ─── */
.cta-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  margin: 32px 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h3 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.cta-banner p {
  font-size: 14px;
  color: var(--text-3);
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--text-4);
}
.empty-state p:first-child { font-size: 16px; margin-bottom: 8px; }
.empty-state p:last-child { font-size: 14px; }

/* ─── Admin ─── */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.admin-title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.admin-subtitle {
  font-size: 14px;
  color: var(--text-4);
  margin-top: 4px;
}
.admin-actions { display: flex; gap: 8px; }

/* Table */
.admin-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 80px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-4);
  font-weight: 500;
  border-bottom: 1px solid var(--border-sub);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-2);
  border-bottom: 1px solid #111614;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface-2); }
.td-title { color: var(--text) !important; font-weight: 500; max-width: 300px; }
.td-actions { text-align: right !important; }
.td-actions-inner { display: flex; gap: 6px; justify-content: flex-end; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-dim { background: rgba(255,255,255,0.06); color: var(--text-4); }
.badge-featured { margin-left: 8px; font-size: 11px; }

/* Buttons */
.btn {
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--green); color: #fff; }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--text-3); }
.btn-danger { background: rgba(220,60,60,0.12); color: #ef6060; }
.btn-outline {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
}
.btn-lg { padding: 10px 20px; font-size: 14px; }

/* ─── Editor ─── */
.editor-wrap { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.field-group { margin-bottom: 20px; }
.field-label {
  display: block;
  font-size: 13px;
  color: var(--text-4);
  margin-bottom: 6px;
  font-weight: 500;
}
.field-label .hint { font-weight: 400; color: var(--text-5); }
.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
}
.input:focus { border-color: var(--green); }
.input::placeholder { color: var(--text-4); }
.textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  min-height: 320px;
  resize: vertical;
  line-height: 1.7;
  transition: border-color 0.2s;
}
.textarea:focus { border-color: var(--green); }
.textarea::placeholder { color: var(--text-4); }
.select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
}
.field-row { display: flex; gap: 16px; }
.field-row > * { flex: 1; }
.checkbox-row {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 8px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-3);
  cursor: pointer;
}
.checkbox-label input { accent-color: var(--green); }
.preview-section {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-sub);
}
.preview-label {
  font-size: 13px;
  color: var(--text-4);
  font-weight: 500;
  margin-bottom: 16px;
}
.banner-preview {
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  height: 160px;
  background-size: cover;
  background-position: center;
}

/* ─── Login ─── */
.login-wrap {
  max-width: 380px;
  margin: 120px auto;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.login-wrap img { width: 48px; height: 48px; margin: 0 auto 20px; }
.login-wrap h2 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.login-wrap p { font-size: 14px; color: var(--text-4); margin-bottom: 24px; }
.login-wrap .input { text-align: center; margin-bottom: 12px; }
.login-wrap .btn { width: 100%; justify-content: center; padding: 10px 16px; }
.login-hint { font-size: 12px; color: var(--text-5); margin-top: 16px; }

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--green);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: toast-in 0.3s ease;
}
.toast.hide { animation: toast-out 0.3s ease forwards; }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(20px); opacity: 0; } }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 90%;
  max-width: 500px;
}
.modal h2 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border-sub);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-5);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links a:not(:last-child):not(.nav-link-blog) { display: none; }
  .filter-bar { flex-direction: column; }
  .search-wrap { width: 100%; }
  .post-grid { grid-template-columns: 1fr; }
  .featured-card { padding: 24px; }
  .featured-card h2 { font-size: 22px; }
  .cta-banner { flex-direction: column; text-align: center; }
  .field-row { flex-direction: column; }
  .admin-table-wrap { overflow-x: auto; }
  .admin-table { min-width: 700px; }
  .td-actions-inner { flex-wrap: wrap; }
}

/* ─── Utilities ─── */
.hidden { display: none !important; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
