/* Mahya Eftekhari — portfolio
   Type: Archivo (variable width + weight). Wide cuts for headings, normal width for reading.
   Signature: the "title block", borrowed from architectural drawing sheets, for facts about her and each project. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/archivo-latin-wdth-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Her original Squarespace palette, kept calm: one cream background, brown text,
     sage deepened so links pass contrast, dusty rose only for small decorative marks. */
  --paper: #f3ede5;
  --vellum: #e9e1d6;
  --ink: #4e3333;
  --ink-soft: #6b5656;
  --rule: #d6c9b8;
  --accent: #56603f;
  --accent-deep: #444c31;
  --accent-tint: #e2e3d3;
  --btn: #4e3333;
  --btn-text: #f3ede5;
  --btn-hover: #3a2525;
  --mark: #cf8f8f;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --page: 76rem;
  --measure: 41rem;
  --gutter: clamp(1.25rem, 4.5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-weight: 400;
  font-stretch: 100%;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }

img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 600; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: 0 0 0.35em; padding-left: 0.15em; }
li::marker { color: var(--ink-soft); }
strong { font-weight: 650; }

a { color: var(--accent); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 10; border-radius: 4px; }
.skip-link:focus { top: 1rem; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type roles ---------- */
.display {
  font-stretch: 122%;
  font-weight: 600;
  font-size: clamp(2.35rem, 1.2rem + 4.6vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.028em;
}
.h2, .case-section > h2, .band h2 {
  font-stretch: 114%;
  font-size: clamp(1.7rem, 1.25rem + 1.5vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
}
.prose h3, .h3 { font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.006em; margin: 2rem 0 0.6rem; }
.prose h4, .h4 { font-size: 1.0625rem; line-height: 1.4; margin: 1.5rem 0 0.4rem; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.lead { font-size: clamp(1.15rem, 1rem + 0.55vw, 1.4rem); line-height: 1.5; }
.muted { color: var(--ink-soft); }

/* ---------- Header / footer ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header__inner {
  max-width: var(--page); margin: 0 auto; padding: 1.05rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 2rem;
}
.wordmark {
  font-stretch: 120%; font-weight: 650; font-size: 1.125rem; letter-spacing: -0.012em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: var(--ink); text-decoration: none; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; margin: 0; padding: 0; }
.site-nav li { margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: 0.3rem 0; color: var(--ink); text-decoration: none;
  font-weight: 500; font-size: 0.97rem;
}
.site-nav a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; text-decoration-color: var(--accent); }

.site-footer { border-top: 1px solid var(--rule); margin-top: 0; }
.site-footer__inner {
  max-width: var(--page); margin: 0 auto; padding: 2rem var(--gutter) 2.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  font-size: 0.94rem; color: var(--ink-soft);
}
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0; padding: 0; }
.site-footer li { margin: 0; padding: 0; }
.site-footer a { color: var(--ink); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.9rem; padding: 0.7rem 1.25rem; border-radius: 6px;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; border: 1.5px solid var(--btn); cursor: pointer;
}
.btn--primary { background: var(--btn); color: var(--btn-text); }
.btn--primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-text); text-decoration: none; }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--vellum); color: var(--ink); text-decoration: none; }

/* ---------- Title block (signature) ---------- */
.titleblock {
  display: grid; gap: 1px; margin: 0;
  grid-template-columns: minmax(0, 1fr);
  background: var(--rule);
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.titleblock > div { background: var(--paper); padding: 0.8rem 1.1rem 0.95rem 0; }
.titleblock > div + div { padding-left: 1.1rem; }
.titleblock dt { font-size: 0.82rem; font-weight: 500; color: var(--ink-soft); margin: 0 0 0.25rem; letter-spacing: 0.005em; }
.titleblock dd { margin: 0; font-size: 1rem; font-weight: 500; line-height: 1.42; }
.titleblock .titleblock__wide { grid-column: 1 / -1; }
@media (min-width: 30rem) { .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 56rem) { .titleblock { grid-template-columns: repeat(var(--tb-cols, 3), minmax(0, 1fr)); } }
.titleblock .titleblock__wide dd { font-size: 1.06rem; max-width: 52rem; }
.titleblock > div, .titleblock > div + div { padding-left: 1.1rem; }
@media (max-width: 29.99rem) { .titleblock > div, .titleblock > div + div { padding-left: 0; } }

/* ---------- Home hero ---------- */
.hero {
  max-width: var(--page); margin: 0 auto;
  padding: clamp(2.25rem, 6vw, 5rem) var(--gutter) clamp(2.5rem, 5vw, 4rem);
  display: grid; gap: 2.25rem 3.5rem; grid-template-columns: minmax(0, 1fr);
}
.hero__text { max-width: 44rem; }
.hero__text .lead { margin: 1.5rem 0 0; max-width: 37rem; color: var(--ink); }
.hero__portrait { margin: 0; max-width: 15rem; }
@media (min-width: 40rem) { .hero__portrait { max-width: 22rem; } }
.hero__portrait img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 30%; border-radius: 4px; background: var(--vellum); }
.hero .titleblock { grid-column: 1 / -1; }
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: end; }
  .hero__portrait { justify-self: end; width: 100%; }
}

/* ---------- Bands ---------- */
.band { max-width: var(--page); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) var(--gutter); }
.band__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 1.75rem; }
.band__head p { margin: 0; color: var(--ink-soft); max-width: 32rem; }
.band--tint { background: var(--vellum); }
.band--tint .titleblock > div { background: var(--vellum); }

