/*
Theme Name: Siavash Habibi Photography
Theme URI: https://siavashhabibi.com
Author: Siavash Habibi
Author URI: https://siavashhabibi.com
Description: A cinematic, editorial, photography-first portfolio theme with built-in bilingual (EN/FA) support and a dark/light mode switch. Standalone theme, not a child theme.
Version: 1.19.16
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: siavash-habibi
Tags: photography, portfolio, one-page, rtl-language-support, dark-mode
*/

/* =========================================================
   SIAVASH HABIBI — PHOTOGRAPHER
   Direction: photography-first / editorial / cinematic
   No external libraries. Replace demo image URLs with the
   final self-hosted WebP/AVIF assets in production.
   ========================================================= */

/*
 * تایپوگرافی اینجا تعریف نمی‌شود — طبق چک‌لیست سینک با Core
 * (theme-core-sync-checklist.md → بخش «فونت‌ها»)، پلاگین
 * siavash-habibi-core تک‌منبع فونت است: استایل sh-core-fonts را
 * (خانواده‌های واقعی "Inter" و "Vazirmatn"، وریابل، از
 * assets/fonts/*.woff2 خود پلاگین) روی هر صفحهٔ فرانت‌اند از قبل
 * enqueue می‌کند. این تم دیگر نسخهٔ محلی/تکراری نمی‌سازد — فایل‌های
 * woff2 اصلاً در پوشهٔ assets/fonts این تم وجود نداشتند (خالی بود)
 * و @font-face های قبلی به فایل‌های ۴۰۴ اشاره می‌کردند؛ برای فارسی
 * حتی fallback هم نداشت و همیشه با Tahoma رندر می‌شد.
 */

/* v1.12.0 — canonical portfolio design tokens.
   The site uses only black, white and #242424 as the base palette.
   Dark mode is the product default; light mode is strictly white/black. */
:root{
  --sh-bg:#000000;
  --sh-surface:#242424;
  --sh-surface-elevated:#242424;
  --sh-neutral:#242424;
  --sh-text:#ffffff;
  --sh-text-secondary:#b8b8b8;
  --sh-text-muted:#8e8e8e;
  --sh-divider:rgba(255,255,255,.16);
  --sh-divider-strong:rgba(255,255,255,.30);
  --sh-accent:#ffffff;
  --sh-focus:#ffffff;
  --sh-max:1500px;
  --sh-content-pad:clamp(18px,4vw,64px);
  --sh-radius:4px;
  --sh-control-radius:999px;
  --sh-motion:cubic-bezier(.2,.7,.2,1);
  /* v1.17.2 — Phase 1 spacing scale. Audit found ~35 distinct hardcoded
     px values for gap/padding/margin across this file (16,20,24,22,18,30,
     10,26,14,80,34,28,150...) with no shared rule — this is the exact
     "فاصله باید یک قانون یکسان داشته باشه" gap. Declaring the scale here
     first, as its own reviewable step, rather than mass-replacing ~100
     existing declarations blindly in the same pass: many of those numbers
     were hand-tuned per component (e.g. 22px, 34px, 9px) and silently
     snapping every one to the nearest scale step risks shifting visual
     rhythm in ways that need a look at the rendered page, not just a diff.
     Scale steps below are chosen to match the dominant existing clusters
     (8/12/16/20/24/32/48/64/80) so future component work — and the
     migration pass itself — has one shared vocabulary to move onto. */
  --sh-sp-1:4px;
  --sh-sp-2:8px;
  --sh-sp-3:12px;
  --sh-sp-4:16px;
  --sh-sp-5:20px;
  --sh-sp-6:24px;
  --sh-sp-8:32px;
  --sh-sp-12:48px;
  --sh-sp-16:64px;
  --sh-sp-20:80px;
  /* v1.17.5 — Phase 1 spacing migration, closed. The 66 remaining fixed
     px values in gap/padding/margin that do NOT match a --sh-sp-* step
     were reviewed and are being kept as-is by decision (SN): they are
     documented, intentional per-component exceptions, not oversights,
     and are not scheduled for further snapping. Full selector-by-value
     list lives in THEME-v1.17.5-CHANGELOG.md — do not re-audit this in
     a future phase without checking that file first. */
  --sh-header-glass:rgba(0,0,0,.22);
  /* v1.17.2 — Phase 1. Danger/error colour was hardcoded (#b5544a) with no
     light-theme variant; on a white background that hue falls below WCAG AA
     for text (~3.2:1). Given its own theme-aware pair like every other
     semantic colour. */
  --sh-danger:#e07a6e;
  /* v1.17.6 — Phase 1 typography, part 1: fixed-size scale for running
     text/labels/captions (never headings — those are fluid, see below).
     Audit of every non-clamp `font-size` in this file found exactly 8
     distinct px values, each already reused 3-15× verbatim (10px alone
     appears 15 times) — a real shared scale already existed in practice,
     it just wasn't named. Naming it here; migrating call sites is a
     separate, zero-visual-change step (same value, just var()). */
  --sh-fs-caption:9px;
  --sh-fs-micro:10px;
  --sh-fs-small:11px;
  --sh-fs-body-sm:12px;
  --sh-fs-body:13px;
  --sh-fs-body-lg:14px;
  --sh-fs-lead:15px;
  --sh-fs-lead-lg:16px;
  /* v1.17.6 — Phase 1 typography, part 2: fluid heading scale. Unlike the
     fixed sizes above, the 21 `clamp()` font-sizes already in this file
     (hero h1, section h2s, project titles, credit titles, nav-link
     strongs, etc.) are ALL distinct — zero exact duplicates — because
     each heading is a bespoke cinematic/editorial treatment for its own
     section, not a mistake to consolidate. Forcing them onto a handful of
     shared steps would change real, currently-intentional sizes and needs
     a rendered-page comparison per component, not a blind diff — exactly
     the same caution already applied to the 66 spacing exceptions in
     v1.17.5. The steps below give future work (and phase 3/5 template
     rewrites) a shared *vocabulary* clustered around the dominant existing
     preferred-vw values (2vw / 3.8-4vw / 5-6vw / 7-9.5vw / 12-16vw), without
     touching a single existing heading's actual numbers yet. Migrating
     individual selectors onto these steps is deferred, one component at a
     time with a visual check — see THEME-v1.17.6-CHANGELOG.md. */
  --sh-fs-h3:clamp(16px,2vw,23px);
  --sh-fs-h2-sm:clamp(26px,3.8vw,55px);
  --sh-fs-h2:clamp(40px,6vw,90px);
  --sh-fs-h1-sm:clamp(44px,9vw,110px);
  --sh-fs-h1:clamp(52px,9.5vw,150px);
  --sh-fs-display:clamp(48px,16vw,84px);
  /* فاز ۳ — عنوان کارت (مثل latest-post-title)؛ عمداً جدا از h1/h2/h3
     چون از نظر بصری هدینگ سطح صفحه نیست، عنوان یک کارت داخل صفحه‌ست.
     مقدار عیناً همون clamp قبلی هاردکد است — صفر تغییر بصری. */
  --sh-fs-card-title:clamp(28px,4vw,58px);
  /* v1.19.13 — Phase 5: single-project/biography/taxonomy/404 templates
     onto the token layer. Full cascade trace found 8 remaining bespoke
     `clamp()` font-sizes with zero exact duplicates among each other or
     the existing steps above — same situation as v1.17.6, so each gets
     its own named token rather than being forced onto a shared step.
     No rendered value changes anywhere; call sites just switched to
     var(). Full per-selector list in THEME-v1.19.13-CHANGELOG.md. */
  --sh-fs-project-title:clamp(40px,7vw,110px);
  --sh-fs-project-desc:clamp(15px,1.4vw,18px);
  --sh-fs-nav-strong:clamp(16px,2vw,22px);
  --sh-fs-credit-title:clamp(15px,1.6vw,19px);
  --sh-fs-credit-note:clamp(14px,1.3vw,17px);
  --sh-fs-about-copy:clamp(19px,2vw,28px);
  --sh-fs-archive-name:clamp(20px,2.2vw,31px);
  --sh-fs-section-title-sm:clamp(34px,12vw,58px);
  --bg:var(--sh-bg);
  --surface:var(--sh-surface);
  --surface-2:var(--sh-surface-elevated);
  --text:var(--sh-text);
  --muted:var(--sh-text-muted);
  --line:var(--sh-divider);
  --line-strong:var(--sh-divider-strong);
  --accent:var(--sh-accent);
  --max:var(--sh-max);
  --pad:var(--sh-content-pad);
  --ease:var(--sh-motion);
  color-scheme:dark;
}
html[data-theme="light"]{
  --sh-bg:#ffffff;
  --sh-surface:#ffffff;
  --sh-surface-elevated:#ffffff;
  --sh-neutral:#242424;
  --sh-text:#000000;
  --sh-text-secondary:#4f4f4f;
  --sh-text-muted:#666666;
  --sh-divider:rgba(0,0,0,.16);
  --sh-divider-strong:rgba(0,0,0,.30);
  --sh-accent:#000000;
  --sh-focus:#000000;
  --sh-header-glass:rgba(255,255,255,.55);
  --sh-danger:#9c3f35;
  color-scheme:light;
}

