/* Reza Abedini — portfolio
   Cinematic dark theme, bilingual FA/EN */

@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("fonts/Vazirmatn-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/InstrumentSerif-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #0b1018;
  --bg-2: #111820;
  --bg-card: #161d27;
  --bg-slot: #1b2430;
  --line: rgba(232, 215, 168, 0.12);
  --line-strong: rgba(232, 215, 168, 0.2);
  --text: #f4efe6;
  --muted: #a39b90;
  --gold: #c4a35a;
  --gold-2: #e8d7a8;
  --gold-dim: rgba(196, 163, 90, 0.14);
  --slot-ink: #c4a35a;
  --danger-soft: #8a4b1f;
  --max: 1120px;
  --nav-h: 72px;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans-fa: "Vazirmatn", "Tahoma", sans-serif;
  --sans-en: "Inter", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  background: var(--bg);
  color: var(--text);
}

html[lang="fa"] { font-family: var(--sans-fa); }
html[lang="en"] { font-family: var(--sans-en); }

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(212, 176, 122, 0.08), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(80, 70, 50, 0.18), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="fa"] body { text-align: right; }
html[lang="en"] body { text-align: left; }

html[lang="fa"] [data-lang="en"],
html[lang="en"] [data-lang="fa"] { display: none !important; }

.ltr, a[href^="http"] {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--sans-en);
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -40px;
  background: var(--gold);
  color: #111;
  padding: 8px 12px;
  z-index: 100;
  font-weight: 600;
}
.skip:focus { top: 12px; }

/* Grain */
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(9, 9, 11, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.15;
  flex: 0 0 auto;
}
.brand-fa {
  font-family: var(--sans-fa);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.brand-en {
  font-family: var(--serif);
  font-size: 0.78rem;
  color: var(--gold);
  font-style: italic;
  direction: ltr;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px 14px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); border-bottom-color: var(--gold); }

.nav-tools { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255,255,255,0.03);
}
.lang-switch button {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.lang-switch button[aria-pressed="true"] {
  background: var(--gold);
  color: #1a140c;
}
.lang-switch .btn-en { font-family: var(--sans-en); }
.lang-switch .btn-fa { font-family: var(--sans-fa); }

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text);
}

/* Hero */
.hero {
  padding: 64px 0 72px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  opacity: 0.7;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
}
.hero-portrait {
  margin: 0;
  position: relative;
  max-width: 380px;
  justify-self: center;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #0b1018;
}
.hero-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(196, 163, 90, 0.42);
  background:
    radial-gradient(ellipse at 42% 36%, transparent 46%, rgba(11, 16, 24, 0.42) 100%),
    linear-gradient(to right, transparent 58%, rgba(11, 16, 24, 0.58) 100%);
}
html[lang="en"] .hero-portrait::after {
  background:
    radial-gradient(ellipse at 42% 36%, transparent 46%, rgba(11, 16, 24, 0.42) 100%),
    linear-gradient(to left, transparent 58%, rgba(11, 16, 24, 0.58) 100%);
}
.hero-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 46% 36%;
  display: block;
}

.kicker {
  color: var(--gold-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
html[lang="fa"] .kicker { letter-spacing: 0.14em; }

.hero h1 {
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
html[lang="fa"] .hero h1 { font-family: var(--sans-fa); }
html[lang="en"] .hero h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.03em; font-size: clamp(3.1rem, 8vw, 6.2rem); }

.hero-sub {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  color: var(--gold);
  direction: ltr;
}
html[lang="en"] .hero-sub {
  font-family: var(--sans-en);
  font-style: normal;
  color: var(--muted);
  font-size: 1.05rem;
  direction: ltr;
}

.hero-role {
  margin-top: 22px;
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  font-weight: 500;
  max-width: 34em;
  color: var(--text);
  line-height: 1.6;
  text-wrap: balance;
}

.hero-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--gold);
  color: #1a140c;
}
.btn-primary:hover { background: var(--gold-2); }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }

/* Sections */
section { padding: 80px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
html[lang="en"] .section-head h2 { font-family: var(--serif); font-weight: 400; }
.section-num {
  font-family: var(--serif);
  color: var(--gold);
  font-style: italic;
  font-size: 1rem;
  direction: ltr;
  unicode-bidi: isolate;
}

.lede {
  color: var(--muted);
  max-width: 42em;
  margin-bottom: 28px;
  font-size: 1.02rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 48px;
  align-items: start;
}
.about-copy p + p { margin-top: 16px; }
.about-copy p { font-size: 1.05rem; color: #e8e2d8; }

.portrait-slot,
.portrait-frame {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
}
.portrait-frame {
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #0b1018;
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(196, 163, 90, 0.42);
  background:
    radial-gradient(ellipse at 42% 36%, transparent 46%, rgba(11, 16, 24, 0.42) 100%),
    linear-gradient(to right, transparent 58%, rgba(11, 16, 24, 0.58) 100%);
}
html[lang="en"] .portrait-frame::after {
  background:
    radial-gradient(ellipse at 42% 36%, transparent 46%, rgba(11, 16, 24, 0.42) 100%),
    linear-gradient(to left, transparent 58%, rgba(11, 16, 24, 0.58) 100%);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 46% 36%;
  display: block;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.chip {
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.03);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 32px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.facts.under-portrait {
  margin-top: 16px;
  padding-top: 0;
  border-top: 0;
  grid-template-columns: 1fr;
  gap: 14px;
}
.fact dt {
  color: var(--gold-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
html[lang="en"] .fact dt { text-transform: uppercase; letter-spacing: 0.1em; }
.fact dd { font-size: 0.95rem; color: var(--text); }

/* Slots / placeholders */
.slot {
  background:
    linear-gradient(180deg, rgba(212,176,122,0.05), transparent 40%),
    var(--bg-slot);
  border: 1px dashed rgba(201, 163, 106, 0.48);
  color: var(--slot-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 18px;
  min-height: 160px;
  position: relative;
}
.slot::before {
  content: attr(data-badge);
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--gold-dim);
  color: var(--gold-2);
  border: 1px solid rgba(201, 163, 106, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
}
.slot-title { font-weight: 700; font-size: 0.95rem; color: var(--gold-2); }
.slot-hint { margin-top: 6px; font-size: 0.78rem; color: #b08950; max-width: 28em; line-height: 1.55; }
.slot iframe,
.slot img,
.slot video {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  border: 0;
}
.slot.filled {
  border-style: solid;
  border-color: var(--line);
  padding: 0;
  overflow: hidden;
}
.slot.filled::before { display: none; }

/* Showreel */
.showreel-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: auto;
}
.showreel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.showreel-tabs button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.showreel-tabs button[aria-selected="true"] {
  background: var(--gold);
  color: #1a140c;
  border-color: var(--gold);
}
.panel[hidden] { display: none !important; }

/* Video grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.work-card .thumb {
  aspect-ratio: 16 / 9;
  min-height: 0;
  margin-bottom: 12px;
}
.work-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.work-meta .ph-line {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.work-meta .ph-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.work-subhead {
  margin: 40px 0 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-2);
  letter-spacing: 0.04em;
}
html[lang="en"] .work-subhead { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; letter-spacing: 0; }
.work-subhead:first-of-type { margin-top: 8px; }

.work-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.work-card .thumb-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111116;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: inset 0 0 0 1px rgba(212, 176, 122, 0.18);
}
.work-card .thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .35s ease;
}
.work-card.is-vertical .thumb-link img,
.work-card.is-square .thumb-link img {
  object-fit: contain;
  background: #0b1018;
}
.work-card .thumb-link:hover img { transform: scale(1.03); }
.work-card .thumb-link:hover { box-shadow: inset 0 0 0 1px rgba(212, 176, 122, 0.45); }

.thumb-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.45), transparent 42%);
}
.thumb-duration {
  position: absolute;
  bottom: 8px;
  inset-inline-end: 8px;
  pointer-events: none;
  font-family: var(--sans-en);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(10,10,12,.78);
  color: var(--text);
  padding: 2px 7px;
  border-radius: 4px;
  direction: ltr;
}
.thumb-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 1px solid rgba(232, 201, 137, .55);
  background: rgba(10,10,12,.45);
  pointer-events: none;
  opacity: 0.9;
}
.thumb-play::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 14px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--gold-2);
}

.thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background:
    radial-gradient(600px 240px at 50% 100%, rgba(212,176,122,.12), transparent 60%),
    #101014;
  pointer-events: none;
}
.thumb-fallback .fb-kicker {
  color: var(--gold-2);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.thumb-fallback .fb-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  max-width: 12em;
  line-height: 1.3;
}
html[lang="en"] .thumb-fallback .fb-title { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; }
.work-card.has-fallback .thumb-link img { opacity: 0.15; }

.work-meta h3 {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 2px;
}
html[lang="en"] .work-meta h3 { font-family: var(--serif); font-weight: 400; font-size: 1.08rem; }
.work-client {
  font-size: 0.8rem;
  color: var(--gold-2);
  font-weight: 500;
}
.work-line {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}
.work-link {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.embed-toggle {
  margin-top: 8px;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 10px;
}
.embed-toggle:hover { color: var(--gold-2); border-color: var(--gold); }
.tg-embed {
  margin-top: 10px;
  background: #0b1018;
  border: 1px solid var(--line);
  min-height: 80px;
  overflow: hidden;
}
.tg-embed[hidden] { display: none !important; }

.writing-card .writing-thumb {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px 18px;
  background:
    linear-gradient(180deg, rgba(212,176,122,.08), transparent 50%),
    #15151a;
  text-decoration: none;
  color: inherit;
}
.writing-card .writing-kicker {
  color: var(--gold-2);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.writing-card .writing-mark {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}
html[lang="en"] .writing-card .writing-mark { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; }


/* Case studies */
.cases {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.case {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 28px 28px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
}
.case:not(:has(.stats)) {
  grid-template-columns: minmax(0, 1fr);
}
.case h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
html[lang="en"] .case h3 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; }
.case-role {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 12px;
}
.case p { color: #d8d2c8; font-size: 0.98rem; }
.case-note { margin-top: 10px; font-size: 0.82rem; color: var(--muted); }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 14px 14px 12px;
}
.stat b {
  display: block;
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--gold-2);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
html[lang="en"] .stat b { font-family: var(--serif); font-weight: 400; }
.stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}
.case-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.case-links a, .case-links .slot-link {
  font-size: 0.82rem;
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.slot-link {
  border: 1px dashed rgba(201, 163, 106, 0.5);
  text-decoration: none !important;
  padding: 2px 8px;
  color: var(--slot-ink) !important;
}

.proof-strip {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.proof-strip-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
html[lang="fa"] .proof-strip-label { letter-spacing: 0; text-transform: none; }
.proof-metrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
}
.proof-metrics li {
  font-size: 0.82rem;
  color: #d8d2c8;
  line-height: 1.45;
}
.proof-metrics b {
  color: var(--gold-2);
  font-weight: 600;
}
.proof-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.proof-thumbs a {
  display: block;
  width: 148px;
  border: 1px solid var(--line);
  background: #0a0a0b;
  line-height: 0;
}
.proof-thumbs img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: cover;
  object-position: top center;
}
.case .proof-note {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.photo-slot {
  aspect-ratio: 4 / 5;
  min-height: 0;
  padding: 16px 10px;
}

/* Software */
.soft-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.soft-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 28px 26px;
  min-height: 0;
}
.soft-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
html[lang="en"] .soft-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.soft-card p { color: #d8d2c8; font-size: 0.95rem; }
.soft-shot {
  aspect-ratio: 16 / 10;
  margin-top: 16px;
  min-height: 0;
}

/* Contact */
.contact-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-list li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.contact-list .lbl {
  display: block;
  font-size: 0.72rem;
  color: var(--gold-2);
  font-weight: 600;
  margin-bottom: 4px;
}
html[lang="en"] .contact-list .lbl { text-transform: uppercase; letter-spacing: 0.1em; }
.contact-list a { text-decoration: none; font-weight: 500; }
.contact-list a:hover { color: var(--gold-2); }
.ph {
  display: inline-block;
  background: rgba(201, 163, 106, 0.12);
  color: var(--slot-ink);
  border-bottom: 1px dashed #c48a55;
  padding: 0 0.35em;
  font-weight: 600;
}

footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.foot-inner {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Mobile */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .case,
  .contact-box,
  .soft-grid { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 320px; }
  .hero { padding: 40px 0 48px; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 56px 0 48px; }
  section { padding: 56px 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .portrait-slot { max-width: 280px; }
}

@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  .wrap, .nav-inner, .foot-inner { width: min(var(--max), calc(100% - 32px)); }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    inset-inline: 0;
    background: rgba(9, 9, 11, 0.96);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 18px;
    gap: 0;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-flex; }
  .work-grid { grid-template-columns: 1fr; }
  .hero::before { display: none; }
  .facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}


.work-card.has-fallback .thumb-play { display: none; }
.fa-phrase { unicode-bidi: isolate; direction: rtl; }

/* Photography stays in the source, hidden until images arrive */
.nav-photo-pending { display: none !important; }
#photo[hidden] { display: none !important; }

/* Featured work */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feat-card:hover { border-color: var(--gold); }
.feat-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0e14;
}
.feat-media img,
.feat-media .feat-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  background: #0a0e14;
}
.feat-video {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: #0a0e14;
  transition: opacity 0.25s ease;
}
.feat-card.is-playing .feat-video {
  opacity: 1;
  pointer-events: auto;
}
.feat-card.is-ready .feat-media {
  cursor: pointer;
}
.feat-card.is-ready .feat-media::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--gold-2);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
  pointer-events: none;
  opacity: 0.9;
  z-index: 2;
}
html[lang="fa"] .feat-card.is-ready .feat-media::after {
  inset: auto auto 12px 12px;
}
.feat-card.is-playing .feat-media::after { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .feat-video { transition: none; }
}
.feat-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.feat-client {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
html[lang="fa"] .feat-client { letter-spacing: 0; text-transform: none; }
.feat-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
}
.feat-views {
  color: var(--gold-2);
  font-weight: 700;
  font-size: 0.95rem;
}
.feat-did {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
.feat-cta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.78rem;
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.feat-cta:hover { color: var(--text); }
.feat-note {
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 72ch;
}
@media (max-width: 1000px) {
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .featured-grid { grid-template-columns: 1fr; gap: 14px; }
  .feat-body { padding: 12px; }
  .feat-card h3 { font-size: 1rem; }
}

.handle-pair { white-space: nowrap; }

@media (max-width: 720px) {
  .hero-role .role-sep { display: none; }
  .hero-role .role-rest { display: block; }
}
