/* Anuj Ashok Potdar, personal site
   One stylesheet, no framework. Print-friendly. */

:root {
  --ink: #1b1f24;
  --ink-soft: #4a525c;
  --ink-faint: #6b737d;
  --rule: #d9dde2;
  --paper: #fcfcfa;
  --accent: #1d4e89;
  --accent-soft: #e8eef6;
  --measure: 44rem;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6e6e3;
    --ink-soft: #b9bcc0;
    --ink-faint: #8d9298;
    --rule: #33373c;
    --paper: #16181b;
    --accent: #8fb4e3;
    --accent-soft: #1f2a38;
  }
}

* { box-sizing: border-box; }

html { font-size: 106.25%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

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

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .4rem .6rem; }

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

.masthead {
  display: grid;
  grid-template-columns: 1fr 9rem;
  gap: 1.75rem;
  align-items: start;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.masthead h1 {
  font-size: 2.05rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 .35rem;
}

.masthead .role {
  font-family: var(--sans);
  font-size: .92rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.masthead .lede { margin: 0 0 1rem; }

.masthead img {
  width: 9rem;
  height: 9rem;
  object-fit: cover;
  border-radius: 2px;
  filter: grayscale(12%);
}

.links {
  font-family: var(--sans);
  font-size: .86rem;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.1rem;
}

nav.toc {
  font-family: var(--sans);
  font-size: .82rem;
  margin: 1.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
}
nav.toc a { color: var(--ink-soft); text-decoration: none; }
nav.toc a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Sections ---------- */

section { margin-top: 2.75rem; }

h2 {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.1rem;
}

h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0 0 .15rem;
  line-height: 1.35;
}

p { margin: 0 0 1rem; }

.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.meta { font-family: var(--sans); font-size: .82rem; color: var(--ink-faint); }

/* Dated rows: year column + content. Used across most sections. */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li {
  display: grid;
  grid-template-columns: 6.25rem 1fr;
  gap: 1rem;
  padding: .55rem 0;
}
.rows > li + li { border-top: 1px solid var(--rule); }
.rows .when {
  font-family: var(--sans);
  font-size: .82rem;
  color: var(--ink-faint);
  padding-top: .2rem;
  font-variant-numeric: tabular-nums;
}
.rows .what p { margin: .2rem 0 0; }

/* Selected work */
.work { margin: 0 0 1.75rem; }
.work .meta { margin-bottom: .45rem; }
.work p { margin-bottom: .55rem; }
.work ul { margin: .25rem 0 .5rem; padding-left: 1.15rem; }
.work li { margin: .2rem 0; }

/* Publications */
.pubs { list-style: none; padding: 0; margin: 0; counter-reset: pub; }
.pubs li { padding: .6rem 0; }
.pubs li + li { border-top: 1px solid var(--rule); }
.pubs .title { font-weight: 600; }
.pubs .venue { font-style: italic; }
.pubs .ids { font-family: var(--sans); font-size: .82rem; margin-top: .2rem; }
.tag {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .03em;
  padding: .05rem .4rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.tag.note { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

h4 {
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 600;
  margin: 1.6rem 0 .3rem;
  color: var(--ink);
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--ink-faint);
}

/* ---------- Project pages ---------- */

.crumb { font-family: var(--sans); font-size: .86rem; margin: 0 0 2rem; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.project-head { padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.project-head h1 { font-size: 1.9rem; line-height: 1.2; font-weight: 600; margin: 0 0 .35rem; }
.project-head .role { font-family: var(--sans); font-size: .92rem; color: var(--ink-soft); margin: 0; }

figure { margin: 1.75rem 0; }
figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 2px; }
figcaption { font-family: var(--sans); font-size: .8rem; color: var(--ink-faint); margin-top: .4rem; }

.facts { margin: 0; display: grid; grid-template-columns: 7.5rem 1fr; gap: .45rem 1rem; }
.facts dt { font-family: var(--sans); font-size: .82rem; color: var(--ink-faint); padding-top: .15rem; }
.facts dd { margin: 0; }

.other { font-family: var(--sans); font-size: .86rem; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .page { padding-top: 2.25rem; }
  .masthead { grid-template-columns: 1fr; }
  .masthead img { width: 6.5rem; height: 6.5rem; order: -1; }
  .rows > li { grid-template-columns: 1fr; gap: .1rem; }
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dd { margin-bottom: .5rem; }
}

/* ---------- Print ---------- */

@media print {
  :root { --paper: #fff; --ink: #000; --ink-soft: #333; --ink-faint: #555; --rule: #ccc; --accent: #000; }
  html { font-size: 10.5pt; }
  .page { max-width: none; padding: 0; }
  nav.toc, .skip { display: none; }
  section { break-inside: auto; }
  .rows > li, .pubs li, .work { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .pubs .ids a::after, .print-url::after { content: " (" attr(href) ")"; font-size: 8.5pt; }
}