/* Contrast contract: muted text remains readable in both themes; accent is
   reserved for focus/identity, never for long-form copy. */
body{background:var(--sh-bg);color:var(--sh-text);}
::selection{background:var(--sh-text);color:var(--sh-bg)}
input,textarea,select{color-scheme:inherit}

/* Direction contract — typography follows the server-rendered language. */
html[dir="rtl"] body{font-family:"Vazirmatn","Tahoma",sans-serif}
html[dir="ltr"] body{font-family:"Inter",Arial,sans-serif}

/* Responsive contract: no component may establish a viewport wider than the
   page, and media must always be shrinkable inside grid/flex children. */
.site,.nav,.hero-content{width:min(100%,var(--sh-max));max-width:100%;}
img,video,svg,iframe{max-width:100%;}
.projects,.facts,.about-grid,.archive-row,.credit-row{min-width:0;}
.projects > *, .facts > *, .about-grid > *{min-width:0;}

/* Keyboard focus is visible but visually quiet. */
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:2px solid var(--sh-focus);outline-offset:3px;
}

@media(max-width:560px){
  :root{--sh-content-pad:18px}
  .section-head{gap:18px}
  .hero-meta{gap:18px}
  .project-single-head{align-items:flex-start;flex-wrap:wrap}
  .project-single-meta{gap:10px}
  .contact h2{font-size:clamp(48px,16vw,84px)}
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:"Inter",Arial,sans-serif;
  line-height:1.45;
  transition:background .35s ease,color .35s ease;
}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit}
img{display:block;max-width:100%}
::selection{background:var(--text);color:var(--bg)}

.site{
  width:min(100%,var(--max));
  margin:auto;
  padding:0 var(--pad);
}

/* Header */
.header{
  position:fixed;
  inset:0 0 auto;
  z-index:20;
  padding:18px var(--pad);
  /* v1.17.1 — Phase 0 contrast fix. This was hardcoded to a black gradient
     regardless of theme, which is fine over the dark homepage hero photo in
     dark mode, but produces a dark scrim with dark (--sh-text) nav text on
     every other template (archive/single/biography have no hero image, so
     the header sits directly over the page background). --sh-header-glass
     already existed as a theme-aware token but was never wired to anything;
     wiring it here fixes the scrim on every non-hero page in both themes.
     The homepage hero itself still needs its own pass (tracked in Phase 3 —
     ROADMAP.md — because making hero nav text reliably legible over a photo
     regardless of site theme is a design decision, not a one-line fix). */
  background:linear-gradient(to bottom,var(--sh-header-glass),transparent);
  pointer-events:none;
}
.nav{
  width:min(100%,var(--max));
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--sh-sp-6);
  pointer-events:auto;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-size:var(--sh-fs-body);
  font-weight:600;
  letter-spacing:.17em;
  white-space:nowrap;
}
.brand-logo{
  width:24px;
  height:24px;
  display:block;
  flex:0 0 24px;
  object-fit:contain;
}
.brand-name{display:inline-block;}
.nav-right{
  display:flex;
  align-items:center;
  gap:22px;
}
.nav-links{
  display:flex;
  gap:var(--sh-sp-6);
  font-size:var(--sh-fs-small);
  text-transform:uppercase;
  letter-spacing:.14em;
}
.nav-links a{opacity:.75;transition:opacity .2s}
.nav-links a:hover{opacity:1}
.controls{display:flex;gap:7px}
.control{
  box-sizing:border-box;
  border:1px solid var(--line-strong);
  /* v1.17.1 — Phase 0 contrast fix. Background was hardcoded to a dark
     translucent chip (rgba(0,0,0,.18)) with text colour inherited from
     body (--sh-text), which flips to black in light mode: dark chip + dark
     text = the exact "light theme, unreadable control" bug reported. Using
     --sh-header-glass makes the chip itself theme-aware (dark glass/white
     text in dark mode, light glass/black text in light mode), so it stays
     self-contained and legible over any backdrop — hero photo or page bg. */
  background:var(--sh-header-glass);
  color:var(--sh-text);
  backdrop-filter:blur(10px);
  border-radius:999px;
  padding:7px 10px;
  cursor:pointer;
  font-size:var(--sh-fs-micro);
  line-height:1;
  letter-spacing:.08em;
  transition:.2s;
}
/* Canonical control-pill shape. This exact box-sizing/padding/border-radius/
   font-size/line-height combination is the single source of truth for the
   language and theme buttons on desktop, tablet and mobile — do not
   redeclare it elsewhere; only add behaviour (open/closed state), never
   resize or reshape it. */
