@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700&display=swap');

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #2c1810;
  --muted: #7a6a5e;
  --accent: #8b4513;
  --accent-2: #2d5016;
  --accent-light: #d4a574;
  --border: #e8e0d6;
  --radius: 14px;
  --shadow: 0 2px 8px rgba(44, 24, 16, 0.06);
  --shadow-md: 0 8px 24px rgba(44, 24, 16, 0.08);
  --shadow-lg: 0 16px 40px rgba(44, 24, 16, 0.10);
}



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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  font-size: 1.05rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--accent-light); border-radius: 5px; border: 2px solid var(--surface-2); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

::selection { background: var(--accent-light); color: var(--text); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

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

.fade-in {
  animation: fadeInUp 0.6s ease-out both;
}

.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.2s; }
.fade-in:nth-child(4) { animation-delay: 0.3s; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}


.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.nav { display: flex; gap: 24px; font-size: 0.95rem; }
.nav a {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.25s, transform 0.15s;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav a:hover { color: var(--accent); transform: translateY(-1px); }
.nav a:hover::after { width: 100%; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  background:
    linear-gradient(135deg, rgba(139, 69, 19, 0.08), rgba(45, 80, 22, 0.06)),
    radial-gradient(900px 450px at 15% 10%, rgba(139, 69, 19, 0.12), transparent),
    radial-gradient(700px 350px at 85% 30%, rgba(45, 80, 22, 0.08), transparent);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238b4513' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero .container { max-width: 780px; text-align: center; }

.hero-badge {
  display: inline-block;
  background: var(--surface);
  color: var(--accent-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  margin: 20px auto 32px;
  max-width: 560px;
  font-size: 1.15rem;
  line-height: 1.7;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #a0522d);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 69, 19, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.35);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

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

/* Gallery */
.gallery-section { padding: 40px 0 20px; }

.gallery-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}

.gallery-scroll::-webkit-scrollbar { height: 6px; }
.gallery-scroll::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 3px; }
.gallery-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.gallery-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 210px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-card:hover img { transform: scale(1.05); }

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gallery-overlay h3 {
  color: #fff;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-date {
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* Section */
.section { padding: 64px 0; }

.section-title {
  font-size: 1.8rem;
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}

.section-title small {
  color: var(--accent-2);
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 6px;
}

/* Trending */
.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

.trend-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 160px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trend-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.trend-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.3s, transform 0.4s;
}

.trend-card:hover img { opacity: 1; transform: scale(1.06); }

.trend-card span {
  position: relative;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  width: 100%;
}

/* Post Grid */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  position: relative;
}

.post-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

.post-card:hover::before { opacity: 1; }

.post-card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover img { transform: scale(1.03); }

.post-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.post-meta {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.tag {
  display: inline-block;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-right: 6px;
  margin-bottom: 2px;
  transition: background 0.2s, color 0.2s;
}

.tag:hover { background: var(--accent); color: #fff; }

.post-card h3 { font-size: 1.2rem; line-height: 1.35; }
.post-card h3 a:hover { color: var(--accent); transition: color 0.2s; }
.post-card p.desc { color: var(--muted); font-size: 0.95rem; flex: 1; line-height: 1.6; }

.read-more {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.2s, gap 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more:hover { color: var(--accent); gap: 8px; }

/* Post Hero */
.post-hero {
  max-width: 800px;
  margin: 48px auto 36px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.post-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 28px 0 14px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

/* Article Content */
.article-content {
  max-width: 800px;
  margin: 0 auto 50px;
  padding: 36px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.article-content h2 {
  margin: 36px 0 14px;
  font-size: 1.6rem;
  border-left: 4px solid var(--accent);
  padding-left: 14px;
}

.article-content h3 {
  margin: 28px 0 12px;
  font-size: 1.3rem;
  color: var(--accent);
}

.article-content p {
  margin: 16px 0;
  font-size: 1.08rem;
  line-height: 1.8;
  color: #3a2a1e;
}


.article-content p:first-of-type::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  margin: 6px 12px 0 0;
  color: var(--accent);
  font-weight: 700;
}

.article-content ul, .article-content ol {
  margin: 16px 0 16px 24px;
  font-size: 1.05rem;
}

.article-content li { margin: 8px 0; line-height: 1.7; }

.article-content blockquote {
  border-left: 4px solid var(--accent-2);
  background: var(--surface-2);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 12px 12px 0;
  color: var(--muted);
  font-style: italic;
  font-size: 1.05rem;
}

.article-content code {
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.9em;
}

.article-content pre {
  background: #1e2430;
  border: 1px solid var(--border);
  color: #e8eaf0;
  padding: 18px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 20px 0;
}

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

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-light);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.article-content a:hover { text-decoration-color: var(--accent); }

.article-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-light), transparent);
  margin: 36px 0;
}

.article-content strong { color: var(--text); font-weight: 700; }

.article-content img {
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

/* CTA / Newsletter */
.cta-section {
  padding: 70px 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  text-align: center;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M20 20h20v20H20z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}

.cta-section p {
  max-width: 500px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
  opacity: 0.9;
}

.cta-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.cta-form input {
  flex: 1;
  padding: 13px 18px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.cta-form button {
  padding: 13px 28px;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s;
}

.cta-form button:hover {
  background: #fff;
  color: var(--accent);
}

/* Admin Body */
.admin-body { background: var(--bg); }

.admin-wrap {
  max-width: 480px;
  margin: 80px auto;
  padding: 0 20px;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.admin-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.admin-card .sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 26px; }

.error-msg {
  background: #fdecec;
  color: #c0392b;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.success-msg {
  background: #e6f7f0;
  color: #0b7a5e;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.admin-panel {
  max-width: 900px;
  margin: 50px auto;
  padding: 0 20px;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.admin-top h1 { font-size: 1.7rem; }

.form-grid {
  display: grid;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.form-group { margin-bottom: 4px; }

.form-group label {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-group textarea { min-height: 320px; font-family: Consolas, monospace; line-height: 1.6; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.95rem;
}

.check-row input { width: auto; accent-color: var(--accent); }

.post-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 10px;
  transition: box-shadow 0.2s;
}

.post-row:hover { box-shadow: var(--shadow); }

.post-row .danger {
  color: #c0392b;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

.post-row .danger:hover { color: #a93226; }

.empty-state { text-align: center; color: var(--muted); padding: 60px 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 30px 0;
  color: var(--muted);
  font-size: 0.9rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }

.footer-nav a {
  color: var(--muted);
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--accent); }

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

/* Markdown Editor */
.editor-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.tb-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.15s;
  font-family: inherit;
}

.tb-btn:hover { background: var(--surface); border-color: var(--border); }
.tb-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.tb-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
}

.editor-body { display: grid; }

.editor-body textarea {
  border: none;
  border-radius: 0;
  min-height: 400px;
  padding: 20px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.92rem;
  line-height: 1.7;
  resize: vertical;
}

.editor-body textarea:focus { outline: none; box-shadow: none; }

.editor-preview {
  padding: 24px;
  min-height: 400px;
  overflow-y: auto;
}

.editor-preview h1 { font-size: 1.8rem; margin: 20px 0 12px; }
.editor-preview h2 { font-size: 1.4rem; margin: 18px 0 10px; border-left: 3px solid var(--accent); padding-left: 10px; }
.editor-preview h3 { font-size: 1.15rem; margin: 14px 0 8px; color: var(--accent); }
.editor-preview p { margin: 10px 0; line-height: 1.7; }
.editor-preview ul { margin: 10px 0 10px 20px; }
.editor-preview blockquote { border-left: 3px solid var(--accent-2); background: var(--surface-2); padding: 10px 14px; margin: 12px 0; border-radius: 0 8px 8px 0; }
.editor-preview pre { background: #1e2430; color: #e8eaf0; padding: 14px; border-radius: 8px; overflow-x: auto; margin: 12px 0; }
.editor-preview code { background: var(--surface-2); padding: 2px 5px; border-radius: 4px; font-size: 0.9em; }

@media (min-width: 900px) {
  .editor-body { grid-template-columns: 1fr 1fr; }
  .editor-body textarea,
  .editor-preview { min-height: 500px; }
  .editor-preview { border-left: 1px solid var(--border); }
}

/* Responsive */
@media (max-width: 720px) {
  .header-inner { flex-direction: column; height: auto; padding: 14px 0; gap: 10px; }
  .nav { flex-wrap: wrap; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .gallery-card { flex: 0 0 82vw; }
  .two-col { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .admin-top { flex-direction: column; gap: 12px; align-items: flex-start; }
  .post-row { flex-direction: column; gap: 10px; align-items: flex-start; }
  .cta-form { flex-direction: column; }
  .article-content { padding: 24px 20px; }
}
