/* ==========================================================
   Mohammad Noroozi — personal site
   Palette:  spruce ink #1C2B28 · birch paper #F4F0E6
             lake teal #2E6E62 · saffron #C99117 · granite #7C817C
             night #0F161D (photography pages)
   Type:     Fraunces (display) · Newsreader (body)
             Gulzar / Vazirmatn (Persian)
   ========================================================== */

:root {
  --ink: #1C2B28;
  --paper: #F4F0E6;
  --teal: #2E6E62;
  --saffron: #C99117;
  --granite: #7C817C;
  --night: #0F161D;
  --night-paper: #E8E4D8;
  --measure: 66ch;
  --display: "Fraunces", Georgia, serif;
  --body: "Newsreader", Georgia, serif;
  --fa: "Gulzar", "Vazirmatn", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.075rem;
  line-height: 1.65;
}

/* ---- night theme (photography) ---- */
body.night {
  background: var(--night);
  color: var(--night-paper);
}
body.night .site-header { border-color: rgba(232,228,216,.18); }
body.night .site-nav a { color: var(--night-paper); }
body.night .site-footer { border-color: rgba(232,228,216,.18); color: #98A0A8; }
body.night .eyebrow { color: var(--saffron); }
body.night a { color: #E8E4D8; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--saffron); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

/* ---- header / nav ---- */
.site-header {
  display: flex; flex-wrap: wrap; gap: .75rem 2rem;
  align-items: baseline; justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 5vw, 4rem);
  border-bottom: 1px solid rgba(28,43,40,.25);
}
.wordmark {
  font-family: var(--display);
  font-weight: 600; font-size: 1.15rem;
  letter-spacing: .01em; text-decoration: none; color: inherit;
}
.wordmark .fa-name {
  font-family: var(--fa); font-size: 1.05rem;
  color: var(--granite); margin-inline-start: .6rem;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.site-nav a {
  font-family: var(--body); font-size: .95rem;
  text-decoration: none; color: var(--ink);
  letter-spacing: .04em;
}
.site-nav a[aria-current="page"] {
  color: var(--saffron);
  border-bottom: 2px solid var(--saffron);
  padding-bottom: 2px;
}

/* ---- layout ---- */
main { padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4rem); }
.narrow { max-width: var(--measure); margin-inline: auto; }
.wide { max-width: 1200px; margin-inline: auto; }

.eyebrow {
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 .5rem;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.15; font-weight: 560; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.8rem 0 .8rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 .4rem; }
.lede { font-size: 1.25rem; line-height: 1.55; }

/* ---- horizon divider: thin rule with a saffron disc ---- */
.horizon {
  border: none; height: 1px;
  background: currentColor; opacity: .35;
  position: relative; margin: 3rem auto; max-width: var(--measure);
  overflow: visible;
}
.horizon::after {
  content: ""; position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--saffron);
}