.control:hover{background:var(--surface-2)}

/* Hero */
.hero{
  color:#fff;
  min-height:100svh;
  position:relative;
  display:grid;
  align-items:end;
  overflow:hidden;
  background:var(--bg);
}
.hero-media{
  position:absolute;
  inset:0;
  z-index:0;
  overflow:hidden;
}
.hero-media img{
  width:100%;height:100%;
  object-fit:cover;
  object-position:center 35%;
  filter:saturate(.65) contrast(1.05);
  transform:scale(1.015);
}
.hero-media:after{
  content:"";
  position:absolute;inset:0;
  background:
    linear-gradient(to top,rgba(0,0,0,.82) 0%,rgba(0,0,0,.28) 46%,rgba(0,0,0,.14) 100%);
}
html[data-theme="light"] .hero-media:after{
  background:linear-gradient(to top,rgba(0,0,0,.65),rgba(0,0,0,.08) 68%);
}
.hero-content{
  color:#fff;
  position:relative;z-index:1;
  padding:0 var(--pad) clamp(44px,8vh,92px);
  width:min(100%,var(--max));
  margin:auto;
}
.eyebrow{
  font-size:var(--sh-fs-micro);
  letter-spacing:.2em;
  text-transform:uppercase;
  opacity:.75;
  margin-bottom:18px;
}
.hero h1{
  margin:0;
  max-width:900px;
  /* فاز ۳ — این مقدار عیناً برابر --sh-fs-h1 بود (تعریف‌شده در فاز ۱،
     v1.17.6)؛ اتصال بدون هیچ تغییر بصری. */
  font-size:var(--sh-fs-h1);
  line-height:.88;
  font-weight:600;
  letter-spacing:-.055em;
}
.hero-meta{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:30px;
  margin-top:28px;
  max-width:1100px;
}
.hero-role{
  font-size:clamp(16px,2vw,23px);
  max-width:580px;
}
.hero-disciplines{
  font-size:var(--sh-fs-micro);
  letter-spacing:.16em;
  text-transform:uppercase;
  text-align:right;
  line-height:1.8;
  opacity:.78;
}

/* Intro */
.intro{
  display:grid;
  grid-template-columns:1fr 1.25fr;
  gap:clamp(40px,9vw,150px);
  /* باگ padding shorthand — پایین همین فایل، بخش «اصلاح چسبیدن محتوا به
     دیواره‌ها» توضیح کامل دارد. اینجا فقط padding-block (بالا/پایین)
     ست می‌شود؛ padding-inline (چپ/راست) دیگر دست‌نخورده می‌ماند تا
     padding:0 var(--pad) خودِ .site (همین المان چون class="site intro")
     جایگزین نشود. */
  padding-block:clamp(110px,16vw,220px);
  border-bottom:1px solid var(--line);
}
.section-kicker{
  font-size:var(--sh-fs-micro);
  text-transform:uppercase;
  letter-spacing:.18em;
  color:var(--muted);
  /*
   * v1.19.15 — این کلاس مشترک، بدون استثنا، بلافاصله قبل از h2.section-title
   * در تمام سکشن‌های سایت می‌آید (Position/Selected Work/Archive/About/
   * Awards/Exhibitions/Publications/Press/Latest) — قبلاً هیچ فاصله‌ای
   * تعریف نشده بود، پس شماره‌گذاری («۰۲ — آثار منتخب») مستقیم به تیتر
   * درشت زیرش می‌چسبید. یک فاصله‌ی فلوئید (هم‌راستا با بقیه‌ی فاصله‌های
   * سایت که با vw رشد می‌کنند) اضافه شد؛ چون یک قانون مشترک است، همین
   * یک تغییر روی کل سایت اعمال می‌شود، نه یک پچ موضعی.
   */
  margin-bottom:clamp(var(--sh-sp-4),2.4vw,var(--sh-sp-8));
  display:block;
}
.intro-copy{
  font-size:clamp(26px,3.8vw,55px);
  line-height:1.05;
  letter-spacing:-.035em;
  max-width:930px;
  margin:0;
}
.intro-copy em{font-style:normal;color:var(--muted)}

/* Work */
.work{padding-block:clamp(90px,12vw,160px)}
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:30px;
  margin-bottom:42px;
}
.section-title{
  margin:0;
  /* فاز ۳ — طبق تصمیم SN به var(--sh-fs-h2) وصل شد (قبلاً
     clamp(36px,5.2vw,78px) هاردکد بود). تغییر بصری عمدی: کمی
     بزرگ‌تر می‌شه. این کلاس هم روی h2 (index.php) و هم h1
     (archive-sh_project.php) استفاده می‌شه — یک قانون، دو سطح تگ. */
  font-size:var(--sh-fs-h2);
  line-height:.95;
  letter-spacing:-.045em;
  font-weight:500;
}
.section-note{
  color:var(--muted);
  font-size:var(--sh-fs-body-sm);
  max-width:280px;
  text-align:right;
}

.projects{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:clamp(18px,2vw,34px);
}
.project{grid-column:span 7}
.project:nth-child(2){grid-column:8 / -1;margin-top:13vw}
.project:nth-child(3){grid-column:2 / span 5;margin-top:3vw}
.project:nth-child(4){grid-column:8 / -1;margin-top:8vw}
.project-image{
  overflow:hidden;
  background:var(--surface);
  aspect-ratio:4/5;
}
.project:nth-child(2) .project-image{aspect-ratio:4/5}
.project:nth-child(3) .project-image{aspect-ratio:3/4}
.project:nth-child(4) .project-image{aspect-ratio:16/11}
.project-image img{
  width:100%;height:100%;object-fit:cover;
  filter:saturate(.78);
  transition:transform .8s var(--ease),filter .5s ease;
}
.project:hover img{transform:scale(1.035);filter:saturate(1)}
.project-info{
  display:flex;
  justify-content:space-between;
  gap:var(--sh-sp-5);
  padding-top:13px;
  border-top:1px solid var(--line);
  margin-top:10px;
}
.project-name{font-size:var(--sh-fs-body-lg)}
.project-type{
  color:var(--muted);
  font-size:var(--sh-fs-micro);
  letter-spacing:.13em;
  text-transform:uppercase;
}

