/* ============================================
   ZeroManual.io — Shared Stylesheet
   ============================================ */

:root {
  --bg: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --accent: #00d4aa;
  --accent-dim: #00d4aa33;
  --accent-glow: #00d4aa22;
  --text: #e2e8f0;
  --text-dim: #8892a4;
  --text-muted: #4a5568;
  --border: #1e293b;
  --white: #ffffff;
  --orange: #f59e0b;
  --blue: #3b82f6;
  --purple: #a78bfa;
  --pink: #f472b6;
  --red: #ef4444;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Sora', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* === SKIP TO CONTENT (A11Y) === */
.skip-to-content {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--accent);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.3s ease;
}
.skip-to-content:focus {
  top: 0;
  outline: none;
}

/* === FOCUS STYLES (A11Y) === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* === GRAIN OVERLAY === */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* === NAVIGATION === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 14, 23, 0.85);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-logo span { color: var(--text-dim); font-weight: 300; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switcher {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.lang-switcher a {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.3s;
}
.lang-switcher a:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.lang-switcher .lang-active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* === HAMBURGER MENU === */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  z-index: 110;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.hero-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 30% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, black 20%, transparent 70%);
}

.hero-content { position: relative; z-index: 2; max-width: 800px; }

.hero-tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-tag::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .dim { color: var(--text-dim); }

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--white);
  box-shadow: 0 0 30px var(--accent-dim);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === STATS BAR === */
.stats-bar {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat-item .stat-number {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-item .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* === SECTIONS === */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-dim);
  max-width: 600px;
  font-size: 1.05rem;
  margin-bottom: 3.5rem;
}

/* === SERVICES === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.service-card:hover {
  border-color: var(--accent-dim);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.service-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.service-tags span {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  background: var(--accent-glow);
  color: var(--accent);
  letter-spacing: 0.03em;
}

/* === PROJECTS === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s ease;
}
.project-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
}

.project-preview {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.project-preview-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}

.project-body { padding: 1.75rem; }

.project-type {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.project-card p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.project-stack span {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* === PROCESS === */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  counter-reset: process;
}

.process-step {
  position: relative;
  padding: 1.5rem;
  counter-increment: process;
}
.process-step::before {
  content: counter(process, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-dim);
  line-height: 1;
  display: block;
  margin-bottom: 1rem;
}
.process-step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.process-step p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* === TECH STACK === */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stack-category h4 {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.stack-category ul {
  list-style: none;
}
.stack-category li {
  color: var(--text-dim);
  font-size: 0.88rem;
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stack-category li::before {
  content: '>';
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* === CTA SECTION === */
.cta-section {
  text-align: center;
  padding: 6rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.cta-section .section-title {
  margin-bottom: 1.5rem;
}

.cta-section p {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* === CONTACT FORM === */
.contact-form {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.form-group .form-error {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 0.4rem;
  display: none;
}
.form-group.error input,
.form-group.error textarea {
  border-color: var(--red);
}
.form-group.error .form-error {
  display: block;
}
.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.form-submit:hover {
  background: var(--white);
  box-shadow: 0 0 30px var(--accent-dim);
}
.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 12px;
  margin-top: 1rem;
}
.form-success.show {
  display: block;
}
.form-success h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}
.form-success p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* === SOLUTION BLOCKS === */
.solutions-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.solution-block {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: stretch;
  margin-bottom: 3rem;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.4s ease;
}
.solution-block:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.solution-pain { padding-right: 1rem; }
.solution-pain h3 {
  font-size: 1.1rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}
.solution-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
}
.pain-badge { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.fix-badge { background: var(--accent-glow); color: var(--accent); }
.pain-symptoms { display: flex; flex-direction: column; gap: 0.6rem; }
.symptom {
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.symptom-icon { font-size: 1rem; width: 24px; text-align: center; flex-shrink: 0; }
.solution-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent);
  opacity: 0.6;
  padding: 0 0.5rem;
}
.solution-fix { padding-left: 1rem; }
.solution-fix h3 { font-size: 1.15rem; font-weight: 600; color: var(--white); margin-bottom: 0.75rem; }
.solution-fix p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.7; margin-bottom: 1.25rem; }
.solution-results { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.result-item { display: flex; flex-direction: column; }
.result-number {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.result-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

/* === FOOTER === */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* === FLOATING ORBS === */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent-dim), transparent);
  top: 10%; right: -5%;
}
.orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent);
  bottom: 20%; left: -10%;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .solution-block { grid-template-columns: 1fr; gap: 1rem; padding: 1.75rem; }
  .solution-arrow { transform: rotate(90deg); padding: 0.5rem 0; }
  .solution-pain { padding-right: 0; }
  .solution-fix { padding-left: 0; }
}

