/* Artin Ghorbanian — personal profile.
   Shares AIONEX's palette, typeface and grid motif; everything else is quieter and more editorial.
   One bold idea: the résumé is shown as paper next to its web version. */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f7fa;
  --bg-alt: #eceff5;
  --surface: #ffffff;
  --surface-2: #f2f5f9;
  --ink: #0b1426;
  --ink-2: #2a3851;
  --muted: #5a6880;
  --faint: #8a96aa;
  --line: #dde3ec;
  --line-strong: #c5cfdd;
  --brand: #1f4fe0;
  --brand-hover: #173fbf;
  --brand-ink: #ffffff;
  --brand-soft: #e8eefd;
  --brand-glow: rgba(31, 79, 224, .14);
  --grid: rgba(31, 79, 224, .075);
  --live: #12805c;
  --danger: #c0362c;
  --danger-soft: #fdecea;
  --success: #12805c;
  --success-soft: #e3f4ec;
  --gold-a: #f6dc8a; --gold-b: #b8860b;
  --silver-a: #ffffff; --silver-b: #8592a5;
  --bronze-a: #f1c09c; --bronze-b: #8a4a22;
  --band: #0a1222;
  --band-2: #111c31;
  --band-ink: #eef3fb;
  --band-muted: #a3b2c9;
  --band-line: #22314b;
  --paper-shadow: 0 1px 2px rgba(11, 20, 38, .14), 0 24px 48px -18px rgba(11, 20, 38, .38);
  --radius: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --container: 1200px;
  --header-h: 68px;
  --font: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #070d18;
  --bg-alt: #0a1221;
  --surface: #0f192b;
  --surface-2: #131f35;
  --ink: #eef3fb;
  --ink-2: #cbd5e5;
  --muted: #97a7bf;
  --faint: #66768f;
  --line: #19263c;
  --line-strong: #283955;
  --brand: #5b8cff;
  --brand-hover: #82a8ff;
  --brand-ink: #06101f;
  --brand-soft: #14244a;
  --brand-glow: rgba(91, 140, 255, .2);
  --grid: rgba(91, 140, 255, .075);
  --live: #4fd1a1;
  --danger: #ff8a80;
  --danger-soft: #3a1714;
  --success: #4fd1a1;
  --success-soft: #0f2e25;
  --band: #0b1528;
  --band-2: #101d35;
  --band-line: #22334f;
  --paper-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 30px 60px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* Hide the page for a moment while Persian copy is applied, so the language never visibly flips. */
html.i18n-pending body { opacity: 0; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="fa"] body { font-size: 1.03rem; line-height: 1.95; font-feature-settings: "ss01"; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; }
p, figure, dl, dd { margin: 0; }
p, dd, li { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--brand); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.ltr, .ltr-name { direction: ltr; unicode-bidi: isolate; }
.ltr, [lang="en"], [dir="ltr"], .kbd { font-feature-settings: normal; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.container { width: min(var(--container), calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; inset-inline-start: 16px; top: -60px; z-index: 200; padding: 8px 16px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }

.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 120; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; transform: scaleX(var(--p, 0)); transform-origin: left center; background: var(--brand); }
[dir="rtl"] .scroll-progress span { transform-origin: right center; }

/* ---------- Buttons & links ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 9px 20px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--ink);
  font-weight: 600; font-size: .95rem; line-height: 1.4; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s, box-shadow .2s;
}
.button--primary { background: var(--brand); color: var(--brand-ink); }
.button--primary:hover { background: var(--brand-hover); }
.button--ghost { border-color: var(--line-strong); }
.button--ghost:hover { border-color: var(--ink); }
.button--ghost-light { border-color: rgba(238, 243, 251, .3); color: #eef3fb; }
.button--ghost-light:hover { border-color: #eef3fb; }
.button--sm { min-height: 38px; padding: 6px 14px; font-size: .9rem; border-radius: 9px; }
.button--lg { min-height: 52px; padding: 12px 26px; font-size: 1rem; border-radius: 12px; }
.button[disabled] { cursor: not-allowed; opacity: .55; }
.button.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.button.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--brand-ink); border-inline-end-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--ink); transition: background-color .2s, border-color .2s; }
.icon-button:hover { background: var(--surface-2); border-color: var(--line); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); text-underline-offset: 5px; transition: text-decoration-color .2s; }
.text-link:hover { text-decoration-color: currentColor; }
.text-link .icon { width: 15px; height: 15px; }
.link-button { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; border: 0; background: none; color: var(--brand); font-weight: 600; font-size: .92rem; text-align: start; }
.link-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-button .icon { width: 16px; height: 16px; }
.link-button--plain { color: inherit; font-weight: inherit; font-size: inherit; }
.link-button--plain:hover { color: var(--brand); }

/* Award tiers: the dot encodes the medal, nothing else uses these colours */
.tier { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; vertical-align: .08em; }
.tier--gold { background: radial-gradient(circle at 35% 30%, var(--gold-a), var(--gold-b)); }
.tier--silver { background: radial-gradient(circle at 35% 30%, var(--silver-a), var(--silver-b)); }
.tier--bronze { background: radial-gradient(circle at 35% 30%, var(--bronze-a), var(--bronze-b)); }
.tier--special { background: var(--brand); }
.tier--winner { background: transparent; box-shadow: inset 0 0 0 2px var(--brand); }
.tier--member { background: transparent; box-shadow: inset 0 0 0 2px var(--faint); }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--faint); }
.dot--live { background: var(--live); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 18%, transparent); }