/* Archive */
.archive{
  border-top:1px solid var(--line);
  padding:clamp(80px,11vw,150px) 0;
}
.archive-row{
  display:grid;
  grid-template-columns:1.1fr 1fr 1fr;
  gap:30px;
  padding:22px 0;
  border-bottom:1px solid var(--line);
  transition:padding .25s ease;
}
.archive-row:hover{padding-left:var(--sh-sp-3);padding-right:var(--sh-sp-3)}
.archive-year{color:var(--muted);font-size:var(--sh-fs-small)}
.archive-name{font-size:var(--sh-fs-archive-name);letter-spacing:-.025em;min-width:0;overflow-wrap:anywhere}
.archive-type{color:var(--muted);font-size:var(--sh-fs-small);text-align:right;text-transform:uppercase;letter-spacing:.06em;min-width:0;overflow-wrap:anywhere}

/* About */
.about{
  background:var(--surface);
  padding:clamp(90px,13vw,180px) 0;
}
.about-grid{
  display:grid;
  grid-template-columns:.7fr 1.3fr;
  gap:clamp(40px,9vw,140px);
}
.about h2{
  margin:0;
  /* فاز ۳ — عیناً برابر --sh-fs-h2 بود؛ اتصال بدون تغییر بصری. */
  font-size:var(--sh-fs-h2);
  line-height:.9;
  font-weight:500;
  letter-spacing:-.05em;
}
.about-copy{
  max-width:780px;
  font-size:var(--sh-fs-about-copy);
  line-height:1.3;
}
.about-copy p{margin:0 0 30px}
.facts{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:var(--sh-sp-5);
  margin-top:55px;
  padding-top:22px;
  border-top:1px solid var(--line);
}
.fact-label{font-size:var(--sh-fs-caption);color:var(--muted);text-transform:uppercase;letter-spacing:.15em}
.fact-value{margin-top:var(--sh-sp-2);font-size:var(--sh-fs-body-lg)}

/* Contact */
.contact{
  padding-block:clamp(110px,17vw,230px);
  text-align:center;
}
.contact-kicker{color:var(--muted);font-size:var(--sh-fs-micro);letter-spacing:.18em;text-transform:uppercase}
.contact h2{
  margin:20px 0 30px;
  /* فاز ۳ — طبق تصمیم SN به var(--sh-fs-h1) وصل شد (قبلاً
     clamp(50px,9vw,145px) هاردکد بود). تغییر بصری عمدی ولی جزئی. */
  font-size:var(--sh-fs-h1);
  line-height:.82;
  letter-spacing:-.06em;
  font-weight:500;
}
.contact-link{
  display:inline-block;
  font-size:clamp(16px,2vw,25px);
  border-bottom:1px solid var(--line-strong);
  padding-bottom:6px;
}

.social-links{
  margin-top:26px;
  display:flex;
  justify-content:center;
  gap:22px;
  font-size:var(--sh-fs-small);
  letter-spacing:.14em;
  text-transform:uppercase;
}
.social-links a{opacity:.75;transition:opacity .2s;display:inline-flex;align-items:center;gap:6px}
.social-links a:hover{opacity:1}
.social-icon{display:inline-flex;width:15px;height:15px;flex:none}
.social-icon svg{width:100%;height:100%}

/* Contact form — theme-core-sync-checklist.md → «فرم تماس واقعی + کپچا» */
.contact-notice{
  max-width:560px;
  margin:26px auto 0;
  padding:12px 18px;
  border:1px solid var(--line-strong);
  border-radius:2px;
  font-size:var(--sh-fs-body);
}
.contact-notice-ok{border-color:var(--accent);color:var(--accent)}
.contact-notice-error{border-color:var(--sh-danger);color:var(--sh-danger)}

.contact-form{
  max-width:560px;
  margin:36px auto 0;
  display:grid;
  gap:var(--sh-sp-4);
  text-align:left;
}
[dir="rtl"] .contact-form{text-align:right}
.contact-hp{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  opacity:0;
  pointer-events:none;
}
.contact-field label{
  display:block;
  font-size:var(--sh-fs-micro);
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:var(--sh-sp-2);
}
.contact-field input,
.contact-field textarea{
  width:100%;
  background:var(--surface);
  border:1px solid var(--line);
  color:var(--text);
  padding:12px 14px;
  font:inherit;
  font-size:var(--sh-fs-lead);
  border-radius:2px;
  transition:border-color .2s;
}
.contact-field input:focus,
.contact-field textarea:focus{
  outline:none;
  border-color:var(--accent);
}
.contact-field textarea{resize:vertical;min-height:120px}
.contact-submit{
  justify-self:start;
  border:1px solid var(--line-strong);
  background:transparent;
  color:var(--text);
  padding:12px 28px;
  font-size:var(--sh-fs-small);
  letter-spacing:.14em;
  text-transform:uppercase;
  border-radius:999px;
  cursor:pointer;
  transition:.2s;
}
[dir="rtl"] .contact-submit{justify-self:end}
.contact-submit:hover{background:var(--surface-2);border-color:var(--accent)}
.cf-turnstile{margin-top:var(--sh-sp-1);width:100%;max-width:100%;overflow:hidden}
.cf-turnstile iframe{width:100%!important;max-width:100%!important}

footer{
  border-top:1px solid var(--line);
  padding:25px 0 32px;
  color:var(--muted);
  font-size:var(--sh-fs-micro);
  letter-spacing:.08em;
  text-transform:uppercase;
}
.footer-row{
  display:flex;justify-content:space-between;gap:var(--sh-sp-5);
}

.reveal{
  opacity:0;
  transform:translateY(24px);
  transition:opacity .8s ease,transform .8s var(--ease);
}
.reveal.visible{opacity:1;transform:none}

/*
 * v1.19.16 — فید-این بسیار کوتاه هدر+هیرو موقع اولین لود صفحه.
 * جایگزین ایدهٔ «صفحهٔ لودینگ/لوگوموشن» که رد شد (LCP/CLS را بدتر
 * می‌کرد). این نسخه:
 * - فقط CSS خالص است، بدون جاوااسکریپت، بدون هیچ منبع/فونت/تصویر اضافه.
 * - مدت کوتاه (۳۵۰ میلی‌ثانیه) و opacity/transform فقط — مرورگر همچنان
 *   تصویر هیرو را بلافاصله دانلود و دیکد می‌کند (fetchpriority="high"،
 *   loading="eager" دست‌نخورده مانده)؛ فقط لحظهٔ «نمایان‌شدن بصری»
 *   چند ده میلی‌ثانیه به تأخیر می‌افتد — هزینهٔ LCP قابل‌اغماض و در ازای
 *   حس ورود ملایم‌تر.
 * - با prefers-reduced-motion: reduce کاملاً غیرفعال می‌شود.
 * - از سیستم .reveal (اسکرول-محور، وابسته به IntersectionObserver در
 *   main.js) کاملاً جداست؛ این یکی فقط یک‌بار، روی لود اولیهٔ صفحه اجرا
 *   می‌شود و هیچ وابستگی به اسکرول ندارد.
 */