/* ---------- Project list ---------- */
.work { list-style: none; margin: 0; padding: 0; }
.work > li { margin: 0; padding: 0; }
.work__item {
  display: grid; gap: 1.5rem 3.25rem; grid-template-columns: minmax(0, 1fr);
  padding: 2.25rem 0 2.5rem; border-top: 1px solid var(--rule);
}
.work > li:first-child .work__item { border-top: 2px solid var(--ink); }
@media (min-width: 56rem) {
  .work__item { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
}
.work__media { display: block; border-radius: 4px; overflow: hidden; background: var(--vellum); aspect-ratio: 4 / 3; }
.work__media img { width: 100%; height: 100%; object-fit: cover; }
.work__context { font-size: 0.94rem; color: var(--ink-soft); margin: 0 0 0.55rem; }
.work__title { font-stretch: 114%; font-size: clamp(1.6rem, 1.25rem + 1.2vw, 2.2rem); line-height: 1.08; letter-spacing: -0.016em; margin: 0 0 0.85rem; }
.work__title a { color: inherit; text-decoration: none; }
.work__title a:hover { color: var(--accent); }
.work__summary { margin: 0 0 0.8rem; }
.work__result { margin: 0 0 1.25rem; padding-left: 0.9rem; border-left: 3px solid var(--mark); }
.work__link { font-weight: 600; }

/* ---------- Principles ---------- */
.principles { display: grid; gap: 2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); margin: 0; padding: 0; list-style: none; }
.principles > li { margin: 0; padding: 1.1rem 0 0; border-top: 2px solid var(--ink); }
.principles h3 { font-size: 1.3rem; font-stretch: 110%; margin: 0 0 0.6rem; }
.principles p { margin: 0; color: var(--ink); }

