/* Avinash Saraswat, personal site. Plain CSS, no build step, no web fonts. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --fg: #1c1b19;
  --muted: #625e57;
  --faint: #8a857c;
  --accent: #b5400f;
  --accent-soft: #fbeee6;
  --rule: #e7e3dc;
  --shadow: 0 1px 2px rgba(28, 27, 25, 0.04), 0 4px 16px rgba(28, 27, 25, 0.05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Bitstream Charter", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131210;
    --surface: #1c1a17;
    --fg: #ece8e1;
    --muted: #aaa49a;
    --faint: #7d776d;
    --accent: #f0895a;
    --accent-soft: #2c1d15;
    --rule: #2e2b26;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}

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

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

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

/* Header */

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.5rem 0 1.25rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

header.site .name {
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  color: var(--fg);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.96875rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

nav a:hover {
  color: var(--accent);
}

/* Type */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}

h1 {
  font-size: clamp(2.125rem, 6vw, 2.875rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.4375rem;
  line-height: 1.3;
  margin: 3rem 0 1rem;
  padding-top: 0.25rem;
}

h2::before {
  content: "";
  display: block;
  width: 2rem;
  height: 3px;
  margin-bottom: 0.875rem;
  border-radius: 2px;
  background: var(--accent);
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.35;
  margin: 1.75rem 0 0.375rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.lede {
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.meta {
  color: var(--faint);
  font-size: 0.9375rem;
}

/* Home hero */

.hero {
  margin-bottom: 0.5rem;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.pills {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pills a {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.pills a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Lists and cards */

ul.items,
ol.items {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

ul.items li,
ol.items li {
  margin-bottom: 0.75rem;
}

ol.cards,
ol.series {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.875rem;
}

ol.cards > li,
ol.series > li {
  margin: 0;
  padding: 1.125rem 1.25rem 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

ol.cards > li:hover,
ol.series > li:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--rule));
  transform: translateY(-1px);
}

ol.cards strong,
ol.series strong {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.kind {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.25rem;
}

.series .week {
  display: block;
  color: var(--faint);
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.status {
  display: inline-block;
  margin-left: 0.375rem;
  padding: 0.0625rem 0.5rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  vertical-align: 0.15em;
}

.links {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.9375rem;
}

p.links {
  margin-bottom: 1rem;
}

.links a {
  font-weight: 500;
}

ul.plain {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

ul.plain li {
  margin-bottom: 0.5rem;
}

.placeholder {
  background: var(--surface);
  border-left: 3px solid var(--rule);
  padding: 0.5rem 0.75rem;
  color: var(--muted);
}

/* Footer */

footer.site {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.875rem;
}

footer.site p {
  margin: 0 0 0.375rem;
}

footer.site a {
  color: var(--muted);
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  .wrap {
    padding: 1rem 1rem 2.5rem;
  }

  header.site {
    margin-bottom: 2rem;
  }

  .lede {
    font-size: 1.1875rem;
  }

  ol.cards > li,
  ol.series > li {
    padding: 1rem;
  }
}

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

  ol.cards > li:hover,
  ol.series > li:hover {
    transform: none;
  }
}