@media (prefers-reduced-motion: no-preference){
  .load-fade{animation:sh-load-fade .35s var(--ease) both;}
  .header.load-fade{animation-delay:0s}
  .hero.load-fade{animation-delay:.06s}
}
@keyframes sh-load-fade{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}
@media (prefers-reduced-motion: reduce){
  .load-fade{opacity:1;transform:none;animation:none}
}

.empty-note{
  color:var(--muted);
  font-size:var(--sh-fs-body-lg);
  padding:var(--sh-sp-5) 0;
}

/* Project single / Archive page / Taxonomy page
   — single-sh_project.php, archive-sh_project.php,
   taxonomy-sh_portfolio_category.php */
.project-single{padding-top:clamp(120px,16vh,180px)}
.project-single-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:var(--sh-sp-5);
  margin-bottom:36px;
}
.back-link{
  font-size:var(--sh-fs-small);
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--muted);
  transition:color .2s;
}
.back-link:hover{color:var(--text)}
.project-single-cat{
  font-size:var(--sh-fs-micro);
  letter-spacing:.13em;
  text-transform:uppercase;
  color:var(--muted);
  border:1px solid var(--line-strong);
  border-radius:999px;
  padding:6px 14px;
  transition:color .2s,border-color .2s;
}
a.project-single-cat:hover{color:var(--text);border-color:var(--text)}
.project-single-title{padding-bottom:clamp(50px,8vw,90px)}
.project-single-title h1{
  margin:0 0 26px;
  font-size:var(--sh-fs-project-title);
  line-height:.92;
  font-weight:500;
  letter-spacing:-.045em;
  max-width:1100px;
}
.project-single-meta{
  display:flex;
  align-items:baseline;
  gap:clamp(24px,4vw,60px);
  border-top:1px solid var(--line);
  padding-top:var(--sh-sp-5);
}
.project-single-year{color:var(--muted);font-size:var(--sh-fs-body-sm);flex:none}
.project-single-desc{
  margin:0;
  max-width:680px;
  font-size:var(--sh-fs-project-desc);
  line-height:1.6;
  color:var(--muted);
}

.project-single-nav{
  display:grid;
  grid-template-columns:1fr 1fr;
  border-top:1px solid var(--line);
  padding-top:26px;
  padding-bottom:clamp(80px,11vw,140px);
}
.project-nav-link{display:flex;flex-direction:column;gap:6px;max-width:80%;min-width:0;overflow-wrap:anywhere}
.project-nav-link.next{text-align:right;margin-inline-start:auto;align-items:flex-end}
.project-nav-label{font-size:var(--sh-fs-micro);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.project-nav-link strong{font-size:var(--sh-fs-nav-strong);font-weight:500;letter-spacing:-.02em}

/* Archive page (/work/) and Category page (/work-category/{slug}/) */
.archive-page{padding-top:clamp(130px,17vw,190px);padding-bottom:clamp(90px,12vw,140px)}
.archive-page .back-link{display:inline-block;margin-bottom:14px}

.pagination{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:var(--sh-sp-2);
  margin-top:44px;
}
.pagination span,.pagination a{
  min-width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 var(--sh-sp-2);
  font-size:var(--sh-fs-body-sm);
  border:1px solid var(--line);
  border-radius:8px;
  color:var(--muted);
  transition:border-color .2s,color .2s;
}
.pagination a:hover{color:var(--text);border-color:var(--line-strong)}
.pagination .current{color:var(--text);border-color:var(--text)}

/* RTL */
[dir="rtl"] .nav-links,[dir="rtl"] .controls{direction:ltr}
[dir="rtl"] .hero-disciplines{text-align:left}
[dir="rtl"] .section-note,[dir="rtl"] .archive-type{text-align:left}
[dir="rtl"] .intro-copy{letter-spacing:0;line-height:1.2}
[dir="rtl"] .hero h1,[dir="rtl"] .section-title,[dir="rtl"] .about h2,[dir="rtl"] .contact h2{
  letter-spacing:0;
}
[dir="rtl"] .project-single-title h1{letter-spacing:0}
[dir="rtl"] .project-nav-link.next{text-align:left;align-items:flex-start}
[dir="rtl"] .pagination{direction:ltr}

@media(max-width:850px){
  .nav-links{display:none}
  .nav-right{gap:10px}
  .hero-meta{display:block}
  .hero-disciplines{text-align:left;margin-top:var(--sh-sp-5)}
  .intro,.about-grid{grid-template-columns:1fr;gap:38px}
  .projects{display:block}
  .project,.project:nth-child(n){margin:0 0 65px}
  .project-image{aspect-ratio:4/5!important}
  .archive-row{grid-template-columns:65px 1fr auto;gap:var(--sh-sp-3)}
  .archive-type{font-size:var(--sh-fs-caption)}
  .project-single-meta{display:block}
  .project-single-desc{margin-top:14px}
  .project-single-nav{grid-template-columns:1fr}
  .project-nav-link.next{text-align:left;align-items:flex-start;margin-top:22px;margin-inline-start:0}
  [dir="rtl"] .project-nav-link.next{text-align:right;align-items:flex-end}
}

@media(max-width:520px){
  :root{--pad:18px}
  .header{padding-top:14px}
  .brand{font-size:var(--sh-fs-small)}
  .hero h1{font-size:clamp(48px,15vw,78px)}
  .hero-role{font-size:var(--sh-fs-lead-lg)}
  .hero-disciplines{font-size:var(--sh-fs-caption)}
  .section-head{display:block}
  .section-note{margin-top:var(--sh-sp-4);text-align:left}
  .archive-row{grid-template-columns:1fr auto}
  .archive-year{display:none}
  .facts{grid-template-columns:1fr}
  .footer-row{display:block}
  .footer-row span{display:block;margin-bottom:var(--sh-sp-2)}
}


/* v1.9.0 — navigation, focus, overflow and small-screen hardening */
html,body{max-width:100%;overflow-x:hidden}
button,a,input,textarea{touch-action:manipulation}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
}
.nav-toggle{display:none}
.nav-links{min-width:0}
/* NOTE: the mobile menu itself (the full-screen overlay panel that opens
   under #siteNav) is defined once, in a single canonical block near the end
   of this file ("Mobile navigation — canonical implementation"). An older
   absolute-positioned dropdown version used to live here; it was deleted
   because two competing mobile-menu implementations in the same file is
   exactly what caused off-center items, missing close icons and
   inconsistent behaviour after edits. Do not re-add a second menu block —
   edit the canonical one instead. */
