
/* Editorial styling for Praveen's website */

:root {
  --paper: #faf9f6;
  --ink: #252a30;
  --muted: #777b80;
  --accent: #365a73;
  --rule: #e5e1d9;

  /* Shared homepage content width */
  --content-width: 760px;
  --content-gutter: 24px;
}

/* Overall reading experience */
html,
body {
  background-color: var(--paper);
  color: var(--ink);
}

body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* Headings and navigation */
h1,
h2,
h3,
h4 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

body > header,
body > footer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body > header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
  margin-bottom: 3rem;
}

/* Links */
a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

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

/* Shared homepage column */
.editorial-intro,
.recent-writing {
  box-sizing: border-box;
  width: calc(100% - 2 * var(--content-gutter));
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

/* Homepage introduction */
.editorial-intro {
  margin-bottom: 4rem;
}

.eyebrow {
  color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.editorial-intro h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.intro-copy {
  max-width: 610px;
  color: #555b61;
  font-size: 1.1rem;
}

/* Recent articles */
.recent-writing {
  margin-bottom: 3rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: 1.5rem;
}

.recent-writing article {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.recent-writing article h1,
.recent-writing article h2 {
  font-size: 1.5rem;
  line-height: 1.35;
}

.recent-writing article h1 a,
.recent-writing article h2 a {
  color: var(--ink);
  text-decoration: none;
}

.recent-writing article h1 a:hover,
.recent-writing article h2 a:hover {
  color: var(--accent);
}

/* Article dates */
.featured-date {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.8rem;
}

/* Code snippets */
pre {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem;
}

/* Mobile layout */
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  body > header {
    margin-bottom: 2rem;
  }

  .editorial-intro {
    margin-bottom: 3rem;
  }

  .section-heading {
    flex-wrap: wrap;
  }
}

