/* ==========================================================================
   pranjalmalewar.com — single page, daylight

   Direction: "Field notes". Warm paper white, black ink, and a colour per
   beat. The palette is not decoration: each clip carries its subject's colour
   on the rail dot, the meta line and the card edge, so the timeline reads as
   a spectrum of what she covers rather than a uniform list.

   Shadows are used only for elevation on things you can interact with, and
   are tinted green rather than grey so they sit in the paper instead of on it.
   ========================================================================== */

:root {
  --paper:   #faf9f6;
  --white:   #ffffff;
  --panel:   #f0eee6;
  --panel-2: #f5f3ed;
  --ink:     #16191c;
  --ink-2:   #35393d;
  --dim:     #5c6469;
  --line:    #e2dfd6;
  --line-2:  #edeae2;

  /* Beat palette. Every value is AA on paper white. */
  --green:   #1d6b50;   /* her voice, and Climate */
  --indigo:  #3a4f9e;   /* Physics */
  --plum:    #7a3d95;   /* Neuroscience */
  --teal:    #146f6b;   /* Biology */
  --amber:   #a5620f;   /* Materials */
  --azure:   #1c6690;   /* Technology */
  --rose:    #a93a55;   /* Health */

  /* Elevation, tinted with the house green so it warms rather than greys. */
  --sh-1: 0 1px 2px rgba(20, 45, 34, 0.05), 0 2px 6px rgba(20, 45, 34, 0.045);
  --sh-2: 0 2px 6px rgba(20, 45, 34, 0.06), 0 10px 26px rgba(20, 45, 34, 0.08);
  --sh-3: 0 6px 14px rgba(20, 45, 34, 0.08), 0 22px 46px rgba(20, 45, 34, 0.11);
  --sh-tint: 0 8px 22px rgba(29, 107, 80, 0.22);

  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t--1: 0.83rem;
  --t-0:  clamp(1rem, 0.97rem + 0.15vw, 1.07rem);
  --t-1:  clamp(1.15rem, 1.06rem + 0.4vw, 1.35rem);
  --t-2:  clamp(1.5rem, 1.25rem + 1.1vw, 2.1rem);
  --t-3:  clamp(2rem, 1.5rem + 2.2vw, 3.2rem);
  --t-4:  clamp(2.4rem, 1.6rem + 3.5vw, 4.5rem);

  --shell: 68rem;
  --band: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  --rail: clamp(1.35rem, 4vw, 2.75rem);
}

/* Per-beat colour. Anything without a match falls back to the house green. */
.clip { --topic: var(--green); }
[data-topic="Physics"]      { --topic: var(--indigo); }
[data-topic="Neuroscience"] { --topic: var(--plum); }
[data-topic="Biology"]      { --topic: var(--teal); }
[data-topic="Materials"]    { --topic: var(--amber); }
[data-topic="Technology"]   { --topic: var(--azure); }
[data-topic="Health"]       { --topic: var(--rose); }
[data-topic="Climate"]      { --topic: var(--green); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Two soft washes behind the top of the page, warm on one side, cool on the
   other, so the paper is not a flat field. */
body::before {
  content: "";
  position: fixed;
  inset: -30% -20% 45% 30%;
  background:
    radial-gradient(closest-side, rgba(29, 107, 80, 0.10), transparent),
    radial-gradient(closest-side at 30% 60%, rgba(58, 79, 158, 0.07), transparent);
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
::selection { background: var(--green); color: var(--paper); }

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.band { padding-block: var(--band); }
.band + .band { padding-top: 0; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green); color: #fff;
  padding: 0.6rem 1rem; font-size: var(--t--1); font-weight: 600;
  box-shadow: var(--sh-2);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* --- Shared type ---------------------------------------------------------- */

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--green); }

.label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}
.label::before {
  content: "";
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(29, 107, 80, 0.14);
  flex: none;
}
.label::after {
  content: "";
  flex: 1; height: 1px;
  background: linear-gradient(to right, var(--line), transparent);
}

