/* saurabhja.in
 *
 * Iteration 2: the saurabh.org.in layout of 2008, done with 2026 craft.
 * Same bones. Nothing added, nothing dropped.
 *
 * RECOVERED from the Internet Archive capture of 30 June 2008:
 *   - white content blocks sitting on a coloured ground
 *     (<td bgcolor="white">, <ul style="background-color:white">, on a bare <body>)
 *   - two columns, 15px gutter, photo and nav left, content right
 *   - lowercase nav
 *   - the biographical sketch as a two-column definition table, cellpadding=4
 *
 * CHOSEN, because site.css was never archived — the crawler took every page and none
 * of the assets, and <body> carried no bgcolor:
 *   - the ground colour. His 2008 bio reads "favourite color: blue", linked to a fan
 *     page titled "the top 13 blue things". So: blue.
 *   - the typefaces. Georgia for headings, IBM Plex Sans for text, Plex Mono for data.
 *
 * --ink3 and --accent are checked against --block at >= 4.5:1 (WCAG AA).
 */

@import url('fonts.css');

:root {
  --ground:      #3d5a73;
  --ground-dark: #334c62;

  --block:  #fdfdfc;
  --ink:    #1a1a1a;
  --ink2:   #55616b;
  --ink3:   #6e7982;
  --rule:   #e6e6e2;
  --rule2:  #d5d5d0;

  --link:   #1a4b7a;
  --accent: #8a5607;

  --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --head: Georgia, 'Times New Roman', serif;
  --cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --shadow: 0 1px 3px rgba(0,0,0,.18);
  --w: 1000px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 28px 16px 64px;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0; }

/* ---- masthead: a white block, like everything else ---- */

.mast {
  background: var(--block);
  box-shadow: var(--shadow);
  padding: 18px 24px 14px;
  margin-bottom: 20px;
}

.mast-rule {
  display: flex; align-items: baseline; gap: 16px;
  border-bottom: 1px solid var(--rule); padding-bottom: 10px;
}

.mast h1 {
  font-family: var(--head); font-weight: 700;
  font-size: clamp(24px, 4vw, 34px); letter-spacing: -.01em;
  margin: 0; text-transform: none;
}

.mast .meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink3);
  letter-spacing: .05em; margin-left: auto; text-align: right; text-transform: none;
}

.nav { display: flex; gap: 20px; padding-top: 10px; font-family: var(--sans); font-size: 14px; letter-spacing: 0; }
.nav a { color: var(--link); text-decoration: none; text-transform: lowercase; }
.nav a:hover { text-decoration: underline; color: var(--accent); }
.nav a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: none; }

/* ---- text ---- */

.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
           text-transform: uppercase; color: var(--ink3); margin: 0 0 8px; }
.lede { font-size: 18px; line-height: 1.5; max-width: 62ch; margin: 0 0 8px; color: var(--ink); }
.sub  { color: var(--ink2); max-width: 68ch; }

/* ---- the capture (career) ---- */

.capture { margin: 0; position: relative; }

.capture-head {
  background: var(--block); box-shadow: var(--shadow); border-bottom: 0;
  display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-end;
  padding: 14px 20px 12px; margin-bottom: 2px;
}
.hint { font-family: var(--mono); font-size: 11px; color: var(--ink3); margin-left: auto; }

.scope { background: var(--block); box-shadow: var(--shadow); border: 0; overflow: hidden; position: relative; }
#svg { display: block; width: 100%; height: auto; touch-action: pan-y; }

.chan-label { font-family: var(--mono); font-size: 11px; fill: var(--ink2); cursor: pointer; user-select: none; }
.chan-label:hover { fill: var(--ink); }
.chan-label.on { fill: var(--ink); font-weight: 500; }

.axis-year { font-family: var(--mono); font-size: 10px; fill: var(--ink3); }
.axis-tick { stroke: var(--rule); stroke-width: 1; }
.axis-tick.major { stroke: var(--rule2); }

.ribbon { transition: opacity .28s ease; cursor: pointer; }
.ribbon.dim { opacity: .14; }
.ribbon--place { cursor: default; }
.chan-label--place { fill: var(--ink3); font-size: 10px; }

.place-band { font-family: var(--mono); font-size: 10px; fill: var(--ink2); letter-spacing: .06em; }
.place-rule { stroke: var(--rule2); stroke-width: 1; stroke-dasharray: 2 3; }

