/* shahrestani.me v2
   Vibe: deep-black tech with one signal-green accent. Native CSS.
   Shape system (documented, applied everywhere):
     containers  24px outer shell / 18px inner core (concentric, 6px bezel)
     controls    pill
     hairlines   white at 8 percent, never solid grey
   Layers: 10 nav, 20 menu, 30 grain (pointer-events none). Nothing else. */

:root {
  color-scheme: dark;

  --bg:       #070708;
  --core:     #0c0c0e;
  --core-2:   #101013;
  --hair:     rgba(255, 255, 255, 0.08);
  --hair-2:   rgba(255, 255, 255, 0.14);
  --shell:    rgba(255, 255, 255, 0.035);
  --glint:    inset 0 1px 0 rgba(255, 255, 255, 0.07);

  --ink:      #f4f4f5;
  --ink-2:    #b4b4ba;
  --ink-3:    #7d7d86;
  --ink-4:    #55555d;

  --accent:   oklch(0.82 0.14 162);
  --accent-2: oklch(0.66 0.11 162);
  --accent-glow: oklch(0.80 0.14 162 / 0.12);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-outer: 24px;
  --r-inner: 18px;
  --bezel: 6px;

  --gutter: clamp(20px, 5vw, 80px);
  --max: 1360px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
  overflow-x: clip;
}

/* atmosphere: two low-chroma glows and a film grain, all fixed so nothing repaints on scroll */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 45% at 82% 8%, var(--accent-glow), transparent 65%),
    radial-gradient(45% 40% at 8% 95%, rgba(120, 140, 200, 0.07), transparent 65%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.03em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 999px; }

.shell { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 40;
  background: var(--accent); color: #06110b; padding: 12px 18px; border-radius: 999px; font-weight: 500;
}
.skip:focus { left: 12px; }

/* nested container: outer shell holds an inner core, concentric radii */
.bezel { background: var(--shell); border: 1px solid var(--hair); border-radius: var(--r-outer); padding: var(--bezel); }
.core  { background: var(--core); border-radius: var(--r-inner); box-shadow: var(--glint); }

/* ── nav: floating glass pill ─────────────────────────── */

.navwrap { position: sticky; top: 14px; z-index: 10; padding-inline: var(--gutter); pointer-events: none; }
.nav {
  pointer-events: auto;
  margin-inline: auto; max-width: var(--max);
  height: 56px; padding: 0 8px 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.62);
  border: 1px solid var(--hair);
  box-shadow: var(--glint), 0 20px 50px -30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.nav .mark { font-family: var(--mono); font-size: 13px; color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; min-height: 40px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav .mark i { font-style: normal; color: var(--ink-4); }
.nav .links { display: flex; align-items: center; gap: 4px; }
.nav .links a {
  display: inline-flex; align-items: center; height: 40px; padding-inline: 16px;
  border-radius: 999px; font-size: 14px; color: var(--ink-2);
  transition: color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav .links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }

.burger {
  display: none; position: relative; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--hair); background: transparent; cursor: pointer; padding: 0;
}
.burger span {
  position: absolute; left: 12px; width: 16px; height: 1px; background: var(--ink);
  transition: transform 0.6s var(--ease), top 0.6s var(--ease);
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.is-open .burger span:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
.is-open .burger span:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; padding-inline: var(--gutter);
  background: rgba(7, 7, 8, 0.82);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
.is-open .menu { opacity: 1; visibility: visible; transition: opacity 0.6s var(--ease); }
.menu ul { display: flex; flex-direction: column; gap: 6px; }
.menu a {
  display: block; font-size: clamp(34px, 9vw, 48px); font-weight: 500; letter-spacing: -0.03em;
  padding-block: 8px; color: var(--ink);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.is-open .menu a { opacity: 1; transform: none; }
.is-open .menu li:nth-child(1) a { transition-delay: 0.08s; }
.is-open .menu li:nth-child(2) a { transition-delay: 0.14s; }
.is-open .menu li:nth-child(3) a { transition-delay: 0.20s; }
.is-open .menu li:nth-child(4) a { transition-delay: 0.26s; }

/* ── type helpers ─────────────────────────────────────── */

.label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
}
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2);
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.h-section { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.02; text-wrap: balance; max-width: 16ch; }

/* ── buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 6px 0 24px; border-radius: 999px;
  background: var(--accent); color: #06110b; font-size: 15px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 14px 40px -14px oklch(0.8 0.14 162 / 0.55);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.btn .ic {
  width: 42px; height: 42px; border-radius: 999px; background: rgba(6, 17, 11, 0.12);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.5s var(--ease), background 0.5s var(--ease);
}
.btn .ic svg { width: 15px; height: 15px; transition: transform 0.5s var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 22px 50px -14px oklch(0.8 0.14 162 / 0.7); }
.btn:hover .ic { background: rgba(6, 17, 11, 0.2); transform: scale(1.06); }
.btn:hover .ic svg { transform: translate(1px, -1px); }
.btn:active { transform: scale(0.98); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 6px 0 22px; border-radius: 999px;
  border: 1px solid var(--hair-2); background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono); font-size: 13px; color: var(--ink-2); white-space: nowrap;
  transition: border-color 0.5s var(--ease), color 0.5s var(--ease), background 0.5s var(--ease), transform 0.5s var(--ease);
}
.btn-ghost .ic {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--hair);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn-ghost .ic svg { width: 15px; height: 15px; }
.btn-ghost:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.05); }
.btn-ghost:hover .ic { transform: scale(1.06); border-color: rgba(255, 255, 255, 0.24); }
.btn-ghost:active { transform: scale(0.98); }

/* ── hero ─────────────────────────────────────────────── */

.hero { padding-block: clamp(72px, 11vw, 150px) clamp(72px, 9vw, 120px); }
.hero .shell {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(40px, 5vw, 72px); align-items: center;
}
.hero .say { display: flex; flex-direction: column; gap: 34px; }
.hero h1 {
  font-size: clamp(42px, 5vw, 70px); line-height: 0.98; letter-spacing: -0.045em;
  max-width: 19ch; text-wrap: balance;
}
.hero .sub { font-size: clamp(17px, 1.55vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 44ch; text-wrap: pretty; }
.acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 6px; }

.topo { margin: 0; position: relative; }
.topo::before {
  content: ""; position: absolute; inset: -20% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-glow), transparent 70%);
}
.topo .cap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--hair);
}
.topo .cap .label { font-size: 10px; letter-spacing: 0.14em; }
.topo .cap b { font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--accent); }
.topo .draw { padding: 26px 22px 20px; }
.topo svg { display: block; width: 100%; height: auto; }
.topo figcaption { padding: 0 20px 20px; font-family: var(--mono); font-size: 11.5px; line-height: 1.65; color: var(--ink-4); }

/* ── proof band: one shell, three cells ───────────────── */

.band { padding-block: 0 clamp(72px, 9vw, 120px); }
.band .core { display: grid; grid-template-columns: 1.3fr 1fr 1fr; }
.band li { padding: 28px 30px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--hair); }
.band li:last-child { border-right: 0; }
.band .k { font-family: var(--mono); font-size: 12px; color: var(--accent-2); }
.band p { font-size: 15px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

/* ── sections ─────────────────────────────────────────── */

.sec { padding-block: clamp(72px, 9vw, 120px) 0; }
.sec-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: clamp(36px, 4vw, 56px); }

/* ── background rows ──────────────────────────────────── */

