/* v2 — "black + ember" theme layered over site.css (reference: dark cinematic portfolio, orange-red accent). */
@counter-style fa-digits { system: extends persian; }
:root {
  --bg: #060407; --bg-2: #0d080c;
  --card: rgba(255, 255, 255, .03); --card-2: rgba(255, 255, 255, .065);
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 130, 95, .24);
  --ink: #f7f2ef; --muted: #b5aaa6; --dim: #7d726e;
  --ac: #ff5a2e; --ac2: #ff8a4c;
  --violet: #ff5a2e; --blue: #ff7a45; --cyan: #ff6a3c; --gold: #ffb35a;
  --grad: linear-gradient(100deg, #ff4a26 0%, #ff7a3c 62%, #ffa45e 100%);
}
::selection { background: rgba(255, 90, 46, .5); }
html, body { background: var(--bg); }

/* ---------- background ---------- */
.bg .b1 { background: #c2200f; opacity: .26; }
.bg .b2 { background: #6e0f1d; opacity: .26; }
.bg .b3 { background: #ff6a1a; opacity: .10; }
.bg .grid { background-image: linear-gradient(rgba(255,150,110,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,150,110,.035) 1px, transparent 1px); }

/* ---------- header ---------- */
.nav-shell { background: rgba(10, 6, 9, .55); border-color: rgba(255,255,255,.08); border-radius: 999px; }
.site-header.is-scrolled .nav-shell { background: rgba(10, 6, 9, .86); border-color: var(--line-2); }
.brand { gap: 10px; }
.brand img { border-radius: 50%; }
.nav a { border-radius: 999px; }
.lang { border-radius: 999px; }
.lang span, .lang a { border-radius: 999px; }
.btn { border-radius: 999px; }
.btn-sm, .btn-xl { border-radius: 999px; }
.btn-tg { background: linear-gradient(135deg, #ff6c3e, #e5401a); box-shadow: 0 12px 34px -10px rgba(255, 80, 36, .7), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-tg:hover { box-shadow: 0 16px 44px -10px rgba(255, 80, 36, .95), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost:hover { border-color: rgba(255,140,100,.5); }
.card::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 90, 46, .14), transparent 60%); }
.card:hover { border-color: rgba(255, 140, 100, .3); }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 300; display: none; place-items: center; text-align: center; background: #050305; transition: opacity .8s ease, visibility .8s ease; overflow: hidden; }
html.intro-on .intro { display: grid; }
html.intro-on body { overflow: hidden; }
.intro.out { opacity: 0; visibility: hidden; }
.intro .ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid rgba(255, 100, 60, .5); transform: translate(-50%, -50%); animation: ringin 1.8s cubic-bezier(.2,.7,.2,1) both; }
.intro .r1 { width: min(62vmin, 460px); aspect-ratio: 1; box-shadow: 0 0 90px rgba(255, 60, 20, .28), inset 0 0 90px rgba(255, 60, 20, .16); }
.intro .r2 { width: min(88vmin, 700px); aspect-ratio: 1; opacity: .4; animation-delay: .15s; }
@keyframes ringin { from { transform: translate(-50%, -50%) scale(.35); opacity: 0; } }
.intro-name { position: relative; }
.intro-name b { display: block; font-size: clamp(1.9rem, 5.4vw, 3.6rem); font-weight: 900; letter-spacing: -.02em; animation: rise 1s .45s both; }
.intro-name small { display: block; margin-top: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--ac2); animation: rise 1s .75s both; }
html[lang="fa"] .intro-name small { letter-spacing: .06em; font-size: 14px; text-transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
.intro-skip { position: absolute; bottom: 28px; inset-inline-end: 30px; cursor: pointer; background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 8px 4px; border-bottom: 1px solid var(--line-2); }
html[lang="fa"] .intro-skip { letter-spacing: 0; text-transform: none; font-size: 14px; }
.intro-skip:hover { color: var(--ink); }
.intro-bar { position: absolute; bottom: 0; inset-inline: 0; height: 2px; background: rgba(255,255,255,.08); }
.intro-bar i { display: block; height: 100%; width: 0; background: var(--grad); animation: fill 2.4s linear forwards; }
@keyframes fill { to { width: 100%; } }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; justify-content: space-between; min-height: 100svh; padding: 96px 0 26px; overflow: hidden; isolation: isolate; align-items: stretch; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg::before { content: ""; position: absolute; left: 50%; top: 44%; width: min(100vw, 1180px); aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(255, 70, 28, .34), rgba(180, 28, 16, .13) 56%, transparent 74%); }
.hero-bg .ring { position: absolute; left: 50%; top: 44%; border: 1px solid rgba(255, 110, 70, .2); border-radius: 50%; transform: translate(-50%, -50%); animation: breathe 9s ease-in-out infinite; }
.hero-bg .r1 { width: 520px; height: 520px; }
.hero-bg .r2 { width: 800px; height: 800px; opacity: .6; animation-delay: -3s; }
.hero-bg .r3 { width: 1120px; height: 1120px; opacity: .32; animation-delay: -6s; }
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.035); } }
.hero-meta { width: min(1320px, 100% - 48px); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 13px; color: var(--muted); font-weight: 600; }
.hero-meta i { display: inline-block; width: 7px; height: 7px; margin-inline-end: 9px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 10px var(--ac); }
html[lang="en"] .hero-meta { letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.hv { width: min(1320px, 100% - 48px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 430px) minmax(0, 1fr); align-items: center; flex: 1; padding-block: 14px; }
.hv-copy, .hv-aside { position: relative; z-index: 2; }
.hv-copy .status { background: rgba(255,255,255,.04); }
.hv-copy .status i { background: var(--ac); animation-name: ping2; box-shadow: 0 0 0 0 rgba(255,90,46,.6); }
@keyframes ping2 { 70% { box-shadow: 0 0 0 10px rgba(255,90,46,0); } 100% { box-shadow: 0 0 0 0 rgba(255,90,46,0); } }
.hero .hv-copy h1 { font-size: clamp(2rem, 3.5vw, 3.3rem); margin-top: 22px; line-height: 1.3; }
html[lang="en"] .hero .hv-copy h1 { line-height: 1.08; }
.hero .hv-copy h1 .hi { font-size: .46em; color: var(--ac2); letter-spacing: .02em; }
.hero h1 .rotator { font-size: .78em; min-height: 3.9em; }
html[lang="en"] .hero h1 .rotator { min-height: 3.4em; }
.hv-photo { position: relative; margin-inline: -26px; align-self: center; justify-self: center; width: 100%; } /* no z-index: the soft elliptical mask on the image blends it with the page glow */
.hv-photo img { width: 100%; aspect-ratio: 860 / 1225; max-height: 76svh; object-fit: cover; object-position: center top; -webkit-mask-image: radial-gradient(ellipse 56% 72% at 50% 52%, #000 70%, transparent 100%), linear-gradient(180deg, transparent 0, #000 13%, #000 80%, transparent 100%); -webkit-mask-composite: source-in; mask-image: radial-gradient(ellipse 56% 72% at 50% 52%, #000 70%, transparent 100%), linear-gradient(180deg, transparent 0, #000 13%, #000 80%, transparent 100%); mask-composite: intersect; }
.hv-photo::after { content: ""; position: absolute; inset: auto 8% 0 8%; height: 24%; background: radial-gradient(closest-side, rgba(255,70,28,.2), transparent); filter: blur(22px); z-index: -1; }
.hv-aside .lead { color: var(--muted); font-size: 1.02rem; margin: 0; max-width: 24em; }
.hv-aside .hero-cta { display: grid; gap: 10px; margin-top: 24px; max-width: 290px; }
.hv-aside .hero-cta .btn { width: 100%; }
.hv-aside .hero-cta .btn { position: relative; justify-content: center; text-align: center; }
.hv-aside .hero-cta .btn-ghost { padding-inline: 52px; }
.hv-aside .hero-cta .btn-ghost svg { position: absolute; top: 50%; translate: 0 -50%; }
.hv-aside .hero-cta [data-phone] svg { left: 20px; }
.hv-aside .hero-cta .arrow { right: 20px; }
.hv-stats { width: min(1320px, 100% - 48px); margin-inline: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; position: relative; z-index: 3; }
.sc { position: relative; padding: 20px 22px 18px; border-radius: 20px; border: 1px solid rgba(255,255,255,.09); background: rgba(14, 8, 11, .62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; }
.sc::before { content: ""; position: absolute; inset-inline-end: 18px; top: 18px; width: 9px; height: 9px; transform: rotate(45deg); border: 1.5px solid var(--ac); opacity: .85; }
.sc b { display: block; font-size: clamp(2rem, 3.2vw, 2.8rem); font-weight: 900; line-height: 1.1; }
.sc span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

.hero .hv-copy h1 { text-wrap: balance; }
@media (max-width: 1100px) {
  .hero h1 .rotator, html[lang="en"] .hero h1 .rotator { min-height: 2.8em; }
  .hero { padding-top: 88px; min-height: auto; }
  .hv { grid-template-columns: 1fr; gap: 26px; }
  .hv-photo { order: -1; margin: 0 auto; width: min(340px, 78%); }
  .hv-aside .hero-cta { grid-template-columns: 1fr; max-width: none; }
  .hv-stats { grid-template-columns: 1fr 1fr; margin-top: 30px; }
  .hero-bg .ring { top: 30%; } .hero-bg::before { top: 28%; }
}
@media (max-width: 560px) {
  .hero-meta span:last-child { display: none; }
  .sc { padding: 16px 16px 14px; border-radius: 16px; } .sc span { font-size: 12.5px; }
}

/* ---------- section heads ---------- */
body { counter-reset: sec; }
.sec-head { max-width: 760px; }
.sec-head .eyebrow { counter-increment: sec; color: var(--ac); font-size: 15px; letter-spacing: .04em; }
.sec-head .eyebrow, .c-left .eyebrow { counter-increment: sec; color: var(--ac); font-size: 15px; letter-spacing: .04em; }
.sec-head .eyebrow::before, .c-left .eyebrow::before { content: "۰" counter(sec, fa-digits) " /"; width: auto; height: auto; background: none; border-radius: 0; font-weight: 800; opacity: .9; }
html[lang="en"] .sec-head .eyebrow::before, html[lang="en"] .c-left .eyebrow::before { content: "0" counter(sec) " /"; }
.sec-head h2 { font-size: clamp(2.1rem, 5vw, 3.9rem); line-height: 1.22; }
html[lang="en"] .sec-head h2 { line-height: 1.04; }
.sec-head h2 .grad-text { display: block; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.marquee li::before { background: var(--grad); }

/* ---------- cards, skills, projects: single ember palette ---------- */
.skill { --c: #ff6a3c !important; }
.b-p .ico { background: linear-gradient(135deg, rgba(255,90,46,.26), rgba(255,160,90,.12)); color: #ffc2a8; }
.service .ex { color: #ffb08f; }
.service .num { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.terminal .p { color: #ff7a45; }
.filters button { border-radius: 999px; }
.filters button[aria-pressed="true"] { color: #1c0905; background: var(--grad); }
html[dir="rtl"] .project, html[dir="ltr"] .project {
  --c1: #ff5a2e !important; --c2: #ff9a62 !important;
  background: radial-gradient(70% 90% at 0% 0%, rgba(255, 82, 40, .15), transparent 60%), radial-gradient(60% 80% at 100% 100%, rgba(255, 150, 90, .07), transparent 60%), rgba(255,255,255,.022);
}
html[dir="rtl"] .project { background: radial-gradient(70% 90% at 100% 0%, rgba(255, 82, 40, .15), transparent 60%), radial-gradient(60% 80% at 0% 100%, rgba(255, 150, 90, .07), transparent 60%), rgba(255,255,255,.022); }
.p-num { filter: none; color: var(--ac); }
.p-role { filter: none; }
.glow { background: radial-gradient(circle, rgba(255, 80, 38, .42), transparent 70%); }
.tag.soon { color: var(--gold); }
.process::after { background: var(--grad); }
.step .dot { background: #12090d; border-color: var(--line-2); box-shadow: 0 0 0 6px var(--bg); border-radius: 50%; }
.site-footer { color: var(--dim); }

/* ---------- contact ---------- */
.contact { text-align: start; display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; background: #0a0609; padding: clamp(30px, 5vw, 60px); border-radius: 32px; }
.contact::before { background: conic-gradient(from var(--ang), #ff4a26, #7a1020, #ff9a5c, #ff4a26); }
.contact::after { background: radial-gradient(closest-side, rgba(255, 70, 28, .3), transparent); left: -10%; width: 60%; }
.contact .me { display: none; }
.c-left h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 900; margin-top: 10px; line-height: 1.2; }
html[lang="en"] .c-left h2 { line-height: 1.05; }
.c-left h2 .grad-text { display: block; }
.c-left > p { color: var(--muted); margin-top: 16px; max-width: 30em; }
.contact-btns { justify-content: flex-start; margin-top: 26px; }
.contact .btn-xl { margin-top: 0; padding: 17px 26px; font-size: 17px; }
.handle { margin-top: 18px; }
.alt-contact { margin-top: 12px; }
.c-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px; border-radius: 24px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); }
.c-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.c-form label.full { grid-column: 1 / -1; }
.c-form input, .c-form select, .c-form textarea { width: 100%; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 11px 13px; line-height: 1.6; }
.c-form textarea { resize: vertical; min-height: 92px; }
.c-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #b5aaa6 50%), linear-gradient(135deg, #b5aaa6 50%, transparent 50%); background-size: 5px 5px; background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-repeat: no-repeat; }
html[dir="rtl"] .c-form select { background-position: 18px 55%, 13px 55%; padding-inline-end: 13px; padding-inline-start: 30px; }
.c-form select option { background: #14090e; color: var(--ink); }
.c-form input:focus, .c-form select:focus, .c-form textarea:focus { outline: none; border-color: var(--ac); box-shadow: 0 0 0 3px rgba(255, 90, 46, .22); }
.c-form button[type="submit"] { grid-column: 1 / -1; margin-top: 4px; }
.c-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--dim); text-align: center; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .c-form { grid-template-columns: 1fr; padding: 18px; } .contact { border-radius: 24px; } .contact-btns .btn { width: 100%; } }

/* ---------- phone header: keep the name, make the Telegram button icon-only so everything fits ---------- */
.nav-shell { min-width: 0; }
.header-actions { flex: none; }
.brand { min-width: 0; }
@media (max-width: 560px) {
  .nav-shell { gap: 8px; padding-inline: 10px; }
  .brand { gap: 8px; }
  .brand span { font-size: 14px; }
  .site-header .btn-tg.btn-sm span { display: none; }
  .site-header .btn-tg.btn-sm { padding: 10px 13px; }
  .site-header .btn-tg.btn-sm::after { display: none; }
}
@media (max-width: 400px) {
  .brand span { display: inline; }
}
@media (max-width: 340px) { .brand span { display: none; } }
/* brand name: bolder */
.brand span { font-weight: 900; font-size: 17px; letter-spacing: -.01em; color: #fff; }
html[lang="en"] .brand span { font-size: 17.5px; letter-spacing: -.02em; }
.brand img { width: 38px; height: 38px; border: 2px solid rgba(255,90,46,.55); }
@media (max-width: 560px) { .brand span, html[lang="en"] .brand span { font-size: 15px; } .brand img { width: 34px; height: 34px; } }
@media (max-width: 400px) { .brand span, html[lang="en"] .brand span { font-size: 14.5px; } }
