@font-face {
  font-family: 'Acumin Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Acumin-RPro.woff') format('woff');
}

@font-face {
  font-family: 'Acumin Pro';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Acumin-ItPro.woff') format('woff');
}

@font-face {
  font-family: 'Acumin Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Acumin-BdPro.woff') format('woff');
}

@font-face {
  font-family: 'Acumin Pro';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Acumin-BdItPro.woff') format('woff');
}

:root {
  --black: #1a1a1a;
  --gray: #707070;
  --bg: #fff;
  --text-link: #1a1a1a;
  --text-title: #1a1a1a;
  --table-color: hsla(0, 0%, 0%, 0.12);
  --hairline-strong: hsla(0, 0%, 0%, 0.22);
  --pill-selected-bg: hsla(0, 0%, 0%, 0.06);
  --pill-selected-border: hsla(0, 0%, 0%, 0.42);
  --code-bg: #011627;
  --inline-code-bg: rgba(255, 229, 100, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  padding: 0;
  width: 100%;
}

html {
  font-size: 70%;
}

body {
  background: var(--bg);
  color: var(--black);
  font-family: 'Acumin Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0;
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
}

body,
button,
input,
textarea {
  font-size: 1.4rem;
}

a {
  border-bottom: 0.5px solid var(--black);
  color: var(--text-link);
  padding-bottom: 1px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

a:hover {
  color: var(--gray);
  border-bottom-color: var(--gray);
}

a:focus-visible {
  outline: 2px solid rgba(26, 26, 26, 0.28);
  outline-offset: 3px;
}

p,
li {
  line-height: 2.3rem;
}

p {
  margin: 0 0 1.6rem;
}

ul,
ol {
  margin-bottom: 1.6rem;
  padding-left: 1.7rem;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--text-title);
  font-family: 'Acumin Pro', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  font-size: 2rem;
  line-height: 2.8rem;
}

h2 {
  font-size: 1.8rem;
  line-height: 2.5rem;
}

h3 {
  font-size: 1.6rem;
}

small {
  color: var(--gray);
  display: block;
  font-size: 1.2rem;
  line-height: 1.8rem;
}

img {
  height: auto;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

td,
th {
  border-bottom: 1px solid var(--table-color);
  padding: 0.6rem 0.8rem;
  text-align: left;
}

.site-shell {
  margin: 0 auto;
  max-width: 100rem;
  padding: 5rem 3rem 7rem;
}

.site-header {
  max-width: 95rem;
}

.site-title {
  line-height: 2.625rem;
  margin: 0;
}

.site-title a {
  border-bottom: none;
  color: inherit;
  font-size: inherit;
  padding-bottom: 0;
}

.site-body {
  display: grid;
  gap: 3rem;
  grid-template-columns: 3fr minmax(0, 7fr) 2fr;
  margin-top: 8rem;
}

.tabs {
  align-items: flex-start;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: -0.2rem;
  position: sticky;
  top: 4rem;
}

.tab-link {
  border-bottom: none;
  color: var(--gray);
  display: inline-block;
  font-size: 1.4rem;
  line-height: 1.9rem;
  padding-bottom: 0;
  text-transform: capitalize;
  transition: color 0.2s;
}

.tab-link:hover,
.tab-link.active {
  border-bottom: none;
  color: var(--text-link);
}

.tab-link.active {
  font-weight: 700;
}

.content-column {
  max-width: 59rem;
  min-width: 0;
}

.right-rail {
  min-width: 0;
}

.site-footer {
  color: var(--gray);
  margin-top: 5rem;
}

.site-footer a {
  border-bottom: none;
  color: var(--gray);
  font-size: 1.2rem;
}

[hidden] {
  display: none !important;
}

.about-page {
  margin-bottom: 5rem;
}

.about-page > :first-child {
  margin-top: 0;
}

.about-contact {
  color: var(--gray);
  margin-top: 2.5rem;
}

.about-contact a {
  color: var(--text-link);
}

.tab-group {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
}

/* The rail is the parent-child cue: one hairline spanning the nested tag filters. */
.tab-nested {
  display: flex;
  flex-direction: column;
  margin-top: 0.9rem;
  padding-left: 1.3rem;
  position: relative;
}

.tab-nested::before {
  background: var(--hairline-strong);
  bottom: 0;
  content: '';
  left: 0.3rem;
  position: absolute;
  top: 0;
  width: 1.5px;
}

/* Rows sit flush (padding, not gap) so adjacent lit segments join into one line. */
.tag-filter {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.3rem;
  line-height: 1.9rem;
  padding: 0.35rem 0;
  position: relative;
  text-align: left;
  transition: color 0.2s ease;
}

/* Each selected filter lights its own slice of the rail. */
.tag-filter::before {
  background: var(--black);
  bottom: 0;
  content: '';
  left: -1rem;
  opacity: 0;
  position: absolute;
  top: 0;
  transition: opacity 0.18s ease;
  width: 1.5px;
}

.tag-filter[aria-pressed='true'] {
  color: var(--text-link);
}

.tag-filter[aria-pressed='true']::before {
  opacity: 1;
}

.tag-filter:hover {
  color: var(--text-link);
}

.tag-filter:focus-visible {
  outline: 2px solid rgba(26, 26, 26, 0.28);
  outline-offset: 3px;
}

.post-tag {
  margin: 0.8rem 0 0;
}

.post-tag a {
  border-bottom: none;
  color: var(--gray);
  font-size: 1.3rem;
}

.post-link {
  border-bottom: none;
  color: inherit;
  display: block;
  margin-bottom: 2.3rem;
  padding-bottom: 0;
}

.post-link h2 {
  color: var(--text-title);
  margin: 0 0 0.5rem;
  transition: color 0.2s;
}

.post-link:hover h2,
.post-link:focus-visible h2 {
  color: var(--gray);
}

.post-link p {
  color: var(--black);
  margin-top: 0.7rem;
}

.post-link.has-preview {
  margin-bottom: 3.2rem;
}

.post-preview {
  aspect-ratio: 3 / 2;
  border-radius: 4px;
  display: block;
  margin-top: 1.2rem;
  object-fit: cover;
  width: 100%;
}

.empty-state {
  color: var(--gray);
}

.post-header h1 {
  line-height: 2.8rem;
  margin: 0 0 1.2rem;
}

.post-header {
  margin-bottom: 2.6rem;
}

.post-content > :first-child {
  margin-top: 0;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  margin: 3rem 0 1.2rem;
}

.post-content img {
  display: block;
  margin: 2.5rem 0 1rem;
}

.post-content a img {
  border-bottom: none;
}

.post-content blockquote {
  border-left: 0.32rem solid var(--black);
  color: var(--gray);
  margin: 2rem 0;
  padding-left: 1.4rem;
}

.post-content code {
  background: var(--inline-code-bg);
  border-radius: 0.3rem;
  font-family: Consolas, Menlo, Monaco, 'Courier New', monospace;
  font-size: 1.3rem;
  padding: 0.15em 0.25em 0.05em;
}

.post-content pre {
  background: var(--code-bg);
  border-radius: 8px;
  color: #fff;
  margin: 1.75rem -2rem;
  overflow-x: auto;
  padding: 1.3125rem;
}

.post-content pre code {
  background: transparent;
  border-radius: 0;
  color: inherit;
  display: block;
  line-height: 1.5;
  padding: 0;
  white-space: pre;
}

@media (max-width: 900px) {
  .site-shell {
    max-width: 68rem;
    padding: 3.6rem 2.2rem 5rem;
  }

  .site-body {
    display: block;
    margin-top: 3.8rem;
  }

  .tabs {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    margin: -1rem 0 4.5rem;
    padding: 1rem 0 0.2rem;
    position: static;
  }

  /* Flatten the group so the pills wrap onto their own full-width row, flush with
     the page rather than indented under Writings. */
  .tab-group {
    display: contents;
  }

  /* Sideways the rail would read as a divider between tags rather than as
     nesting, so the row drops it and uses pills instead. */
  .tab-nested {
    column-gap: 0.8rem;
    flex-basis: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: -0.8rem;
    padding-left: 0;
    row-gap: 0.8rem;
  }

  .tab-nested::before,
  .tag-filter::before {
    display: none;
  }

  .tag-filter {
    border: 0.5px solid var(--hairline-strong);
    border-radius: 999px;
    line-height: 1.7rem;
    padding: 0.5rem 1.15rem;
  }

  /* Tonal fill rather than a solid black slug — the darker rim and text carry the
     state without the pill shouting over the post list. */
  .tag-filter[aria-pressed='true'] {
    background: var(--pill-selected-bg);
    border-color: var(--pill-selected-border);
    color: var(--black);
  }

  .content-column {
    max-width: none;
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 560px) {
  html {
    font-size: 68%;
  }

  .site-shell {
    padding: 2.6rem 1.6rem 4rem;
  }

  .post-content pre {
    border-radius: 0;
    margin-left: -1.6rem;
    margin-right: -1.6rem;
  }
}