/* ---------- Contact band ---------- */
.contact-band { display: grid; gap: 1.5rem 4rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { .contact-band { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: end; } }
.contact-band p { max-width: 34rem; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.contact-list li { margin: 0; padding: 0.75rem 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.contact-list li:last-child { border-bottom: 1px solid var(--rule); }
.contact-list span { font-size: 0.85rem; color: var(--ink-soft); }
.contact-list a { font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Simple pages ---------- */
.page-head { max-width: var(--page); margin: 0 auto; padding: clamp(2.25rem, 6vw, 4.5rem) var(--gutter) 1.5rem; }
.page-head .lead { margin-top: 1.25rem; max-width: 38rem; }
.about { max-width: var(--page); margin: 0 auto; padding: 1rem var(--gutter) clamp(3rem, 7vw, 5rem); display: grid; gap: 2.5rem 4rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) { .about { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.about__photo { margin: 0; }
.about__photo img { border-radius: 4px; width: 100%; max-width: 24rem; }
.about .titleblock { margin-top: 2.5rem; }

/* ---------- Case study ---------- */
.case-head { max-width: var(--page); margin: 0 auto; padding: clamp(2rem, 5vw, 3.75rem) var(--gutter) 0; }
.crumb { font-size: 0.94rem; margin: 0 0 1.5rem; }
.crumb a { color: var(--ink-soft); }
.case-head .display { max-width: 17ch; }
.case-head .lead { max-width: 40rem; margin: 1.25rem 0 2.25rem; }
.case-hero { max-width: var(--page); margin: clamp(2rem, 4vw, 3rem) auto 0; padding: 0 var(--gutter); }
.case-hero__frame { background: var(--vellum); border-radius: 4px; overflow: hidden; display: flex; justify-content: center; }
.case-hero__frame img { width: 100%; max-height: min(78vh, 46rem); object-fit: cover; }
.case-hero__frame.is-portrait img { width: auto; max-width: 100%; object-fit: contain; max-height: min(80vh, 44rem); }

.case-body { max-width: var(--page); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(3rem, 6vw, 4.5rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
@media (min-width: 72rem) { .case-body { grid-template-columns: 13.5rem minmax(0, 1fr); gap: 3.5rem; } }

.toc { display: none; }
@media (min-width: 72rem) {
  .toc { display: block; position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow-y: auto; padding-top: 2.6rem; }
}
.toc p { font-size: 0.82rem; color: var(--ink-soft); margin: 0 0 0.6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc li { margin: 0; padding: 0; }
.toc a {
  display: block; padding: 0.32rem 0 0.32rem 0.9rem; margin-left: -1px; border-left: 2px solid transparent;
  font-size: 0.9rem; line-height: 1.35; color: var(--ink-soft); text-decoration: none;
}
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

.case-content { min-width: 0; }
.case-section { padding: 2.5rem 0 1rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.case-section:first-child { border-top: 2px solid var(--ink); }
.case-section > h2 { margin: 0 0 1.4rem; max-width: 24ch; }
.case-section .prose { max-width: var(--measure); }
.flow > * + * { margin-top: 1.75rem; }

:where(.figure) { margin: 0; }
.figure__frame { background: var(--vellum); border-radius: 4px; padding: clamp(0.6rem, 1.8vw, 1.25rem); }
.figure__frame img { margin: 0 auto; }
.figure--bare .figure__frame { background: none; padding: 0; }
.figure--tall { max-width: 28rem; }
.cols--phone .figure--tall { max-width: none; }
.figure figcaption { font-size: 0.94rem; line-height: 1.5; color: var(--ink-soft); margin-top: 0.7rem; max-width: var(--measure); }
.zoom { cursor: zoom-in; }

.cols { display: grid; gap: 1.75rem 2.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 52rem) { .cols { grid-template-columns: var(--cols); } .cols.is-centered { align-items: center; } }
.cols > .col > * + * { margin-top: 1.25rem; }

.gallery { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); padding: 0; list-style: none; }
:where(.gallery) { margin: 0; }
.gallery--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.gallery li { margin: 0; padding: 0; }
.gallery .figure__frame { padding: 0.5rem; height: 100%; display: flex; align-items: center; }

.icons { display: flex; flex-wrap: wrap; gap: 1rem; padding: 0; list-style: none; }
:where(.icons) { margin: 0; }
.icons li { margin: 0; padding: 0; }
.icons img { width: 6.5rem; height: auto; border-radius: 12px; }
.media { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 1.1rem; align-items: start; max-width: var(--measure); }
.media img { width: 3.5rem; height: auto; border-radius: 10px; margin-top: 0.2rem; }

.quotes { list-style: none; padding: 0; display: grid; gap: 1.25rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
:where(.quotes) { margin: 0; }
.quotes li { margin: 0; padding: 0; }
.quotes blockquote { margin: 0; padding: 0.2rem 0 0.2rem 1rem; border-left: 3px solid var(--mark); font-size: 1.08rem; line-height: 1.5; }

.callout { max-width: var(--measure); background: var(--accent-tint); border-radius: 4px; padding: 1.1rem 1.3rem; }
.callout p:last-child { margin-bottom: 0; }

.video-frame { background: var(--ink); border-radius: 4px; overflow: hidden; }
.video-frame video { width: 100%; }

.next { border-top: 2px solid var(--ink); margin-top: 1.5rem; padding-top: 1.75rem; display: grid; gap: 1.25rem 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) { .next { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.next a { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; align-items: center; text-decoration: none; color: var(--ink); }
.next img { width: 7.5rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--vellum); }
.next span { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.next strong { display: block; font-stretch: 112%; font-size: 1.2rem; font-weight: 600; line-height: 1.2; }
.next a:hover strong { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; margin: auto; max-width: min(96vw, 110rem); max-height: 94vh; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(43, 26, 26, 0.88); }
.lightbox img { max-width: min(96vw, 110rem); max-height: calc(94vh - 4rem); width: auto; margin: 0 auto; background: #fff; border-radius: 3px; }
.lightbox p { color: #f3ede5; font-size: 0.94rem; margin: 0.7rem auto 0; max-width: 48rem; text-align: center; }
.lightbox button {
  position: fixed; top: 1rem; right: 1rem; min-height: 2.75rem; padding: 0.55rem 1rem; border-radius: 6px;
  border: 1.5px solid #f3ede5; background: rgba(43, 26, 26, 0.6); color: #f3ede5; font: inherit; font-weight: 600; cursor: pointer;
}

@media print {
  .site-header, .site-footer, .toc, .next, .actions { display: none !important; }
  .case-body { display: block; }
}