@media (max-width: 768px) {
  nav { padding: 1rem; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.35s ease;
    z-index: 105;
  }
  .nav-links.open {
    right: 0;
  }
  .nav-links a {
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
  }
  .hamburger { display: flex; }
  .hero { padding: 6rem 1.5rem 3rem; }
  section { padding: 4rem 1.5rem; }
  .stats-bar { gap: 2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-form { text-align: left; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.2rem; }
  .stats-bar { flex-direction: column; gap: 1.5rem; }
}

/* Mobile menu overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 104;
}
.nav-overlay.open {
  display: block;
}

/* === RTL OVERRIDES (Arabic) === */
html[dir="rtl"] .hero-tag::before {
  order: 1;
}
html[dir="rtl"] .hero-tag {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
html[dir="rtl"] .hero-grid {
  mask-image: radial-gradient(ellipse at 70% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, black 20%, transparent 70%);
}
html[dir="rtl"] .orb-1 {
  right: auto;
  left: -5%;
}
html[dir="rtl"] .orb-2 {
  left: auto;
  right: -10%;
}
html[dir="rtl"] .solution-pain {
  padding-right: 0;
  padding-left: 1rem;
}
html[dir="rtl"] .solution-fix {
  padding-left: 0;
  padding-right: 1rem;
}
html[dir="rtl"] .stack-category li::before {
  content: '<';
}
html[dir="rtl"] .contact-form {
  text-align: right;
}
html[dir="rtl"] .symptom {
  flex-direction: row-reverse;
}
html[dir="rtl"] .lang-switcher {
  margin-left: 0;
  margin-right: 1rem;
}
@media (max-width: 768px) {
  html[dir="rtl"] .nav-links {
    right: auto;
    left: -100%;
    border-left: none;
    border-right: 1px solid var(--border);
  }
  html[dir="rtl"] .nav-links.open {
    left: 0;
  }
}

/* ============================================
   BLOG
   ============================================ */

/* Active nav link */
.nav-links .nav-active { color: var(--accent); }

/* === BLOG LISTING === */
.blog-section {
  padding-top: 8rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.blog-card:hover {
  border-color: var(--accent-dim);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}
.blog-card:hover::before { opacity: 1; }

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.blog-card-meta time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.blog-card-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--accent-glow);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-card p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.7;
  flex-grow: 1;
}

.blog-card-read {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 1.25rem;
}

/* === BLOG ARTICLE === */
.blog-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.blog-back {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2rem;
  transition: opacity 0.3s;
}
.blog-back:hover { opacity: 0.7; }

.blog-article-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.blog-article-meta time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.blog-article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Prose styles for markdown content */
.blog-article-body h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}
.blog-article-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}
.blog-article-body p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.blog-article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-article-body ul,
.blog-article-body ol {
  color: var(--text-dim);
  margin: 0 0 1.5rem 1.5rem;
  line-height: 1.85;
}
.blog-article-body li {
  margin-bottom: 0.4rem;
}
.blog-article-body strong {
  color: var(--text);
  font-weight: 600;
}
.blog-article-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-card);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.blog-article-body pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.blog-article-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}
.blog-article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-dim);
  font-style: italic;
}
.blog-article-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
}
.blog-article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.blog-article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.blog-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.blog-share span { color: var(--text-muted); }
.blog-share a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.3s;
}
.blog-share a:hover { opacity: 0.7; }

/* Blog responsive */
@media (max-width: 768px) {
  .blog-section { padding-top: 6rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-article { padding: 6rem 1.5rem 3rem; }
}

/* Blog RTL overrides */
html[dir="rtl"] .blog-article-body blockquote {
  border-left: none;
  border-right: 3px solid var(--accent);
  padding-left: 0;
  padding-right: 1.25rem;
}
html[dir="rtl"] .blog-back {
  direction: rtl;
}
html[dir="rtl"] .blog-article-body ul,
html[dir="rtl"] .blog-article-body ol {
  margin-left: 0;
  margin-right: 1.5rem;
}
