@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --text: #1a1a2e;
  --muted: #6b7280;
  --accent: #e67e22;
  --accent-2: #27ae60;
  --border: #e5e7eb;
  --radius: 14px;
}



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

::selection { background: var(--accent); color: #fff; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.site-header:hover { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.5px; }
.logo span { color: var(--accent-2); }
.nav { display: flex; gap: 28px; font-size: 0.95rem; font-weight: 500; }
.nav a {
  color: var(--muted); transition: color 0.25s; position: relative;
}
.nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width 0.3s; border-radius: 1px;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
  border-radius: 10px; font-weight: 600; font-size: 0.95rem; font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #d35400);
  color: #fff; box-shadow: 0 4px 15px rgba(230, 126, 34, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 25px rgba(230, 126, 34, 0.45); }
.btn-ghost {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Hero */
.hero {
  position: relative; overflow: hidden; padding: 110px 0 90px;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(230, 126, 34, 0.1), transparent),
    radial-gradient(800px 450px at 85% 10%, rgba(39, 174, 96, 0.08), transparent),
    var(--bg);
  animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
.hero .container { max-width: 820px; text-align: center; }
.hero-badge {
  display: inline-block; background: var(--surface); color: var(--accent-2);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 18px; font-size: 0.85rem; font-weight: 600; margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.6s ease-out;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem); line-height: 1.1;
  font-weight: 900; letter-spacing: -1.5px;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}
.hero h1 em {
  font-style: normal; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
  color: var(--muted); margin: 22px auto 34px; max-width: 600px;
  font-size: 1.15rem; line-height: 1.75;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}
.hero .btn { animation: fadeInUp 0.6s ease-out 0.3s both; }

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

/* 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: 14px;
  scrollbar-width: thin;
}
.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: 220px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s;
}
.gallery-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.15);
}
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-card:hover img { transform: scale(1.06); }
.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.35; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gallery-date {
  color: var(--accent-2); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
}

/* Sections */
.section { padding: 70px 0; }
.section-title {
  font-size: 1.8rem; font-weight: 800; margin-bottom: 30px; letter-spacing: -0.5px;
}
.section-title small {
  color: var(--accent-2); display: block; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 2.5px; margin-bottom: 6px; font-weight: 700;
}

/* Trending chips */
.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.trend-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  height: 165px; display: flex; align-items: flex-end;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s, box-shadow 0.35s;
}
.trend-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.82; transition: opacity 0.4s, transform 0.4s;
}
.trend-card:hover img { opacity: 1; transform: scale(1.07); }
.trend-card span {
  position: relative; padding: 16px 18px; font-weight: 700; font-size: 1.08rem;
  color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); width: 100%;
}