@media(max-width:520px){
  .nav-right{gap:10px}
  .brand{max-width:60vw;overflow:hidden;text-overflow:ellipsis}
  .hero{min-height:100svh}
  .hero-content{padding-bottom:40px}
  .hero-meta{margin-top:22px}
  .section-title{font-size:var(--sh-fs-section-title-sm)}
  .credits{padding-block:70px}
}

@media(prefers-reduced-motion:reduce){
  *,html{scroll-behavior:auto!important;transition:none!important}
}

/* =========================================================
   v1.7.0 — appended, additive block (theme-core-sync-checklist.md):
   (۱) لینک لایت‌باکس روی تصاویر گالری پروژه («گالری/لایت‌باکس/EXIF/
       واترمارک») — استایل فقط رفتار hover؛ باز/بسته‌شدن نمایشگر کامل
       خودش سمت CSS/JS خود پلاگین (gallery.css/gallery-single.js) است.
   (۲) بخش‌های محتوایی جاافتاده — Memberships (زیربخش داخل About) و
       Awards/Exhibitions/Publications/Press (بخش‌های تمام‌عرض جدید،
       با الگوی مشترک .credits/.credit-row که عمداً از همان زبان
       بصری .archive-row پیروی می‌کند تا با بقیهٔ سایت یک‌دست بماند).
   طبق قانون «CSS افزایشی»، هیچ قانون قبلی اینجا ویرایش نشده — فقط
   قوانین تازه اضافه شده‌اند. رنگ --accent (طلایی) عمداً در هیچ‌کدام
   از این قوانین استفاده نشده — طبق اصل طراحی، آن رنگ فقط مخصوص لوگو
   است.
   ========================================================= */

/* --- (۱) Gallery lightbox trigger, project-single --- */
.gallery-item-link{display:block;cursor:pointer}
.gallery-item-link img{transition:transform .7s var(--ease),filter .4s ease;filter:saturate(.85)}
.gallery-item-link:hover img{transform:scale(1.035);filter:saturate(1)}

/* --- (۲) Shared "credits" list pattern: Awards / Exhibitions / Publications / Press --- */
.credits{border-top:1px solid var(--line);padding:clamp(70px,10vw,130px) 0}
.credits .section-head{margin-bottom:30px}
.credit-note{
  margin:0 0 34px;
  color:var(--muted);
  font-size:var(--sh-fs-credit-note);
  line-height:1.7;
  max-width:760px;
}
.credits-list{border-top:1px solid var(--line)}
.credit-row{
  display:grid;
  grid-template-columns:70px 1.5fr 1fr 90px;
  gap:var(--sh-sp-6);
  align-items:baseline;
  padding:var(--sh-sp-5) 0;
  border-bottom:1px solid var(--line);
  transition:padding .25s ease;
}
.credit-row:hover{padding-left:var(--sh-sp-3);padding-right:var(--sh-sp-3)}
.credit-year{color:var(--muted);font-size:var(--sh-fs-small)}
.credit-title{font-size:var(--sh-fs-credit-title);letter-spacing:-.01em}
.credit-meta{color:var(--muted);font-size:var(--sh-fs-body-sm)}
.credit-link{
  justify-self:end;
  color:var(--muted);
  font-size:var(--sh-fs-micro);
  text-transform:uppercase;
  letter-spacing:.1em;
  border-bottom:1px solid var(--line-strong);
  transition:color .2s ease,border-color .2s ease;
}
.credit-link:hover{color:var(--text);border-color:var(--text)}

/* فاز ۳ (تصمیم SN، فاز ۲) — نسخه‌ی خلاصه‌ی Home برای Awards/Exhibitions/
   Publications/Press: فقط سال+عنوان رندر می‌شود (بدون venue/publisher/
   type/value) تا هم‌پوشانی متنی با صفحه‌ی کامل بیوگرافی کم شود. این حذف
   واقعاً از PHP (index.php) انجام شده، نه صرفاً مخفی‌سازی CSS — پس ستون‌
   بندی گرید هم با تعداد واقعی فرزندان (سال، عنوان، لینک) تطبیق داده شده.
   صفحه‌ی `/biography` این کلاس را ندارد و meta کامل را نشان می‌دهد. */
.credits-list--summary .credit-row{grid-template-columns:70px 1.5fr 90px}

/* --- (۲) Memberships — small subsection inside About, not a full section --- */
.about-sub{margin-top:50px;padding-top:var(--sh-sp-6);border-top:1px solid var(--line)}
.about-sub h3{margin:0 0 var(--sh-sp-4);font-size:var(--sh-fs-small);text-transform:uppercase;letter-spacing:.14em;color:var(--muted);font-weight:500}
.about-sub-list{display:grid;gap:var(--sh-sp-3)}
.about-sub-row{display:flex;justify-content:space-between;align-items:baseline;gap:18px;font-size:var(--sh-fs-body-lg);padding-bottom:10px;border-bottom:1px solid var(--line)}
.about-sub-row:last-child{border-bottom:0;padding-bottom:0}
.about-sub-row span:last-child,.about-sub-row a:last-child{color:var(--muted);font-size:var(--sh-fs-body-sm);text-align:right;white-space:nowrap}

/* --- RTL --- */
[dir="rtl"] .credit-row{direction:rtl}
[dir="rtl"] .credit-link{justify-self:start}
[dir="rtl"] .about-sub-row span:last-child,[dir="rtl"] .about-sub-row a:last-child{text-align:left}

/* --- Mobile --- */
@media(max-width:850px){
  .credit-row{grid-template-columns:46px 1fr auto;gap:var(--sh-sp-3)}
  .credit-meta{display:none}
  /* summary rows دیگر meta در DOM ندارند؛ فقط عرض ستون سال با نسخه‌ی کامل
     یکسان بماند (۴۶px)، چون دو کلاس اختصاصی‌تر از پیش‌فرض غیرموبایل است. */
  .credits-list--summary .credit-row{grid-template-columns:46px 1fr auto}
}
@media(max-width:520px){
  .credit-row{grid-template-columns:1fr auto}
  .credit-year{display:none}
  .about-sub-row{display:block}
  .about-sub-row span:last-child,.about-sub-row a:last-child{display:block;text-align:left;margin-top:var(--sh-sp-1)}
  [dir="rtl"] .about-sub-row span:last-child,[dir="rtl"] .about-sub-row a:last-child{text-align:right}
}

/* Personal portrait: editorial identity block, using the existing Core setting. */
.about-identity{display:flex;flex-direction:column;align-items:flex-start;gap:var(--sh-sp-6)}
.about-identity .sh-about-photo-wrap{width:min(260px,100%)}
.about-identity .sh-about-photo{display:block;width:100%;height:auto;aspect-ratio:var(--sh-about-ratio,4/3);object-fit:cover;object-position:center;border:0!important}
.about-identity-copy{display:grid;gap:7px}
.about-identity-name{font-size:var(--sh-fs-body-sm);letter-spacing:.12em;text-transform:uppercase;font-weight:600}
.about-identity-role{font-size:var(--sh-fs-micro);color:var(--muted);letter-spacing:.08em;text-transform:uppercase}

