/* Pavithra Mohan - portfolio
   Paper, ink, her coral. Bricolage Grotesque for headlines, Newsreader for
   the long reads. Figures sit on a light-table blue. */
:root {
  --paper: #F8F7F3;
  --paper-2: #F1EFE9;
  --ink: #1B1A17;
  --ink-2: #3A3936;
  --slate: #5E6470;
  --rule: #DAD7CF;
  --coral: #E4573D;
  --coral-ink: #B9402B;
  --table: #DCE5EE;
  --table-2: #C9D6E3;
  --wrap: 1180px;
  --measure: 66ch;
  --head: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Newsreader", Georgia, "Times New Roman", serif;
  --ui: "Bricolage Grotesque", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 1.1875rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--coral-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: #fff; padding: 8px 12px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule);
}
.head-row { display: flex; align-items: center; height: 64px; gap: 28px; }
.mono-mark {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-family: var(--head); font-weight: 700;
  font-size: .9rem; letter-spacing: -0.04em; text-decoration: none;
}
.mono-mark:hover { background: var(--coral); color: #fff; }
.head-name { font-family: var(--head); font-weight: 600; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font-family: var(--ui); font-size: .98rem; text-decoration: none; color: var(--ink-2); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--coral); }
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ui); font-size: .92rem; color: var(--ink-2); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2FA863; box-shadow: 0 0 0 3px rgba(47,168,99,.18); }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* ---------- home ---------- */
.hero { padding: 96px 0 72px; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); font-weight: 600; max-width: 15ch; }
.hero .lede { margin-top: 26px; max-width: 48ch; font-size: 1.3rem; color: var(--ink-2); }
.hero-meta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px 26px; font-family: var(--ui); font-size: .98rem; color: var(--slate); }
.hero-meta a { color: var(--ink); }

.work-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 24px; }
.work-head h2 { font-size: 1.1rem; font-weight: 600; color: var(--slate); }
.work-head p { font-family: var(--ui); color: var(--slate); font-size: .95rem; }

/* project cards: content decides hierarchy, so the featured one is a
   full-width spread and the rest are halves */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.project { grid-column: span 1; text-decoration: none; color: inherit; display: block; border-radius: 16px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--rule); }
