:root {
  --bg: #fff;
  --surface: #fafafa;
  --text: #18181b;
  --muted: #71717a;
  --border: #e4e4e7;
  --accent: #ff672b;
  --header: rgba(255,255,255,.96);
}
html.dark {
  --bg: #09090b;
  --surface: #18181b;
  --text: #fafafa;
  --muted: #a1a1aa;
  --border: #27272a;
  --header: rgba(9,9,11,.96);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.75;
}
html[lang="ar"] body { font-family: Tahoma, system-ui, sans-serif; }
a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.site-nav {
  width: min(1150px, calc(100% - 40px));
  min-height: 84px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.06em;
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--accent); }
.nav-links, .nav-actions { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--accent); }
.nav-actions { gap: 14px; }
.language-link { font-size: 12px; font-weight: 600; text-decoration: none; }
.theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}
.contact-button {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 10px 19px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.blog-container { width: min(1150px, calc(100% - 40px)); margin: auto; }
.blog-header {
  padding: 46px 0 78px;
  text-align: start;
}
.blog-header h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.25;
  margin: 0 0 18px;
}
.blog-header p {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
  max-width: 720px;
}
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 32px;
}
html[dir="rtl"] .blog-filters { justify-content: flex-start; }
.blog-filter {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.blog-filter:hover { border-color: var(--accent); color: var(--text); }
.blog-filter.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px;
  padding-bottom: 85px;
}
.blog-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.blog-card[hidden] { display: none !important; }
.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 15px 35px rgba(0,0,0,.06);
}
.blog-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #eee;
}
.blog-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #71717a;
  background: linear-gradient(135deg,#e4e4e7,#f4f4f5);
  font-size: 13px;
}
.blog-card-content { padding: 24px; }
.blog-card-category {
  display: inline-block;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #ea580c;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
}
.blog-card h2 {
  font-size: 21px;
  line-height: 1.5;
  font-weight: 800;
  margin: 17px 0 12px;
}
.blog-card h2 a { text-decoration: none; }
.blog-card h2 a:hover { color: var(--accent); }
.blog-summary {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
  margin: 0;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.blog-card-footer a { color: var(--accent); text-decoration: none; font-weight: 700; }
.blog-empty { color: var(--muted); }
@media (max-width: 1000px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 12px; }
  .blog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .site-nav { min-height: 72px; }
  .nav-links { display: none; }
  .blog-header { padding: 42px 0 48px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-header h1 { font-size: 42px; }
}
@media (max-width: 400px) {
  .blog-container, .site-nav { width: calc(100% - 28px); }
  .nav-actions { gap: 9px; }
  .contact-button { padding: 9px 12px; }
}

/* Match the portfolio visual identity */
body { font-family: 'DM Sans', sans-serif; }
html[lang="ar"] body { font-family: 'Noto Sans Arabic', sans-serif; }
.blog-container { width: min(1150px, calc(100% - 40px)); }
.blog-header { padding-top: 125px; }
.blog-card-image { aspect-ratio: 16 / 10; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-image-placeholder {
  background: linear-gradient(135deg,#e7e7e9,#f4f4f5);
  color: #71717a;
}
html.dark .blog-image-placeholder {
  background: linear-gradient(135deg,#27272a,#18181b);
  color: #a1a1aa;
}
@media(max-width:760px) {
  .blog-header { padding-top: 110px; }
}

.blog-admin-access{display:flex;justify-content:flex-end;padding-top:100px}
html[dir="rtl"] .blog-admin-access{justify-content:flex-start}
.blog-admin-link{display:inline-flex;align-items:center;gap:8px;border:1px solid #e4e4e7;border-radius:999px;padding:9px 16px;color:#71717a;font-size:12px;font-weight:700;text-decoration:none}
.blog-admin-link:hover{color:#ed6b25;border-color:#ed6b25}
.blog-admin-access+.blog-header{padding-top:28px}
@media(max-width:760px){.blog-admin-access{padding-top:85px}}