/* Latest journal/post — a quiet full-width cover near the end of the landing page.
   v1.17.3 — Phase 1 decision (SN): this card previously hardcoded a permanent
   dark surface (#242424/#fff/#b8b8b8) regardless of site theme, unlike every
   other component. Confirmed NOT intentional — now follows --sh-surface/
   --sh-text/--sh-text-secondary/--sh-divider-strong like the rest of the page,
   so it goes white/black in light mode along with everything else. */
.latest-post{padding:clamp(80px,11vw,150px) 0;border-top:1px solid var(--line)}
.latest-post-head{display:flex;justify-content:space-between;align-items:end;gap:var(--sh-sp-6);margin-bottom:28px}
.latest-post-card{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,.75fr);min-height:clamp(300px,42vw,620px);background:var(--sh-surface);color:var(--sh-text);overflow:hidden}
.latest-post-media{position:relative;min-width:0;min-height:100%}
.latest-post-media img{width:100%;height:100%;object-fit:cover}
/* Brand mark on the "latest from the journal" cover — same logo file as the
   header, presented as a quiet corner badge over the photo rather than
   inline text, matching an editorial magazine cover treatment. */
.latest-post-media img.latest-post-logo{
  position:absolute;
  inset-block-start:20px;
  inset-inline-start:20px;
  width:30px;height:30px;
  object-fit:contain;
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.55));
  opacity:.92;
}
.latest-post-content{display:flex;flex-direction:column;justify-content:flex-end;gap:var(--sh-sp-4);padding:clamp(24px,4vw,56px);background:var(--sh-surface)}
.latest-post-meta{font-size:var(--sh-fs-caption);letter-spacing:.13em;text-transform:uppercase;color:var(--sh-text-secondary)}
/* فاز ۳ — طبق تصمیم SN به توکن جدید var(--sh-fs-card-title) وصل شد
   (نه به h1/h2/h3، چون بصری عنوان کارته نه هدینگ صفحه). مقدار عیناً
   همون قبلی‌ست — صفر تغییر بصری. */
.latest-post-title{margin:0;font-size:var(--sh-fs-card-title);line-height:.98;font-weight:500;letter-spacing:-.035em}
.latest-post-excerpt{margin:0;color:var(--sh-text-secondary);font-size:var(--sh-fs-body-lg);line-height:1.7;max-width:46ch}
.latest-post-link{align-self:flex-start;font-size:var(--sh-fs-micro);letter-spacing:.12em;text-transform:uppercase;border-bottom:1px solid var(--sh-divider-strong);padding-bottom:6px}

@media(max-width:560px){
  .about-identity .sh-about-photo-wrap{width:min(220px,100%)}
  .latest-post{padding-block:72px}
  .latest-post-media{height:72vw;min-height:220px}
  .latest-post-content{padding:var(--sh-sp-6)}
  .latest-post-title{font-size:clamp(30px,10vw,48px)}
}
@media(prefers-reduced-motion:reduce){
  .latest-post-card *,.about-identity *{transition:none!important}
}


/* =========================================================
   Mobile navigation — canonical implementation (single source of truth)
   =========================================================
   This is the ONLY block that defines the mobile menu, the mobile header
   controls, and the mobile layout correction for home sections. Earlier
   revisions of this theme grew a second, competing copy of the same
   full-screen menu further up this file; the two disagreed on padding,
   gap and centering, which is what produced off-center menu items and
   inconsistent fixes between edits. That duplicate has been removed —
   everything mobile-nav-related now lives here, once.

   This pass intentionally does NOT change the visual dimensions, shape,
   padding or typography of the language/theme controls on desktop, tablet
   or mobile. Only the menu panel, its open/closed state and small-screen
   section layout are affected.
*/
*,*::before,*::after{box-sizing:border-box}

/* Keep every home section inside the viewport after padding is applied. */
.site,.nav,.hero-content{min-width:0}