/* Article cards */
.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.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s, border-color 0.35s;
  display: flex; flex-direction: column;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
  border-image: linear-gradient(135deg, var(--accent), var(--accent-2)) 1;
}
.post-card img { height: 200px; width: 100%; object-fit: cover; transition: transform 0.4s; }
.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: 500; }
.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; transition: background 0.2s, color 0.2s;
}
.tag:hover { background: var(--accent); color: #fff; }
.post-card h3 { font-size: 1.18rem; line-height: 1.4; font-weight: 700; }
.post-card h3 a { transition: color 0.25s; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p.desc { color: var(--muted); font-size: 0.92rem; flex: 1; line-height: 1.65; }
.read-more {
  color: var(--accent-2); font-weight: 700; font-size: 0.9rem;
  transition: color 0.25s, gap 0.25s; display: inline-flex; align-items: center; gap: 4px;
}
.read-more:hover { color: var(--accent); gap: 8px; }

/* Post page */
.post-hero {
  max-width: 820px; margin: 45px auto 35px; padding: 0 20px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.post-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem); margin: 26px 0 14px;
  letter-spacing: -0.8px; line-height: 1.2; font-weight: 800;
}
.article-content {
  max-width: 800px; margin: 0 auto 50px; padding: 40px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.article-content h2 {
  margin: 38px 0 14px; font-size: 1.6rem; font-weight: 700;
  border-left: 4px solid var(--accent); padding-left: 14px;
}
.article-content h3 {
  margin: 28px 0 12px; font-size: 1.25rem; color: var(--accent); font-weight: 700;
}
.article-content p { margin: 16px 0; color: #3a4252; font-size: 1.05rem; line-height: 1.85; }
.article-content p:first-of-type::first-letter {
  float: left; font-size: 3.2rem; font-weight: 800; line-height: 1;
  margin: 4px 12px 0 0; color: var(--accent);
}
.article-content ul, .article-content ol { margin: 16px 0 16px 26px; color: #3a4252; }
.article-content li { margin: 8px 0; font-size: 1.02rem; }
.article-content blockquote {
  border-left: 4px solid var(--accent-2); background: var(--surface-2);
  padding: 16px 20px; margin: 22px 0;
  border-radius: 0 12px 12px 0; color: var(--muted);
  font-style: italic; font-size: 1.02rem;
}
.article-content code {
  background: var(--surface-2); padding: 3px 7px; border-radius: 5px;
  font-size: 0.9em; font-family: 'Consolas', 'Monaco', monospace;
}
.article-content pre {
  background: #1e2430; border: 1px solid var(--border);
  color: #e8eaf0; padding: 20px; border-radius: 12px;
  overflow-x: auto; margin: 22px 0; line-height: 1.6;
}
.article-content pre code { background: none; padding: 0; color: inherit; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--accent-2); }
.article-content hr { border: none; border-top: 2px solid var(--border); margin: 36px 0; }
.article-content strong { color: var(--text); font-weight: 700; }

/* Newsletter CTA */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.06), rgba(39, 174, 96, 0.06));
}
.cta-inner {
  max-width: 620px; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 50px 40px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
.cta-inner h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.cta-inner p { color: var(--muted); margin-bottom: 26px; font-size: 1.05rem; }
.cta-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cta-form input {
  padding: 13px 18px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 0.95rem; width: 280px; font-family: inherit; background: var(--bg);
}
.cta-form input:focus { outline: none; border-color: var(--accent); }

/* Admin */
.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: 38px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}
.admin-card h1 { font-size: 1.6rem; margin-bottom: 8px; font-weight: 800; }
.admin-card .sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 28px; }
.error-msg {
  background: #fdecec; color: #c0392b; padding: 12px 16px;
  border-radius: 10px; margin-bottom: 18px; font-size: 0.9rem; font-weight: 500;
}
.success-msg {
  background: #e6f7f0; color: #0b7a5e; padding: 12px 16px;
  border-radius: 10px; margin-bottom: 18px; font-size: 0.9rem; font-weight: 500;
}
.admin-panel { max-width: 880px; margin: 55px 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; font-weight: 800; }
.form-grid {
  display: grid; gap: 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}
.form-group { margin-bottom: 4px; }
.form-group label {
  font-size: 0.85rem; color: var(--muted); display: block;
  margin-bottom: 7px; 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.25s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}
.form-group textarea { min-height: 320px; font-family: 'Consolas', monospace; line-height: 1.65; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check-row {
  display: flex; align-items: center; gap: 10px;
  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: 12px; padding: 16px 20px; margin-bottom: 12px;
  transition: box-shadow 0.25s, border-color 0.25s;
}
.post-row:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
}
.post-row .danger {
  color: #c0392b; background: none; border: none;
  cursor: pointer; font-size: 0.9rem; font-weight: 600; font-family: inherit;
  transition: color 0.2s;
}
.post-row .danger:hover { color: #a93226; }
.empty-state { text-align: center; color: var(--muted); padding: 70px 0; font-size: 1.05rem; }

/* 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); }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 70px;
  padding: 30px 0; color: var(--muted); font-size: 0.9rem;
  background: linear-gradient(135deg, 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.25s; }
.footer-nav a:hover { color: var(--accent); }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }

/* Responsive */
@media (max-width: 720px) {
  .header-inner { flex-direction: column; height: auto; padding: 14px 0; gap: 10px; }
  .nav { flex-wrap: wrap; justify-content: center; gap: 18px; }
  .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: 14px; align-items: flex-start; }
  .post-row { flex-direction: column; gap: 12px; align-items: flex-start; }
  .article-content { padding: 24px; }
  .cta-inner { padding: 36px 24px; }
}
