/* Cyrus Behroozi, personal site. One accent (orange) marks things that are live or moving; everything else is warm neutral. */

@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-normal-400.v1.woff2') format('woff2'); 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: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-normal-500.v1.woff2') format('woff2'); 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: 'Schibsted Grotesk'; font-style: italic; font-weight: 400 700; font-display: swap; src: url('../fonts/schibsted-grotesk-italic-400-700.v1.woff2') format('woff2'); 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: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/schibsted-grotesk-normal-400-800.v1.woff2') format('woff2'); 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 {
  --bg: #0b0c0c;
  --bg-2: #0e0f0f;
  --ink: #eceae5;
  --ink-2: #a6a59f;
  --ink-3: #85847e;
  --rule: rgba(236, 234, 229, 0.09);
  --rule-2: rgba(236, 234, 229, 0.16);
  --accent: #ff7a45;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1200px;
  --gut: 40px;
  --sec: 168px;
}
@media (max-width: 900px) { :root { --gut: 24px; --sec: 112px; } }
@media (max-width: 560px) { :root { --gut: 16px; --sec: 88px; } }

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--accent); color: #111; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gut)); margin-left: auto; margin-right: auto; padding-left: var(--gut); padding-right: var(--gut); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; max-height: 1040px; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#terrain { opacity: 0; transition: opacity 1.8s ease; }
#terrain.on { opacity: 1; }
#terrain-ov { pointer-events: none; }
.hero-veil { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11,12,12,.94) 0%, rgba(11,12,12,.78) 28%, rgba(11,12,12,.25) 50%, rgba(11,12,12,0) 62%),
    linear-gradient(0deg, rgba(11,12,12,1) 0%, rgba(11,12,12,.5) 7%, rgba(11,12,12,0) 16%),
    linear-gradient(180deg, rgba(11,12,12,.7) 0%, rgba(11,12,12,0) 14%); }
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; height: 84px; }
.brand { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; padding: 10px 0; }
.nav-links { display: flex; gap: 32px; font-size: 15px; color: var(--ink-2); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 700px) { .nav-links { display: none; } }
.hero-copy { position: absolute; left: 0; right: 0; bottom: clamp(88px, 13vh, 132px); z-index: 3; pointer-events: none; }
.hero-copy a { pointer-events: auto; }
.eyebrow { margin: 0 0 22px; font-size: 17px; color: var(--ink-2); }
.eyebrow a { color: var(--ink); border-bottom: 1px solid var(--rule-2); transition: border-color .2s; }
.eyebrow a:hover { border-color: var(--accent); }
.hero h1 { margin: 0 0 26px; font-weight: 600; font-size: clamp(56px, 8.6vw, 128px); line-height: .9; letter-spacing: -0.048em; }
.lede { margin: 0; max-width: 24em; text-wrap: balance; font-size: clamp(19px, 1.65vw, 23px); line-height: 1.42; letter-spacing: -0.012em; color: var(--ink-2); }
.hero-foot { position: absolute; left: 0; right: 0; bottom: 30px; z-index: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 22px; pointer-events: none; }
.attrib { pointer-events: auto; font: 400 12px/1.4 var(--mono); color: var(--ink-3); transition: color .2s; }
.attrib:hover { color: var(--ink); }
.readout { font: 400 12px/1.4 var(--mono); color: var(--ink-3); letter-spacing: .01em; text-align: right; transition: color .3s; }
.readout b { color: var(--ink); font-weight: 500; }
@media (max-width: 1023px), (orientation: portrait) {
  .hero-veil { background: linear-gradient(0deg, rgba(11,12,12,1) 0%, rgba(11,12,12,.9) 34%, rgba(11,12,12,.2) 62%, rgba(11,12,12,0) 76%), linear-gradient(180deg, rgba(11,12,12,.7) 0%, rgba(11,12,12,0) 14%); }
  .hero-copy { bottom: 76px; }
  .hero-foot { justify-content: flex-start; bottom: 28px; }
  .readout { text-align: left; }
}

/* ---------- Section scaffolding ---------- */
main > section { padding-top: var(--sec); }
main { display: block; }
.sec-head { display: flex; align-items: baseline; gap: 22px; margin: 0 0 48px; }
.sec-n { font: 400 13px var(--mono); color: var(--ink-3); }
h2 { margin: 0; text-wrap: balance; font-weight: 600; font-size: clamp(34px, 3.8vw, 52px); line-height: 1.02; letter-spacing: -0.035em; }

