/* مُنادی — dark, sun-themed portfolio
   Palette: ink #0d0b09 · coal #15110d · line #2c2418 · sun #d9a441 · sun-dim #8a6d34 · text #ece4d2 · muted #a3937a */
/* fonts — Estedad (self-hosted Persian webfont) */
@font-face { font-family: "Estedad"; src: url("fonts/estedad/Estedad-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("fonts/estedad/Estedad-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("fonts/estedad/Estedad-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("fonts/estedad/Estedad-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("fonts/estedad/Estedad-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("fonts/estedad/Estedad-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("fonts/estedad/Estedad-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

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

:root {
  --ink: #0d0b09;
  --coal: #15110d;
  --line: #2c2418;
  --sun: #d9a441;
  --sun-dim: #8a6d34;
  --text: #ece4d2;
  --muted: #a3937a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: Estedad, "Vazirmatn", Tahoma, sans-serif;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body { line-height: 1.75; }

/* giant sun glow on the horizon of the page — gently breathing */
.sun-bg {
  position: fixed;
  top: -240px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(217,164,65,0.14) 0%, rgba(217,164,65,0.05) 38%, transparent 66%);
  pointer-events: none;
  z-index: 0;
  animation: sun-breath 9s ease-in-out infinite;
}
@keyframes sun-breath {
  0%, 100% { opacity: 0.75; transform: translateX(50%) scale(1); }
  50%      { opacity: 1;    transform: translateX(50%) scale(1.06); }
}

/* soft glow following the cursor */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,164,65,0.07) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s;
  will-change: transform;
}
body.has-cursor .cursor-glow { opacity: 1; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 11, 9, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--sun);
}
.sun-mark { width: 30px; height: 30px; animation: spin-slow 24s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.logo-text { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.nav nav { display: flex; align-items: center; }
.nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15.5px;
  margin-inline-start: 26px;
  position: relative;
  transition: color 0.2s;
}
.nav nav a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--sun);
  transition: width 0.25s ease;
}
.nav nav a:hover, .nav nav a:focus-visible { color: var(--sun); }
.nav nav a:hover::after, .nav nav a:focus-visible::after { width: 100%; }
.lang-btn {
  margin-inline-start: 26px;
  background: none;
  border: 1px solid var(--sun-dim);
  color: var(--sun);
  font-family: inherit;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.lang-btn:hover, .lang-btn:focus-visible { background: var(--sun); color: var(--ink); transform: translateY(-1px); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 24px 70px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 48px;
  align-items: center;
}
.hero-sun { display: flex; justify-content: center; }
.sun-disc {
  width: 190px;
  height: 190px;
  color: var(--sun);
  animation: sunrise 1.6s ease-out both;
  filter: drop-shadow(0 0 26px rgba(217,164,65,0.25));
}
.sun-disc svg {
  width: 100%; height: 100%; display: block;
  animation: spin-slow 60s linear infinite;
}
@keyframes sunrise {
  from { transform: translateY(34px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(217,164,65,0.18)); }
  50%      { filter: drop-shadow(0 0 38px rgba(217,164,65,0.4)); }
}
.sun-disc { animation: sunrise 1.6s ease-out both, pulse-glow 5s ease-in-out 1.6s infinite; }

.hero-text .eyebrow {
  color: var(--sun);
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.hero h1 { font-size: clamp(38px, 5.5vw, 60px); font-weight: 700; line-height: 1.25; }
.name-en { display: none; font-size: clamp(34px, 5vw, 54px); letter-spacing: 1px; }
html[lang="en"] .name-fa { display: none; }
html[lang="en"] .name-en { display: block; }
.hero-sub { margin-top: 18px; color: var(--muted); font-size: 17px; max-width: 42ch; }

.hero-portrait {
  width: 170px;
  height: 220px;
  border-radius: 110px 110px 6px 6px;   /* arch shape, echoes the sun */
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}
.hero-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -60px 60px -30px rgba(13,11,9,0.55);
  pointer-events: none;
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 6s ease; }
.hero-portrait:hover img { transform: scale(1.06); }

/* ---------- sections ---------- */
section { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 46px 24px; }
.section-head { display: flex; align-items: center; gap: 22px; margin-bottom: 44px; }
.section-head h2 { font-size: 24px; font-weight: 700; white-space: nowrap; }
.section-head .rule {
  height: 1px;
  background: linear-gradient(to var(--dir, left), var(--sun-dim), transparent);
  flex: 1;
  transform: scaleX(0);
  transform-origin: var(--origin, right);
  transition: transform 1s ease 0.2s;
}
.reveal.visible .rule, .section-head.visible .rule { transform: scaleX(1); }
html[lang="en"] .section-head .rule { --origin: left; }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}
.reveal.d1 { transition-delay: 0.15s; }
.reveal.d2 { transition-delay: 0.3s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- project cards ---------- */
.project-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--coal);
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(217,164,65,0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.project-card:hover::before, .project-card:focus-visible::before { opacity: 1; }
.project-card:hover, .project-card:focus-visible {
  border-color: var(--sun-dim);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px -18px rgba(217,164,65,0.22);
}
.card-art {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10.4;
  background: #14110d;
}
.card-art img, .card-art svg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.project-card:hover .card-art img, .project-card:hover .card-art svg { transform: scale(1.05); }
.card-body .eyebrow { color: var(--sun); font-size: 12.5px; letter-spacing: 1px; margin-bottom: 6px; }
.card-body h3 { font-size: 32px; font-weight: 700; margin-bottom: 10px; transition: color 0.25s; }
.project-card:hover .card-body h3 { color: var(--sun); }
.card-desc { color: var(--muted); font-size: 15.5px; }
.card-more {
  display: inline-block;
  margin-top: 16px;
  color: var(--sun);
  font-size: 14px;
  border-bottom: 1px solid var(--sun-dim);
  padding-bottom: 2px;
  transition: letter-spacing 0.25s;
}
.project-card:hover .card-more { letter-spacing: 1px; }

.more-note { color: var(--muted); font-style: italic; font-size: 14.5px; text-align: center; margin-top: 30px; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 44px;
  align-items: start;
}
.portrait {
  width: 210px;
  height: 270px;
  border-radius: 130px 130px 8px 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 6s ease; }
.portrait:hover img { transform: scale(1.06); }
.about-text p { font-size: 17px; margin-bottom: 16px; }
.about-en { color: var(--muted); display: none; }
html[lang="en"] .about-fa { display: none; }
html[lang="en"] .about-en { display: block; }

/* ---------- contact ---------- */
.contact-line { color: var(--muted); margin-bottom: 22px; }
.contact-links { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 11px 26px;
  border: 1px solid var(--sun);
  color: var(--sun);
  text-decoration: none;
  font-size: 14.5px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover, .btn:focus-visible {
  background: var(--sun);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -10px rgba(217,164,65,0.5);
}
.btn.ghost { border-color: var(--line); color: var(--muted); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: var(--coal); color: var(--sun); box-shadow: none; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 26px 24px;
  color: var(--muted);
  font-size: 14px;
  position: relative;
  z-index: 1;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 56px 24px 48px; gap: 34px; }
  .hero-sun { order: -1; }
  .sun-disc { width: 150px; height: 150px; }
  .hero-portrait { display: none; }
  .hero-sub { margin-inline: auto; }
  .project-card { grid-template-columns: 1fr; gap: 20px; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { margin: 0 auto; }
  .about-text { text-align: center; }
  .nav nav a { margin-inline-start: 16px; font-size: 14px; }
  .lang-btn { margin-inline-start: 16px; }
}

/* ---------- focus & motion safety ---------- */
a:focus-visible, .btn:focus-visible, .lang-btn:focus-visible, .project-card:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .section-head .rule { transform: scaleX(1); }
  .cursor-glow { display: none; }
}

/* ---------- project pages ---------- */
.project-hero { max-width: 860px; padding-top: 70px; }
.project-hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; margin: 8px 0 18px; }
.project-intro { color: var(--muted); font-size: 17px; max-width: 62ch; }
.meta { list-style: none; margin-top: 30px; border-top: 1px solid var(--line); max-width: 640px; }
.meta li { display: flex; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.meta li > span:first-child {
  min-width: 84px;
  color: var(--sun);
  font-size: 12px;
  letter-spacing: 1px;
  padding-top: 3px;
}

.step { display: flex; gap: 22px; max-width: 860px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.step:last-of-type { border-bottom: none; }
.step-num {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border: 1px solid var(--sun-dim);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--sun);
  font-size: 19px;
  font-weight: 700;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.step:hover .step-num {
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 0 22px rgba(217,164,65,0.35);
  transform: scale(1.08);
}
.step-body h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.step-body p { color: var(--muted); font-size: 15.5px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1000px; }
.gallery .frame { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--coal); transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s; }
.gallery .frame:hover { border-color: var(--sun-dim); transform: translateY(-3px); box-shadow: 0 14px 34px -16px rgba(217,164,65,0.2); }
.gallery .frame svg, .gallery .frame img { width: 100%; display: block; }
.gallery .frame.full { grid-column: 1 / -1; }
.gallery figcaption { padding: 12px 16px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.gallery-note { color: var(--muted); font-style: italic; font-size: 14.5px; margin-top: 22px; }

@media (max-width: 860px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .project-hero { padding-top: 46px; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .step { flex-direction: row; }
}

.ep-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--sun);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid var(--sun-dim);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
.ep-link:hover { color: #f0c877; border-color: #f0c877; }

/* ---------- background texture ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(217,164,65,0.05), transparent 60%),
    radial-gradient(ellipse 120% 90% at 50% 110%, rgba(0,0,0,0.5), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,0.006) 3px 6px);
}
header.nav, section, footer { position: relative; z-index: 1; }

/* ---------- studio members ---------- */
.team { max-width: 1100px; margin: 0 auto; padding: 80px 24px 40px; }
.team-grid { display: grid; gap: 28px; }
.member-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  background: linear-gradient(160deg, rgba(44,36,24,0.45), rgba(21,17,13,0.7));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.member-card:hover { border-color: var(--sun-dim); transform: translateY(-3px); }
.member-photo {
  width: 240px; height: 280px;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  align-self: start;
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.9); transition: filter 0.4s, transform 0.6s ease; }
.member-card:hover .member-photo img { filter: saturate(1); transform: scale(1.04); }
.member-body h3 { font-size: 24px; margin-bottom: 4px; }
.member-name-en { display: none; font-size: 21px; letter-spacing: 0.5px; }
html[lang="en"] .member-name-fa { display: none; }
html[lang="en"] .member-name-en { display: inline; }
.member-role { color: var(--sun); font-size: 14px; margin-bottom: 14px; letter-spacing: 0.5px; }
.member-fa, .member-en { color: var(--muted); font-size: 15.5px; line-height: 1.9; }
.member-en { display: none; }
html[lang="en"] .member-fa { display: none; }
html[lang="en"] .member-en { display: block; }
.member-links { margin-top: 16px; display: flex; gap: 18px; flex-wrap: wrap; }
.member-links a { color: var(--sun); font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--sun-dim); padding-bottom: 2px; transition: color 0.25s, border-color 0.25s; }
.member-links a:hover { color: #f0c877; border-color: #f0c877; }

@media (max-width: 720px) {
  .member-card { grid-template-columns: 1fr; }
  .member-photo { width: 100%; height: 320px; }
}

/* ---------- member links & tags ---------- */
.member-link { color: inherit; text-decoration: none; transition: color 0.25s; }
.member-link:hover { color: var(--sun); }
.member-name-en { display: none; }
html[lang="en"] .member-name-en { display: inline; }
html[lang="en"] .member-name-fa { display: none; }

.founder-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border: 1px solid var(--sun-dim);
  border-radius: 999px;
  color: var(--sun);
  font-size: 12.5px;
  letter-spacing: 0.5px;
}

/* empty photo placeholder */
.member-photo-empty {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(44,36,24,0.5), rgba(21,17,13,0.85));
}
.member-photo-empty svg { width: 65%; height: 65%; color: var(--sun-dim); }

/* ---------- member pages ---------- */
.member-hero { max-width: 1100px; margin: 0 auto; padding: 130px 24px 30px; }
.member-hero-inner { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: center; }
.member-photo-lg { width: 240px; height: 280px; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.member-hero-text .eyebrow { color: var(--sun); font-size: 14px; letter-spacing: 1px; margin-bottom: 8px; }
.member-title { font-size: clamp(34px, 5vw, 52px); font-weight: 700; line-height: 1.25; }
.member-title .member-name-en { display: none; }
html[lang="en"] .member-title .member-name-en { display: block; }
html[lang="en"] .member-title .member-name-fa { display: none; }
.member-hero-text .member-role { color: var(--sun); font-size: 16px; margin-top: 8px; letter-spacing: 0.5px; }

.member-section { max-width: 1100px; margin: 0 auto; padding: 55px 24px 10px; }
.member-bio { color: var(--muted); font-size: 16.5px; line-height: 2; max-width: 70ch; }
.member-works { display: flex; flex-wrap: wrap; gap: 12px; }
.work-chip {
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 14.5px;
  transition: border-color 0.25s, color 0.25s, transform 0.25s;
}
.work-chip:hover { border-color: var(--sun); color: var(--sun); transform: translateY(-2px); }

@media (max-width: 720px) {
  .member-hero { padding-top: 110px; }
  .member-hero-inner { grid-template-columns: 1fr; }
  .member-photo-lg { width: 100%; height: 300px; }
}
.credit-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--sun-dim); transition: color 0.25s, border-color 0.25s; }
.credit-link:hover { color: var(--sun); border-color: var(--sun); }
/* hero logo placeholder — empty frame until the real logo arrives */
.hero-logo-slot {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px dashed rgba(217, 164, 65, 0.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(44,36,24,0.35), rgba(21,17,13,0.7));
}
.hero-logo-slot svg {
  width: 34%;
  color: var(--sun);
  opacity: 0.55;
  animation: breath 5s ease-in-out infinite;
}
img.member-photo-lg { width: 240px; height: 280px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
@media (max-width: 720px) { img.member-photo-lg { width: 100%; height: 300px; } }
.hero-links { margin-top: 14px; display: flex; gap: 16px; }
.hero-links a { color: var(--sun); text-decoration: none; font-size: 14.5px; border-bottom: 1px dotted var(--sun-dim); transition: border-color 0.25s; }
.hero-links a:hover { border-color: var(--sun); }
/* ---------- resume (cv) list ---------- */
.cv-list { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.cv-item {
  display: flex;
  gap: 22px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid rgba(44, 36, 24, 0.7);
}
.cv-item:last-child { border-bottom: none; }
.cv-year {
  flex: 0 0 96px;
  color: var(--sun);
  font-size: 14.5px;
  letter-spacing: 0.5px;
}
.cv-title { color: var(--text); font-size: 16px; line-height: 1.9; }
@media (max-width: 560px) {
  .cv-item { flex-direction: column; gap: 4px; }
  .cv-year { flex-basis: auto; }
}