.node circle { fill: var(--block); stroke-width: 1.6; transition: r .18s ease; cursor: pointer; }
.node:hover .node-dot--primary, .node.sel .node-dot--primary { r: 7; }
.node:hover .node-dot, .node.sel .node-dot { stroke-width: 2.4; }
.node.sel circle { fill: var(--ink); }
.node-dot { transition: r .18s ease, stroke-width .18s ease; }
.node text {
  font-family: var(--cond); font-weight: 600; font-size: 11.5px; fill: var(--ink2); cursor: pointer;
  paint-order: stroke fill; stroke: var(--block); stroke-width: 3.5px; stroke-linejoin: round;
}
.node:hover text, .node.sel text { fill: var(--ink); }
.node.dim { opacity: .16; }

.cursor-line { stroke: var(--accent); stroke-width: 1; opacity: 0; pointer-events: none; }
.cursor-year { font-family: var(--mono); font-size: 11px; fill: #fff; opacity: 0; pointer-events: none; font-weight: 500; }
.cursor-box { fill: var(--accent); opacity: 0; pointer-events: none; }

.legend {
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 12px 20px;
  list-style: none; background: var(--block); box-shadow: var(--shadow);
}
.legend li { display: flex; align-items: center; gap: 7px; }
.legend button { background: none; border: 0; padding: 3px 0; cursor: pointer;
                 font-family: var(--mono); font-size: 11.5px; color: var(--ink2); }
.legend button:hover { color: var(--ink); }
.legend button[aria-pressed="true"] { color: var(--ink); font-weight: 500; }
.swatch { width: 13px; height: 13px; border: 1px solid rgba(0,0,0,.25); flex: none; }
.legend li.off .swatch { opacity: .2; }

/* ---- readout ---- */

.readout { background: var(--block); box-shadow: var(--shadow); border: 0;
           margin: 20px 0 40px; padding: 28px 32px 32px; }
.readout[hidden] { display: none; }

.readout-logo { height: 30px; width: auto; max-width: 150px; align-self: center;
                object-fit: contain; }
.readout-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
               border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.readout h2 { font-family: var(--head); font-weight: 700; font-size: clamp(20px, 3vw, 28px);
              margin: 0; letter-spacing: -.01em; }
.readout .years { font-family: var(--mono); font-size: 13px; color: var(--accent); font-weight: 500; }
.readout .role  { font-family: var(--sans); font-size: 14px; color: var(--ink2); }
.readout .place { font-family: var(--mono); font-size: 11px; color: var(--ink3);
                  text-transform: uppercase; letter-spacing: .08em; margin-left: auto; }

.readout p { margin: 14px 0 0; max-width: 74ch; color: var(--ink2); font-size: 15px; }
.readout p b { color: var(--ink); font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; padding: 0; list-style: none; }
.tags li { font-family: var(--mono); font-size: 10.5px; color: var(--ink2);
           border: 1px solid var(--rule2); padding: 2px 7px; letter-spacing: .03em; }

.readout .out { margin-top: 16px; font-family: var(--mono); font-size: 12px; }

.close { margin-left: 12px; background: none; border: 1px solid var(--rule2);
         font-family: var(--mono); font-size: 11px; cursor: pointer; color: var(--ink2); padding: 2px 8px; }
.close:hover { border-color: var(--ink); color: var(--ink); }

.empty { font-family: var(--mono); font-size: 13px; color: var(--ink3); padding: 6px 0; }

/* ---- footer ---- */

.foot { background: var(--block); box-shadow: var(--shadow); border-top: 0;
        margin-top: 24px; padding: 12px 20px;
        font-family: var(--mono); font-size: 11px; color: var(--ink3); letter-spacing: .04em; }
.foot a { color: var(--ink2); }

/* ---- the 2008 home page ---- */

.page2008 { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }

.side { display: flex; flex-direction: column; gap: 18px; }

.shot { background: var(--block); padding: 8px; box-shadow: var(--shadow); margin: 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: 11px; color: var(--ink3); padding-top: 8px; line-height: 1.4; }

.side ul { background: var(--block); list-style: none; margin: 0; padding: 14px 16px;
           box-shadow: var(--shadow); }
.side li { padding: 3px 0; }
.side a { text-decoration: none; }
.side a:hover { text-decoration: underline; }
.side h3 { color: rgba(255,255,255,.85); font-size: 11px; letter-spacing: .09em;
           text-transform: uppercase; margin: 6px 0 -8px; font-weight: 600; }

.odd { text-align: center; opacity: .8; }
.counter { display: inline-block; background: rgba(0,0,0,.35); color: #fff;
           font: 600 12px/1 var(--mono); letter-spacing: 5px; padding: 5px 8px; }
.ff { display: inline-block; background: rgba(255,255,255,.9); font-size: 10px;
      padding: 3px 8px; color: #444; font-family: var(--mono); }

.block { background: var(--block); box-shadow: var(--shadow); padding: 36px 40px 44px; }
.block h1 { font: 700 clamp(24px,4vw,32px)/1.15 var(--head); margin: 0 0 12px; letter-spacing: -.01em; }
.block > p { margin: 0 0 10px; }
.sketch-label { color: var(--ink3); font-size: 12px; letter-spacing: .1em;
                text-transform: uppercase; margin: 32px 0 12px; font-family: var(--mono); }

.sketch { width: 100%; border-collapse: collapse; }
.sketch th { width: 130px; text-align: left; vertical-align: top; font-weight: 400;
             color: var(--ink3); padding: 9px 20px 9px 0; border-top: 1px solid var(--rule);
             font-size: 14px; }
.sketch td { vertical-align: top; padding: 9px 0; border-top: 1px solid var(--rule); }
.sketch tr:first-child th, .sketch tr:first-child td { border-top: 0; }

.as-2008 { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--rule);
           color: var(--ink3); font-size: 13px; line-height: 1.6; }

@media (max-width: 760px) {
  .page2008 { grid-template-columns: 1fr; }
  .block { padding: 22px 20px 26px; }
}

@media (max-width: 720px) {
  body { padding: 14px 8px 40px; }
  .scope { overflow-x: auto; }
  #svg { min-width: 780px; }
  .readout { padding: 20px; }
  .readout .place { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* channel readout */
.chan-swatch { display: inline-block; width: 12px; height: 12px; margin-right: 8px;
               border: 1px solid rgba(0,0,0,.25); vertical-align: baseline; }
.chan-things { list-style: none; padding: 0; margin: 16px 0 0; display: flex;
               flex-wrap: wrap; gap: 6px 18px; }
.chan-things li { display: flex; gap: 6px; align-items: baseline; }
.chan-when { font-family: var(--mono); font-size: 11px; color: var(--ink3); }

/* ---- braided-ribbon career timeline (braid.js) ---- */
/* Legend chips double as the isolate control. Reuses .legend / .swatch above. */
.legend button { display: inline-flex; align-items: center; gap: 7px; }

/* Each strand paints a page-coloured casing (stroke) so that when a front strand crosses
   one drawn earlier, it carves a groove — the over/under of a real braid. */
.braid-strand {
  stroke: var(--block); stroke-width: 3; stroke-linejoin: round;
  transition: opacity .28s ease; cursor: pointer;
}
.braid-strand:hover { fill-opacity: 1; }
.braid-strand.dim { opacity: .12; }

.braid-tick { stroke: var(--rule); stroke-width: 1; }
.braid-lane { stroke: var(--rule2); stroke-width: .75; stroke-dasharray: 1 4; }
.braid-where { font-family: var(--mono); font-size: 10px; fill: var(--ink2); letter-spacing: .06em; }
.braid-place-label { font-family: var(--mono); font-size: 10px; fill: var(--ink3); }

.node-span { stroke: #708999; stroke-width: .75; stroke-dasharray: 2 2; }
.node-stem { stroke: #708999; stroke-width: .75; }

@media (prefers-reduced-motion: reduce) {
  .braid-strand, .node-dot, .node text { transition: none; }
}

/* straight-ribbon section under the woven WHERE strip (braid.js) */
.ribbon-flat { stroke: none; }          /* flat ribbons: solid channel colour, no casing */
.braid-rule { stroke: var(--rule2); stroke-width: 1; }

/* unwoven style-option chooser (career page) */
.uw-options { background: var(--block); box-shadow: var(--shadow); margin-top: 22px; padding: 20px 22px 26px; }
.uw-head { border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 6px; }
.uw-head h2 { font-family: var(--head); font-weight: 700; font-size: 20px; margin: 0; }
.uw-opt { border-top: 1px solid var(--rule); padding-top: 6px; }
.uw-opt:first-of-type { border-top: 0; }
.uw-name { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 10px 0 0; }
.uw-options .scope { box-shadow: none; }
.uw-tick { stroke: var(--rule); stroke-width: 1; }
.uw-lane { stroke: var(--rule2); stroke-width: .75; stroke-dasharray: 1 4; }
.uw-year { font-family: var(--mono); font-size: 10px; fill: var(--ink3); }
.uw-label { font-family: var(--mono); font-size: 10px; fill: var(--ink3); }

/* dot rows below the WHERE strip (chosen unwoven style) */
.uw-dotg { cursor: pointer; transition: opacity .28s ease; }
.uw-dotg.dim { opacity: .12; }
