/* =====================================================================
   Neil Kumar — minimal personal site
   Text-first, off-white, narrow centered column. One shared stylesheet.
   ===================================================================== */

:root {
  --bg:    #fbfaf7;   /* warm off-white */
  --text:  #1c1c1a;   /* near-black */
  --muted: #6e6e68;   /* secondary text / separators */
  --rule:  #e7e5de;   /* hairlines */
  --maxw:  720px;

  /* A classic, fast, system serif stack — no web-font request. */
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria,
           "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  /* Stay light per the brief, but soften pure-white glare slightly if a UA forces it. */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

::selection { background: #1c1c1a; color: var(--bg); }

:focus-visible { outline: 2px solid #1c1c1a; outline-offset: 2px; border-radius: 2px; }

/* ---------- top nav ---------- */
.nav {
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav a + a::before {
  content: "·";
  color: var(--muted);
  margin: 0 0.55rem;
  font-weight: 400;
  text-decoration: none;
}
.nav a[aria-current="page"] {
  color: var(--muted);
  font-weight: 600;
}
.nav a[aria-current="page"]:hover { text-decoration: none; cursor: default; }

/* ---------- headings ---------- */
h1 {
  font-weight: 600;
  font-size: clamp(1.7rem, 1.4rem + 1.6vw, 2.1rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 1.2rem;
}
h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--muted);
  margin: 2.2rem 0 0.8rem;
}

/* ---------- body / prose ---------- */
.prose p { margin: 0 0 0.95rem; }
.prose p:last-child { margin-bottom: 0; }

.hero {
  padding-bottom: 2rem;
}
.hero p { max-width: 34rem; margin: 0 0 0.65rem; }
.hero p:last-child { margin-bottom: 0; }

/* inline links: subtly bold + underlined */
.prose a, .link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 500;
}
.prose a:hover, .link:hover { text-decoration-thickness: 2px; }

.lead { font-size: 1.02rem; }
.muted { color: var(--muted); }

/* ---------- simple lists (work / writing / resume) ---------- */
.list { list-style: none; padding: 0; margin: 0; }
.list > li { margin: 0 0 1.1rem; }
.list > li:last-child { margin-bottom: 0; }

.item__title { font-weight: 600; }
.item__title a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.item__title a:hover { border-bottom-color: var(--text); }
.item__role { color: var(--muted); font-weight: 400; }
.item__note { display: block; color: var(--muted); font-size: 0.94rem; }

/* compact list for resume sub-items */
.tight { list-style: none; padding: 0; margin: 0; }
.tight > li { margin: 0 0 0.45rem; }
.tight .item__role { font-style: normal; }
.row-date { color: var(--muted); font-variant-numeric: tabular-nums; }

.skills { color: var(--text); }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(2.5rem, 6vh, 3.5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow-x: hidden;
}
.footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer a + a::before {
  content: "·";
  color: var(--rule);
  margin: 0 0.55rem;
}

/* back link on sub-pages */
.back {
  display: inline-block;
  margin-top: 2.4rem;
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- small screens ---------- */
@media (max-width: 480px) {
  html { font-size: 16px; }
  .wrap { padding-top: 1.5rem; }
  .nav { margin-bottom: 2rem; }
}