/* ---------- Intro ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "text photo" "stats photo"; column-gap: 112px; row-gap: 64px; align-items: start; padding-top: 136px !important; }
.intro-text { grid-area: text; }
.intro-text p { margin: 0 0 26px; max-width: 32em; font-size: 20px; line-height: 1.6; color: var(--ink-2); }
.intro-text p:last-child { margin-bottom: 0; }
.intro-text p:first-child { font-size: clamp(25px, 2.35vw, 33px); line-height: 1.34; letter-spacing: -0.02em; color: var(--ink); max-width: 24em; }
.portrait { grid-area: photo; display: block; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: 10px; filter: saturate(.9) contrast(1.02) brightness(.96); box-shadow: 0 0 0 1px rgba(236, 234, 229, 0.12), 0 40px 80px -30px rgba(0, 0, 0, 0.8); }
.stats { grid-area: stats; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; align-self: end; }
.stats div { display: flex; flex-direction: column; border-top: 1px solid var(--rule-2); padding-top: 18px; }
.stats dd { order: 1; margin: 0 0 8px; font-weight: 600; font-size: clamp(28px, 2.6vw, 38px); letter-spacing: -0.035em; line-height: 1; white-space: nowrap; }
.stats dt { order: 2; margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-3); }
@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; grid-template-areas: "text" "stats" "photo"; row-gap: 48px; padding-top: 96px !important; }
  .portrait { max-width: 260px; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .intro { grid-template-columns: minmax(0, 1fr) 220px; grid-template-areas: "text text" "stats photo"; column-gap: 48px; }
  .portrait { max-width: none; align-self: end; }
  .stats { grid-template-columns: 1fr; gap: 0; }
  .stats div { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; }
  .stats dd { margin: 0; } .stats dt { text-align: right; }
}
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; gap: 0; } .stats div { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; } .stats dd { margin: 0; } .stats dt { text-align: right; max-width: 14em; } }

/* ---------- Work and exhibit ---------- */
.work-lede { max-width: 40em; }
.work-lede p { margin: 0; }
.work-lede p:first-child { font-size: clamp(21px, 1.9vw, 25px); line-height: 1.45; letter-spacing: -0.015em; }
.exhibit { margin: 64px auto 0; width: 100%; max-width: calc(1360px + 2 * var(--gut)); padding: 0 var(--gut); }
.exhibit-frame { position: relative; width: 100%; aspect-ratio: 16 / 8.2; background: var(--bg-2); outline: 1px solid var(--rule); overflow: hidden; cursor: crosshair; touch-action: pan-y; }
.exhibit-frame canvas { position: absolute; left: 0; top: 0; display: block; }
.exhibit-frame .pf-fx { cursor: crosshair; }
@media (max-width: 700px) { .exhibit-frame { aspect-ratio: 4 / 5; } }
.exhibit-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; padding-top: 16px; font: 400 13px/1.5 var(--mono); color: var(--ink-3); }
.meter { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.meter i { position: relative; display: block; width: 160px; height: 2px; background: var(--rule-2); overflow: hidden; border-radius: 2px; }
.meter b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width .4s ease; }
.meter em { font-style: normal; color: var(--ink-2); min-width: 3.2em; text-align: right; }
@media (max-width: 560px) { .meter i { width: 96px; } }
@media (prefers-reduced-motion: reduce) { .meter b { transition: none; } }
.exhibit-note { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; margin-top: 88px; }
.stack div { border-top: 1px solid var(--rule-2); padding-top: 22px; }
.stack h3 { margin: 0 0 10px; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.stack p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
@media (max-width: 900px) { .stack { grid-template-columns: 1fr; gap: 28px; margin-top: 64px; } }

/* ---------- Press ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 48px; align-items: end; padding: 40px 0 44px; border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule); }
.feature .src { grid-column: 1 / -1; font: 400 13px var(--mono); color: var(--ink-3); }
.feature .h { text-wrap: balance; font-weight: 500; font-size: clamp(28px, 3.3vw, 46px); line-height: 1.12; letter-spacing: -0.03em; max-width: 20em; transition: color .25s; }
.feature .go { font-size: 15px; color: var(--ink-2); white-space: nowrap; transition: color .25s, transform .25s; }
.feature .blurb { grid-column: 1 / -1; margin: 6px 0 0; max-width: 40em; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.feature:hover .h { color: #fff; }
.feature:hover .go { color: var(--accent); transform: translateX(4px); }
@media (max-width: 700px) { .feature { grid-template-columns: 1fr; } }
.press-list { list-style: none; margin: 0; padding: 0; }
.press-list a { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 17px; transition: color .2s; }
.press-list a span:first-child { font: 400 13px/1.9 var(--mono); color: var(--ink-3); }
.press-list a:hover { color: #fff; }
@media (max-width: 700px) { .press-list a { grid-template-columns: 1fr; gap: 4px; } }
.recog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 72px; }
.recog a { display: block; padding-top: 18px; border-top: 1px solid var(--rule-2); transition: border-color .25s; }
.recog a:hover { border-color: var(--accent); }
.recog b { display: block; font-weight: 500; font-size: 16.5px; line-height: 1.3; margin-bottom: 6px; }
.recog span { font-size: 14px; color: var(--ink-3); line-height: 1.4; display: block; }
@media (max-width: 900px) { .recog { grid-template-columns: 1fr 1fr; gap: 28px 24px; } }


/* ---------- Record ---------- */
.record-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 96px; }
.col-h { margin: 0 0 8px; font: 400 13px var(--mono); color: var(--ink-3); }
.xp { list-style: none; margin: 12px 0 0; padding: 0 0 0 34px; position: relative; }
.xp::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 26px; border-left: 1.5px dashed var(--rule-2); }
.xp li { position: relative; padding: 0 0 38px; }
.xp li:last-child { padding-bottom: 8px; }
.xp li::before { content: ""; position: absolute; left: -34px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink-3); box-sizing: border-box; }
.xp li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(255,122,69,.16); }
.xp .yr { display: block; font: 400 13px/1.4 var(--mono); color: var(--ink-3); margin-bottom: 8px; }
.xp .role { font-weight: 600; font-size: 19px; letter-spacing: -0.015em; line-height: 1.3; }
.xp .co { color: var(--ink-2); font-size: 15.5px; margin-top: 2px; }
.xp .note { color: var(--ink-3); font-size: 15px; line-height: 1.55; margin-top: 8px; max-width: 34em; }
.edu { margin: 18px 0 0 34px; font-size: 15px; color: var(--ink-3); }
.oss { list-style: none; margin: 0; padding: 0; }
.oss a { display: block; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.oss .t { display: flex; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; transition: color .2s; }
.oss .t small { font: 400 13px var(--mono); color: var(--ink-3); padding-top: 3px; white-space: nowrap; }
.oss .d { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.oss a:hover .t { color: var(--accent); }
@media (max-width: 900px) { .record-grid { grid-template-columns: 1fr; gap: 64px; } }

/* ---------- Contact ---------- */
.contact { padding-top: var(--sec); padding-bottom: 40px; }
.contact-h { font-size: clamp(48px, 7vw, 104px); letter-spacing: -0.05em; line-height: .95; font-weight: 600; margin: 0 0 44px; }
.contact-row { display: flex; gap: 32px; flex-wrap: wrap; padding-bottom: 72px; }
.contact-links { display: flex; gap: 32px; font-size: 19px; }
.contact-links a { border-bottom: 1px solid var(--rule-2); padding-bottom: 3px; transition: border-color .2s, color .2s; }
.contact-links a:hover { border-color: var(--accent); color: #fff; }
.colophon { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-3); }

/* ---------- Short landscape screens (phones held sideways) ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 100svh; height: 100svh; }
  .nav { height: 64px; }
  .hero-copy { bottom: 28px; }
  .eyebrow { margin-bottom: 10px; font-size: 14px; }
  .hero h1 { font-size: clamp(40px, 7vw, 60px); margin-bottom: 12px; }
  .lede { font-size: 16px; max-width: 26em; }
  .hero-foot { display: none; }
  .hero-veil { background: linear-gradient(90deg, rgba(11,12,12,.94) 0%, rgba(11,12,12,.7) 34%, rgba(11,12,12,0) 60%), linear-gradient(0deg, rgba(11,12,12,.9) 0%, rgba(11,12,12,0) 40%); }
}
@media (max-width: 700px) { .contact-links a { padding: 10px 0 6px; } .contact-links { gap: 36px; } }

/* ---------- Accessibility helpers ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gut); top: -48px; z-index: 10; padding: 10px 14px; background: var(--ink); color: var(--bg); font-size: 14px; border-radius: 6px; transition: top .15s; }
.skip:focus { top: 12px; }
.exhibit-frame:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.nf .code { font: 400 13px var(--mono); color: var(--ink-3); margin: 0 0 18px; }
.nf h1 { text-wrap: balance; margin: 0 0 20px; font-weight: 600; font-size: clamp(44px, 7vw, 88px); line-height: .95; letter-spacing: -0.045em; }
.nf p { margin: 0 0 32px; color: var(--ink-2); font-size: 19px; max-width: 26em; }
.nf a { border-bottom: 1px solid var(--rule-2); padding-bottom: 3px; transition: border-color .2s; }
.nf a:hover { border-color: var(--accent); }
