:root {
  color-scheme: dark;
  --background: #0d1411;
  --glass: rgb(18 31 25 / .79);
  --raised: #1e352a;
  --edge: rgb(143 190 168 / .26);
  --accent: #a3d5ba;
  --text: #edf3f0;
  --muted: #adc4b9;
  --shadow: 0 18px 42px -26px #000c, inset 0 1px 0 #fff1;
  --reading-small: 1rem;
  --reading-base: 1.12rem;
  --reading-large: 1.25rem;
  --system-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(ellipse at 7% 16%, #1e3a2d 0%, transparent 36rem),
    radial-gradient(ellipse at 92% 80%, #152b24 0%, transparent 40rem), var(--background);
  font: 1rem/1.65 var(--system-font);
}

[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--background); }
a { color: var(--accent); text-underline-offset: .19em; }
a:hover { color: var(--text); }
button, input { font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { opacity: .57; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
h1, h2, h3, a { overflow-wrap: anywhere; }
img { display: block; max-width: 100%; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: .8rem;
  left: .8rem;
  z-index: 4;
  border-radius: .5rem;
  padding: .7rem 1rem;
  color: var(--background);
  background: var(--accent);
}

.masthead {
  overflow: hidden;
  color: var(--text);
  text-align: center;
  background: radial-gradient(ellipse at 50% 110%, #47745b 0%, transparent 62%),
    linear-gradient(120deg, #203c31, #284c3b 52%, #1b372b);
  border-bottom: 1px solid #bcdfc94d;
  box-shadow: inset 0 1px 0 #fff2, 0 1rem 3rem -2rem #000c;
}
.masthead-inner { width: min(100% - 2rem, 70rem); margin: auto; padding: 1rem 0 3.2rem; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem; margin-bottom: 1.4rem; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: .3rem .85rem;
  border: 1px solid transparent;
  border-radius: 1.4rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current] { background: #0d141159; border-color: #d1ebdb42; }
.masthead h1, .brand-title {
  display: inline-block;
  color: var(--text);
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 740;
  line-height: 1.1;
  letter-spacing: -.055em;
  text-decoration: none;
  text-shadow: 0 4px 24px #0d141159;
}
.brand-title { font-size: clamp(1.65rem, 5vw, 2.75rem); }
.masthead p { margin-top: .8rem; color: #daebe2; font-size: clamp(1rem, 2vw, 1.175rem); }
body:not(.page-home) .masthead-inner { padding-bottom: 1.8rem; }
body:not(.page-home) .site-nav { margin-bottom: .6rem; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13.8rem, 16.4rem);
  align-items: start;
  gap: clamp(1.1rem, 3vw, 2.1rem);
  width: min(100% - 2rem, 70rem);
  margin: clamp(1.6rem, 4vw, 3rem) auto 3.2rem;
}
.layout-single { display: block; }
.glass {
  border: 1px solid var(--edge);
  border-radius: .9rem;
  background: linear-gradient(150deg, #9ddab609, transparent 62%), var(--glass);
  box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(12px)) {
  .glass { backdrop-filter: blur(12px) saturate(132%); }
}

.list-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin-bottom: 1rem; }
.list-heading h1, .list-heading h2, .archive > h1, .not-found h1 { font-size: clamp(1.55rem, 4vw, 2.05rem); letter-spacing: -.035em; }
.results-count { color: var(--muted); font-size: .925rem; }
.filters { display: flex; align-items: flex-end; gap: .75rem; margin-bottom: 1.2rem; }
.search-label { display: grid; gap: .32rem; flex: 1 1 auto; min-width: 0; color: var(--muted); font-size: .9rem; }
input[type='search'], input[type='url'] {
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  padding: .5rem .78rem;
  border: 1px solid var(--edge);
  border-radius: .57rem;
  background: #12221b;
  color: var(--text);
  font-size: 1rem;
}
input::placeholder { color: #a1b9ad; }
.text-button, .read-link, .back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .42rem .82rem;
  border: 1px solid var(--edge);
  border-radius: .55rem;
  color: var(--accent);
  background: rgb(117 176 143 / .1);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.text-button:hover, .text-button[aria-pressed='true'], .read-link:hover, .back-link:hover { border-color: #a3d5ba9c; background: var(--raised); color: var(--text); }
.post-list > .back-link { margin-bottom: 1rem; }
.cards { display: grid; gap: .9rem; }
.post-card { position: relative; min-width: 0; overflow: hidden; }
.post-card:hover { border-color: #9bd4b37a; }
.post-card-body { position: relative; padding: clamp(1rem, 3vw, 1.65rem); }
.category-label {
  display: inline-flex;
  width: fit-content;
  min-height: 1.8rem;
  align-items: center;
  padding: .16rem .62rem;
  border: 1px solid #90c3a859;
  border-radius: 1rem;
  background: #243e31;
  color: #bee1cc;
  font-size: .83rem;
  font-weight: 660;
  text-decoration: none;
}
.card-title { margin-top: .52rem; font-size: clamp(1.25rem, 3vw, 1.75rem); letter-spacing: -.025em; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin-top: .6rem; color: var(--muted); font-size: .9rem; }
.post-meta > :not(:first-child)::before { margin-right: .75rem; color: #9eb8aa; content: '·'; }
.post-card .summary { margin-top: .8rem; color: #dce9e1; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .9rem; }
.post-card .cover { width: 100%; max-height: 17rem; border-bottom: 1px solid var(--edge); object-fit: cover; }
.empty-message { margin-top: .8rem; padding: 1.25rem; color: var(--muted); }

.sidebar { display: grid; gap: .85rem; }
.sidebar-widget { min-width: 0; padding: 1rem; }
.sidebar-widget h2 { margin-bottom: .65rem; font-size: 1rem; }
.sidebar-widget ul { margin: 0; padding: 0; list-style: none; }
.profile-card { display: grid; justify-items: center; text-align: center; }
.profile-img { width: 5.875rem; height: 5.875rem; border: 3px solid #d0e8dc47; border-radius: 50%; box-shadow: 0 0 0 .3rem #a3d5ba1f; object-fit: cover; }
.profile-name { margin-top: .65rem; color: var(--text); font-size: 1.3rem; font-weight: 700; }
.profile-location { color: var(--muted); font-size: .9rem; }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1rem; margin-top: .6rem; }
.social-links a { display: inline-flex; align-items: center; min-height: 2rem; }
.category-nav ul { display: grid; gap: .15rem; }
.category-nav a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .6rem;
  min-height: 2.25rem;
  padding: .2rem .48rem;
  border-radius: .35rem;
  color: var(--text);
  font-size: .92rem;
  text-decoration: none;
}
.category-nav a:hover, .category-nav a[aria-current] { background: var(--raised); color: var(--accent); }
.category-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.recent li + li { margin-top: .45rem; }
.recent a { font-size: .92rem; }

.article { --font-scale: var(--reading-base); overflow: hidden; }
.article[data-reader-size='0'] { --font-scale: .9375rem; }
.article[data-reader-size='1'] { --font-scale: var(--reading-small); }
.article[data-reader-size='3'] { --font-scale: var(--reading-large); }
.article[data-reader-size='4'] { --font-scale: 1.42rem; }
.article-header, .prose, .article-end { padding-right: clamp(1rem, 4vw, 2.25rem); padding-left: clamp(1rem, 4vw, 2.25rem); }
.article-header { padding-top: clamp(1.25rem, 3vw, 2.45rem); padding-bottom: 1.2rem; }
.article-header h1 { margin-top: .66rem; font-size: clamp(1.7rem, 5vw, 3rem); letter-spacing: -.043em; }
.article-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.font-buttons { display: inline-flex; gap: .2rem; }
.font-buttons .text-button { min-width: 2.75rem; padding-right: .57rem; padding-left: .57rem; }
.share-status { color: var(--accent); }
.share-status:not(:empty), .share-input { display: block; margin-top: .6rem; }
.share-input input { display: block; margin-top: .25rem; }
.article > .cover { width: 100%; max-height: 30rem; object-fit: cover; }
.prose {
  overflow-wrap: anywhere;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  border-top: 1px solid var(--edge);
  color: #ecf3ef;
  font: var(--font-scale)/1.82 var(--system-font);
}
.prose > * { max-width: 70ch; }
.prose > * + * { margin-top: 1em; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin-top: 1.4em; line-height: 1.31; }
.prose > :first-child { margin-top: 0; }
.prose img { height: auto; border-radius: .5rem; }
.prose li + li { margin-top: .3em; }
.prose blockquote { margin-left: 0; padding: .12rem 0 .12rem 1rem; border-left: 3px solid #93c2a8; color: #c5dfd1; }
.prose pre { max-width: 100%; overflow-x: auto; padding: .7rem .9rem; border: 1px solid var(--edge); border-radius: .45rem; background: var(--background); }
.prose code { font-size: .92em; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: .3rem .6rem; border: 1px solid var(--edge); text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--edge); }
.article-end { padding-bottom: 1.4rem; }
.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 3;
  width: 100%;
  height: .22rem;
  appearance: none;
  border: 0;
  color: var(--accent);
  background: transparent;
}
.reading-progress::-webkit-progress-bar { background: transparent; }
.reading-progress::-webkit-progress-value { background: var(--accent); }
.reading-progress::-moz-progress-bar { background: var(--accent); }

.archive > h1 { margin-bottom: 1rem; }
.archive-year { padding: 1rem 1.2rem; }
.archive-year + .archive-year { margin-top: .8rem; }
.archive-year h2 { font-size: 1.25rem; }
.archive-year ul { margin: .5rem 0 0; padding: 0; list-style: none; }
.archive-year li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem 1rem; padding: .6rem 0; }
.archive-year li + li { border-top: 1px solid var(--edge); }
.archive-year li span { display: block; }
.archive-year li span, .archive-year li time { color: var(--muted); font-size: .9rem; }
.not-found { margin: auto; max-width: 33rem; padding: clamp(1rem, 4vw, 2.45rem); }
.not-found > * + * { margin-top: .8rem; }
.site-footer { margin-top: 1rem; border-top: 1px solid var(--edge); color: var(--muted); font-size: .9rem; }
.site-footer > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; width: min(100% - 2rem, 70rem); margin: auto; padding: 1rem 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }

@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .masthead-inner { padding-bottom: 2rem; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 485px) {
  .layout { width: calc(100% - 1rem); }
  .filters { flex-wrap: wrap; }
  .search-label { flex-basis: 100%; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  :root { color-scheme: light; }
  body, .article { color: #000; background: #fff; }
  .layout { display: block; width: 100%; margin: 0; }
  .article { border: 0; box-shadow: none; }
  .article-header, .prose { padding-left: 0; padding-right: 0; }
  .prose, .post-meta, a, .category-label { color: #000; }
  .masthead, .article-actions, .article-end, .reading-progress, .sidebar, .site-footer { display: none !important; }
}
