/* ------------------------------------------------------------------
   Thomas Vadora — personal blog
   Palette: warm black / ivory / amber (used for links only)
   Type: Newsreader for everything read, IBM Plex Mono for dates/labels
------------------------------------------------------------------- */

:root {
  --ink-bg: #141309;
  --ink-text: #f0ede8;
  --ink-muted: #8d8779;
  --ink-faint: #55523f;
  --ink-amber: #e4a11b;
  --ink-rule: #2b2818;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --measure: 39rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--ink-bg);
}

/* Hide scrollbars everywhere; scrolling itself still works. */
html,
body,
.split .col {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.split .col::-webkit-scrollbar {
  display: none;
}

body {
  background: var(--ink-bg);
  color: var(--ink-text);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 7rem 1.5rem 5rem;
}

/* Masthead ------------------------------------------------------- */

.masthead {
  margin-bottom: 4.5rem;
}

.masthead h1 {
  font-size: 2.375rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.masthead .role {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

/* Prose ---------------------------------------------------------- */

.bio p + p {
  margin-top: 1.4em;
}

a {
  color: var(--ink-text);
  text-decoration: underline;
  text-decoration-color: var(--ink-amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 120ms ease;
}

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

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

/* Writing index -------------------------------------------------- */

.writing {
  margin-top: 5.5rem;
}

.writing h2 {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink-rule);
}

.post-index {
  list-style: none;
}

.post-index li {
  display: flex;
  align-items: baseline;
  gap: 1.75rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--ink-rule);
}

.post-index .date {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  flex: 0 0 4.5rem;
}

.post-index a,
.post-index .title {
  font-size: 1.25rem;
  line-height: 1.35;
}

.post-index a {
  text-decoration: none;
}

.post-index a:hover {
  color: var(--ink-amber);
}

.post-index .forthcoming .date {
  color: var(--ink-faint);
}

.post-index .forthcoming .title {
  font-style: italic;
  color: var(--ink-faint);
}

/* Post pages ------------------------------------------------------ */

.post .back {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.post .back:hover {
  color: var(--ink-amber);
}

.post header {
  margin: 3.5rem 0 3rem;
}

.post header .date {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.post h1 {
  margin-top: 0.9rem;
  font-size: 2.125rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.post article p + p {
  margin-top: 1.4em;
}

.post article h2 {
  margin: 2.4em 0 0.8em;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.post article em {
  font-style: italic;
}

.post article blockquote {
  margin: 1.6em 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--ink-amber);
  color: var(--ink-muted);
  font-style: italic;
}

/* Colophon -------------------------------------------------------- */

.colophon {
  margin-top: 6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* Split layout (home, wide screens) -------------------------------
   Bio on the left, writing index scrolling independently on the
   right. Below 900px the columns are unstyled blocks and the page
   stacks exactly as before. */

@media (min-width: 900px) {
  .split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: 96rem;
    height: 100dvh;
    padding: 0;
    overflow: hidden;
  }

  .split .col {
    overflow-y: auto;
    padding: 7rem clamp(2rem, 5vw, 4.5rem) 4rem;
  }

  .split .col-bio {
    border-right: 1px solid var(--ink-rule);
  }

  .split .col-inner {
    max-width: var(--measure);
    margin: 0 auto;
  }

  .split .writing {
    margin-top: 0;
  }

  .split .colophon {
    margin-top: 4rem;
  }
}

/* Responsive ------------------------------------------------------ */

@media (max-width: 480px) {
  .page {
    padding-top: 4.5rem;
  }

  body {
    font-size: 1.0625rem;
  }

  .masthead h1 {
    font-size: 1.875rem;
  }

  .post-index li {
    flex-direction: column;
    gap: 0.3rem;
  }

  .post-index .date {
    flex-basis: auto;
  }
}