/* Mobile menu: fixed viewport sheet, exact center, visible close control. */
@media(max-width:850px){
  html.nav-open,body.nav-open{
    overflow:hidden!important;
    overscroll-behavior:none!important;
  }
  .nav-toggle{display:inline-flex;align-items:center;justify-content:center}
  .nav-toggle .menu-label{display:inline-block}
  .nav-toggle[aria-expanded="true"] .menu-label{display:none}
  .brand{gap:7px}
  .brand-logo{width:22px;height:22px;flex-basis:22px}
  .latest-post-card{grid-template-columns:1fr;min-height:0}
  .latest-post-media{height:min(72vw,430px);min-height:260px}
  .latest-post-content{min-height:240px}
  .latest-post-head{display:block}
  .latest-post-head .section-note{margin-top:14px}
  body.nav-open .header{background:transparent}
  body.nav-open .nav{position:relative;z-index:40}
  body.nav-open .controls .control{background:transparent}
  body.nav-open #themeBtn{visibility:visible;pointer-events:auto}
  .nav-right{min-width:0}
  .controls{position:relative;z-index:60}
  .nav-toggle{position:relative;z-index:70}
  .nav-toggle .menu-close{display:none;font-size:24px;line-height:1;font-weight:300}
  .nav-toggle[aria-expanded="true"] .menu-close{display:inline-flex!important;align-items:center;justify-content:center}

  .nav-right > .nav-links,
  .nav-right > ul.nav-links{
    box-sizing:border-box!important;
    position:fixed!important;
    inset:0!important;
    z-index:50!important;
    display:none;
    flex-direction:column!important;
    height:100dvh!important;
    min-height:100svh!important;
    margin:0 !important;
    padding:0 var(--pad)!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    background:var(--sh-bg)!important;
    color:var(--sh-text)!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    list-style:none!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    gap:clamp(20px,4vh,34px)!important;
  }
  /* v1.17.2 — the light-theme override that used to live here (forcing
     #fff/#000) is gone: background/color above now read var(--sh-bg) /
     var(--sh-text), which already flip correctly in light mode. One
     source of truth instead of two hardcoded copies that had to be kept
     in sync by hand. */
  .nav-right > .nav-links.is-open,
  .nav-right > ul.nav-links.is-open{display:flex!important}
  .nav-right > .nav-links a,
  .nav-right > ul.nav-links a{
    background:none!important;
    color:inherit!important;
    opacity:1!important;
    font-size:clamp(22px,5.5vw,38px)!important;
    line-height:1.15!important;
    letter-spacing:.02em!important;
    text-transform:none!important;
  }
  [dir="rtl"] .nav-right > .nav-links a,[dir="rtl"] .nav-right > ul.nav-links a{letter-spacing:0!important}
  .nav-right > .nav-links li,
  .nav-right > ul.nav-links li{
    width:auto!important;
    max-width:100%!important;
    margin:0 !important;
    padding:0 !important;
    text-align:center!important;
  }
  .nav-right > .nav-links a,
  .nav-right > ul.nav-links a{
    width:auto!important;
    max-width:100%!important;
    margin:0 !important;
    padding:0 !important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    text-align:center!important;
  }

  /* Never let the full-screen sheet cover the menu button itself. */
  body.nav-open .nav-right > .nav-links,
  body.nav-open .nav-right > ul.nav-links{z-index:50!important}
  body.nav-open .controls{z-index:60!important}
  body.nav-open .nav-toggle{z-index:70!important}

  /* All home containers use the same safe inline geometry. */
  .intro,.work,.archive,.about,.credits,.latest-post,.contact,footer .site{
    width:100%;
    max-width:100%;
    min-width:0;
  }
  .intro{
    grid-template-columns:1fr!important;
    gap:var(--sh-sp-6) !important;
    text-align:center!important;
  }
  .intro .section-kicker,
  .intro .intro-copy{
    width:100%;
    max-width:none;
    text-align:center!important;
    margin-inline:auto!important;
  }
  .intro-copy{overflow-wrap:anywhere}

  /* Center every numbered editorial section on small screens. */
  .section-head{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%;
    text-align:center!important;
  }
  .section-head > *{max-width:100%;text-align:center!important}
  .section-note{margin-inline:auto!important}

  /* Contact: form fields and social row can never exceed the viewport.
     No padding-inline is added here — this section already carries the
     .site class (padding:0 var(--pad) at all widths); adding it again
     here used to double the inset on mobile only. */
  .contact{
    width:100%;
    max-width:100%;
    margin-inline:auto;
    text-align:center;
  }
  .contact h2,.contact-lead,.contact-link{max-width:100%;overflow-wrap:anywhere}
  .contact-form{
    width:100%;
    max-width:560px;
    min-width:0;
    margin-inline:auto;
  }
  .contact-field,.contact-field input,.contact-field textarea,.cf-turnstile,
  .contact-submit{min-width:0;max-width:100%}
  .contact-field input,.contact-field textarea{width:100%;box-sizing:border-box}
  .social-links{
    width:100%;
    max-width:100%;
    min-width:0;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:center;
    gap:12px 18px;
    margin-inline:auto;
  }
  .social-links a{
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
    white-space:normal;
    justify-content:center;
  }
  .social-label{min-width:0;overflow-wrap:anywhere}

  .credits-list{width:100%;max-width:100%;min-width:0}
  .credit-row{
    min-width:0;
    max-width:100%;
    grid-template-columns:1fr!important;
    gap:var(--sh-sp-2) !important;
    text-align:center;
  }
  .credit-row > *{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .credit-link{justify-self:center!important}

  .about-grid{min-width:0;max-width:100%}
  .about-identity,.about-copy{min-width:0;max-width:100%}
  .about-identity{align-items:center;text-align:center}
  .about-copy{overflow-wrap:anywhere}
  .facts{min-width:0;max-width:100%}
  .fact-label,.fact-value{overflow-wrap:anywhere}

  .latest-post-card,.latest-post-content,.latest-post-media{min-width:0;max-width:100%}
  .latest-post-title,.latest-post-excerpt{overflow-wrap:anywhere}
}

@media(max-width:520px){
  .section-head{margin-bottom:30px}
  .contact h2{font-size:clamp(44px,14vw,72px);overflow-wrap:anywhere}
  .social-links{gap:10px 14px}
}

/* ==========================================================================
   v1.17.0 — صفحهٔ مستقل «بیوگرافی» (/biography) و خلاصه‌سازی Home
   theme-core-sync-checklist.md → «ساختار تک‌صفحه در برابر چندصفحه»
   (تصمیم نهایی: مدل ترکیبی). Additive block — چیزی از قوانین بالا
   ویرایش نشده.
   ========================================================================== */

/* لینک «مشاهدهٔ رزومهٔ کامل» زیر فهرست‌های خلاصه‌شدهٔ Home
   (Memberships/Awards/Exhibitions/Publications/Press). از همان زبان
   بصری .back-link استفاده می‌کند اما کلاس مستقل دارد چون معنایش برعکس
   است (رفتن به جلو/صفحهٔ دیگر، نه بازگشت). */
.view-full-link{
  display:inline-block;
  margin-top:var(--sh-sp-4);
  font-size:var(--sh-fs-small);
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--muted);
  transition:color .2s;
}
.view-full-link:hover{color:var(--text)}

/* دکمهٔ CTA بخش About هوم → لینک به صفحهٔ بیوگرافی. زبان بصری همان
   .contact-submit (pill، بوردردار، حروف بزرگ) برای یکدستی با تنها
   دکمهٔ واقعی مشابه‌ای که همین تم از قبل دارد. */
.about-cta{
  display:inline-block;
  margin-top:22px;
  border:1px solid var(--line-strong);
  color:var(--text);
  padding:12px 28px;
  font-size:var(--sh-fs-small);
  letter-spacing:.14em;
  text-transform:uppercase;
  border-radius:999px;
  transition:.2s;
}
.about-cta:hover{background:var(--surface-2);border-color:var(--accent)}

/* صفحهٔ بیوگرافی (page-biography.php): از همان کلاس‌های آماده
   .project-single/.project-single-head/.project-single-title/
   .back-link/.credits/.credit-row/.about-sub استفاده می‌کند — فقط یک
   spacing کوچک اضافه برای فاصلهٔ بین سکشن‌های پشت‌سرهم روی این صفحه
   (روی Home این فاصله را .reveal/section padding خودشان تامین
   می‌کردند، اینجا چون همه یک‌جا زیر هم می‌آیند نیاز به کمی فاصلهٔ
   دستی هست). */
.bio-page .credits + .credits{border-top:none}
.bio-page .about-sub{border-top:1px solid var(--line);padding-top:clamp(50px,8vw,90px);margin-top:clamp(50px,8vw,90px)}
/* v1.19.13 — Phase 5. The closing "let's work together" block was an
   inline `style="padding-block:clamp(60px,9vw,100px)"` directly in
   page-biography.php — a fluid value living outside style.css, which
   breaks the "one token file, no parallel definition elsewhere" rule
   even worse than an un-tokenized-but-in-CSS value would. Moved here
   verbatim (same clamp, zero visual change), following the same
   precedent as `.credits`/`.about-sub` above: a fluid spacing value
   that stays a documented per-component exception rather than a
   named token, since it's used in exactly one place. */
.bio-final-cta{padding-block:clamp(60px,9vw,100px)}
