/* ============================================================================
   SUMMER THEME — Fresh Vibrant Season
   Tropical greens, coral oranges, ocean blues, golden yellows
   Full video background support · Glassmorphism cards
   Fonts: Outfit (body) + Fraunces (headings)
   ============================================================================ */

:root {
  --bg: #f0faf4;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-solid: #ffffff;
  --text: #1a3a2a;
  --text-muted: #5a7a6a;
  --border: rgba(0, 180, 120, 0.15);
  --accent: #ff6b35;
  --accent-hover: #e85a28;
  --accent-2: #00b478;
  --accent-3: #0099cc;
  --accent-4: #f5c842;
  --radius: 16px;
  --radius-sm: 10px;
  --glass-blur: 18px;
  --glass-border: rgba(255, 255, 255, 0.35);
  --shadow: 0 8px 32px rgba(0, 100, 60, 0.08);
  --shadow-hover: 0 12px 40px rgba(0, 100, 60, 0.14);
  --gradient-summer: linear-gradient(135deg, #00b478 0%, #0099cc 50%, #ff6b35 100%);
  --gradient-warm: linear-gradient(135deg, #ff6b35 0%, #f5c842 100%);
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-heading: 'Fraunces', Georgia, serif;
}

/* ---- Reset & Base ---- */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ---- Video Background ---- */

.summer-video-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  object-fit: cover;
  z-index: -2;
}

.summer-video-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(
    180deg,
    rgba(240, 250, 244, 0.55) 0%,
    rgba(240, 250, 244, 0.75) 40%,
    rgba(240, 250, 244, 0.92) 100%
  );
  z-index: -1;
}

/* ---- Container ---- */

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

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  background: rgba(240, 250, 244, 0.7);
  border-bottom: 1px solid var(--glass-border);
}

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

.site-brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-brand:hover { color: var(--accent); }

.brand-icon {
  font-size: 1.5rem;
  color: var(--accent-4);
  filter: drop-shadow(0 0 4px rgba(245, 200, 66, 0.5));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.nav-admin {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.nav-form { display: inline; }
.nav-link-btn {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted); padding: 0;
}
.nav-link-btn:hover { color: var(--accent); }

.icon-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  border-radius: 8px; display: flex; align-items: center;
  transition: all 0.2s;
}
.icon-btn:hover { color: var(--accent); background: rgba(0, 180, 120, 0.08); }