.bio ol li {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(20px, 3vw, 56px); align-items: baseline;
  padding-block: 30px; border-top: 1px solid var(--hair);
}
.bio ol li:last-child { border-bottom: 1px solid var(--hair); }
.bio .yr { font-family: var(--mono); font-size: 12px; color: var(--ink-4); white-space: nowrap; }
.bio h3 { font-size: clamp(18px, 1.8vw, 23px); line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.bio h3 span { display: block; font-size: 13px; font-weight: 400; color: var(--ink-4); margin-top: 6px; letter-spacing: 0; }
.bio p { font-size: 15.5px; line-height: 1.64; color: var(--ink-2); max-width: 54ch; text-wrap: pretty; }
.aside-note { margin-top: 34px; font-size: 15.5px; line-height: 1.66; color: var(--ink-3); max-width: 62ch; text-wrap: pretty; }
.stack { font-family: var(--mono); font-size: 11.5px; line-height: 1.9; color: var(--ink-4); max-width: 80ch; }

/* ── work: two nested cards, mirrored ─────────────────── */

.piece + .piece { margin-top: clamp(28px, 3vw, 40px); }
.piece .core {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 80px); padding: clamp(28px, 4vw, 56px);
}
.piece-b .core { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.piece .n {
  position: absolute; top: -0.12em; right: 28px; z-index: 0;
  font-family: var(--mono); font-size: clamp(120px, 16vw, 220px); line-height: 1; letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.035); pointer-events: none; user-select: none;
}
.piece-b .n { right: auto; left: 28px; }
.piece .head, .piece .prose { position: relative; z-index: 1; }
.piece .head { display: flex; flex-direction: column; gap: 20px; align-self: start; }
.piece h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.04; max-width: 15ch; text-wrap: balance; }
.piece .meta { font-family: var(--mono); font-size: 12px; color: var(--ink-4); }
.piece .meta a { color: var(--accent-2); display: inline-flex; align-items: center; min-height: 44px; transition: color 0.4s var(--ease); }
.piece .meta a:hover { color: var(--accent); }
.piece .prose { display: flex; flex-direction: column; gap: 26px; }
.piece .body { font-size: 16.5px; line-height: 1.62; color: var(--ink-2); max-width: 58ch; text-wrap: pretty; }

.notes li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--hair); }
.notes li:last-child { border-bottom: 1px solid var(--hair); }
.notes .i { font-family: var(--mono); font-size: 11px; color: var(--accent-2); padding-top: 4px; }
.notes p { font-size: 15px; line-height: 1.62; color: var(--ink-2); text-wrap: pretty; }
.notes b { display: block; margin-bottom: 5px; font-weight: 500; color: var(--ink); letter-spacing: -0.012em; }
.outcome { font-family: var(--mono); font-size: 12px; line-height: 1.65; color: var(--accent-2); border-left: 1px solid var(--hair-2); padding-left: 14px; }
.piece .stack { max-width: none; }

/* ── approach: four cells, first one lit ──────────────── */

.approach .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.approach .core {
  height: 100%; padding: clamp(26px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden;
}
.approach .lit .core::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-glow), transparent 70%);
}
.approach .i { font-family: var(--mono); font-size: 11px; color: var(--accent-2); }
.approach h3 { font-size: clamp(20px, 2.1vw, 26px); line-height: 1.14; letter-spacing: -0.02em; text-wrap: balance; }
.approach p { font-size: 15.5px; line-height: 1.64; color: var(--ink-2); text-wrap: pretty; }

/* ── contact ──────────────────────────────────────────── */

