/* ============================================================
   Demfati Blog - Design System
   Inspired by blog.google, Anthropic Newsroom & OpenAI Blog
   Theme accent: #048bff
   ============================================================ */

:root {
  /* Color tokens */
  --color-bg: #ffffff;
  --color-bg-subtle: #f8f9fa;
  --color-surface: #f1f3f4;
  --color-surface-hover: #f8f9fa;
  --color-text: #202124;
  --color-text-secondary: #5f6368;
  --color-text-muted: #80868b;
  --color-border: #e8eaed;
  --color-accent: #048bff;
  --color-accent-strong: #0376d6;
  --color-accent-soft: rgba(4, 139, 255, 0.08);
  --color-on-accent: #ffffff;

  /* Typography */
  --font-sans: "Inter", "Google Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.06), 0 2px 6px rgba(60, 64, 67, 0.05);
  --shadow-md: rgba(0, 0, 0, 0.06) 0px 8px 12px 4px, rgba(0, 0, 0, 0.08) 0px 2px 8px 0px;
  --shadow-lg: rgba(0, 0, 0, 0.1) 0px 2px 8px 0px, rgba(0, 0, 0, 0.08) 0px 8px 12px 4px;

  /* Layout */
  --container: 1140px;
  --gutter: 24px;

  /* Motion */
  --ease: cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a:hover {
  color: var(--color-accent-strong);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 0.5em;
}

h1 { font-size: 40px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding: 48px 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.btn-accent:hover {
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background: var(--color-bg-subtle);
  border-color: #dadce0;
  color: var(--color-text);
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
}

.btn-ghost:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 14px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.site-logo-text {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.25px;
  color: var(--color-text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Inline menu (desktop) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-link:hover {
  background: var(--color-bg-subtle);
  color: var(--color-text);
}

.nav-link.active {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* Search icon (far end) */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.search-icon-btn:hover {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: #dadce0;
}

.search-icon-btn.active {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.search-icon-btn svg {
  width: 19px;
  height: 19px;
}

/* Expanded search dropdown (below nav) */
.nav-search {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(380px, 92vw);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 10px 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
}

.search-wrap.open .nav-search {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s;
}

.nav-search:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft), var(--shadow-lg);
}

.nav-search svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.nav-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
  padding: 8px 10px;
}

.nav-search input::placeholder {
  color: var(--color-text-muted);
}

.nav-search button {
  border: none;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--ease);
}

.nav-search button:hover {
  background: var(--color-accent-strong);
}

.search-kbd {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 3px 6px;
  flex-shrink: 0;
}

.nav-search:focus-within .search-kbd {
  display: none;
}

/* Menu button (circle, mobile only) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 12px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-toggle:hover {
  background: var(--color-surface);
  border-color: #dadce0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1.08;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Section heading ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin: 0;
}

.section-title .accent {
  color: var(--color-accent);
}

.section-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
}

.section-link:hover {
  color: var(--color-accent-strong);
}

/* ---------- Post cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

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

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

.post-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-surface);
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

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

.post-card-media .badge-sponsored {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(32, 33, 36, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}

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

.card-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.card-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.2px;
  margin: 0 0 10px;
}

.card-title a {
  color: var(--color-text);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--color-accent);
}

.card-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 13px;
  color: var(--color-text-muted);
}

.card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #dadce0;
}

.card-meta a {
  color: var(--color-text-secondary);
  font-weight: 500;
  text-decoration: none;
}

.card-meta a:hover {
  color: var(--color-accent);
}

/* ---------- Featured card ---------- */
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.featured-media {
  position: relative;
  min-height: 320px;
  background: var(--color-surface);
  overflow: hidden;
}

.featured-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.featured:hover .featured-media img {
  transform: scale(1.03);
}

.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}

.featured-body .card-category {
  font-size: 13px;
}

.featured-body .card-title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.featured-body .card-excerpt {
  font-size: 16px;
  margin-bottom: 24px;
}

/* ---------- Sidebar ---------- */
.blog-sidebar {
  min-width: 0;
}

.sidebar-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-card:last-child {
  margin-bottom: 0;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-list li:first-child {
  padding-top: 0;
}

.sidebar-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-list a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.2s var(--ease);
}

.sidebar-list a:hover {
  color: var(--color-accent);
}

.sidebar-list .side-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
}

.sidebar-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.sidebar-cats a:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.sidebar-cats a .count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-pill);
  padding: 2px 9px;
}

.sidebar-cats a:hover .count {
  background: var(--color-accent);
  color: #fff;
}

.sidebar-cta {
  background: linear-gradient(135deg, rgba(4, 139, 255, 0.08), rgba(4, 139, 255, 0.02));
  border-color: rgba(4, 139, 255, 0.14);
}

.sidebar-cta h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

.sidebar-cta p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* ---------- Home layout ---------- */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  padding: 56px 0 72px;
}

/* ---------- Page head (category / search) ---------- */
.page-head {
  padding: 48px 0 8px;
}