/* ---------- Referral bar (only for visitors arriving from aionex-ai.com) ---------- */
.ref-bar { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.ref-inner { display: flex; align-items: center; gap: 16px; min-height: 42px; }
.ref-inner p { flex: 1; }
.ref-inner a { color: var(--brand); font-weight: 600; white-space: nowrap; }
.ref-inner .icon-button { width: 32px; height: 32px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.3) blur(14px); -webkit-backdrop-filter: saturate(1.3) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--bg); } }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: .78rem; letter-spacing: .02em; direction: ltr; }
.brand-name { font-weight: 600; font-size: 1rem; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.main-nav a { position: relative; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.main-nav a:hover, .main-nav a.is-active { color: var(--ink); }
.main-nav a.is-active::after { content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 1.5px; background: var(--brand); border-radius: 2px; }
.main-nav .nav-mobile-only { display: none; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.lang-toggle { height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: transparent; font-weight: 600; font-size: .88rem; transition: border-color .2s; }
.lang-toggle:hover { border-color: var(--ink); }
.icon-sun, [data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
.menu-toggle, .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 88px); }
.hero-bg { position: absolute; inset: 0; pointer-events: none;
  --gx: 74%;
  background:
    radial-gradient(520px 460px at var(--gx) 32%, var(--brand-glow), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(75% 70% at var(--gx) 30%, #000 25%, transparent 80%);
  mask-image: radial-gradient(75% 70% at var(--gx) 30%, #000 25%, transparent 80%);
}
[dir="rtl"] .hero-bg { --gx: 26%; }
.hero-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); column-gap: clamp(40px, 7vw, 112px); align-items: end; }
.hero-text { padding-bottom: 8px; }
.hero-name { font-weight: 300; font-size: clamp(3.4rem, 8.4vw, 7.2rem); line-height: .98; letter-spacing: -.045em; }
html[lang="fa"] .hero-name { font-weight: 400; font-size: clamp(3rem, 7.2vw, 6.1rem); line-height: 1.3; letter-spacing: 0; }
.hero-name .line { display: block; overflow: hidden; padding-bottom: .06em; }
html[lang="fa"] .hero-name .line { padding-bottom: .12em; margin-bottom: -.12em; }
.hero-name .line > span { display: inline-block; }
.hero-lede { margin-top: clamp(24px, 3vw, 36px); max-width: 34em; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--muted); }
html[lang="fa"] .hero-lede { line-height: 1.95; }
.hero-lede a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.hero-lede a:hover { text-decoration-color: var(--brand); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: #8f949b; box-shadow: 0 40px 80px -40px rgba(7, 13, 24, .55); }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }
.credentials { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.credentials li + li { border-inline-start: 1px solid var(--line); }
.credentials a { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 12px; padding: 24px 24px 32px; height: 100%; transition: background-color .2s; }
.credentials li:first-child a { padding-inline-start: 0; }
.credentials a:hover strong { color: var(--brand); }
.credentials strong { font-weight: 600; font-size: 1.02rem; transition: color .2s; }
.credentials span { grid-column: 2; color: var(--muted); font-size: .92rem; }

/* The one orchestrated moment: name, portrait and credentials arrive together */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-name .line > span { transform: translateY(110%); animation: rise 1s var(--ease-out) .05s forwards; }
  .js .hero-name .line + .line > span { animation-delay: .14s; }
  .js .hero-portrait img { clip-path: inset(100% 0 0 0); animation: unveil 1.2s var(--ease-out) .1s forwards; }
  .js .hero-lede, .js .hero-actions, .js .credentials { opacity: 0; animation: settle .9s var(--ease-out) forwards; }
  .js .hero-lede { animation-delay: .38s; }
  .js .hero-actions { animation-delay: .48s; }
  .js .credentials { animation-delay: .62s; }
}
@keyframes rise { to { transform: none; } }
@keyframes unveil { to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 136px) 0; }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.12; }
html[lang="fa"] .section-head h2 { letter-spacing: 0; line-height: 1.4; }
.section-head p { margin-top: 16px; max-width: 58ch; color: var(--muted); font-size: 1.1rem; }
.sub-title { font-size: 1.15rem; font-weight: 600; margin: 56px 0 8px; }

/* ---------- Work: featured product ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature-figure { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: inherit; cursor: zoom-in; }
.browser { display: block; border-radius: 14px; overflow: hidden; background: #0b1220; border: 1px solid #1d2a44; box-shadow: 0 50px 90px -40px rgba(7, 13, 24, .6); transition: transform .6s var(--ease); }
.feature-figure:hover .browser { transform: translateY(-4px); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; background: #0f1a2e; border-bottom: 1px solid #1d2a44; direction: ltr; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2b3a55; }
.browser-bar span { margin-inline-start: 10px; font-size: .74rem; color: #8da0bd; }
.browser img { display: block; width: 100%; height: auto; }
.feature-text h3 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); font-weight: 600; letter-spacing: -.02em; }
[dir="rtl"] .feature-text h3 { text-align: right; }
.feature-text > p { margin-top: 14px; color: var(--muted); }
.meta { margin-top: 28px; border-top: 1px solid var(--line); }
.meta div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.meta dt { color: var(--muted); font-size: .9rem; }
.meta dd { font-size: .97rem; color: var(--ink-2); }
.meta .link-button { padding: 0; font-size: .97rem; }
.feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }

/* ---------- Work: index ---------- */
.index { margin-top: clamp(72px, 9vw, 112px); }
.index-title { font-size: .95rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.index-list + .index-title { margin-top: 56px; }
.index-list { border-top: 1px solid var(--line-strong); }
.index-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 15rem; gap: 24px; align-items: baseline; width: 100%; padding: 22px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: start; transition: padding .35s var(--ease), color .2s; }
.index-row:hover, .index-row:focus-visible { padding-inline-start: 14px; }
.index-row:hover .i-name, .index-row:focus-visible .i-name { color: var(--brand); }
.i-name { font-size: clamp(1.15rem, 1.8vw, 1.42rem); font-weight: 600; letter-spacing: -.01em; transition: color .2s; }
[dir="rtl"] .i-name.ltr-name { text-align: right; }
.i-cat { color: var(--muted); }
.i-status { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); justify-self: start; }
.index-foot { margin-top: 32px; }
.index-preview { position: fixed; top: 0; left: 0; z-index: 30; width: 360px; pointer-events: none; opacity: 0; transition: opacity .25s; will-change: transform; }
.index-preview img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -20px rgba(7, 13, 24, .55); transform: scale(.94); transition: transform .35s var(--ease-out); }
.index-preview.is-on { opacity: 1; }
.index-preview.is-on img { transform: none; }

