/* ==========================================================================
   Theme "Notebook" — loaded after site.css; overrides look, not structure.

   Each page opens with a masthead: a full-width band of graph paper behind the
   page title (and only the title). Everything below is plain paper, and each
   section opens like a magazine chapter, with an ink rule and a big numeral:

       ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   <- grid band, edge to edge
       ░░  Shubham Jain  ░░░░░░░░░░░░░░░░ [photo] ░
       ─────────────────────────────────── [     ] ─
         PhD student in Physics, ...       [     ]
         Bio text on plain paper ...

       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   <- ink rule
       01          News
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       02          Papers

   Type: Bricolage Grotesque for headings, IBM Plex Sans for text, IBM Plex
   Mono for dates. Accent: vermilion.
   Delete this file (and its <link>) to return to the original look.
   ========================================================================== */

:root {
  --bg: #f7f4ee;
  --bg-2: #eeeae1;
  --band: #efebe2;
  --grid: rgba(22, 24, 29, 0.085);
  --text: #121418;
  --text-2: #3c4048;
  --text-3: #686c75;
  --rule: #e2ddd2;
  --rule-2: #cdc6b8;
  --ink: #121418;
  --accent: #cc3a10;
  --accent-hover: #9e2a07;
  --accent-soft: rgba(204, 58, 16, 0.1);
  --plate: #ffffff;
  --plate-border: #e2ddd2;

  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --bg: #0d1015;
  --bg-2: #171c24;
  --band: #10141a;
  --grid: rgba(236, 232, 223, 0.07);
  --text: #f0ece4;
  --text-2: #c4c0b8;
  --text-3: #959aa3;
  --rule: #252c37;
  --rule-2: #3a4351;
  --ink: #f0ece4;
  --accent: #ff7a45;
  --accent-hover: #ffa47d;
  --accent-soft: rgba(255, 122, 69, 0.15);
  --plate: #ffffff;
  --plate-border: transparent;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1015;
    --bg-2: #171c24;
    --band: #10141a;
    --grid: rgba(236, 232, 223, 0.07);
    --text: #f0ece4;
    --text-2: #c4c0b8;
    --text-3: #959aa3;
    --rule: #252c37;
    --rule-2: #3a4351;
    --ink: #f0ece4;
    --accent: #ff7a45;
    --accent-hover: #ffa47d;
    --accent-soft: rgba(255, 122, 69, 0.15);
    --plate: #ffffff;
    --plate-border: transparent;
  }
}
:root[data-theme="dark"] .chip.solid,
:root[data-theme="dark"] .chip.solid:hover { color: #1f0a02; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip.solid,
  :root:not([data-theme="light"]) .chip.solid:hover { color: #1f0a02; }
}

/* ---------- Masthead: grid band behind the page title ---------- */

/* The band bleeds past the wrap; never scroll sideways (hidden = fallback for old Safari). */
html { overflow-x: hidden; overflow-x: clip; }
body { font-size: 16.5px; line-height: 1.7; }

.hero h1, .page-head h1, .p-head h1, .lost h1 { position: relative; }
.hero h1::before, .page-head h1::before, .p-head h1::before, .lost h1::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -600px;              /* runs up under the header to the top of the page */
  bottom: -26px;            /* and stops just below the title */
  left: -100vw;
  right: -100vw;
  background-color: var(--band);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center bottom;
  border-bottom: 1px solid var(--rule-2);
  pointer-events: none;
}
.hero h1, .page-head h1, .lost h1 { margin-bottom: 44px; }
.p-head h1 { margin-bottom: 46px; }
.hero { padding-top: 64px; }
.page-head { padding-top: 64px; }
.crumbs { padding-top: 40px; }
.crumbs a {                  /* small text over the band gets a solid backing */
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
}
.hero .portrait { position: relative; box-shadow: 0 18px 40px -26px rgba(20, 16, 8, 0.45); }

.site-header {
  background: color-mix(in srgb, var(--band) 80%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.site-header.is-scrolled { border-bottom-color: var(--rule-2); }

/* ---------- Type ---------- */

h1, h2, h3, .brand, .f-name {
  font-family: var(--display);
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
}
h1 { font-weight: 700; }

.brand { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.brand span { font-weight: 400; color: var(--text-2); }
.nav a { font-weight: 500; color: var(--text-2); }

.hero h1 { font-size: 64px; font-weight: 300; letter-spacing: -0.04em; color: var(--text-2); }
.hero h1 b { font-weight: 700; color: var(--text); }
.role { font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.01em; color: var(--text-3); }

.page-head h1 { font-size: 60px; letter-spacing: -0.04em; }
.p-head h1 { font-weight: 650; letter-spacing: -0.025em; }
.pub-title { font-weight: 600; font-size: 1.1em; letter-spacing: -0.01em; }
strong, b { font-weight: 600; }

.when, .t-meta .kind {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.when { line-height: 2.1; }

/* ---------- Sections: an ink rule and a big numeral ---------- */

main { counter-reset: sec; }
.section {
  margin-top: 80px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
}
.sec-title {
  counter-increment: sec;
  align-items: start;
  margin-bottom: 34px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.sec-title::before {
  content: counter(sec, decimal-leading-zero);
  height: auto;
  background: none;
  color: var(--accent);
  font-family: var(--display);
  font-size: 64px;
  font-weight: 300;
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-align: right;
}

/* ---------- News on the home page: a quiet footnote, not a chapter ---------- */

.section.news-note {
  margin-top: 88px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-2);
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}
.news-note .sec-title {
  counter-increment: none;
  margin-bottom: 14px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.news-note .sec-title::before { content: none; }
.news-note .sec-title::after { content: none; }
.news-note .row { padding-bottom: 8px; }
.news-note .when { font-size: 12px; line-height: 1.95; }
.news-note .more { margin-top: 12px; }
.news-note .more > summary { font-size: 13px; }

/* ---------- Details ---------- */

.portrait { border-radius: 8px; }
.chip { border-radius: 999px; }
.pub-thumb { border-radius: 8px; }
.pager { border-top: 2px solid var(--ink); }
.site-footer { border-top: 2px solid var(--ink); }

a { text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }

@media (max-width: 720px) {
  .hero h1 { font-size: 46px; }
  .page-head h1 { font-size: 42px; }
  .hero h1, .page-head h1, .lost h1 { margin-bottom: 36px; }
  .hero h1::before, .page-head h1::before, .p-head h1::before, .lost h1::before { bottom: -20px; background-size: 22px 22px; }
  .hero .portrait { margin-bottom: 30px; }
  .section { margin-top: 56px; padding-top: 16px; }
  .sec-title {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: 27px;
  }
  .sec-title::before { font-size: 44px; text-align: left; flex: none; }
}