.project.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr .85fr; }
.project .art { background: var(--table); min-height: 260px; position: relative; overflow: hidden; }
.project.featured .art { min-height: 440px; }
.project .copy { padding: 26px 26px 28px; }
.project h3 { font-size: 1.7rem; }
.project.featured h3 { font-size: clamp(1.9rem, 3vw, 2.6rem); max-width: 14ch; }
.project .kicker { font-family: var(--ui); font-size: .95rem; color: var(--coral-ink); margin-bottom: 10px; }
.project .blurb { margin-top: 12px; color: var(--ink-2); font-size: 1.1rem; max-width: 46ch; }
.project .tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--ui); font-size: .85rem; color: var(--ink-2); border: 1px solid var(--rule); background: #fff; padding: 4px 10px; border-radius: 999px; }
.project .cta { margin-top: 24px; font-family: var(--ui); font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.project .cta::after { content: ""; width: 22px; height: 2px; background: var(--coral); transition: width .2s ease; }
.project:hover .cta::after { width: 40px; }
.project.placeholder .art { background: repeating-linear-gradient(135deg, var(--paper-2) 0 12px, #fff 12px 24px); }
.project.placeholder .copy { color: var(--slate); }
.project.placeholder h3 { color: var(--slate); }

/* contact-sheet artwork for the Winnow card */
.sheet { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; padding: 22px; align-content: start; }
.sheet i { display: block; aspect-ratio: 4 / 3; border-radius: 3px; background: var(--table-2); position: relative; }
.sheet i::after { content: ""; position: absolute; left: 50%; top: 45%; width: 28%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(27,26,23,.14); }
.sheet i.hit { background: #fff; box-shadow: 0 0 0 2px var(--coral); }
.sheet i.hit::after { background: var(--coral); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; padding: 80px 0 64px; }
.about h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.about .prose { margin-top: 26px; display: grid; gap: 18px; color: var(--ink-2); max-width: var(--measure); }
.about ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.about li { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.polaroids { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.polaroid { background: #fff; padding: 10px 10px 30px; border: 1px solid var(--rule); border-radius: 6px; transform: rotate(var(--r, 0deg)); }
.polaroid .ph { aspect-ratio: 4 / 5; background: var(--table); border-radius: 3px; display: grid; place-items: center; text-align: center; color: var(--slate); font-family: var(--ui); font-size: .85rem; padding: 10px; }
.polaroid img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.polaroid:nth-child(1) { --r: -2deg; } .polaroid:nth-child(2) { --r: 1.5deg; margin-top: 28px; }
.polaroid:nth-child(3) { --r: 1deg; } .polaroid:nth-child(4) { --r: -1.5deg; margin-top: 18px; }
.beyond { padding: 24px 0 80px; }
.beyond h2 { font-size: 1.6rem; margin-bottom: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.note { background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 26px; }
.note h3 { font-size: 1.35rem; }
.note p { margin-top: 10px; color: var(--ink-2); }
.note .kicker { font-family: var(--ui); font-size: .9rem; color: var(--coral-ink); margin-bottom: 8px; }
.note a.more { display: inline-block; margin-top: 16px; font-family: var(--ui); font-weight: 600; }
.logos { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 14px 40px; font-family: var(--ui); color: var(--slate); font-size: .98rem; }
.logos span { padding: 6px 0; }

/* ---------- case study ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--coral); z-index: 40; }
.cs-hero { padding: 72px 0 0; }
.cs-hero .kicker { font-family: var(--ui); color: var(--coral-ink); font-size: 1rem; }
.cs-hero h1 { margin-top: 10px; font-size: clamp(2.6rem, 6.4vw, 5.2rem); max-width: 14ch; }
.cs-hero .dek { margin-top: 22px; font-size: 1.35rem; color: var(--ink-2); max-width: 44ch; }

/* the sorting wall: tiny frames, matches gather as you scroll */
.wall-wrap { margin-top: 48px; height: 220vh; position: relative; }
.wall-stick { position: sticky; top: 64px; height: calc(100vh - 64px); overflow: hidden; background: var(--table); border-radius: 18px 18px 0 0; }
.wall { position: absolute; inset: 0; }
.frame { position: absolute; width: 5.2%; aspect-ratio: 4 / 3; border-radius: 3px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); will-change: transform, opacity; transform-origin: 0 0; }
.frame::after { content: ""; position: absolute; left: 50%; top: 46%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(27,26,23,.16); }
.frame.hit { box-shadow: 0 0 0 2px var(--coral), 0 6px 18px -6px rgba(228,87,61,.5); z-index: 2; }
.frame.hit::after { background: var(--coral); }
.wall-caption { position: absolute; left: 32px; bottom: 28px; right: 32px; display: flex; justify-content: space-between; align-items: end; gap: 16px; font-family: var(--ui); color: var(--ink); }
.wall-caption strong { font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; display: block; }
.wall-caption span { color: var(--slate); }
.wall-caption .right { text-align: right; max-width: 30ch; }

/* facts strip */
.facts { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-top: 0; padding: 26px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; font-family: var(--ui); }
.facts dt { font-size: .88rem; color: var(--slate); }
.facts dd { margin: 4px 0 0; font-size: 1.02rem; color: var(--ink); }
.facts dl { margin: 0; }

/* body layout: chapter rail + article */
.cs-body { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding: 56px 0 80px; align-items: start; }
.rail { position: sticky; top: 92px; font-family: var(--ui); }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--slate); font-size: .95rem; line-height: 1.3; }
.rail a b { color: var(--rule); font-weight: 600; min-width: 1.6ch; }
.rail a.is-active { color: var(--ink); background: #fff; }
.rail a.is-active b { color: var(--coral); }
.article { max-width: 760px; }
.chapter { padding-top: 24px; margin-top: 24px; }
.chapter + .chapter { border-top: 1px solid var(--rule); padding-top: 56px; margin-top: 56px; }
.chapter > h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); max-width: 18ch; }
.chapter > h2 b { color: var(--coral); font-weight: 600; margin-right: 10px; }
.chapter h3 { font-size: 1.35rem; margin-top: 40px; }
.chapter p { margin-top: 18px; color: var(--ink-2); max-width: var(--measure); }
.chapter ul, .chapter ol { margin: 14px 0 0; padding-left: 22px; color: var(--ink-2); max-width: var(--measure); }
.chapter li { margin-top: 8px; }
.chapter li::marker { color: var(--coral); }
.lead { font-size: 1.32rem; color: var(--ink) !important; }

/* figures: develop from grey to colour once, like a print in the tray */
figure.fig { margin: 34px 0 0; }
.fig .ph {
  background: var(--table); border-radius: 12px; border: 1px dashed var(--table-2);
  aspect-ratio: 16 / 10; display: grid; place-content: center; text-align: center;
  color: var(--slate); font-family: var(--ui); font-size: .95rem; padding: 20px;
}
.fig .ph small { display: block; margin-top: 6px; font-size: .82rem; color: var(--slate); opacity: .8; }
.fig img { border-radius: 12px; border: 1px solid var(--rule); }
.fig .ph { display: none; }
.fig.missing .ph { display: grid; }
.fig.missing img { display: none; }
.fig figcaption { margin-top: 10px; font-family: var(--ui); font-size: .92rem; color: var(--slate); max-width: var(--measure); }
.develop { filter: grayscale(1) contrast(.9); opacity: .55; transition: filter 1.1s ease, opacity 1.1s ease; }
.develop.is-in { filter: none; opacity: 1; }
.fig.wide { max-width: none; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.compare .fig { margin: 0; }
.compare .label { font-family: var(--ui); font-size: .88rem; color: var(--slate); margin-bottom: 8px; }
.compare .label.after { color: var(--coral-ink); }

/* callouts */
.callout { margin-top: 30px; padding: 20px 22px; border-left: 3px solid var(--coral); background: #fff; border-radius: 0 12px 12px 0; }
.callout .k { font-family: var(--ui); font-size: .9rem; color: var(--coral-ink); }
.callout p { margin-top: 6px; }
.quote { margin: 34px 0 0; padding: 0; font-size: 1.45rem; line-height: 1.4; color: var(--ink); max-width: 30ch; }
.quote footer { margin-top: 10px; font-family: var(--ui); font-size: .95rem; color: var(--slate); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.stat { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 18px; font-family: var(--ui); }
.stat b { display: block; font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; }
.stat span { color: var(--slate); font-size: .95rem; }
.timeline { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 0; max-width: var(--measure); }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); font-family: var(--ui); }
.timeline li span:first-child { color: var(--coral-ink); }
.timeline li span:last-child { color: var(--ink-2); font-family: var(--body); }
.next { margin-top: 64px; padding: 28px; border-radius: 16px; background: var(--ink); color: var(--paper); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.next a { color: var(--paper); font-family: var(--ui); font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.next a:hover { color: var(--coral); }
.next span { color: #B9B6AD; font-family: var(--ui); }

/* footer */
.site-foot { border-top: 1px solid var(--rule); padding: 40px 0 48px; font-family: var(--ui); color: var(--slate); font-size: .95rem; }
.foot-row { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.foot-row .links { display: flex; gap: 22px; margin-left: auto; }
.foot-row .links a { color: var(--ink-2); text-decoration: none; }
.foot-row .links a:hover { color: var(--ink); }

/* responsive */
@media (max-width: 1000px) {
  .cs-body { grid-template-columns: 1fr; }
  .rail { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .project.featured { grid-template-columns: 1fr; }
  .project.featured .art { min-height: 320px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .status { display: none; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px 24px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .projects, .two, .compare, .stats { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .wall-wrap { height: 160vh; }
  .frame { width: 9%; }
  .polaroids { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .develop { transition: none; filter: none; opacity: 1; }
  .frame { transition: none !important; }
}
/* polaroid slots keep their portrait shape */
.polaroid.fig .ph { aspect-ratio: 4 / 5; border: 0; border-radius: 3px; padding: 10px; font-size: .85rem; }
.polaroid.fig img { border: 0; border-radius: 3px; }
.cs-hero + .wall-wrap + section .facts { margin-top: 0; }
code { font-family: var(--ui); font-size: .92em; background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 1px 7px; color: var(--ink); }

/* real photos on the wall and the home card */
.frame.photo, .sheet i.photo { background-repeat: no-repeat; background-color: var(--table-2); }
.frame.photo::after, .sheet i.photo::after { display: none; }
.frame.photo:not(.hit) { filter: saturate(.7); }
.sheet i.photo:not(.hit) { filter: saturate(.6) brightness(1.03); }
.frame.photo.hit { border: 2px solid #fff; }
/* keep the caption readable over photos */
.wall-stick::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(to top, var(--table) 30%, rgba(220,229,238,0)); pointer-events: none; z-index: 3; }
.wall-caption { z-index: 4; }

/* unverified placeholder text: remove the class once confirmed */
.todo { background: #fff3b0; color: #5c4a00; padding: 0 .25em; border-radius: 3px; font-style: normal; }

/* institutions ticker */
.ticker-sec { margin: -24px auto 72px; position: relative; }
.ticker-label { font-family: var(--ui); color: var(--slate); font-size: .95rem; margin: 0 0 12px; }
.ticker { overflow: hidden; border-block: 1px solid var(--rule); padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tk-track { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; gap: 56px;
  animation: tk-scroll 32s linear infinite; }
.ticker:hover .tk-track, .ticker:focus-within .tk-track, .ticker.paused .tk-track { animation-play-state: paused; }
@keyframes tk-scroll { to { transform: translateX(var(--tk-shift, -50%)); } }
.tk-item { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 6px 4px;
  font-family: var(--ui); font-weight: 600; font-size: 1.15rem; color: var(--slate); opacity: .75;
  transition: opacity .2s, color .2s; border-radius: 6px; }
.tk-item img { height: 34px; width: auto; max-width: 120px; object-fit: contain; filter: grayscale(1); transition: filter .2s; }
.tk-item:hover, .tk-item:focus-visible, .tk-item[aria-expanded="true"] { opacity: 1; color: var(--ink); }
.tk-item:hover img, .tk-item:focus-visible img, .tk-item[aria-expanded="true"] img { filter: none; }
.tk-item:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.tk-pop { position: absolute; z-index: 20; width: min(340px, calc(100% - 8px)); background: #fff; border: 1px solid var(--rule);
  border-radius: 14px; padding: 18px 20px; box-shadow: 0 14px 40px rgba(27,26,23,.14); top: 0; left: 0; }
.tk-pop[hidden] { display: none; }
.tk-pop-k { font-family: var(--ui); font-size: .85rem; color: var(--coral-ink); }
.tk-pop h3 { margin: 4px 0 8px; font-family: var(--head); font-size: 1.25rem; }
.tk-pop p { margin: 0; font-size: 1.02rem; line-height: 1.5; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .tk-track { animation: none; flex-wrap: wrap; width: auto; gap: 18px 36px; } .tk-track li[aria-hidden] { display: none; } }

/* hero: copy on the left, looping journey animation on the right */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 500px); gap: 24px 48px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.6rem); }
.hero-art { min-width: 0; }
.hero-art iframe { display: block; width: 100%; aspect-ratio: 16 / 9.7; border: 0; background: transparent; color-scheme: light; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .hero-art { max-width: 560px; } }

/* project thumbnails: fill the card art area; the pale background shows until an image exists */
.project .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