/* ---------- Recognition ---------- */
.register { width: 100%; border-collapse: collapse; }
.register thead th { padding: 0 0 14px; padding-inline-end: 24px; border-bottom: 1px solid var(--line-strong); color: var(--muted); font-size: .86rem; font-weight: 500; text-align: start; }
.register td, .register tbody th { padding: 24px 0; padding-inline-end: 24px; border-bottom: 1px solid var(--line); vertical-align: baseline; text-align: start; font-weight: inherit; }
.register tbody tr:last-child td, .register tbody tr:last-child th { border-bottom: 0; }
.r-date { width: 7.5rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.register tbody .r-award { width: 14rem; font-weight: 600; white-space: nowrap; }
.r-award .tier { margin-inline-end: 12px; }
.r-event small { display: block; margin-top: 2px; color: var(--muted); font-size: .9rem; }
.r-work { width: 15rem; color: var(--ink-2); }
.r-none { color: var(--faint); }
.r-work .link-button--plain { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.r-work .link-button--plain:hover { text-decoration-color: var(--brand); }
.register .r-doc { width: 1%; padding-inline-end: 0; text-align: end; white-space: nowrap; }
.training { margin-top: clamp(56px, 7vw, 80px); }
.training h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 18px; }
.training ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; border-top: 1px solid var(--line-strong); padding-top: 22px; }
.training li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.training strong { font-weight: 600; }
.training span { color: var(--muted); font-size: .95rem; }
.fine-print { display: flex; gap: 10px; align-items: flex-start; margin-top: 40px; color: var(--muted); font-size: .88rem; }
.fine-print .icon { width: 16px; height: 16px; margin-top: .3em; }