/* Search bar */
.search-bar {
  display: none;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.search-bar.active { display: block; }

.search-form {
  display: flex; gap: 8px;
}
.search-form input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.search-form input:focus { border-color: var(--accent-2); }

/* ---- Flash Messages ---- */

.flash {
  padding: 14px 0;
  font-size: 0.9rem;
  font-weight: 500;
}
.flash .container { display: flex; align-items: center; justify-content: space-between; }
.flash-close { background: none; border: none; cursor: pointer; font-size: 1.2rem; opacity: 0.6; color: inherit; }
.flash-success { background: rgba(0, 180, 120, 0.12); color: #0a6e48; }
.flash-error { background: rgba(255, 80, 60, 0.12); color: #b42318; }
.flash-info { background: rgba(0, 153, 204, 0.12); color: #0a5a7a; }

/* ---- Main Content ---- */

.site-main {
  padding: 48px 0;
  min-height: calc(100vh - 200px);
}

/* ---- Layout: Sidebar ---- */

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ---- Post Card ---- */

.post-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 28px;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.post-card-image img {
  width: 100%; height: 220px;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .post-card-image img { transform: scale(1.03); }

.post-card-body { padding: 24px 28px; }

.post-card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 10px; font-size: 0.82rem;
}

.post-date { color: var(--text-muted); }

.post-card-title { font-family: var(--font-heading); font-size: 1.45rem; line-height: 1.3; margin-bottom: 8px; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; margin-bottom: 16px; }

.post-card-footer {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.82rem; color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.post-stats { display: flex; gap: 12px; }
.stat { display: flex; align-items: center; gap: 4px; }
.stat svg { opacity: 0.6; }

.read-more {
  margin-left: auto; font-weight: 600;
  color: var(--accent); font-size: 0.85rem;
}

/* ---- Tags ---- */

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(0, 180, 120, 0.1), rgba(0, 153, 204, 0.1));
  color: var(--accent-2);
  border: 1px solid rgba(0, 180, 120, 0.15);
  transition: all 0.2s;
}
.tag:hover {
  background: var(--accent-2); color: #fff; border-color: var(--accent-2);
}
.tag-sm { padding: 2px 8px; font-size: 0.72rem; }

/* ---- Sidebar ---- */

.sidebar-widget {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 14px;
  color: var(--text);
}
.widget-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 14px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.inline-sub-form { display: flex; gap: 8px; }
.inline-sub-form input {
  flex: 1; padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text); outline: none;
}
.inline-sub-form input:focus { border-color: var(--accent-2); }
.inline-sub-form button {
  padding: 8px 18px; border: none;
  background: var(--gradient-warm);
  color: #fff; font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit;
  transition: opacity 0.2s;
}
.inline-sub-form button:hover { opacity: 0.9; }

/* ---- Single Post ---- */

.post-layout { max-width: 760px; margin: 0 auto; }

.post-hero { margin: -24px -24px 28px; border-radius: var(--radius); overflow: hidden; }
.post-hero-img { width: 100%; max-height: 420px; object-fit: cover; }

.post-header { margin-bottom: 32px; }
.post-meta-top { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.post-title {
  font-family: var(--font-heading);
  font-size: 2.5rem; font-weight: 700;
  line-height: 1.2; margin-bottom: 14px;
  background: var(--gradient-summer);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.post-byline {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 0.88rem; color: var(--text-muted);
  align-items: center;
}
.post-author { font-weight: 600; color: var(--accent-2); }
.post-stats-inline { color: var(--text-muted); }

/* Prose / post body */
.prose { font-size: 1.05rem; line-height: 1.8; }
.prose h2 { font-family: var(--font-heading); font-size: 1.6rem; margin: 2rem 0 0.8rem; color: var(--text); }
.prose h3 { font-family: var(--font-heading); font-size: 1.3rem; margin: 1.6rem 0 0.6rem; }
.prose p { margin-bottom: 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem 1.5rem; }
.prose li { margin-bottom: 0.4rem; }
.prose blockquote {
  border-left: 4px solid var(--accent-2);
  padding: 12px 20px; margin: 1.5rem 0;
  background: rgba(0, 180, 120, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted); font-style: italic;
}
.prose code {
  background: rgba(0, 153, 204, 0.08);
  padding: 2px 7px; border-radius: 5px;
  font-size: 0.9em; color: var(--accent-3);
}
.prose pre {
  background: #1a3a2a; color: #d4f5e6;
  padding: 20px 24px; border-radius: var(--radius-sm);
  overflow-x: auto; margin: 1.5rem 0;
  font-size: 0.88rem; line-height: 1.6;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose img { border-radius: var(--radius-sm); margin: 1.5rem 0; }
.prose a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.prose hr { border: none; border-top: 2px solid var(--border); margin: 2rem 0; }

/* Post footer / actions */
.post-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }

.post-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

.like-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--bg-card);
  cursor: pointer; font-family: inherit;
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-muted);
  transition: all 0.25s;
}
.like-btn:hover, .like-btn.liked {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 107, 53, 0.08);
}

.share-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: transparent;
  cursor: pointer; font-family: inherit;
  font-size: 0.85rem; color: var(--text-muted);
  transition: all 0.2s;
}
.share-btn:hover { border-color: var(--accent-3); color: var(--accent-3); }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags-label { font-size: 0.85rem; color: var(--text-muted); margin-right: 4px; }

/* ---- Comments ---- */

.comments-section { margin-top: 48px; }
.comments-heading {
  font-family: var(--font-heading);
  font-size: 1.5rem; margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.comment-count-badge {
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 600;
  background: var(--accent-2); color: #fff;
  padding: 2px 10px; border-radius: 50px;
}

.comment-form-wrap {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.comment-form-title { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 0.85rem;
  font-weight: 500; margin-bottom: 6px;
  color: var(--text);
}
.muted { color: var(--text-muted); font-weight: 400; }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text); outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent-2); }

.form-group textarea { resize: vertical; }

.btn-primary {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  background: var(--gradient-warm);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-full { width: 100%; text-align: center; }

/* Comment list */
.comment {
  display: flex; gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-reply { padding-left: 20px; }

.comment-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-summer);
  color: #fff; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.comment-author { font-size: 0.92rem; }
.comment-time { font-size: 0.78rem; color: var(--text-muted); }
.comment-content { font-size: 0.92rem; line-height: 1.6; }

.reply-toggle {
  background: none; border: none; cursor: pointer;
  font-size: 0.82rem; font-weight: 500;
  color: var(--accent-3); padding: 4px 0;
  margin-top: 6px; font-family: inherit;
}
.reply-toggle:hover { text-decoration: underline; }

.comment-replies { margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--border); }

