:root {
  --bg: #050816;
  --bg-alt: #0b1022;
  --surface: rgba(12, 18, 39, 0.82);
  --surface-strong: rgba(16, 24, 50, 0.96);
  --text: #eef2ff;
  --muted: #a7b2d6;
  --line: rgba(255, 255, 255, 0.08);
  --primary: #7c5cff;
  --primary-2: #35d2ff;
  --accent: #ffd24a;
  --success: #25d366;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --fs-display: clamp(1.8rem, 3.2vw, 3rem);
  --fs-section: clamp(1.25rem, 2.1vw, 1.8rem);
  --fs-card: 1rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Vazirmatn", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.22), transparent 32%),
    radial-gradient(circle at top right, rgba(53, 210, 255, 0.16), transparent 26%),
    radial-gradient(circle at 75% 12%, rgba(255, 210, 74, 0.14), transparent 18%),
    linear-gradient(180deg, #040611 0%, #060a18 48%, #081023 100%);
  line-height: 1.85;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: -1;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 16px 0 auto;
  z-index: 1000;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(10, 16, 35, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  direction: ltr;
}

.brand {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: url("images/favicon.svg") center/cover no-repeat;
  color: transparent;
  font-size: 0;
  text-indent: -9999px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(124, 92, 255, 0.24);
}

.brand-text {
  font-size: 1.05rem;
}

.nav-links {
  order: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
  direction: rtl;
}

.nav-links a {
  color: rgba(238, 242, 255, 0.86);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
  transform: translateY(-1px);
}

.nav-cta {
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #9a7dff);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(124, 92, 255, 0.18);
}

.menu-btn {
  order: 3;
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  margin-inline-start: auto;
}

.hero {
  position: relative;
  padding: 140px 0 54px;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 92, 255, 0.2), transparent 22%),
    radial-gradient(circle at 80% 18%, rgba(53, 210, 255, 0.12), transparent 20%),
    radial-gradient(circle at 50% 78%, rgba(255, 210, 74, 0.13), transparent 22%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.92fr);
  grid-template-areas: "copy visual";
  gap: 48px;
  align-items: center;
}

.hero-copy {
  grid-area: copy;
  text-align: right;
}

.eyebrow,
.section-kicker,
.project-tag,
.article-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 210, 74, 0.06));
  color: #d8defa;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.hero-copy h1,
.section-head h2,
.about-copy h2,
.contact-copy h2 {
  margin: 18px 0 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.28;
  text-wrap: auto;
}

.hero-copy h1 {
  font-size: var(--fs-display);
  text-align: right;
}

.hero-copy p,
.section-head p,
.about-copy p,
.contact-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.95;
}

.hero-copy p {
  max-width: 58ch;
  margin-top: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #9a7dff);
  color: #fff;
  box-shadow: 0 10px 22px rgba(124, 92, 255, 0.18);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-block {
  width: 100%;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.pill-list span {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 210, 74, 0.06));
  color: #d6dbf6;
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  grid-area: visual;
  min-height: 620px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  pointer-events: none;
}

.orb-one {
  width: 210px;
  height: 210px;
  top: 24px;
  left: 18px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.62), rgba(124, 92, 255, 0));
}

.orb-two {
  width: 180px;
  height: 180px;
  right: 4px;
  bottom: 68px;
  background: radial-gradient(circle, rgba(255, 210, 74, 0.42), rgba(255, 210, 74, 0));
}

.dashboard-card {
  position: absolute;
  inset: 52px 0 auto 74px;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(18, 27, 58, 0.92), rgba(9, 13, 28, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.24), transparent 24%),
    radial-gradient(circle at 95% 0%, rgba(53, 210, 255, 0.15), transparent 22%),
    radial-gradient(circle at 100% 100%, rgba(255, 210, 74, 0.18), transparent 26%);
  pointer-events: none;
}

.dashboard-top,
.dashboard-footer {
  position: relative;
  z-index: 1;
}

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: #e7ebff;
  font-size: 0.88rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(37, 211, 102, 0.12);
}

