/* kushagr.k75h.in — resume page
   No dependencies, no JavaScript, no external requests. */

:root {
  color-scheme: light;

  --bg: #fff;
  --text: #222;
  --muted: #888;

  /* Links use a darkened turquoise so body-size text clears WCAG AA (5.0:1 on
     white); the bright turquoise is reserved for non-text accents. */
  --link: #0b7c7c;
  --link-hover: #12a3a3;
  --accent: #40e0d0;

  --rule: #e6e6e6;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Helvetica, Arial, sans-serif;

  --measure: 46rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

/* ---------- links ---------- */

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 120ms ease;
}

a:hover { color: var(--link-hover); }

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 0.875rem;
  background: var(--bg);
  border: 2px solid var(--link);
  border-radius: 4px;
  text-decoration: none;
}

.skip-link:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 1;
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding: clamp(2.5rem, 8vw, 4.5rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
}

/* ---------- masthead ---------- */

.masthead {
  padding-bottom: clamp(1.5rem, 4vw, 2.25rem);
  border-bottom: 1px solid var(--rule);
}

h1 {
  font-size: clamp(2rem, 1.5rem + 2.4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.tagline {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  font-weight: 500;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- sections ---------- */

.section { margin-top: clamp(2.25rem, 6vw, 3rem); }

h2 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.summary { margin-top: 1rem; max-width: 40rem; }

/* ---------- roles ---------- */

.role { margin-top: clamp(1.5rem, 4vw, 2rem); }

.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem 1.5rem;
}

h3 {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  line-height: 1.35;
  font-weight: 700;
  flex: 1 1 20rem;
}

.at {
  color: var(--muted);
  font-weight: 400;
  padding-inline: 0.15em;
}

.context {
  color: var(--muted);
  font-weight: 500;
}

.dates {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: 0 0 auto;
}

.role ul { margin-top: 0.6rem; }

.role li {
  position: relative;
  padding-left: 1.1rem;
  margin-top: 0.4rem;
}

.role li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.institution {
  margin-top: 0.4rem;
  color: var(--muted);
}

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

.colophon {
  margin-top: clamp(2.5rem, 7vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- narrow screens ---------- */

@media (max-width: 40rem) {
  .role-head { display: block; }
  .dates {
    margin-top: 0.15rem;
    white-space: normal;
  }
  .contact { gap: 0.25rem 1rem; }
}

/* ---------- print ---------- */

@media print {
  :root {
    --text: #000;
    --muted: #444;
    --link: #000;
    --accent: #000;
    --rule: #bbb;
  }

  body { font-size: 10.5pt; line-height: 1.45; }

  .wrap { max-width: none; padding: 0; }

  .skip-link, .colophon { display: none; }

  /* Contact links already print their own URL as visible text. */
  a { text-decoration: none; }

  h2 { border-bottom-width: 1px; }

  .role, .section { break-inside: avoid; }
}