.no-comments { text-align: center; padding: 32px; color: var(--text-muted); font-style: italic; }

/* ---- Archive ---- */

.archive-header { margin-bottom: 36px; text-align: center; }
.archive-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  background: var(--gradient-summer);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.archive-subtitle { font-size: 0.95rem; color: var(--text-muted); margin-top: 8px; }

.archive-list { list-style: none; }
.archive-item {
  display: flex; gap: 20px; align-items: baseline;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.archive-item:hover { background: rgba(0, 180, 120, 0.06); }
.archive-date { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; min-width: 55px; }
.archive-item-body { flex: 1; }
.archive-title-link { font-weight: 600; color: var(--text); font-size: 1.05rem; }
.archive-title-link:hover { color: var(--accent); }
.archive-tags { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- Auth ---- */

.auth-wrap { display: flex; justify-content: center; padding: 40px 0; }
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.auth-title {
  font-family: var(--font-heading);
  font-size: 1.8rem; margin-bottom: 6px;
}
.auth-sub { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 28px; }

.form-error-banner {
  background: rgba(255, 80, 60, 0.1);
  border: 1px solid rgba(255, 80, 60, 0.25);
  color: #b42318;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 20px;
}
.field-error { color: #d93025; font-size: 0.82rem; margin-top: 4px; display: block; }

.auth-form { margin-bottom: 20px; }
.auth-switch { text-align: center; font-size: 0.88rem; color: var(--text-muted); }
.auth-switch a { font-weight: 600; }

/* ---- Subscribe ---- */

.subscribe-wrap { display: flex; justify-content: center; padding: 60px 0; }
.subscribe-card {
  width: 100%; max-width: 480px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 48px 36px;
  text-align: center;
  box-shadow: var(--shadow);
}
.subscribe-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  color: var(--accent-4);
  filter: drop-shadow(0 0 8px rgba(245, 200, 66, 0.4));
}
.subscribe-title {
  font-family: var(--font-heading);
  font-size: 1.8rem; margin-bottom: 10px;
}
.subscribe-desc { color: var(--text-muted); margin-bottom: 28px; font-size: 0.95rem; }
.subscribe-form { text-align: left; }
.subscribe-success { padding: 16px 0; }
.subscribe-success p { margin-bottom: 16px; font-weight: 500; color: var(--accent-2); }

/* ---- Pagination ---- */

.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.pag-btn {
  padding: 8px 18px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.88rem; font-weight: 500;
  color: var(--text); transition: all 0.2s;
}
.pag-btn:hover { border-color: var(--accent); color: var(--accent); }
.pag-info { font-size: 0.85rem; color: var(--text-muted); }

/* ---- Empty State ---- */

.empty-state {
  text-align: center; padding: 80px 20px;
  color: var(--text-muted); font-size: 1.05rem;
}
.empty-state a { display: inline-block; margin-top: 12px; font-weight: 600; }

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 48px;
  background: rgba(240, 250, 244, 0.5);
  backdrop-filter: blur(8px);
}

.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
  font-size: 1.1rem;
}
.footer-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.footer-nav { display: flex; gap: 20px; }
.footer-nav a { font-size: 0.88rem; color: var(--text-muted); font-weight: 500; }
.footer-nav a:hover { color: var(--accent); }

/* ---- Toast ---- */

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0; transform: translateY(12px);
  transition: all 0.3s;
  pointer-events: none;
  z-index: 9999;
}
.toast.active { opacity: 1; transform: translateY(0); }

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar { order: -1; }

  .header-inner { height: 56px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.82rem; }

  .post-title { font-size: 1.8rem; }
  .archive-title { font-size: 1.6rem; }

  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-nav { justify-content: center; }

  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .site-main { padding: 32px 0; }

  .post-card-body { padding: 18px 20px; }
  .post-card-title { font-size: 1.2rem; }
  .post-title { font-size: 1.5rem; }
  .auth-card { padding: 28px 20px; }
  .subscribe-card { padding: 32px 20px; }

  .site-nav a:not(.nav-admin) { display: none; }
  .site-nav .icon-btn { display: flex; }
}