.lede { font-size: var(--t-1); color: var(--ink-2); max-width: 54ch; text-wrap: pretty; }

.prose p { color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.prose p + p { margin-top: 1.05em; }
.prose a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(var(--green), var(--green));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 1px;
  transition: color 0.2s, background-size 0.25s;
}
.prose a:hover { color: var(--green); background-size: 100% 2px; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-size: var(--t--1); font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--green); border-radius: 4px;
  background: var(--green); color: #fff;
  box-shadow: var(--sh-tint);
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background: #175a43; border-color: #175a43;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(29, 107, 80, 0.3);
}
.btn:active { transform: translateY(0); box-shadow: var(--sh-1); }

.btn--ghost {
  background: var(--white); color: var(--ink); border-color: var(--line);
  box-shadow: var(--sh-1);
}
.btn--ghost:hover {
  background: var(--white); color: var(--green); border-color: var(--green);
  box-shadow: var(--sh-2);
}

/* --- Header --------------------------------------------------------------- */

.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.top[data-stuck="true"] {
  border-bottom-color: var(--line);
  box-shadow: var(--sh-1);
}
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.85rem; }

.mark { display: block; line-height: 0; }
.mark img { height: clamp(22px, 3.4vw, 30px); width: auto; }

.topnav { display: flex; gap: clamp(0.85rem, 2.4vw, 1.7rem); }
.topnav a {
  font-size: var(--t--1); color: var(--dim); text-decoration: none;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.topnav a:hover, .topnav a.is-here { color: var(--ink); border-bottom-color: var(--green); }
@media (max-width: 34rem) { .topnav a:nth-child(3) { display: none; } }

/* --- Hero ----------------------------------------------------------------- */

.hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) var(--band); }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: var(--t--1); color: var(--dim); letter-spacing: 0.04em;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  padding: 0.35rem 0.95rem 0.35rem 0.8rem;
  box-shadow: var(--sh-1);
}
.hero__eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 4px rgba(29, 107, 80, 0.16);
}

.hero h1 { font-size: var(--t-4); margin: 1.2rem 0 1.5rem; max-width: 17ch; }
.hero .lede { margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 2rem; }
.hero__status { font-size: var(--t--1); color: var(--green); font-weight: 500; }

.hero__grid { display: grid; gap: clamp(1.5rem, 1rem + 3vw, 3rem); align-items: end; }
@media (min-width: 54rem) { .hero__grid { grid-template-columns: minmax(0, 1fr) auto; } }

/* Cutout portrait on a disc that carries the whole beat palette. */
.figure { position: relative; width: clamp(200px, 25vw, 320px); justify-self: center; }
.figure::before {
  content: "";
  position: absolute; left: -9%; right: -9%; bottom: 7%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(at 30% 25%, rgba(58, 79, 158, 0.16), transparent 60%),
    radial-gradient(at 78% 70%, rgba(165, 98, 15, 0.16), transparent 60%),
    linear-gradient(150deg, #eef2ec, var(--panel));
  box-shadow: inset 0 0 0 1px var(--line), var(--sh-2);
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
.figure img {
  position: relative;
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 76%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 76%, transparent 99%);
}

/* --- Signature sign-off --------------------------------------------------- */

.sig { margin-top: 2.2rem; }
.sig img { width: clamp(150px, 22vw, 200px); }
.sig figcaption {
  font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--dim); margin-top: 0.7rem;
}

/* --- Beats ---------------------------------------------------------------- */

.beats { display: flex; flex-wrap: wrap; gap: 0.55rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.beats li {
  font-size: var(--t--1); font-weight: 500;
  color: var(--pill, var(--green));
  padding: 0.42rem 0.95rem;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  box-shadow: var(--sh-1);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; align-items: center; gap: 0.5rem;
}
.beats li::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}
.beats li:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.beats li:nth-child(1) { --pill: var(--indigo); }
.beats li:nth-child(2) { --pill: var(--plum); }
.beats li:nth-child(3) { --pill: var(--rose); }
.beats li:nth-child(4) { --pill: var(--green); }
.beats li:nth-child(5) { --pill: var(--teal); }
.beats li:nth-child(6) { --pill: var(--rose); }
.beats li:nth-child(7) { --pill: var(--amber); }
.beats li:nth-child(8) { --pill: var(--azure); }

