/* ============================================================
   Debajyoti Ray · personal site
   Aesthetic: minimal & warm. One column, generous whitespace,
   warm cream paper, ink text, a single clay accent.
   Shared across index.html, writing.html, and posts/*.html
   ============================================================ */

:root {
  --paper:      #f0e5cf;   /* deeper warm parchment            */
  --paper-deep: #e8dabe;   /* deeper panel                     */
  --ink:        #2b241b;   /* warm near-black, body text       */
  --ink-soft:   #615847;   /* muted text, captions             */
  --rule:       #d7c6a6;   /* warm hairline dividers           */
  --accent:     #ad4f27;   /* clay / terracotta                */
  --accent-dim: #8a3d1d;   /* darker clay, hover               */
  --accent-tint:#e7d4ba;   /* faint clay wash                  */
  --maxw:       680px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(177, 84, 44, 0.16); }

/* ---- layout ---- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

main { padding-bottom: 72px; }

section { margin: 0 0 60px; }
section[id] { scroll-margin-top: 32px; }

/* ---- top nav ---- */
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.nav .home {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.1px;
  color: var(--ink);
  text-decoration: none;
}
.nav .home:hover { color: var(--accent); }
.nav .links { display: flex; gap: 24px; }
.nav .links a {
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav .links a:hover,
.nav .links a[aria-current="page"] { color: var(--accent); }

/* ---- hero ---- */
.hero { padding: 76px 0 14px; }
.hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(38px, 7vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.6px;
  margin: 0 0 16px;
}
.hero h1 .dot { color: var(--accent); }
.hero .name-meaning {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 16px;
  max-width: 52ch;
}
.hero .lede {
  font-size: clamp(21px, 2.5vw, 24px);
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
  max-width: 46ch;
}

/* ---- section labels ---- */
h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
}
h2::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--rule);
}

h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.22;
  letter-spacing: -0.2px;
  margin: 0 0 12px;
}

p { margin: 0 0 22px; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(177, 84, 44, 0.35);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
a:hover { color: var(--accent-dim); text-decoration-color: currentColor; }

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

strong { font-weight: 600; }
em { font-style: italic; }

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

/* ---- mission pillars ---- */
.pillars { list-style: none; margin: 0; padding: 0; }
.pillar {
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 26px;
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}
.pillar:first-child { border-top: 0; padding-top: 6px; }
.pillar:last-child { padding-bottom: 0; }
.pillar-num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--accent);
  opacity: 0.5;
}
.kicker {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.pillar-text p:last-child { margin-bottom: 0; }

/* ---- writing list ---- */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li {
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.posts li:last-child { border-bottom: 1px solid var(--rule); }
.posts h3 { margin-bottom: 7px; }
.posts h3 a {
  color: var(--ink);
  text-decoration: none;
}
.posts h3 a:hover { color: var(--accent); }
.posts .meta {
  font-family: "Fraunces", Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.posts .dek { margin: 6px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.55; }

/* ---- article (post pages) ---- */
.article-head { padding: 64px 0 10px; }
.article-head .meta {
  font-family: "Fraunces", Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.article-head h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(32px, 5.5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.5px;
  margin: 0;
}
article { margin-top: 16px; }
article p:first-of-type { font-size: 21px; line-height: 1.6; color: var(--ink); }
article blockquote {
  margin: 38px 0;
  padding-left: 26px;
  border-left: 3px solid var(--accent);
  font-family: "Fraunces", Georgia, serif;
  font-size: 23px;
  line-height: 1.4;
  font-style: italic;
  color: var(--ink);
}

/* ---- draft badge ---- */
.badge {
  display: inline-block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: 2px 10px;
  vertical-align: middle;
}

/* ---- contact row ---- */
.contact a { margin-right: 24px; }

/* ---- footer ---- */
.foot {
  border-top: 1px solid var(--rule);
  padding: 30px 0 60px;
  font-size: 14px;
  color: var(--ink-soft);
}
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.foot a { color: var(--ink-soft); text-decoration-color: var(--rule); }
.foot a:hover { color: var(--accent); }

/* ---- back link on posts ---- */
.back {
  display: inline-block;
  margin: 12px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 15px;
  text-decoration: none;
}
.back:hover { color: var(--accent-dim); }

/* ---- small screens ---- */
@media (max-width: 560px) {
  body { font-size: 18px; }
  .wrap, .nav { padding-left: 22px; padding-right: 22px; }
  .hero { padding: 52px 0 8px; }
  .nav { flex-wrap: wrap; }
  .pillar {
    grid-template-columns: 1fr;
    row-gap: 6px;
    column-gap: 0;
  }
  .pillar-num { font-size: 24px; opacity: 0.45; }
  article blockquote { font-size: 21px; }
}