/* ---------- Services & process ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 48px; }
.services div { padding-top: 20px; border-top: 1px solid var(--line-strong); }
.services dt { font-size: 1.12rem; font-weight: 600; }
.services dd { margin-top: 8px; color: var(--muted); font-size: .98rem; }
.process { margin-top: clamp(72px, 9vw, 112px); }
.process h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 28px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.steps li { position: relative; padding-top: 58px; }
.steps li::before { content: ""; position: absolute; top: 18px; inset-inline: 0; height: 1px; background: var(--line-strong); }
.steps li:last-child::before { inset-inline-end: auto; width: 36px; }
.step-n { position: absolute; top: 0; inset-inline-start: 0; z-index: 1; display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--bg); font-weight: 600; font-size: .95rem; }
.steps h4 { font-size: 1.05rem; font-weight: 600; }
.steps p { margin-top: 8px; color: var(--muted); font-size: .96rem; }

/* ---------- Résumé ---------- */
.resume-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(48px, 8vw, 128px); align-items: start; }
.about p { max-width: 62ch; }
.about p + p { margin-top: 16px; }
.timeline, .skills { border-top: 1px solid var(--line-strong); }
.timeline li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.t-when { color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline h4 { font-size: 1.05rem; font-weight: 600; }
.timeline p { margin-top: 4px; color: var(--muted); font-size: .97rem; }
.skills div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.skills dt { color: var(--muted); font-size: .95rem; }
.skills dd { color: var(--ink-2); }
[dir="rtl"] .skills dd.ltr, [dir="rtl"] .meta dd.ltr { text-align: right; }
.doc-sticky { position: sticky; top: calc(var(--header-h) + 40px); }
.paper { position: relative; display: block; width: calc(100% - 28px); aspect-ratio: 1100 / 1556; margin: 0 0 40px; padding: 0; border: 0; background: none; cursor: zoom-in; }
.sheet { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 3px; background: #fff; box-shadow: var(--paper-shadow); transition: transform .6s var(--ease-out); }
.sheet--back { transform: translate(22px, 20px) rotate(3.2deg); }
.sheet--front { transform: rotate(-1deg); }
[dir="rtl"] .sheet--back { transform: translate(-22px, 20px) rotate(-3.2deg); }
[dir="rtl"] .sheet--front { transform: rotate(1deg); }
.paper:hover .sheet--front, .paper:focus-visible .sheet--front { transform: translate(-6px, -10px) rotate(-2deg); }
.paper:hover .sheet--back, .paper:focus-visible .sheet--back { transform: translate(30px, 24px) rotate(5deg); }
[dir="rtl"] .paper:hover .sheet--front, [dir="rtl"] .paper:focus-visible .sheet--front { transform: translate(6px, -10px) rotate(2deg); }
[dir="rtl"] .paper:hover .sheet--back, [dir="rtl"] .paper:focus-visible .sheet--back { transform: translate(-30px, 24px) rotate(-5deg); }
.paper-hint { position: absolute; z-index: 2; bottom: 16px; inset-inline-end: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(11, 20, 38, .86); color: #fff; font-size: .82rem; font-weight: 600; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.paper:hover .paper-hint, .paper:focus-visible .paper-hint { opacity: 1; transform: none; }
.paper-hint .icon { width: 14px; height: 14px; }
.doc-caption { color: var(--muted); font-size: .92rem; }
.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.faq-layout .section-head { margin-bottom: 0; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 22px 0; padding-inline-end: 44px; font-weight: 600; font-size: 1.08rem; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after { content: ""; position: absolute; inset-inline-end: 6px; top: 50%; width: 14px; height: 1.5px; background: var(--ink-2); transition: transform .3s var(--ease); }
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }
.faq-list summary:hover { color: var(--brand); }
.faq-list details p { padding-bottom: 26px; max-width: 62ch; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { background: var(--band); color: var(--band-ink); }
.contact-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 104px); align-items: start; }
.contact-intro h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.12; color: #fff; }
html[lang="fa"] .contact-intro h2 { letter-spacing: 0; line-height: 1.4; }
.contact-intro > p { margin-top: 16px; color: var(--band-muted); font-size: 1.08rem; max-width: 46ch; }
.contact-list { margin-top: 40px; border-top: 1px solid var(--band-line); }
.contact-list li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 36px; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--band-line); }
.c-label { color: var(--band-muted); font-size: .9rem; line-height: 1.4; }
.c-primary { display: block; color: #4fd1a1; font-size: .78rem; font-weight: 600; }
.c-value { justify-self: start; color: #fff; font-weight: 600; overflow-wrap: anywhere; padding: 4px 0; }
.c-value:hover { color: #8fb0ff; }
.copy-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--band-line); background: transparent; color: var(--band-muted); transition: color .2s, border-color .2s; }
.copy-btn:hover { color: #fff; border-color: #8fb0ff; }
.copy-btn .icon { width: 16px; height: 16px; }
.copy-btn.is-done { color: #4fd1a1; border-color: #4fd1a1; }
.contact-social { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }
.contact-social a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--band-ink); font-weight: 600; font-size: .95rem; }
.contact-social a:hover { color: #8fb0ff; }
.contact-social .icon { width: 17px; height: 17px; color: var(--band-muted); }

.request-card { position: relative; padding: clamp(24px, 3.5vw, 40px); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .7); }
[data-theme="dark"] .request-card { border: 1px solid var(--line-strong); }
.request-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.request-step { flex: none; color: var(--muted); font-size: .88rem; font-weight: 600; }
.request-progress { flex: 1; height: 3px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.request-progress span { display: block; height: 100%; width: 33.33%; background: var(--brand); border-radius: 3px; transition: width .45s var(--ease); }
.draft-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--ink-2); font-size: .88rem; }
.draft-note button { border: 0; background: none; color: var(--brand); font-weight: 600; font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.form-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step-title { padding: 0; font-size: 1.35rem; font-weight: 600; }
.step-hint { margin-top: 4px; color: var(--muted); font-size: .92rem; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice > span { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; height: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-size: .95rem; font-weight: 500; line-height: 1.45; transition: border-color .2s, background-color .2s; }
.choice > span::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-strong); background: var(--surface) center / 12px no-repeat; transition: background-color .2s, border-color .2s; }
.choice:hover > span { border-color: var(--muted); }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.choice input:checked + span::before { border-color: var(--brand); background-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
[data-theme="dark"] .choice input:checked + span::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306101f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; margin-top: 20px; min-width: 0; }
.field-label { font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.field-label em { color: var(--danger); font-style: normal; }
.field-label small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 140px; line-height: 1.75; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a96aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 18px; background-position: left 14px center; padding-inline-end: 42px; }
[dir="ltr"] .field select { background-position: right 14px center; }
.field select option { background: var(--surface); color: var(--ink); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-glow); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.counter { flex: none; color: var(--faint); font-size: .8rem; direction: ltr; padding-top: 4px; }
.field-error { color: var(--danger); font-size: .86rem; font-weight: 600; }
.field-error:empty { display: none; }
.prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.prompts button { padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); font-size: .8rem; font-weight: 500; transition: border-color .2s, color .2s; }
.prompts button:hover { border-color: var(--brand); color: var(--brand); }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { position: relative; display: inline-flex; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.segmented span { display: inline-flex; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 500; font-size: .92rem; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.segmented input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; font-size: .93rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 19px; height: 19px; margin-top: .3em; accent-color: var(--brand); flex: none; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.summary-box { margin-top: 24px; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; }
.summary-box h4 { font-size: .9rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.summary-box dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; }
.summary-box dt { color: var(--muted); }
.summary-box dd { color: var(--ink-2); font-weight: 500; overflow-wrap: anywhere; }
.form-status { margin-top: 16px; font-size: .92rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-error { padding: 12px 16px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); }
.form-status.is-busy { color: var(--muted); }
.form-nav { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.form-nav .spacer { flex: 1; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; color: var(--muted); font-size: .82rem; }
.privacy-note .icon { width: 14px; height: 14px; margin-top: .35em; }
.request-done, .request-fallback { text-align: center; padding: 20px 4px; }
.request-done:focus { outline: none; }
.done-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--success-soft); color: var(--success); margin-bottom: 18px; }
.done-icon .icon { width: 28px; height: 28px; stroke-width: 2.4; }
.request-done h3, .request-fallback h3 { font-size: 1.4rem; font-weight: 600; }
.request-done p, .request-fallback p { margin-top: 8px; color: var(--muted); }
.done-ref { display: inline-flex; gap: 8px; margin-top: 18px !important; padding: 8px 16px; border-radius: 10px; background: var(--surface-2); color: var(--ink) !important; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0 36px; background: var(--band); color: var(--band-muted); border-top: 1px solid var(--band-line); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-links a { padding: 6px 0; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-tip .link-button { color: var(--band-muted); font-weight: 500; font-size: .88rem; gap: 8px; }
.footer-tip .link-button:hover { color: #fff; text-decoration: none; }
.footer-tip .icon { width: 15px; height: 15px; }
.kbd { font-family: inherit; font-size: .74rem; font-weight: 600; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted); direction: ltr; }
.site-footer .kbd { border-color: var(--band-line); color: var(--band-muted); }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: transparent; max-width: none; max-height: none; }
dialog:not([open]) { display: none !important; }
dialog::backdrop { background: rgba(5, 10, 20, .66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog[open] { animation: dialogIn .3s var(--ease-out); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(12px); } }
html.has-dialog { overflow: hidden; }
.modal { width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; border-radius: 18px; background: var(--surface); box-shadow: 0 40px 100px rgba(0, 0, 0, .45); overflow: hidden; display: flex; flex-direction: column; }
.modal-scroll { overflow-y: auto; overscroll-behavior: contain; }
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(10, 18, 34, .72); color: #fff; }
.modal-close:hover { background: rgba(10, 18, 34, .92); }
.modal.no-media .modal-close { border-color: var(--line); background: var(--surface-2); color: var(--ink); }
.pd-media { aspect-ratio: 16 / 9; background: #0b1220; overflow: hidden; border-bottom: 1px solid var(--line); }
.pd-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pd-body { padding: 30px 36px 34px; }
.modal.no-media .pd-body { padding-top: 40px; }
.pd-cat { color: var(--muted); font-size: .92rem; }
.pd-body h2 { margin-top: 4px; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: -.02em; }
html[lang="fa"] .pd-body h2 { letter-spacing: 0; }
.pd-tagline { margin-top: 6px; color: var(--ink-2); font-size: 1.05rem; }
.pd-awards { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; }
.pd-awards:empty { display: none; }
.pd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.pd-block h3, .pd-features h3 { font-size: .92rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.pd-block p { color: var(--ink-2); }
.pd-features { margin-top: 28px; }
.pd-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.pd-list li { position: relative; padding-inline-start: 22px; color: var(--ink-2); font-size: .97rem; }
.pd-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .78em; width: 10px; height: 1.5px; background: var(--brand); }
.pd-stack { margin-top: 24px; color: var(--muted); font-size: .92rem; }
.pd-stack:empty { display: none; }
.pd-note { display: flex; gap: 10px; margin-top: 18px; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: .88rem; }
.pd-note .icon { width: 16px; height: 16px; margin-top: .3em; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pd-actions:empty { display: none; }
.pd-nav { display: flex; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--surface-2); }
.pd-nav button { display: inline-flex; align-items: center; gap: 8px; max-width: 48%; padding: 8px 4px; border: 0; background: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.pd-nav button:hover { color: var(--brand); }
.pd-nav button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[dir="rtl"] .pd-nav .icon, [dir="rtl"] .viewer-nav .icon { transform: scaleX(-1); }

.viewer { width: min(1080px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; border-radius: 18px; background: #0b1220; color: #eef3fb; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) auto; box-shadow: 0 40px 90px rgba(0, 0, 0, .6); }
.viewer-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 16px; background: radial-gradient(ellipse at center, #1a2436, #070d18); }
.viewer-stage img { max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.viewer-nav { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(10, 18, 34, .75); color: #fff; }
.viewer-nav:hover { background: rgba(10, 18, 34, .95); }
.viewer-nav--prev { inset-inline-start: 14px; }
.viewer-nav--next { inset-inline-end: 14px; }
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 22px; border-top: 1px solid #1f2d45; }
.viewer-bar .v-text { flex: 1; min-width: 220px; display: grid; line-height: 1.5; }
.viewer-bar strong { font-size: 1rem; font-weight: 600; }
.viewer-bar small { color: #a3b2c9; font-size: .85rem; }
.viewer-bar .v-count { color: #a3b2c9; font-size: .85rem; direction: ltr; }

.docview { width: min(1040px, calc(100vw - 24px)); height: calc(100dvh - 24px); margin: auto; border-radius: 16px; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #2b3241; box-shadow: 0 40px 100px rgba(0, 0, 0, .55); }
.docview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
[dir="rtl"] .docview-bar { padding: 12px 20px 12px 14px; }
.docview-bar h2 { margin-inline-end: auto; font-size: 1rem; font-weight: 600; }
.docview-lang { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--line); }
.docview-lang button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-weight: 600; font-size: .88rem; }
.docview-lang button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.docview-pages { overflow-y: auto; overscroll-behavior: contain; display: grid; justify-items: center; gap: 24px; padding: 28px 20px 40px; }
.docview-pages:focus { outline: none; }
.docview-pages img { width: min(800px, 100%); height: auto; background: #fff; border-radius: 2px; box-shadow: 0 12px 34px rgba(0, 0, 0, .45); }

.cmd { width: min(600px, calc(100vw - 24px)); margin: 12vh auto auto; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0, 0, 0, .45); overflow: hidden; }
.cmd-search { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cmd-search .icon { color: var(--muted); }
.cmd-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.02rem; outline: none; padding: 6px 0; }
.cmd-list { max-height: min(56vh, 440px); overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.cmd-group { padding: 10px 12px 4px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.cmd-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; text-align: start; font-size: .95rem; font-weight: 500; color: var(--ink); }
.cmd-item small { margin-inline-start: auto; color: var(--muted); font-size: .8rem; }
.cmd-item[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); }
.cmd-empty { padding: 26px; text-align: center; color: var(--muted); font-size: .92rem; }

.toast { position: fixed; z-index: 300; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .9rem; box-shadow: 0 20px 40px rgba(0, 0, 0, .3); transition: opacity .25s, transform .25s var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
  .index-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 12.5rem; }
  .r-work { width: 12rem; }
}
@media (max-width: 1000px) {
  .header-cta { display: none; }
  .main-nav a { padding: 8px 9px; }
}
@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .container { width: calc(100% - 48px); }
  .menu-toggle { display: inline-grid; }
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 12px 24px 24px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .4); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .25s var(--ease), visibility .2s; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .menu-open .main-nav { transform: none; opacity: 1; visibility: visible; }
  .main-nav a { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav a.is-active::after { display: none; }
  .main-nav .nav-mobile-only { display: flex; margin-top: 16px; border: 0; border-radius: 10px; color: var(--brand-ink); justify-content: center; }
  .header-tools { margin-inline-start: auto; }
  .hero-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-portrait { width: min(360px, 72%); margin-top: 48px; }
  .credentials { grid-template-columns: minmax(0, 1fr); margin-top: 48px; }
  .credentials li + li { border-inline-start: 0; border-top: 1px solid var(--line); }
  .credentials a, .credentials li:first-child a { padding: 18px 0; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .index-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .i-cat { grid-row: 2; grid-column: 1 / -1; font-size: .95rem; }
  .i-status { grid-row: 1; grid-column: 2; justify-self: end; }
  .register thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .register, .register tbody { display: block; }
  .register tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "award date" "event event" "work work" "doc doc"; gap: 6px 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
  .register tbody tr:first-child { border-top: 1px solid var(--line-strong); }
  .register tbody tr:last-child { border-bottom: 0; }
  .register td, .register tbody th { display: block; width: auto !important; padding: 0 !important; border: 0 !important; }
  .register tbody .r-award { grid-area: award; white-space: normal; }
  .r-date { grid-area: date; text-align: end; }
  .r-event { grid-area: event; }
  .r-work { grid-area: work; font-size: .95rem; }
  .r-work:has(.r-none) { display: none !important; }
  .register .r-doc { grid-area: doc; text-align: start; }
  .register .r-doc:empty { display: none !important; }
  .training ul { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .steps li:nth-child(2)::before { inset-inline-end: auto; width: 36px; }
  .resume-layout, .faq-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .resume-doc { max-width: 400px; }
  .doc-sticky { position: static; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 40px); }
  .brand-name { font-size: .95rem; }
  .hero-actions .button { flex: 1 1 auto; }
  .hero-portrait { width: 78%; }
  .services { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li::before { display: none; }
  .steps li { padding-top: 0; padding-inline-start: 56px; }
  .step-n { top: -4px; }
  .timeline li, .skills div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .meta div { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .contact-list li { grid-template-columns: minmax(0, 1fr) 36px; gap: 2px 12px; }
  .c-label { grid-column: 1 / -1; }
  .request-card { padding: 22px 18px; border-radius: 16px; }
  .choice-grid, .field-row { grid-template-columns: minmax(0, 1fr); }
  .field-row .field { margin-top: 20px; }
  .pd-body { padding: 24px 20px 26px; }
  .pd-grid, .pd-list { grid-template-columns: minmax(0, 1fr); }
  .pd-nav { padding: 10px 14px; }
  .docview-bar h2 { flex-basis: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .container { width: calc(100% - 32px); }
  .header-inner { gap: 10px; }
  .brand { gap: 8px; min-width: 0; flex: 0 1 auto; }
  .brand-mark { width: 30px; height: 30px; flex: none; }
  .brand-name { font-size: .86rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .header-tools { gap: 4px; }
  .lang-toggle { padding: 0 8px; height: 36px; }
  .icon-button { width: 36px; height: 36px; }
  .paper { width: calc(100% - 44px); }
  .sheet--back { transform: translate(14px, 14px) rotate(2.4deg); }
  [dir="rtl"] .sheet--back { transform: translate(-14px, 14px) rotate(-2.4deg); }
}
@media (hover: none), (max-width: 900px) {
  .index-preview { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