.dash-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 210, 74, 0.14);
  color: #fff7c8;
}

.dashboard-card img {
  width: 100%;
  aspect-ratio: 1 / 0.88;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  filter: saturate(1.08) contrast(1.04) brightness(1.02);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.dashboard-card:hover img {
  transform: scale(1.02);
  filter: saturate(1.15) contrast(1.06) brightness(1.05);
}

.dashboard-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dashboard-footer div {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.dashboard-footer strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.dashboard-footer span {
  color: var(--muted);
  font-size: 0.84rem;
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 290px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(10, 16, 35, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.floating-card i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(255, 210, 74, 0.22));
  color: #fff;
  font-size: 1.05rem;
}

.floating-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.floating-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.float-a {
  left: 8px;
  bottom: 112px;
}

.float-b {
  right: 8px;
  top: 128px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.stat-card {
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(12, 18, 39, 0.86), rgba(10, 16, 35, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 108px 0;
}

.section-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.03));
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 44px;
}

.section-head h2,
.about-copy h2,
.contact-copy h2 {
  font-size: var(--fs-section);
}

.section-head p {
  margin-top: 10px;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  align-items: center;
}

.about-grid {
  grid-template-areas: "copy media";
}

.contact-grid {
  grid-template-areas: "copy form";
}

.about-media {
  position: relative;
  grid-area: media;
  isolation: isolate;
}

.about-media img {
  width: 100%;
  min-height: 520px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 0;
  filter: saturate(1.08) contrast(1.04) brightness(1.02);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.about-media:hover img {
  transform: scale(1.03);
  filter: saturate(1.16) contrast(1.07) brightness(1.05);
}

.about-media::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 210, 74, 0.2), transparent 24%),
    radial-gradient(circle at 86% 82%, rgba(124, 92, 255, 0.18), transparent 26%);
  pointer-events: none;
  z-index: 1;
}

.media-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(7, 10, 22, 0.74), rgba(29, 22, 10, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  z-index: 2;
}

.media-badge span,
.media-badge strong {
  display: block;
}

.media-badge span {
  color: var(--muted);
  font-size: 0.85rem;
}

.media-badge strong {
  margin-top: 4px;
  font-size: 1rem;
  color: #fff7c8;
}

.about-copy {
  grid-area: copy;
  text-align: right;
}

.about-copy > p + p {
  margin-top: 12px;
}

