:root {
  color-scheme: dark;
  --bg: #070b12;
  --bg-soft: #0d1422;
  --panel: rgba(14, 22, 36, 0.78);
  --panel-strong: rgba(18, 29, 47, 0.94);
  --text: #eef6ff;
  --muted: #9dafc4;
  --line: rgba(112, 247, 211, 0.16);
  --accent: #60f5c8;
  --accent-2: #7aa7ff;
  --danger: #ff5f8f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 28px;
  --container: min(1120px, calc(100% - 40px));
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Vazirmatn", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(96, 245, 200, 0.12), transparent 32rem),
    radial-gradient(circle at 90% 4%, rgba(122, 167, 255, 0.14), transparent 30rem),
    linear-gradient(135deg, #05070c 0%, var(--bg) 48%, #091322 100%);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(96, 245, 200, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 245, 200, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 70%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

.container {
  width: var(--container);
  margin-inline: auto;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 11, 18, 0.72);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(96, 245, 200, 0.22), rgba(122, 167, 255, 0.13));
  color: var(--accent);
  box-shadow: 0 0 28px rgba(96, 245, 200, 0.2);
}

.nav-links {
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  transition: 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-links .nav-cta {
  color: #06100d;
  background: var(--accent);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.section,
.hero {
  padding-block: 92px;
}

.section-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.35;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.hero-text,
.about-card p,
.project-card p,
.blog-card p,
.cta p,
.timeline-item p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 34px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: 180ms ease;
}

.button.primary {
  color: #06100d;
  background: linear-gradient(135deg, var(--accent), #b3ffe8);
  box-shadow: 0 14px 36px rgba(96, 245, 200, 0.24);
}

.button.ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button:hover {
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.hero-stats div,
.about-card,
.timeline-item,
.project-card,
.blog-card,
.cta {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-stats div {
  padding: 18px;
  border-radius: 22px;
}

.hero-stats dt {
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  min-height: 540px;
}

.terminal-card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid rgba(96, 245, 200, 0.2);
  border-radius: 30px;
  background: rgba(2, 6, 12, 0.9);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.44), 0 0 60px rgba(96, 245, 200, 0.12);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  direction: ltr;
}

.terminal-header span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--danger);
}

.terminal-header span:nth-child(2) {
  background: #ffd166;
}

.terminal-header span:nth-child(3) {
  background: var(--accent);
}

.terminal-card pre {
  margin: 0;
  padding: 26px;
  color: #b8ffe9;
  direction: ltr;
  font: 600 0.95rem/1.9 var(--mono);
  white-space: pre-wrap;
}

.radar {
  position: absolute;
  inset: auto auto 0 5%;
  width: min(390px, 85vw);
  aspect-ratio: 1;
  border: 1px solid rgba(122, 167, 255, 0.18);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 58px, rgba(122, 167, 255, 0.14) 59px 60px),
    linear-gradient(35deg, rgba(96, 245, 200, 0.08), rgba(122, 167, 255, 0.12));
  opacity: 0.86;
}

.radar::before,
.radar::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: rgba(122, 167, 255, 0.2);
}

.radar::after {
  transform: rotate(90deg);
}

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 48%;
  height: 2px;

  background: linear-gradient(90deg, var(--accent), transparent);

  transform-origin: left center;
  translate: 0 -50%;

  animation: scan 5s linear infinite;
}

.node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.node-a { top: 28%; left: 34%; }
.node-b { top: 58%; right: 22%; }
.node-c { bottom: 22%; left: 24%; }

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

.about-card,
.cta {
  padding: 34px;
  border-radius: var(--radius);
}

.hero-name {
    margin: 0 0 12px;

    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;

    line-height: .9;
    letter-spacing: -.04em;

    color: #fff;

    text-transform: uppercase;
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 18px;
  width: 1px;
  background: linear-gradient(var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding: 26px 26px 26px 56px;
  border-radius: 24px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 12px;
  width: 13px;
  height: 13px;
  border: 4px solid var(--bg-soft);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(96, 245, 200, 0.7);
}

.timeline-date,
.tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(96, 245, 200, 0.07);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  min-height: 300px;
  padding: 28px;
  border-radius: var(--radius);
  transition: 180ms ease;
}

