:root {
  --page-bg: #dcecf8;
  --paper: #f2f2f2;
  --paper-muted: #f2f2f2;
  --paper-selected: #deded9;
  --tab-active: #f2f2f2;
  --tab-mid: #c9d0d4;
  --tab-dark: #8c9aa4;
  --ink: #171715;
  --ink-muted: #5f5f59;
  --ink-faint: #8a8a82;
  --line: rgba(23, 23, 21, 0.72);
  --line-soft: rgba(23, 23, 21, 0.12);
  --mono: Arial, "PingFang SC", sans-serif;
  --sans: Arial, "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 12px 24px 24px;
  color: var(--ink);
  background: var(--page-bg);
  font-family: var(--sans);
}

button {
  font: inherit;
  color: inherit;
}

.blog-shell {
  width: min(1220px, 100%);
  height: min(740px, calc(100vh - 80px));
  min-height: 620px;
  margin: 0 auto;
  filter: drop-shadow(0 14px 18px rgba(76, 102, 122, 0.1));
}

.site-logo {
  display: block;
  width: min(170px, 20vw);
  height: auto;
  margin: 0 0 24px;
}

.year-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  height: 38px;
  padding-left: 18px;
  position: relative;
  z-index: 1;
}

.year-tab {
  position: relative;
  min-width: 118px;
  height: 36px;
  padding: 0 30px 2px;
  border: 0;
  background: var(--tab-mid);
  clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 100%, 0 100%);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  transform: translateY(0);
  transition:
    background 120ms ease,
    color 120ms ease;
}

.year-tab + .year-tab {
  margin-left: -22px;
}

.year-tab:nth-child(1) {
  background: #ffffff;
  z-index: 4;
}

.year-tab:nth-child(2) {
  background: #cfd7dd;
  z-index: 3;
}

.year-tab:nth-child(3) {
  background: #aab7c0;
  z-index: 2;
}

.year-tab:nth-child(4) {
  background: var(--tab-dark);
  z-index: 1;
}

.year-tab:hover,
.year-tab.is-active {
  background: var(--tab-active);
  z-index: 5;
}

.blog-frame {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: calc(100% - 54px - 38px);
  margin-top: -2px;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  position: relative;
  z-index: 2;
  border: 0;
  border-radius: 0 9px 9px 9px;
  background: var(--paper);
  box-shadow: 0 18px 28px rgba(98, 126, 146, 0.16);
}

.blog-list-panel {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 22px 21px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-header h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.blog-list {
  overflow: auto;
}

.blog-list-button {
  display: block;
  width: 100%;
  min-height: 78px;
  padding: 18px 21px 15px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.blog-list-button:hover,
.blog-list-button.is-active {
  background: var(--paper-selected);
  box-shadow: inset 3px 0 0 var(--ink);
}

.blog-list-date {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-list-title {
  display: block;
  white-space: pre-line;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: 0;
}

.blog-reader {
  overflow: auto;
  padding: 30px 56px 72px;
  background: var(--paper);
}

.reader-header {
  max-width: 860px;
  padding-bottom: 21px;
  border-bottom: 0;
}

.eyebrow {
  display: none;
}

.reader-header h2 {
  max-width: 860px;
  margin: 0;
  white-space: pre-line;
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0;
  word-spacing: 0.02em;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 9px;
  margin-top: 14px;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reader-meta time {
  display: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink-muted);
  background: transparent;
  font-family: var(--sans);
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.blog-content {
  max-width: 860px;
  padding-top: 30px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0;
}

.blog-content p,
.blog-content ul,
.blog-content ol,
.blog-content blockquote {
  margin: 0 0 1.4em;
}

.blog-content h3 {
  margin: 2.35em 0 0.28em;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0;
}

.blog-content ul,
.blog-content ol {
  padding-left: 1.2em;
}

.blog-content li + li {
  margin-top: 0.48em;
}

.blog-content blockquote {
  padding: 0;
  border-left: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.empty-state {
  padding: 22px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 820px) {
  body {
    display: block;
    padding: 10px;
  }

  .blog-shell {
    width: 100%;
    height: auto;
    min-height: auto;
    margin: 0 auto;
    padding: 0;
  }

  .site-logo {
    width: min(150px, 44vw);
    margin-bottom: 22px;
  }

  .year-tabs {
    overflow-x: auto;
    padding-left: 0;
  }

  .year-tab {
    min-width: 96px;
    padding: 0 22px 2px;
  }

  .blog-frame {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 58px);
    max-height: none;
  }

  .blog-list-panel {
    max-height: 280px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .panel-header {
    min-height: 52px;
    padding: 18px 20px;
  }

  .blog-list-button {
    min-height: 64px;
    padding: 15px 20px;
  }

  .blog-reader {
    padding: 28px 24px 54px;
  }

  .reader-header h2 {
    max-width: 100%;
    font-size: 27px;
  }
}
