:root {
  --bg: #050608;
  --bg-2: #0a0c10;
  --panel: #0d1016;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --ink: #f1f4f8;
  --ink-2: #a3acb9;
  --ink-3: #6b7584;
  --blue: #358ffd;
  --blue-d: #1d5fc4;
  --blue-dd: #0f3a80;
  --max: 1200px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --script: "Great Vibes", cursive;
}
:root[lang="fa"] {
  --sans: "Vazirmatn", "Inter", system-ui, sans-serif;
  --script: "Aref Ruqaa", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6; overflow-x: clip; -webkit-font-smoothing: antialiased; }
:root[lang="fa"] body { line-height: 1.85; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.up { text-transform: uppercase; letter-spacing: .06em; }
:root[lang="fa"] .up { text-transform: none; letter-spacing: 0; }
.blue { color: var(--blue); }
.spark { color: var(--blue); }

/* ── top bar ───────────────────────────────────── */
.top { position: relative; z-index: 5; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; height: 64px; gap: 16px; font-size: 12px; }
.top .who b { display: block; color: var(--blue); font-weight: 600; }
.top .who span { color: var(--ink-2); }
.top .right { display: flex; align-items: center; gap: 18px; color: var(--ink-2); }
.lang { border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; color: var(--ink); font-size: 12.5px; }
.lang:hover { border-color: var(--blue); }

/* ── hero ──────────────────────────────────────── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 55% 60% at 50% 30%, rgba(53, 143, 253, .16), transparent 70%); }
.hero-word {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  font-family: var(--display); font-size: clamp(120px, 25vw, 330px); line-height: .9; letter-spacing: .005em;
  white-space: nowrap; direction: ltr; user-select: none; z-index: 0;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-d) 45%, rgba(15, 58, 128, .25) 80%, rgba(15, 58, 128, 0) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-photo {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 1;
  width: min(660px, 48vw);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr minmax(0, 1.1fr) 250px; gap: 24px; min-height: 740px; align-items: end; padding: 40px 0 56px; }
.hello { font-family: var(--script); font-size: 46px; line-height: 1; color: var(--ink); margin-bottom: 6px; }
:root[lang="fa"] .hello { font-size: 38px; margin-bottom: 14px; }
.name { font-family: var(--display); font-size: clamp(64px, 7.4vw, 100px); line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
:root[lang="fa"] .name { font-family: var(--sans); font-weight: 900; line-height: 1.15; font-size: clamp(54px, 6.4vw, 86px); }
.role { margin-top: 18px; color: var(--blue); font-weight: 600; font-size: 19px; line-height: 1.3; }
.intro { margin-top: 14px; color: var(--ink-2); font-size: 14.5px; max-width: 32em; }
.where { margin-top: 22px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); }
.where svg { width: 16px; height: 16px; color: var(--blue); }

.side { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding-top: 170px; }
.motto { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.motto .ring { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--blue); font-size: 18px; background: rgba(5, 6, 8, .5); }
.stats { list-style: none; }
.stats li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.stats li:last-child { border-bottom: 0; }
.stats b { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; color: var(--blue); min-width: 88px; }
:root[lang="fa"] .stats b { font-family: var(--sans); font-weight: 800; font-size: 34px; }
.stats span { font-size: 11.5px; color: var(--ink-2); line-height: 1.45; }

/* ── section heads ─────────────────────────────── */
.sec { border-bottom: 1px solid var(--line); padding: 44px 0; }
.head { display: flex; align-items: center; gap: 22px; margin-bottom: 28px; }
.head h2 { font-size: 20px; font-weight: 700; white-space: nowrap; }
:root[lang="fa"] .head h2 { font-size: 21px; }
.head .rule { flex: 1; height: 1px; background: var(--line-2); }
.head .more { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.head .more:hover { color: var(--ink); }
.arrow { width: 26px; height: 12px; }
:root[dir="rtl"] .arrow { transform: scaleX(-1); }

/* ── projects ──────────────────────────────────── */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.proj.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: center; margin-top: 8px; }
.proj.wide .shot { aspect-ratio: 8 / 3; }
.proj.wide .cap { margin-top: 0; }
.proj.feature { grid-template-columns: 5fr 2fr; margin: 0 0 22px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.proj.feature .shot { border-color: rgba(53,143,253,.55); box-shadow: 0 0 60px rgba(53,143,253,.18); }
.proj.feature .cap .t b { font-size: 16px; }
a.shot { display: block; }
.shot { aspect-ratio: 16 / 10; border: 1px solid var(--line-2); overflow: hidden; background: var(--panel); position: relative; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.proj:hover .shot img, .proj:hover .mock { transform: scale(1.03); }
.cap { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.cap .n { font-family: var(--display); font-size: 34px; color: var(--blue); line-height: 1; }
:root[lang="fa"] .cap .n { font-family: var(--sans); font-weight: 800; font-size: 28px; }
.cap .t { flex: 1; }
.cap .t b { display: block; font-size: 13.5px; font-weight: 700; }
.cap .t span { font-size: 11.5px; color: var(--ink-2); }
.cap .arrow { color: var(--ink-2); }
.proj p { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }

.group { font-size: 12px; color: var(--blue); font-weight: 600; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.more-work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 20px; margin-top: 20px; }
.mw { display: flex; gap: 16px; }
.mw .n { font-family: var(--display); font-size: 26px; color: var(--blue); line-height: 1.1; }
:root[lang="fa"] .mw .n { font-family: var(--sans); font-weight: 800; font-size: 22px; }
.mw b { display: block; font-size: 13.5px; }
.mw p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }

/* dashboard mock (no brand, no numbers) */
.mock { position: absolute; inset: 0; display: grid; grid-template-columns: 46px 1fr; background: #f4f6fa; color: #0d1320; transition: transform .5s ease; font-family: "Inter", sans-serif; direction: ltr; }
.mock .ms { background: #0c1a33; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 14px; }
.mock .ms i { width: 18px; height: 18px; border-radius: 5px; background: rgba(255, 255, 255, .16); }
.mock .ms i:first-child { background: var(--blue); }
.mock .mm { padding: 14px 16px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; min-width: 0; }
.mock .mt { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 700; }
.mock .lg { display: flex; gap: 4px; }
.mock .lg span { font-size: 8.5px; padding: 2px 6px; border-radius: 99px; background: #e3e9f3; color: #3a4a66; font-weight: 600; }
.mock .lg span:first-child { background: var(--blue); color: #fff; }
.mock .bar { height: 9px; border-radius: 5px; background: #d9e1ee; }
.mock .chart { background: #fff; border-radius: 8px; box-shadow: 0 1px 0 #e3e9f3; padding: 8px; min-height: 0; }
.mock .chart svg { width: 100%; height: 100%; }
.mock .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mock .tiles div { background: #fff; border-radius: 7px; padding: 7px; display: grid; gap: 5px; }
.mock .tiles i { display: block; height: 6px; border-radius: 3px; background: #dfe6f1; }
.mock .tiles i:first-child { width: 55%; background: var(--blue); opacity: .75; }

/* ── expertise / process / quote ───────────────── */
.trio { display: grid; grid-template-columns: 1fr 1fr 0.8fr; border-bottom: 1px solid var(--line); }
.trio > div { padding: 44px 32px; }
.trio > div:first-child { padding-inline-start: 0; }
.trio > div + div { border-inline-start: 1px solid var(--line); }
.trio h2 { font-size: 20px; font-weight: 700; margin-bottom: 26px; }
.trio h3 { font-size: 12px; color: var(--blue); font-weight: 600; margin-bottom: 14px; }
.exp { list-style: none; margin-bottom: 26px; }
.exp li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.exp li b { font-size: 13.5px; font-weight: 600; }
.exp li span { font-size: 12px; color: var(--ink-3); text-align: end; }
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.skills span { border: 1px solid var(--line-2); padding: 7px 6px; font-size: 10.5px; text-align: center; color: var(--ink-2); }
:root[lang="fa"] .skills span { font-family: "Inter", sans-serif; }

.steps { list-style: none; position: relative; }
.steps li { display: grid; grid-template-columns: 34px 46px 1fr; gap: 14px; align-items: start; padding-bottom: 20px; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: calc(34px + 14px + 22px); top: 46px; bottom: 0; width: 1px; background: rgba(53, 143, 253, .45); }
.steps .n { font-family: var(--display); font-size: 22px; color: var(--blue); padding-top: 10px; }
:root[lang="fa"] .steps .n { font-family: var(--sans); font-weight: 800; font-size: 18px; }
.steps .ic { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(53, 143, 253, .6); display: grid; place-items: center; color: var(--ink); background: var(--bg); }
.steps .ic svg { width: 19px; height: 19px; }
.steps b { display: block; color: var(--blue); font-size: 12.5px; font-weight: 700; padding-top: 4px; }
.steps p { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

.quote { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
  background: linear-gradient(160deg, #1f6fe0 0%, #0f3a80 55%, #08204a 100%); }
.quote::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, #000, transparent 75%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%); pointer-events: none; }
.quote > * { position: relative; }
.quote .qm { font-family: Georgia, serif; font-size: 64px; line-height: .6; color: #9ec8ff; }
.quote blockquote { font-size: 19px; line-height: 1.45; font-weight: 500; }
:root[lang="fa"] .quote blockquote { line-height: 1.8; }
.quote .sig { font-family: var(--script); font-size: 40px; line-height: 1; color: #fff; margin-top: 14px; }
.quote .end { font-size: 11.5px; color: #cfe2ff; line-height: 1.5; }

/* ── contact ───────────────────────────────────── */
.contact .wrap { display: grid; grid-template-columns: 0.9fr 1fr 1.1fr; gap: 36px; align-items: center; padding: 54px 0; }
.contact h2 { font-size: 32px; font-weight: 800; line-height: 1.2; }
.contact h2 .spark { font-size: 20px; vertical-align: top; }
.contact .lead { color: var(--ink-2); margin-top: 14px; font-size: 13.5px; }
.contact .offer { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; max-width: 440px; }
.contact .offer li { border: 1px solid var(--line-2); padding: 6px 12px; font-size: 10.5px; color: var(--ink); letter-spacing: .04em; }
:root[lang="fa"] .contact .offer li { font-size: 12px; letter-spacing: 0; }
.contact .go { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; font-size: 12px; color: var(--blue); font-weight: 600; }
.contact .go i { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--blue); display: grid; place-items: center; font-style: normal; }
.links { list-style: none; }
.links li a, .links li > span { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.links li:last-child a, .links li:last-child > span { border-bottom: 0; }
.links .ic { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid rgba(53, 143, 253, .55); display: grid; place-items: center; color: var(--blue); }
.links .ic svg { width: 17px; height: 17px; }
.links a:hover { color: var(--blue); }
.links bdi { direction: ltr; }

.laptop { position: relative; }
.laptop img { width: 112%; max-width: none; margin-inline-start: -6%; mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 48%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 72% 70% at 50% 48%, #000 62%, transparent 100%); }
:root[dir="rtl"] .laptop img { transform: scaleX(-1); }

footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 22px 0 28px; font-size: 12px; color: var(--ink-3); }

/* ── reveal ────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ── responsive ────────────────────────────────── */
@media (max-width: 1080px) {
  .hero .wrap { grid-template-columns: 1fr 0.7fr 220px; }
  .trio { grid-template-columns: 1fr 1fr; }
  .trio .quote { grid-column: span 2; border-inline-start: 0 !important; }
  .trio > div:nth-child(3) { padding-inline: 32px; }
  .contact .wrap { grid-template-columns: 1fr 1fr; }
  .laptop { grid-column: span 2; max-width: 620px; justify-self: center; width: 100%; }
}
@media (max-width: 820px) {
  .top .right .loc { display: none; }
  .hero-word { position: relative; left: auto; transform: none; display: block; text-align: center; font-size: 25vw; top: 0; padding-top: 18px; }
  .hero-photo { position: relative; left: auto; transform: none; width: min(88%, 460px); margin: -19vw auto 0; }
  .hero .wrap { display: block; min-height: 0; padding: 0 0 36px; margin-top: -60px; }
  .hello { font-size: 40px; }
  .side { padding-top: 34px; gap: 22px; }
  .stats { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .stats li { border-bottom: 1px solid var(--line) !important; }
  .stats b { min-width: 0; font-size: 34px; }
  .stats li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .projects, .more-work { grid-template-columns: 1fr; gap: 28px; }
  .proj.wide { grid-template-columns: 1fr; gap: 16px; }
  .head .more span { display: none; }
  .trio { grid-template-columns: 1fr; }
  .trio > div { padding: 36px 0 !important; border-inline-start: 0 !important; }
  .trio > div + div { border-top: 1px solid var(--line); }
  .trio .quote { grid-column: auto; padding: 36px 24px !important; }
  .contact .wrap { grid-template-columns: 1fr; gap: 30px; }
  .laptop { grid-column: auto; }
  .contact h2 { font-size: 28px; }
}