/* --- Clips rail ----------------------------------------------------------- */

.clips {
  padding-left: var(--rail);
  border-left: 1px solid var(--line);
}

.clips__year {
  font-family: var(--display); font-size: var(--t-2); color: var(--green);
  position: relative; padding-block: 0.4rem 1rem;
}
.clips__year::before {
  content: ""; position: absolute;
  left: calc(-1 * var(--rail) - 4px); top: 1.1rem;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(29, 107, 80, 0.13);
}

.clip {
  position: relative;
  padding: 1.5rem 1.25rem 1.5rem 1.1rem;
  margin-left: -1.1rem;
  border-top: 1px solid var(--line-2);
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  transition: background 0.28s, box-shadow 0.28s, transform 0.28s, border-color 0.28s;
}
.clip::before {
  content: ""; position: absolute;
  left: calc(1.1rem - var(--rail) - 5px); top: 2rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--topic);
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.clip:hover {
  background: var(--white);
  border-top-color: transparent;
  box-shadow: var(--sh-2);
  transform: translateX(3px);
}
.clip:hover::before {
  background: var(--topic);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--topic) 18%, transparent);
  transform: scale(1.1);
}

.clip__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center;
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.clip__meta time { color: var(--dim); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.clip__meta span:not(.topic) { color: var(--dim); }
.clip__meta .topic {
  color: var(--topic);
  font-weight: 600;
  background: color-mix(in srgb, var(--topic) 10%, transparent);
  border-radius: 100px;
  padding: 0.18rem 0.6rem;
  letter-spacing: 0.08em;
}

.clip h3 {
  font-family: var(--display); font-weight: 400;
  font-size: var(--t-2); line-height: 1.14; letter-spacing: -0.012em;
  margin-bottom: 0.5rem; max-width: 34ch;
  transition: color 0.2s;
}
.clip h3 a { text-decoration: none; }
.clip h3 a::after { content: ""; position: absolute; inset: 0; }
.clip:hover h3 { color: var(--topic); }
.clip p { color: var(--dim); font-size: var(--t--1); line-height: 1.6; max-width: 72ch; }

.more { margin-top: 2rem; padding-left: var(--rail); }

/* --- Mastheads ------------------------------------------------------------ */

.mastheads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}
.masthead {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 1.5rem 1.3rem 1.35rem;
  display: grid; gap: 0.3rem; align-content: start;
  text-decoration: none;
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.masthead::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent, var(--green));
}
.masthead:nth-child(1) { --accent: var(--green); }
.masthead:nth-child(2) { --accent: var(--indigo); }
.masthead:nth-child(3) { --accent: var(--amber); }
.masthead:nth-child(4) { --accent: var(--plum); }
.masthead:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.masthead h3 { font-family: var(--display); font-weight: 400; font-size: var(--t-1); letter-spacing: -0.01em; }
.masthead:hover h3 { color: var(--accent); }
.masthead p { font-size: var(--t--1); color: var(--dim); }
.masthead span {
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-top: 0.5rem;
}

/* --- About ---------------------------------------------------------------- */

.split { display: grid; gap: clamp(1.8rem, 1rem + 4vw, 3.5rem); }
@media (min-width: 52rem) { .split { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }

.stats { display: grid; gap: 1rem; }
.stat {
  background: var(--white);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent, var(--green));
  border-radius: 6px;
  padding: 1rem 1.1rem;
  box-shadow: var(--sh-1);
  transition: transform 0.22s, box-shadow 0.22s;
}
.stat:hover { transform: translateX(3px); box-shadow: var(--sh-2); }
.stat:nth-child(1) { --accent: var(--green); }
.stat:nth-child(2) { --accent: var(--indigo); }
.stat:nth-child(3) { --accent: var(--amber); }
.stat:nth-child(4) { --accent: var(--plum); }
.stat b {
  display: block; font-family: var(--display); font-weight: 400;
  font-size: var(--t-3); line-height: 1; letter-spacing: -0.02em;
  color: var(--accent);
}
.stat span { display: block; font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim); margin-top: 0.5rem; }

