/* ============================================================
   Dev Patel — personal site stylesheet
   ------------------------------------------------------------
   One shared stylesheet for every page. You rarely need to
   touch this file to add content — just edit the HTML pages.
   Colors, fonts and spacing all live in the :root variables
   below, so tweaking the look is a one-line change.
   ============================================================ */

:root {
  color-scheme: light;

  /* --- palette (warm off-white paper + deep plum accent) --- */
  --paper:      #faf7f1;   /* page background            */
  --ink:        #2b2622;   /* main text                  */
  --ink-soft:   #6b6058;   /* secondary text, excerpts   */
  --ink-faint:  #a89a8c;   /* dates, meta                */
  --accent:     #6a3d6e;   /* deep plum — links & marks  */
  --accent-2:   #a08d5a;   /* muted gold — section labels */
  --rule:       #e7dfd3;   /* hairline dividers          */

  /* --- type --- */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- layout --- */
  --measure: 40rem;        /* max reading width          */
}

/* ---------- resets ---------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

/* the shared column all pages sit in */
.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.4rem 5rem;
}

/* ---------- links ---------- */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- site header + nav ---------- */
.site-head { margin-bottom: 3rem; }

.site-head .name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin: 0;
}
.site-head .name a { color: var(--ink); }
.site-head .name a:hover { text-decoration: none; color: var(--accent); }

nav.main {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.65rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}
nav.main a { color: var(--accent); }
nav.main a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- headings ---------- */
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}
h3 { font-weight: 600; font-size: 1.2rem; margin: 0 0 0.3rem; }

/* the italic intro/tagline used on the home page */
.lede {
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
  max-width: 32ch;
  margin: 0 0 2.5rem;
}

/* small uppercase monospace section labels */
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-2);
  margin: 0 0 1.25rem;
}

/* faint monospace metadata (dates, durations) */
.meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

/* horizontal rule between blocks */
.rule { border: 0; border-top: 1px solid var(--rule); margin: 2.75rem 0; }

/* generic vertical spacing between sections */
.section { margin-top: 3rem; }
.section:first-of-type { margin-top: 0; }

/* ============================================================
   BLOGS — post list
   ============================================================ */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.post-list li:first-child { border-top: 0; }
.post-list h3 { margin-bottom: 0.15rem; }
.post-list h3 a { color: var(--ink); }
.post-list h3 a:hover { color: var(--accent); text-decoration: none; }
.post-list .excerpt { color: var(--ink-soft); font-size: 1rem; margin: 0.35rem 0 0; }

/* ============================================================
   MEDIA — card grid
   ============================================================ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
.media-card { display: flex; flex-direction: column; }
.media-card a.thumb-link { display: block; }
.media-card .thumb {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  border: 1px solid var(--rule);
  /* subtle striped placeholder — swap for a real <img> (see media.html) */
  background:
    repeating-linear-gradient(45deg, #f1ece2, #f1ece2 10px, #ece5d8 10px, #ece5d8 20px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); font-family: var(--mono); font-size: 0.72rem;
  text-align: center; padding: 0.5rem;
}
.media-card img.thumb { object-fit: cover; }
.media-card .kind {
  font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent-2); margin: 0.8rem 0 0.25rem;
}
.media-card h3 { font-size: 1.15rem; margin: 0 0 0.2rem; }
.media-card h3 a { color: var(--ink); }
.media-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0.2rem 0 0; }

/* ============================================================
   LINKS — labelled list
   ============================================================ */
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 1.05rem 0; border-top: 1px solid var(--rule); }
.link-list li:first-child { border-top: 0; }
.link-list .label { font-size: 1.15rem; }
.link-list .label a { color: var(--ink); }
.link-list .label a:hover { color: var(--accent); text-decoration: none; }
.link-list .arrow { color: var(--accent); }
.link-list .note { color: var(--ink-soft); font-size: 0.92rem; margin: 0.15rem 0 0; }

/* ============================================================
   BLOG POST PAGE (see posts/_template.html)
   ============================================================ */
.post-head { margin-bottom: 2.5rem; }
.post-head .meta { display: block; margin-top: 0.6rem; }

.prose { }
.prose p { margin: 0 0 1.3rem; }
.prose h2 { margin: 2.4rem 0 0.8rem; font-size: 1.4rem; }
.prose h3 { margin: 2rem 0 0.6rem; }
.prose blockquote {
  margin: 1.8rem 0; padding: 0.2rem 0 0.2rem 1.3rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft); font-style: italic;
}
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.3rem; }
.prose li { margin: 0.35rem 0; }
.prose img { max-width: 100%; border-radius: 8px; }
.prose code {
  font-family: var(--mono); font-size: 0.85em;
  background: #efe9dd; padding: 0.1em 0.35em; border-radius: 4px;
}
.back-link { font-family: var(--mono); font-size: 0.8rem; }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.site-foot a { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 560px) {
  body { font-size: 18px; }
  .wrap { padding: 2.5rem 1.2rem 4rem; }
  .media-grid { grid-template-columns: 1fr; }
}
