/* VavilonWood — Restorer's Collection */
:root {
  --wood-dark: #2c1810;
  --wood-mid: #5c3a21;
  --wood-light: #8b5e3c;
  --wood-pale: #c4a484;
  --cream: #f7f0e6;
  --cream-dark: #ebe0d0;
  --accent: #a67c52;
  --accent-hover: #8b5e3c;
  --text: #2a1f18;
  --text-muted: #6b5344;
  --card-bg: #fffdf9;
  --border: #e0d5c5;
  --success: #4a7c59;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(44, 24, 16, 0.08);
  --shadow-hover: 0 8px 30px rgba(44, 24, 16, 0.14);
  --font-main: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ========== HEADER ========== */
.site-header {
  background: linear-gradient(135deg, var(--wood-dark) 0%, var(--wood-mid) 100%);
  color: var(--cream);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--wood-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-sub {
  font-size: 0.75rem;
  opacity: 0.75;
  font-weight: 400;
}

.nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--cream);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
  opacity: 0.9;
  transition: background 0.2s, opacity 0.2s;
}

.nav a:hover, .nav a.active {
  background: rgba(255,255,255,0.15);
  opacity: 1;
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(160deg, var(--wood-mid) 0%, var(--wood-dark) 100%);
  color: var(--cream);
  padding: 3.5rem 1.5rem 4rem;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.8rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--wood-pale);
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ========== MAIN LAYOUT ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--wood-dark);
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  font-size: 0.95rem;
}

/* ========== FILTERS ========== */
.filters-bar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.8rem;
  box-shadow: var(--shadow);
}

.search-box {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%236b5344' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 0.9rem center no-repeat;
  color: var(--text);
  transition: border-color 0.2s;
}

.search-box:focus {
  outline: none;
  border-color: var(--accent);
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cat-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--cream);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cat-btn:hover {
  border-color: var(--accent);
  color: var(--wood-mid);
}

.cat-btn.active {
  background: var(--wood-mid);
  border-color: var(--wood-mid);
  color: white;
}

.results-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

/* ========== POST CARDS ========== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.4rem;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.post-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.post-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wood-dark);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  background: var(--cream-dark);
  color: var(--wood-mid);
  border-radius: 4px;
}

.reactions {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== MODAL / POST VIEW ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.55);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  margin-bottom: 3rem;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--cream-dark);
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--wood-pale);
  color: var(--wood-dark);
}

.modal-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--wood-dark);
  margin-bottom: 1rem;
  line-height: 1.3;
  padding-right: 2rem;
}

.modal-body {
  font-size: 1rem;
  line-height: 1.75;
  white-space: pre-wrap;
  color: var(--text);
}

.modal-tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.modal-reactions {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========== PHILOSOPHY SECTION ========== */
.philosophy {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.philosophy h2 {
  font-family: var(--font-serif);
  color: var(--wood-dark);
  margin-bottom: 1rem;
}

.philosophy p {
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

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

.principle {
  background: var(--cream);
  padding: 1.1rem;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.principle strong {
  display: block;
  color: var(--wood-dark);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.principle span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--wood-dark);
  color: var(--wood-pale);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--cream);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-links {
  margin: 0.8rem 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state p {
  margin-top: 0.5rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  .hero { padding: 2.5rem 1rem 3rem; }
  .hero-stats { gap: 1.5rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .modal { padding: 1.5rem 1.2rem; }
  .header-inner { flex-direction: column; align-items: flex-start; }
}
EOF