.page-head .page-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.page-head h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.page-head p {
  color: var(--color-text-secondary);
  font-size: 16px;
  max-width: 640px;
}

/* ---------- Pagination ---------- */
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 44px;
}

.pagination-row .btn {
  font-size: 14px;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 64px 0;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
}

.empty-state .bx {
  font-size: 44px;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 16px;
}

/* ---------- Article (post) ---------- */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.article-head {
  margin-bottom: 40px;
}

.article-head .card-category {
  font-size: 13px;
}

.article-title {
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin: 0 0 24px;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), #6fc0ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.article-author .name {
  font-weight: 600;
  color: var(--color-text);
  font-size: 14px;
}

.article-meta .meta-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #dadce0;
}

.article-hero-img {
  border-radius: var(--radius-lg);
  width: 100%;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

.article-body {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.75;
  color: #3c4043;
}

.article-body p {
  margin-bottom: 1.4em;
}

.article-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.article-body a:hover {
  color: var(--color-accent-strong);
}

.article-body h2 {
  font-family: var(--font-sans);
  font-size: 28px;
  letter-spacing: -0.5px;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.article-body h3 {
  font-family: var(--font-sans);
  font-size: 22px;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}

.article-body h4 {
  font-family: var(--font-sans);
  font-size: 18px;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
}

.article-body img {
  border-radius: var(--radius-md);
  margin: 1.6em auto;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

.article-body li {
  margin-bottom: 0.4em;
}

.article-body blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--color-accent);
  color: var(--color-text-secondary);
  font-style: italic;
}

.article-body pre {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 1.6em 0;
}

.article-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85em;
  background: var(--color-bg-subtle);
  border-radius: 6px;
  padding: 2px 6px;
}

.article-body pre code {
  background: transparent;
  padding: 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 15px;
}

.article-body th,
.article-body td {
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  text-align: left;
}

.article-body th {
  background: var(--color-bg-subtle);
  font-family: var(--font-sans);
}

/* Tags */
.tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.tags-row .tags-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
}

.tag-pill {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

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

/* Share */
.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.share-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-size: 18px;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.share-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}

/* Newsletter */
.newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-top: 48px;
}

.newsletter-copy h3 {
  font-size: 22px;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.newsletter-copy p {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: 0;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.newsletter-form input {
  min-width: 240px;
  height: 46px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  padding: 0 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.newsletter-form input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.newsletter-form .btn {
  height: 46px;
}

/* ---------- Contact ---------- */
.contact-layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.contact-intro {
  text-align: center;
  margin-bottom: 40px;
}

.contact-intro h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.contact-intro p {
  color: var(--color-text-secondary);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.contact-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

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

.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.form-group .form-control {
  width: 100%;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-group textarea.form-control {
  height: auto;
  min-height: 140px;
  padding: 14px 16px;
  resize: vertical;
}

.form-group .form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-alert {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 20px;
}

.form-alert.error {
  background: #fce8e6;
  color: #c5221f;
}

.form-alert.success {
  background: #e6f4ea;
  color: #1e8e3e;
}

.contact-info-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
  list-style: none;
  padding: 0;
}

.contact-info-list li {
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.contact-info-list .bx {
  font-size: 26px;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.contact-info-list strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.contact-info-list a,
.contact-info-list span {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 48px 0 32px;
  margin-top: 24px;
}

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

.footer-brand {
  max-width: 320px;
}

.footer-brand .site-logo-text {
  font-size: 18px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 14px 0 0;
}

.footer-cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 17px;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-social a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .home-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 10px;
  }

  #latest{
    margin-top: 20px;
  }

  .blog-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .blog-sidebar .sidebar-card {
    margin-bottom: 0;
  }

  .sidebar-cta {
    grid-column: 1 / -1;
  }

  .featured-body {
    padding: 36px;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-left: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 12px var(--gutter) 20px;
    box-shadow: var(--shadow-md);
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    padding: 12px 14px;
  }

  .search-kbd {
    display: none;
  }

  .search-wrap {
    position: static;
  }

  .nav-search {
    right: var(--gutter);
    width: calc(100vw - var(--gutter) * 2);
  }

  .footer-cols {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  h1 { font-size: 32px; }
  h2 { font-size: 26px; }

  .article,
  .contact-layout {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .hero {
    padding: 48px 0 40px;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .featured {
    grid-template-columns: 1fr;
  }

  .featured-media {
    min-height: 240px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-body {
    font-size: 17px;
  }

  .newsletter {
    flex-direction: column;
    align-items: stretch;
    padding: 28px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    width: 100%;
    min-width: 0;
  }

  .blog-sidebar {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 28px;
  }

  .contact-info-list {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .featured-body {
    padding: 24px;
  }

  .featured-media {
    min-height: 200px;
  }

  .post-card-body {
    padding: 18px 20px 20px;
  }

  .card-title {
    font-size: 19px;
  }
}