.about-points {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.point {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.point i {
  color: var(--accent);
}

.about-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.about-mini-stats div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.about-mini-stats strong,
.about-mini-stats span {
  display: block;
}

.about-mini-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.services-grid,
.projects-grid,
.articles-grid,
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.stack-card,
.article-card,
.project-card,
.contact-form {
  background: linear-gradient(180deg, rgba(12, 18, 39, 0.9), rgba(8, 12, 26, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.article-card {
  display: block;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: rgba(53, 210, 255, 0.22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.service-card {
  padding: 28px;
  min-height: 230px;
  text-align: center;
}

.service-card i {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(255, 210, 74, 0.18));
  color: #fff;
  font-size: 1.4rem;
}

.service-card h3,
.stack-card h3,
.project-content h3,
.article-content h3 {
  margin: 18px 0 10px;
  font-size: var(--fs-card);
  line-height: 1.45;
}

.service-card p,
.project-content p,
.article-content p {
  margin: 0;
  color: var(--muted);
}

.project-card {
  overflow: hidden;
}

.project-image {
  position: relative;
  overflow: hidden;
}

.project-image::after,
.article-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 6, 17, 0) 52%, rgba(4, 6, 17, 0.14) 100%),
    radial-gradient(circle at 88% 18%, rgba(255, 210, 74, 0.14), transparent 24%);
  pointer-events: none;
}

.project-image img,
.article-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04) brightness(1.02);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.project-card:hover .project-image img,
.article-card:hover img {
  transform: scale(1.03);
  filter: saturate(1.16) contrast(1.07) brightness(1.05);
}

.project-content,
.article-content {
  padding: 20px 22px 24px;
  text-align: center;
}

.project-content p,
.article-content p {
  line-height: 1.85;
}

.project-tag,
.article-tag {
  margin-bottom: 12px;
  color: #e6ebff;
}

.stack-card {
  padding: 24px;
  text-align: center;
}

.stack-card:nth-child(4),
.stack-card:nth-child(5) {
  border-color: rgba(255, 210, 74, 0.16);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(255, 210, 74, 0.08) inset;
}

.stack-card h3 {
  margin-top: 0;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.articles-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-card img {
  height: 190px;
}

.contact-grid {
  align-items: stretch;
}

.contact-copy {
  grid-area: copy;
  padding-top: 8px;
}

.contact-items {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.contact-item i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(255, 210, 74, 0.18));
  color: #fff;
}

.contact-item span,
.contact-item strong {
  display: block;
}

.contact-item span {
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-item a {
  color: #fff;
  word-break: break-word;
}

.contact-item a:hover {
  color: var(--primary-2);
}

.contact-form {
  grid-area: form;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.contact-form label {
  display: grid;
  gap: 5px;
}

.contact-form span {
  color: #dbe1ff;
  font-size: 0.78rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.92rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(167, 178, 214, 0.72);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(53, 210, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(53, 210, 255, 0.06);
}

.contact-form textarea {
  min-height: 92px;
  resize: vertical;
}

.contact-form .btn-block {
  min-height: 42px;
  padding: 0 14px;
  font-size: 0.9rem;
  border-radius: 12px;
}

.site-footer {
  padding: 32px 0 48px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.footer-inner a {
  color: #fff;
}

.stat-card,
.dashboard-footer div,
.floating-card,
.point,
.about-mini-stats div,
.article-toc,
.article-note,
.article-card-hero {
  text-align: center;
}

.article-toc ul,
.article-prose ul {
  list-style-position: inside;
  padding-right: 0;
}

.article-prose {
  text-align: center;
}

.article-prose p,
.article-prose li {
  text-align: center;
}

/* Article pages */
.article-page .site-header {
  position: sticky;
  top: 16px;
  inset: auto 0 auto;
}

.article-page .hero,
.article-page .section {
  padding-top: 96px;
}

.article-shell {
  padding: 132px 0 88px;
}

.article-hero {
  display: grid;
  gap: 28px;
}

.article-banner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: stretch;
}

.article-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-quick-card {
  padding: 18px 18px 16px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(12, 18, 39, 0.88), rgba(8, 12, 26, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  text-align: right;
}

.article-quick-card h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.article-quick-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: 0.9rem;
}

.article-card-hero,
.article-toc,
.article-prose,
.article-note {
  background: linear-gradient(180deg, rgba(12, 18, 39, 0.9), rgba(8, 12, 26, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.article-card-hero {
  padding: 22px;
}

.article-card-hero .hero-title {
  margin: 18px 0 14px;
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  text-align: right;
  text-wrap: auto;
}

.article-card-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.95;
}

.article-card-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 22px;
  margin-top: 18px;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.article-meta-row span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.9rem;
}

.article-banner-side {
  display: grid;
  gap: 18px;
}

.article-toc,
.article-note {
  padding: 22px;
}

.article-toc h3,
.article-note h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  text-align: center;
}

.article-toc ul {
  margin: 0;
  padding: 0 18px 0 0;
  color: var(--muted);
}

.article-toc li + li {
  margin-top: 10px;
}

.article-content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
  margin-top: 24px;
}

.article-prose {
  padding: 28px;
  text-align: right;
}

.article-prose h2 {
  margin: 34px 0 12px;
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  line-height: 1.45;
  text-align: right;
}

.article-prose p {
  margin: 0;
  color: var(--muted);
  line-height: 2;
  text-align: right;
}

.article-prose p + p,
.article-prose h2 + p,
.article-prose ul + p {
  margin-top: 14px;
}

.article-prose ul {
  margin: 14px 0 0;
  padding-right: 18px;
  color: var(--muted);
  text-align: right;
}

.article-prose li + li {
  margin-top: 10px;
}

.article-quote {
  margin: 22px 0;
  padding: 18px 20px;
  border-right: 4px solid var(--primary-2);
  background: rgba(53, 210, 255, 0.06);
  border-radius: 18px;
  color: #dbe6ff;
  text-align: right;
}

.article-bottom-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.article-nav a {
  flex: 1;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
}

.article-sidebar {
  position: sticky;
  top: 120px;
  display: grid;
  gap: 18px;
}

.article-sidebar .article-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  text-align: right;
}

.article-checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-right: 0;
  list-style: none;
}

.article-checklist li {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-align: right;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "visual";
  }

  .hero-copy,
  .about-copy,
  .contact-copy {
    text-align: right;
  }

  .hero-copy h1 {
    max-width: 14ch;
  }

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

  .services-grid,
  .projects-grid,
  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-header {
    inset: 10px 0 auto;
  }

  .nav {
    border-radius: 22px;
    padding: 12px 14px;
  }

  .menu-btn {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 22px;
    background: rgba(10, 16, 35, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    direction: rtl;
    text-align: right;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 8px;
  }

  .nav-cta {
    text-align: center;
  }

  .hero {
    padding-top: 112px;
  }

  .hero-copy h1 {
    max-width: none;
    width: 100%;
    font-size: clamp(1.4rem, 6.5vw, 1.95rem);
    text-wrap: auto;
  }

  .article-card-hero .hero-title {
    font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  }

  .hero-actions,
  .hero-tags {
    justify-content: flex-start;
  }

  .hero-visual {
    min-height: auto;
    padding-top: 12px;
  }

  .dashboard-card {
    position: relative;
    inset: auto;
    width: min(100%, 460px);
    margin: 0 auto;
  }

  .float-a {
    display: none;
  }

  .float-b {
    display: none;
  }

  .orb {
    display: none;
  }

  .hero-stats,
  .about-grid,
  .contact-grid,
  .services-grid,
  .projects-grid,
  .articles-grid,
  .stack-grid,
  .about-mini-stats {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-areas:
      "copy"
      "media";
  }

  .contact-grid {
    grid-template-areas:
      "copy"
      "form";
  }

  .about-media img {
    min-height: 300px;
  }

  .section-head h2,
  .about-copy h2,
  .contact-copy h2 {
    font-size: clamp(1.05rem, 4.8vw, 1.3rem);
  }

  .service-card h3,
  .stack-card h3,
  .project-content h3,
  .article-content h3 {
    font-size: 0.95rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .article-banner,
  .article-content-wrap {
    grid-template-columns: 1fr;
  }

  .article-quick-grid {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 20px, 1200px);
  }

  .nav {
    padding: 12px 14px;
  }

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

  .hero {
    padding-top: 104px;
  }

  .hero-visual {
    padding-top: 8px;
  }

  .dashboard-card {
    padding: 12px;
    width: 100%;
  }

  .dashboard-footer {
    grid-template-columns: 1fr;
  }

  .floating-card {
    max-width: 220px;
    padding: 12px 14px;
  }

  .floating-card span {
    display: none;
  }

  .section {
    padding: 72px 0;
  }

  .hero-stats {
    gap: 12px;
    margin-top: 22px;
  }

  .hero-stats .stat-card {
    width: 100%;
  }

  .stat-card {
    padding: 16px 14px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: 0.82rem;
  }

  .hero-copy h1 {
    max-width: none;
    width: 100%;
    font-size: clamp(1.15rem, 6.5vw, 1.45rem);
    text-wrap: auto;
  }

  .section-head h2,
  .about-copy h2,
  .contact-copy h2 {
    font-size: clamp(0.95rem, 4.5vw, 1.05rem);
  }

  .about-media img,
  .project-image img,
  .article-card img {
    height: 190px;
    min-height: auto;
  }

  .service-card,
  .stack-card,
  .project-content,
  .article-content,
  .contact-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .article-shell {
    padding-top: 104px;
  }

  .article-card-hero {
    padding: 16px;
  }

  .article-prose {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