/* ---- home: three doors ---- */
.doors { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 2.5rem; }
.door {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid rgba(28,43,40,.3); padding: 1.6rem 1.5rem 1.8rem;
  transition: border-color .25s, transform .25s;
  background: rgba(255,255,255,.35);
}
.door:hover { border-color: var(--saffron); transform: translateY(-3px); color: inherit; }
.door h3 { margin: 0 0 .5rem; }
.door p { margin: 0; color: #47524E; font-size: .98rem; }
.door .fa-hint { font-family: var(--fa); color: var(--granite); display: block; margin-top: .9rem; font-size: 1.05rem; }

/* ---- career ---- */
.role { margin: 0 0 2.6rem; }
.role .when { font-size: .88rem; letter-spacing: .1em; color: var(--granite); text-transform: uppercase; }
.role h3 { margin: .2rem 0 .1rem; }
.role .org { color: var(--teal); font-style: italic; margin: 0 0 .6rem; }
.role ul { margin: .4rem 0 0; padding-inline-start: 1.2rem; }
.role li { margin: .35rem 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.pill-row li {
  border: 1px solid rgba(28,43,40,.35); border-radius: 999px;
  padding: .25rem .85rem; font-size: .88rem;
}
.project { border-inline-start: 3px solid var(--teal); padding-inline-start: 1.2rem; margin: 2rem 0; }
.project h3 { margin-top: 0; }
.project .outcome { color: var(--teal); }

/* ---- photography ---- */
.collections { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 2.5rem; }
.collection-card {
  position: relative; display: flex; align-items: flex-end;
  min-height: 220px; padding: 1.2rem 1.3rem;
  text-decoration: none; color: var(--night-paper);
  background:
    linear-gradient(180deg, rgba(15,22,29,.05) 30%, rgba(15,22,29,.85)),
    linear-gradient(160deg, #22323C, #101820);
  border: 1px solid rgba(232,228,216,.2);
  transition: border-color .25s, transform .25s;
}
.collection-card:hover { border-color: var(--saffron); transform: translateY(-3px); color: var(--night-paper); }
.collection-card h3 { margin: 0; font-size: 1.35rem; }
.collection-card span { display: block; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: #A9B2AC; margin-top: .3rem; }

.gallery { column-count: 3; column-gap: 1.2rem; margin-top: 2.4rem; }
@media (max-width: 900px) { .gallery { column-count: 2; } }
@media (max-width: 560px) { .gallery { column-count: 1; } }
.gallery figure { break-inside: avoid; margin: 0 0 1.2rem; }
.gallery img { width: 100%; display: block; border: 1px solid rgba(232,228,216,.25); }
.gallery figcaption { font-size: .88rem; color: #A9B2AC; padding-top: .4rem; }

/* placeholder frames until real photos are added */
.ph {
  display: grid; place-items: center; text-align: center;
  border: 1px dashed rgba(232,228,216,.4);
  color: #7E8790; font-size: .85rem; letter-spacing: .05em;
  padding: 1rem;
}
.ph.r32 { aspect-ratio: 3 / 2; }
.ph.r23 { aspect-ratio: 2 / 3; }
.ph.r11 { aspect-ratio: 1 / 1; }

/* ---- translations ---- */
.poets { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 2.5rem; }
.poet-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid rgba(28,43,40,.3); padding: 1.6rem 1.5rem;
  background: rgba(255,255,255,.35);
  transition: border-color .25s, transform .25s;
}
.poet-card:hover { border-color: var(--saffron); transform: translateY(-3px); color: inherit; }
.poet-card .fa-title { font-family: var(--fa); font-size: 1.7rem; display: block; margin-bottom: .3rem; }
.poet-card p { color: #47524E; font-size: .95rem; margin: .5rem 0 0; }

.poem-list { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.poem-list li { border-bottom: 1px solid rgba(28,43,40,.2); }
.poem-list a {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: .9rem .2rem; text-decoration: none; color: inherit;
}
.poem-list a:hover { color: var(--saffron); }
.poem-list .fa-inline { font-family: var(--fa); font-size: 1.2rem; color: var(--granite); }

/* facing-page translation: Persian right, English left */
.facing {
  display: grid; gap: 2.5rem; margin-top: 2.5rem;
  grid-template-columns: 1fr 1fr;
  max-width: 1050px; margin-inline: auto;
}
@media (max-width: 820px) { .facing { grid-template-columns: 1fr; } .facing .fa-page { order: -1; } }
.fa-page {
  direction: rtl; font-family: var(--fa);
  font-size: 1.45rem; line-height: 2.5;
  border-inline-start: 1px solid rgba(28,43,40,.25);
  padding-inline-start: 2rem;
}
@media (max-width: 820px) { .fa-page { border-inline-start: none; padding-inline-start: 0; border-bottom: 1px solid rgba(28,43,40,.25); padding-bottom: 1.6rem; } }
.en-page { font-size: 1.12rem; line-height: 2; }
.poem-note { max-width: var(--measure); margin: 3rem auto 0; color: #47524E; font-size: .98rem; border-top: 1px solid rgba(28,43,40,.2); padding-top: 1.2rem; }

.placeholder-text {
  border: 1px dashed rgba(28,43,40,.4); padding: 1.2rem;
  color: var(--granite); font-size: .95rem; font-family: var(--body);
  direction: ltr; text-align: left; line-height: 1.6;
}

/* ---- contact ---- */
.contact-list { list-style: none; padding: 0; font-size: 1.15rem; }
.contact-list li { margin: .8rem 0; }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid rgba(28,43,40,.25);
  padding: 1.6rem clamp(1.25rem, 5vw, 4rem) 2.2rem;
  display: flex; flex-wrap: wrap; gap: .6rem 2rem;
  justify-content: space-between;
  font-size: .9rem; color: #5A625E;
}
.site-footer .fa-name { font-family: var(--fa); }

/* hero name treatment on home */
.hero { text-align: center; padding: clamp(2rem, 7vw, 5rem) 0 1rem; }
.hero .fa-big {
  font-family: var(--fa); font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--teal); display: block; margin-top: .4rem;
}
.hero p.tagline { color: #47524E; max-width: 46ch; margin: 1.2rem auto 0; font-size: 1.15rem; }