.project-card:hover,
.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 245, 200, 0.28);
}

.card-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 26px;
  place-items: center;
  border-radius: 18px;
  color: var(--accent);
  background: rgba(96, 245, 200, 0.1);
  font-size: 1.8rem;
}

.project-card a {
  color: var(--accent);
  font-weight: 800;
}

.skills-section {
  padding-block: 80px;
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.skills-cloud span {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #dceaff;
}

.blog-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: 180ms ease;
}

.blog-card.featured {
  grid-column: span 2;
}

.blog-art {
  min-height: 210px;
  background-color: #0c1626;
}

.matrix-art {
  background:
    linear-gradient(120deg, rgba(7, 11, 18, 0.15), rgba(7, 11, 18, 0.84)),
    repeating-linear-gradient(90deg, rgba(96, 245, 200, 0.2) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(122, 167, 255, 0.16) 0 1px, transparent 1px 28px),
    radial-gradient(circle at 70% 35%, rgba(96, 245, 200, 0.32), transparent 18rem);
}

.lock-art {
  background:
    radial-gradient(circle at 50% 42%, rgba(96, 245, 200, 0.24), transparent 7rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 320 210' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%2360f5c8' stroke-width='7' opacity='.9'%3E%3Crect x='105' y='92' width='110' height='78' rx='15'/%3E%3Cpath d='M128 92V71a32 32 0 0 1 64 0v21'/%3E%3Cpath d='M160 122v24'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.radar-art {
  background:
    radial-gradient(circle, transparent 0 38px, rgba(122, 167, 255, 0.12) 39px 40px, transparent 41px 78px, rgba(96, 245, 200, 0.16) 79px 80px, transparent 81px),
    conic-gradient(from 25deg, rgba(96, 245, 200, 0.42), transparent 34%, rgba(122, 167, 255, 0.2), transparent 68%);
}

.blog-content {
  padding: 24px;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background:
    linear-gradient(135deg, rgba(96, 245, 200, 0.13), rgba(122, 167, 255, 0.12)),
    var(--panel-strong);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 34px;
  color: var(--muted);
}

.footer div {
  display: flex;
  gap: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scan {
  to { transform: rotate(360deg); }
}

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

  .nav-links {
    position: fixed;
    inset: 76px 20px auto;
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(8, 13, 22, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: 180ms ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .section-grid,
  .split,
  .card-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card.featured {
    grid-column: auto;
  }

  .hero-visual {
    min-height: 470px;
  }

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

@media (max-width: 560px) {
  :root {
    --container: min(100% - 28px, 1120px);
  }

  .section,
  .hero {
    padding-block: 66px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .terminal-card pre {
    padding: 20px;
    font-size: 0.82rem;
  }

  .timeline-item {
    padding-right: 20px;
  }
}

/* --- Premium minimalist refinements added for the updated personal site --- */
:root {
  --bg: #060910;
  --bg-soft: #0b111d;
  --panel: rgba(13, 20, 33, 0.72);
  --panel-strong: rgba(13, 22, 36, 0.92);
  --text: #f3f8ff;
  --muted: #aab7c8;
  --line: rgba(154, 255, 226, 0.14);
  --accent: #75ffd9;
  --accent-2: #89a9ff;
  --radius: 24px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(circle at 8% 12%, rgba(117, 255, 217, 0.09), transparent 28rem),
    radial-gradient(circle at 92% 6%, rgba(137, 169, 255, 0.11), transparent 30rem),
    linear-gradient(135deg, #03050a 0%, #060910 52%, #08111d 100%);
}

body::before {
  background-size: 64px 64px;
  opacity: 0.75;
}

.site-header {
  background: rgba(6, 9, 16, 0.76);
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  font-size: 0.82rem;
  letter-spacing: -0.02em;
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.15;
}

.brand-text strong {
  color: var(--text);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a {
  padding: 9px 13px;
  font-size: 0.92rem;
}

.nav-links .nav-cta,
.button.primary {
  color: #03120e;
  background: linear-gradient(135deg, var(--accent), #d9fff5);
}

.section,
.hero {
  padding-block: clamp(68px, 8vw, 96px);
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
}

h1 {
  max-width: 900px;
  font-size: clamp(2.35rem, 5.5vw, 4.7rem);
  letter-spacing: -0.06em;
}

h2 {
  letter-spacing: -0.045em;
}

.hero-identity {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 24px;
  padding: 14px 22px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 26px;
  color: #f8fcff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)),
    rgba(11, 18, 30, 0.42);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 42px rgba(96, 245, 200, 0.09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: clamp(2.15rem, 5vw, 3.85rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
}

.hero-identity::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 0%, rgba(96, 245, 200, 0.18), transparent 38%),
    radial-gradient(circle at 88% 100%, rgba(122, 167, 255, 0.14), transparent 42%);
  opacity: 0.9;
}

.hero-identity::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(122, 167, 255, 0.64), transparent);
  box-shadow: 0 0 18px rgba(96, 245, 200, 0.32);
}

.identity-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent), 0 0 38px rgba(96, 245, 200, 0.32);
}

.hero-name {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: #eaf7ff;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: none;
}

.hero-text {
  max-width: 680px;
  font-size: 1.04rem;
}

.hero-stats div,
.about-card,
.timeline-item,
.project-card,
.blog-card,
.cert-card,
.post-card,
.cta,
.terminal-card,
.image-frame {
  border-color: rgba(255, 255, 255, 0.075);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)), var(--panel);
}

.hero-stats div {
  padding: 16px;
}

.hero-stats dt {
  font-size: 1.55rem;
}

.terminal-card {
  border-radius: 26px;
}

.radar {
  opacity: 0.58;
  filter: blur(0.1px);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.cert-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: 180ms ease;
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: rgba(117, 255, 217, 0.28);
}

.cert-card p {
  color: var(--muted);
}

.certificate-link {
  color: var(--accent);
  font-weight: 850;
}

.project-card,
.blog-card,
.cert-card,
.timeline-item,
.about-card,
.cta {
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.28);
}

.blog-card-link {
  display: grid;
  height: 100%;
}

.blog-art {
  overflow: hidden;
  min-height: 148px;
  aspect-ratio: 16 / 7;
}

.blog-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-card.featured .blog-art {
  min-height: 170px;
  aspect-ratio: 16 / 6;
}

.blog-content {
  padding: 22px;
}

.blog-content h3 {
  font-size: 1.12rem;
}

.section-action {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* Full blog page: compact image frames */
.blog-hero {
  padding-block: clamp(64px, 7vw, 90px);
}

.blog-hero-panel {
  max-width: 440px;
  margin-inline-start: auto;
}

.image-frame {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-frame-large {
  height: clamp(220px, 28vw, 330px);
}

.blog-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 18px;
}

.post-card {
  display: flex;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: 180ms ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(117, 255, 217, 0.26);
}

.post-card-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
}

.post-image {
  height: 205px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.post-card-featured .post-image {
  height: 100%;
  min-height: 285px;
}

.post-content {
  padding: 28px;
}

.post-content h2 {
  margin-bottom: 12px;
  font-size: clamp(1.3rem, 2.6vw, 2.15rem);
}

.post-content p {
  color: var(--muted);
}

.read-more {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 850;
}

.blog-meta .tag {
  margin-bottom: 0;
}

.fa-copy {
  direction: rtl;
  text-align: right;
  letter-spacing: 0;
  font-family: "Vazirmatn", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.post-content h2.fa-copy {
  line-height: 1.65;
  font-weight: 900;
}

.post-content p.fa-copy {
  line-height: 2.05;
}

.blog-meta,
.tag {
  font-family: var(--mono);
  letter-spacing: 0;
}

/* Blog post template */
.article-hero {
  padding-block: clamp(58px, 7vw, 88px) 34px;
}

.article-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: 42px;
  align-items: center;
}

.article-breadcrumb {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
}

.article-title {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4.8vw, 4.1rem);
  line-height: 1.45;
  letter-spacing: 0;
}

.article-summary {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 2.05;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  font-family: var(--mono);
}

.article-meta span,
.article-meta time {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.82rem;
}

.article-cover {
  min-height: clamp(260px, 34vw, 430px);
}

.article-shell {
  width: min(900px, calc(100% - 40px));
  margin-inline: auto;
  padding-block: 28px 88px;
}

.article-body {
  direction: rtl;
  text-align: right;
  letter-spacing: 0;
  font-family: "Vazirmatn", system-ui, sans-serif;
}

.article-body p,
.article-body li {
  color: #d7e4f2;
  font-size: 1.02rem;
  line-height: 2.15;
}

.article-body h2 {
  margin-top: 54px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.article-body h3 {
  margin-top: 34px;
  color: #f7fbff;
  letter-spacing: 0;
}

.article-body a {
  color: var(--accent);
  font-weight: 850;
}

.article-lead {
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 3px solid var(--accent);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)), var(--panel);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.24);
}