.pull {
  border-left: 3px solid var(--green);
  background: linear-gradient(100deg, rgba(29, 107, 80, 0.06), transparent 70%);
  border-radius: 0 8px 8px 0;
  padding: 1.2rem 1.4rem 1.2rem clamp(1rem, 3vw, 1.8rem);
  margin-top: 2.2rem;
}
.pull blockquote {
  font-family: var(--display); font-style: italic; font-size: var(--t-2);
  line-height: 1.24; letter-spacing: -0.01em; max-width: 40ch; text-wrap: pretty;
}

/* --- FAQ ------------------------------------------------------------------ */

.faq { display: grid; gap: 0.7rem; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: var(--sh-1);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.faq details:hover { box-shadow: var(--sh-2); }
.faq details[open] { box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--green) 30%, var(--line-2)); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.25rem;
  font-family: var(--display); font-size: var(--t-1); letter-spacing: -0.01em;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--green); }
.faq summary::after {
  content: "+"; flex: none; color: #fff;
  background: var(--green);
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--sans); font-size: 0.95rem; line-height: 1;
  transition: transform 0.25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--dim); font-size: var(--t--1); max-width: 62ch; padding: 0 1.25rem 1.2rem; }

/* --- Contact: email only, no form ----------------------------------------- */

.mailto {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.45rem, 0.95rem + 2.2vw, 2.5rem);
  line-height: 1.15; letter-spacing: -0.015em;
  text-decoration: none; overflow-wrap: break-word;
  background-image: linear-gradient(var(--green), var(--green));
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 0.35s ease, color 0.2s;
}
.mailto:hover { color: var(--green); background-size: 100% 2px; }

.copy {
  margin-top: 1.2rem;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  font-size: var(--t--1);
  color: var(--dim); cursor: pointer;
  background: var(--white); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--sh-1);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.copy:hover { color: var(--green); border-color: var(--green); box-shadow: var(--sh-2); transform: translateY(-1px); }
.copy[data-done="true"] { color: #fff; background: var(--green); border-color: var(--green); }

.fineprint { margin-top: 1.8rem; font-size: var(--t--1); color: var(--dim); max-width: 48ch; }

.lines {
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.lines a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line-2);
  text-decoration: none; font-size: var(--t--1);
  transition: padding-left 0.25s, color 0.2s, background 0.2s;
}
.lines a:last-child { border-bottom: 0; }
.lines a:hover { padding-left: 1.5rem; color: var(--green); background: var(--panel-2); }
.lines a span:last-child { color: var(--dim); text-align: right; }
.lines a:hover span:last-child { color: var(--green); }

.facts { margin-top: 1.2rem; display: grid; gap: 0.9rem; padding: 1.2rem 1.1rem;
         background: linear-gradient(160deg, rgba(58, 79, 158, 0.05), rgba(29, 107, 80, 0.05));
         border: 1px solid var(--line-2); border-radius: 8px; }
.facts > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.facts dt { font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.facts dd { margin: 0; font-size: var(--t--1); color: var(--ink-2); text-align: right; }

/* --- Footer --------------------------------------------------------------- */

.foot { border-top: 1px solid var(--line); padding-block: 2rem 2.8rem; }
.foot__in { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: baseline; }
.foot p, .foot a { font-size: var(--t--1); color: var(--dim); text-decoration: none; }
.foot a { transition: color 0.2s; }
.foot a:hover { color: var(--green); }
.foot__links { display: flex; gap: 1.2rem; }

/* --- Reveal (JS-scoped so content is never trapped invisible) ------------- */

.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  body::before, .top, .copy { display: none; }
  * { box-shadow: none !important; }
  .clip a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