.contact { padding-block: clamp(80px, 11vw, 150px) 0; }
.contact .core {
  padding: clamp(32px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 5vw, 80px); align-items: end;
  position: relative; overflow: hidden;
}
.contact .core::before {
  content: ""; position: absolute; inset: auto auto -50% -10%; width: 60%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-glow), transparent 70%);
}
.contact h2 { font-size: clamp(34px, 5vw, 68px); line-height: 0.98; letter-spacing: -0.04em; max-width: 13ch; position: relative; }
.contact .aside { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; position: relative; }
.contact .mailto {
  font-family: var(--mono); font-size: clamp(14px, 1.4vw, 17px); color: var(--accent);
  display: inline-flex; align-items: center; min-height: 44px;
  border-bottom: 1px solid var(--accent-2); transition: opacity 0.4s var(--ease);
}
.contact .mailto:hover { opacity: 0.75; }
.contact .aside .btn-ghost { height: 46px; }
.contact .aside .btn-ghost .ic { width: 34px; height: 34px; }
.contact .also { font-size: 14.5px; line-height: 1.6; color: var(--ink-3); max-width: 38ch; margin-top: 14px; text-wrap: pretty; }

.foot .shell { padding-block: 36px 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot span { font-family: var(--mono); font-size: 12px; color: var(--ink-4); }

/* ── motion: heavy fade-up, gated behind the class JS adds ─ */

@media (prefers-reduced-motion: no-preference) {
  .js-reveal .rise {
    opacity: 0; transform: translateY(26px); filter: blur(5px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
    transition-delay: var(--d, 0ms);
  }
  .js-reveal .rise.in { opacity: 1; transform: none; filter: blur(0); }
}

/* ── narrow ───────────────────────────────────────────── */

@media (max-width: 1000px) {
  .hero .shell { grid-template-columns: 1fr; align-items: start; }
  .piece .core, .piece-b .core { grid-template-columns: 1fr; }
  .piece-b .prose { order: 2; }
  .piece .n { font-size: 140px; }
  .bio ol li { grid-template-columns: 120px minmax(0, 1fr); }
  .bio ol li p { grid-column: 2; }
  .contact .core { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 760px) {
  .nav { padding-left: 18px; }
  .nav .mark i { display: none; }
  .nav .links { display: none; }
  .burger { display: block; flex: none; }
  .tag { font-size: 10px; letter-spacing: 0.1em; padding: 6px 11px 6px 10px; }
  .band .core { grid-template-columns: 1fr; }
  .band li { padding: 22px 22px; border-right: 0; border-bottom: 1px solid var(--hair); }
  .band li:last-child { border-bottom: 0; }
  .acts { flex-direction: column; align-items: stretch; }
  .btn, .btn-ghost { justify-content: space-between; width: 100%; }
  .bio ol li { grid-template-columns: 1fr; gap: 10px; }
  .bio ol li p { grid-column: 1; }
  .approach .grid { grid-template-columns: 1fr; }
  .piece .n { font-size: 110px; right: 12px; }
  .piece-b .n { left: 12px; }
  .foot .shell { flex-direction: column; align-items: flex-start; gap: 10px; }
}


/* ── for companies: intro left, four engagements right ── */

.help .core {
  padding: clamp(28px, 4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 80px); align-items: start;
  position: relative; overflow: hidden;
}
.help .core::before {
  content: ""; position: absolute; inset: -30% auto auto -15%; width: 55%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-glow), transparent 70%);
}
.help .say { display: flex; flex-direction: column; gap: 22px; position: relative; }
.help .say p { font-size: 16.5px; line-height: 1.62; color: var(--ink-2); max-width: 44ch; text-wrap: pretty; }
.help .say .btn { align-self: flex-start; margin-top: 6px; }
.offers { position: relative; }
.offers li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 18px; padding: 22px 0; border-top: 1px solid var(--hair); }
.offers li:first-child { border-top: 0; padding-top: 0; }
.offers li:last-child { padding-bottom: 0; }
.offers .i { font-family: var(--mono); font-size: 11px; color: var(--accent-2); padding-top: 5px; }
.offers h3 { font-size: clamp(17px, 1.7vw, 21px); line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 7px; text-wrap: balance; }
.offers p { font-size: 15px; line-height: 1.62; color: var(--ink-2); text-wrap: pretty; }

@media (max-width: 1000px) {
  .help .core { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .help .say .btn { align-self: stretch; }
}
