/* Munsif Vengattil — "paper trail" style. Fonts are self-hosted (SIL Open Font License). */
@font-face { font-family: "Besley"; src: url("fonts/besley-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Besley"; src: url("fonts/besley-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/courierprime-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/courierprime-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #efebe2;
  --sheet: #fbf9f4;
  --ink: #221f1b;
  --pencil: #6e695f;
  --edge: #d9d3c5;
  --marker: #fbe35b;
  --pen: #2547a3;
  --head: "Besley", Georgia, serif;
  --body: "Spectral", Georgia, serif;
  --type: "Courier Prime", "Courier New", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-size: 1.08rem; line-height: 1.6;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.13 0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px dashed var(--pen); outline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.type { font-family: var(--type); font-size: .8rem; letter-spacing: .02em; }

/* Masthead */
.mast { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px 24px; padding: 26px 0 14px; border-bottom: 1.5px solid var(--ink); }
.mast .name { font-family: var(--head); font-weight: 900; font-size: 1.6rem; letter-spacing: -.01em; text-decoration: none; }
.mast nav { display: flex; gap: 6px 20px; flex-wrap: wrap; font-family: var(--type); font-size: .9rem; }
.mast nav a { text-decoration: none; }
.mast nav a:hover { text-decoration: underline; }
.mast nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
/* Selected work: a quiet marker stroke behind the word, the same yellow used for documented impact */
.mast nav a.feature { font-weight: 700; background-image: linear-gradient(100deg, rgba(251,227,91,0) 1%, var(--marker) 4%, var(--marker) 94%, rgba(251,227,91,.3) 99%); background-repeat: no-repeat; background-size: 100% 42%; background-position: 0 85%; padding: 0 .15em; }

/* Highlighter */
.hl {
  background-image: linear-gradient(100deg, rgba(251,227,91,0) .6%, var(--marker) 2%, var(--marker) 96%, rgba(251,227,91,.3) 99%);
  background-repeat: no-repeat; background-size: 100% 82%; background-position: 0 62%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .12em;
  transition: background-size 1.1s cubic-bezier(.3,.7,.3,1) .35s;
}
/* Highlights sweep in on scroll only when JavaScript runs; without it they simply show */
.js .chain:not(.in) .hl { background-size: 0% 82%; }

/* Clipping */
.clip { background: var(--sheet); border: 1px solid var(--edge); padding: 16px 18px 18px; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 10px 18px -14px rgba(0,0,0,.35); position: relative; }
.clip .type { color: var(--pencil); }
.clip h3 { font-family: var(--head); font-weight: 700; font-size: 1.05rem; line-height: 1.25; margin: 6px 0 0; }
.clip h3 a { text-decoration: none; }
.clip h3 a:hover { text-decoration: underline; }
.clip .by { font-family: var(--type); font-size: .76rem; color: var(--pencil); margin: 8px 0 0; }
.clip .story-list { list-style: none; margin: 12px 0 0; padding: 0; }
.clip .story-list li { padding: 10px 0 0; margin: 10px 0 0; border-top: 1px dashed var(--edge); }
.clip .story-list li:first-child { margin-top: 0; }
.clip .story-list a { font-family: var(--head); font-weight: 700; font-size: .95rem; line-height: 1.3; text-decoration: none; }
.clip .story-list a:hover { text-decoration: underline; }
.clip .story-list .by { margin-top: 4px; }
.tilt-l { transform: rotate(-.6deg); }
.tilt-r { transform: rotate(.5deg); }

/* Hand-drawn arrow */
.arrow path { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .8s ease; }
.arrow path.head { transition-delay: .65s; transition-duration: .25s; }
.js .chain:not(.in) .arrow path { stroke-dashoffset: 1; }

/* Stamp */
.stamp { display: inline-block; font-family: var(--type); font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; border: 2px solid var(--ink); padding: 7px 11px; transform: rotate(-2.5deg); }

/* ---------- Home ---------- */
.home { padding: 40px 0 70px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.sketch { margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sketch img {
  display: block; width: 100%; height: auto; mix-blend-mode: multiply; transform-origin: 50% 96%;  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 55%); mask-image: linear-gradient(to bottom, #000 45%, transparent 55%);
  -webkit-mask-size: 100% 260%; mask-size: 100% 260%;
  -webkit-mask-position: 0 0; mask-position: 0 0;
}
/* Set by script on load: start hidden, then sketch in from the top (a one-time transition, so hover never replays it) */
.sketch.pre img { -webkit-mask-position: 0 100%; mask-position: 0 100%; }
.sketch.pre.drawn img { -webkit-mask-position: 0 0; mask-position: 0 0; transition: -webkit-mask-position 1.6s cubic-bezier(.4,.1,.3,1), mask-position 1.6s cubic-bezier(.4,.1,.3,1); }
.sketch:hover img, .sketch.nod img { animation: nod .9s ease-in-out; }
@keyframes nod { 0%,100% { rotate: 0deg; } 25% { rotate: -3deg; } 60% { rotate: 2deg; } 80% { rotate: -.8deg; } }

.about { display: grid; grid-template-columns: 1fr 320px; gap: 56px; padding: 0 0 90px; }
.bio-intro { margin: 0 0 30px; }
.bio-intro p { margin: 0 0 1em; }
.bio-intro p:last-child { margin-bottom: 0; }
.bio .author-link { font-size: .85rem !important; margin-top: 6px; }
.chapter { border-left: 1.5px solid var(--ink); padding: 0 0 26px 22px; position: relative; }
.chapter::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }
.chapter:last-child { padding-bottom: 0; }
.chapter .type {
  display: inline-block; margin-bottom: 6px; color: var(--ink); font-weight: 700; font-size: .9rem;
  background-image: linear-gradient(100deg, rgba(251,227,91,0) 1%, var(--marker) 3%, var(--marker) 96%, rgba(251,227,91,.3) 99%);
  background-repeat: no-repeat; background-size: 100% 55%; background-position: 0 80%; padding: 0 .2em;
}
.chapter p { margin: 0; }
.chapter p + p { margin-top: .8em; }
.home h1 { font-family: var(--head); font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 22px; }
.bio p { margin: 0 0 1em; max-width: 62ch; font-size: 1.06rem; }
.index-card { background: var(--sheet); border: 1px solid var(--edge); padding: 16px 18px; box-shadow: 0 10px 18px -14px rgba(0,0,0,.35); transform: rotate(.7deg); align-self: start; border-top: 3px solid var(--ink); }
.index-card h2 { font-family: var(--type); font-weight: 700; font-size: .85rem; margin: 0 0 4px; letter-spacing: .04em; }
.index-card ul { list-style: none; padding: 0; margin: 0 0 18px; }
.index-card li { font-size: .95rem; line-height: 1.35; padding: 8px 0; border-bottom: 1px dashed var(--edge); }
.index-card li:last-child { border-bottom: 0; }
.index-card li .type { display: block; color: var(--pencil); font-size: .74rem; }

/* ---------- Selected work: chains ---------- */
.chains { border-top: 1.5px solid var(--ink); padding-top: 26px; }
.chain { display: flex; align-items: center; margin: 0 0 44px; }
.chain .num { font-family: var(--head); font-weight: 900; font-size: 1.25rem; color: var(--pencil); width: 56px; flex-shrink: 0; align-self: flex-start; line-height: 1; padding-top: 10px; }
.chain .clip { flex: 1.3 1 0; min-width: 0; }
.chain:nth-child(odd) .clip { transform: rotate(-.5deg); }
.chain:nth-child(even) .clip { transform: rotate(.45deg); }
.chain .impact { flex: 1 1 0; min-width: 0; font-size: 1rem; }
.chain .impact > .type { display: block; margin-bottom: 2px; }
.chain .link { flex: 0 0 104px; text-align: center; }
.chain .link .type { display: block; color: var(--pencil); font-size: .72rem; line-height: 1.2; min-height: 1.2em; }
.chain .link svg { width: 96px; height: 36px; display: block; margin: 0 auto; }
.chain .impact .impact-next { margin-top: 12px; }
.chain.solo .clip { flex: 0 1 62%; }
/* Collapsible groups: Highlights, then one per year */
.group { margin: 0 0 6px; }
main > .group:first-of-type { margin-top: 26px; }
.group-head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 0; font-family: var(--head); font-weight: 900; font-size: 1.25rem; }
.group-head::-webkit-details-marker { display: none; }
.group-head .g-title { font: inherit; margin: 0; }
.group-head .g-rule { flex: 1; }
.group + .group { border-top: 1px solid var(--ink); }
.group-head .g-sign { font-family: var(--type); font-weight: 700; font-size: 1.2rem; width: 1.2em; text-align: center; }
.group-head .g-sign::before { content: "+"; }
.group[open] > .group-head .g-sign::before { content: "\2212"; }
.group-head:hover .g-title { background: linear-gradient(transparent 55%, var(--marker) 55%); }
.group-head:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.group > .chains { border-top: 0; padding-top: 10px; padding-bottom: 18px; }
.sub-head { font-family: var(--type); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 4px; }
.sub-head ~ .sub-head { margin-top: 20px; padding-top: 22px; border-top: 1px dashed var(--edge); }
.sub-intro { color: var(--pencil); font-size: .95rem; margin: 0 0 24px; max-width: 62ch; }

/* ---------- Awards ---------- */
.awards { padding: 0 0 80px; display: grid; gap: 46px; }
.award { display: grid; grid-template-columns: 90px 1fr; gap: 30px; align-items: start; }
.award .stamp { font-size: .82rem; padding: 6px 11px; justify-self: start; }
.award:nth-child(even) .stamp { transform: rotate(2deg); }
.award .clip h3 { font-size: 1.05rem; }
.award .clip { max-width: 720px; }
.award .clip p { margin: 8px 0 0; }
.award-quote { margin: 14px 0 10px; padding: 2px 0 2px 16px; border-left: 3px solid var(--ink); }
.award-quote p { font-family: var(--body); font-weight: 400; font-style: italic; font-size: .98rem; line-height: 1.6; margin: 0 0 6px !important; }
.award-quote .q-mark {
  background-image: linear-gradient(100deg, rgba(251,227,91,0) .6%, var(--marker) 2%, var(--marker) 97%, rgba(251,227,91,.3) 99%);
  background-repeat: no-repeat; background-size: 100% 70%; background-position: 0 70%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .15em;
}
.award-quote footer { font-family: var(--type); font-size: .76rem; color: var(--pencil); }
.award-quote footer::before { content: "— "; }
.award .clip .src { font-family: var(--type); font-size: .76rem; color: var(--pencil); }

/* ---------- Contact: press card ---------- */
.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; }
.press-wrap { display: flex; flex-direction: column; align-items: flex-start; padding: 40px 0 110px; }
.contact-intro { max-width: 440px; margin: 0 0 22px; font-size: 1.04rem; }
.press-card {
  position: relative; width: 100%; max-width: 440px; background: var(--sheet);
  border: 1px solid var(--edge); border-radius: 10px; padding: 46px 40px 34px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 24px 34px -24px rgba(0,0,0,.45);
}
.press-card .slot { position: absolute; top: 16px; left: 50%; width: 58px; height: 10px; margin-left: -29px; border-radius: 6px; background: var(--paper); border: 1px solid var(--edge); box-shadow: inset 0 1px 2px rgba(0,0,0,.18); }
.pc-rows { margin: 0; }
.pc-rows div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px dashed var(--edge); }
.pc-rows div:last-child { border-bottom: 0; padding-bottom: 0; }
.pc-rows dt { font-family: var(--type); font-size: .82rem; color: var(--pencil); }
.pc-rows dd { margin: 0; font-family: var(--head); font-weight: 700; font-size: 1.02rem; overflow-wrap: anywhere; }
.pc-rows dd a { text-decoration: none; }
.pc-rows dd a:hover { text-decoration: underline; }
@media (max-width: 520px) {
  .press-wrap { padding: 50px 0 80px; }
  .press-card { padding: 40px 22px 26px; }
  .pc-rows div { grid-template-columns: 78px 1fr; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 560px) {
  .mast nav { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 10px; font-size: .78rem; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
  .mast nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 360px) {
  .mast nav { font-size: .7rem; gap: 6px; }
}
@media (max-width: 880px) {
  .chain.solo .clip { flex: 1 1 auto; }
  /* Phone/tablet: small figure stands beside the heading, feet on the rule above the bio */
  .home { grid-template-columns: minmax(0, 1fr) clamp(104px, 30vw, 170px); grid-template-areas: "title fig" "bio bio"; gap: 0 12px; align-items: end; padding-top: 24px; }
  .home-main { display: contents; }
  .home h1 { grid-area: title; align-self: end; margin: 0; padding-bottom: 16px; }
  .sketch { grid-area: fig; align-self: end; margin-bottom: -3px; }
  .home .bio { grid-area: bio; border-top: 1.5px solid var(--ink); padding-top: 20px; }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .chain { flex-direction: column; align-items: stretch; padding-left: 36px; position: relative; }
  .chain .num { position: absolute; left: 0; top: 0; font-size: 1.15rem; width: auto; }
  .chain .link { flex: none; display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 6px; padding: 4px 0 4px 18px; text-align: left; }
  .chain .link svg { width: 70px; height: 30px; margin: 18px -14px; transform: rotate(90deg); }
  .award { grid-template-columns: 1fr; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .sketch img { animation: none !important; transition: none !important; -webkit-mask-image: none; mask-image: none; }
  .hl, .arrow path { transition: none; }
}

/* Pages without a visible title: breathing room under the masthead */
main.about, main.awards { margin-top: 32px; }