/* kaushikbhattacharjee.org — shared styles. Plain CSS, no framework. */

:root {
  --bg: #fbfbf8;
  --surface: #ffffff;
  --ink: #1a1a18;
  --muted: #5d5d57;
  --accent: #0b5394;
  --accent-soft: #edf3fa;
  --rule: #e5e2d9;
  --header-bg: rgba(251, 251, 248, 0.92);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131518;
    --surface: #1b1e23;
    --ink: #e9e7e1;
    --muted: #a3a6ab;
    --accent: #84b8ec;
    --accent-soft: #1d2a3a;
    --rule: #2b2f36;
    --header-bg: rgba(19, 21, 24, 0.92);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

.page { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem 4rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header .inner {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.02rem;
}
.brand:hover { text-decoration: none; }

.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 1.15rem;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
}
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- hero (home) ---------- */

.hero { padding: 3.2rem 0 0.5rem; }

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 0.7rem;
  font-weight: 600;
}

.tagline {
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 1.6rem;
  max-width: 34rem;
}

.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn:hover { text-decoration: none; background: var(--accent-soft); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { opacity: 0.92; }

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

h2.section-title {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 2.9rem 0 0.9rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
h2.section-title::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

p { margin: 0 0 1rem; }

/* ---------- writing list ---------- */

.group {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 1.6rem 0 0.4rem;
}

ul.essays { list-style: none; margin: 0; padding: 0; }

ul.essays li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0.6rem;
  margin: 0 -0.6rem;
  border-radius: 0.5rem;
  color: var(--ink);
}
ul.essays li a:hover { background: var(--accent-soft); text-decoration: none; }
ul.essays .date {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

.featured {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 0.6rem;
  padding: 1.05rem 1.2rem;
  color: var(--ink);
}
.featured:hover { text-decoration: none; border-color: var(--accent); }
.featured .f-title { font-size: 1.18rem; font-weight: 600; display: block; margin-bottom: 0.3rem; }
.featured .f-line { color: var(--muted); display: block; margin-bottom: 0.5rem; }
.featured .f-meta {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.88rem;
  color: var(--accent);
}

/* ---------- essay pages ---------- */

.crumbs {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 2.2rem;
  margin-bottom: 1.6rem;
}

.chip {
  display: inline-block;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  margin-bottom: 0.9rem;
}

.page h1 {
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  line-height: 1.22;
  margin: 0 0 0.6rem;
  font-weight: 600;
}

.meta { color: var(--muted); font-size: 0.98rem; margin: 0 0 2.25rem; }

article p { margin: 0 0 1.15rem; }

article h2 {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 2.1rem 0 0.8rem;
}

.series-box {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0.6rem;
  margin-top: 2.75rem;
  padding: 1.1rem 1.25rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.series-box p { margin: 0; }

.essay-nav {
  margin-top: 2.2rem;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

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

footer {
  margin-top: 3.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
footer p { margin: 0; }
footer .foot-nav { display: flex; gap: 1rem; font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
footer .foot-nav a { color: var(--muted); }
footer .foot-nav a:hover { color: var(--accent); }