.article-figure {
  overflow: hidden;
  margin: 38px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(4, 8, 14, 0.8);
  box-shadow: var(--shadow);
}

.article-figure img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.article-figure figcaption {
  padding: 14px 18px 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.9;
}

.article-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 38px 0;
}

.article-image-grid .article-figure {
  margin: 0;
}

.article-callout {
  margin: 34px 0;
  padding: 24px 26px;
  border: 1px solid rgba(117, 255, 217, 0.18);
  border-right: 3px solid var(--accent);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(117, 255, 217, 0.09), rgba(137, 169, 255, 0.08)),
    rgba(13, 22, 36, 0.74);
}

.article-code {
  direction: ltr;
  text-align: left;
  margin: 34px 0;
  overflow: hidden;
  border: 1px solid rgba(117, 255, 217, 0.18);
  border-radius: var(--radius);
  background: #03070d;
  box-shadow: var(--shadow);
}

.article-code figcaption {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  direction: rtl;
  text-align: right;
}

.article-code pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: #b8ffe9;
  font: 600 0.92rem/1.9 var(--mono);
}

.article-body code,
.ltr-token {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--mono);
}

.article-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 58px;
}

@media (max-width: 980px) {
  .cert-grid,
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .article-hero-grid,
  .article-image-grid {
    grid-template-columns: 1fr;
  }

  .post-card-featured {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .post-card-featured .post-image {
    height: 230px;
    min-height: 0;
  }

  .blog-hero-panel {
    max-width: none;
    margin-inline-start: 0;
  }
}

@media (max-width: 860px) {
  .brand-text small {
    display: none;
  }

  .hero {
    min-height: auto;
  }

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

  .blog-art,
  .blog-card.featured .blog-art {
    min-height: 135px;
    aspect-ratio: 16 / 8;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-text strong {
    font-size: 0.9rem;
  }

  .hero-identity {
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 16px 14px;
    border-radius: 22px;
    font-size: clamp(1.62rem, 9.5vw, 2.45rem);
    letter-spacing: -0.055em;
  }

  .hero-identity::after {
    left: 16px;
    right: 16px;
    bottom: 8px;
  }

  .identity-dot {
    width: 10px;
    height: 10px;
  }

  .image-frame-large,
  .post-image,
  .post-card-featured .post-image {
    height: 185px;
  }

  .post-content {
    padding: 22px;
  }

  .article-shell {
    width: var(--container);
    padding-bottom: 66px;
  }

  .article-lead,
  .article-callout {
    padding: 20px;
  }

  .article-code pre {
    padding: 18px;
    font-size: 0.8rem;
  }

  .article-footer-nav {
    flex-direction: column;
  }
}

/* Compact certificate and home blog preview refinements */
.cert-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cert-card {
  min-height: 250px;
  padding: 24px;
}

.blog-card.featured {
  grid-column: auto;
}

.blog-art,
.blog-card.featured .blog-art {
  min-height: 112px;
  aspect-ratio: 16 / 6;
}

.blog-content {
  padding: 18px;
}

.blog-content h3 {
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  font-size: 1.02rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.blog-content p {
  display: -webkit-box;
  min-height: 3.4em;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.blog-meta {
  font-size: 0.78rem;
}

@media (max-width: 1080px) {
  .cert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
}
