:root {
  --ui-surface: #1f2023;
  --ui-surface-soft: #25272b;
  --ui-shell-bg: #1f2023;
  --ui-ink: #f8f8ff;
  --ui-ink-muted: rgba(248, 248, 255, 0.72);
  --ui-line: rgba(248, 248, 255, 0.14);
  --ui-content-max: 760px;
  --ui-gutter: 16px;
  --ui-footer-pad-top: 18px;
  --ui-footer-pad-bottom: 20px;
  --ui-card-radius: 12px;
  --ui-card-bg: #23252a;
  --ui-card-line: rgba(248, 248, 255, 0.1);
  --ui-link-blue: #80aadd;
}

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

.headerWrapper {
  overflow: visible;
  background: var(--ui-shell-bg);
  border-bottom: 1px solid var(--ui-line);
  position: relative;
  z-index: 20;
}

.header {
  width: min(calc(var(--ui-content-max) + (var(--ui-gutter) * 2)), 100%);
  min-height: 64px;
  padding: 0 var(--ui-gutter);
  box-sizing: border-box;
  position: relative;
}

.header > div:first-child {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.terminal,
.terminal:hover {
  color: var(--ui-ink);
  letter-spacing: 0.02em;
}

.terminal {
  display: inline-block;
  max-width: 100%;
  line-height: 1.2;
}

.headerLinks ul {
  display: flex;
  align-items: center;
  gap: 14px;
}

.headerLinks ul li {
  margin: 0;
}

.headerLinks ul li a {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ui-ink-muted);
  background: none;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.headerLinks ul li a:hover,
.headerLinks ul li a:focus-visible {
  color: var(--ui-ink);
  border-color: transparent;
  background: none;
  outline: none;
}

.hamb {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--ui-line);
  border-radius: 6px;
  background: rgba(248, 248, 255, 0.03);
}

.hamb-line,
.hamb-line::before,
.hamb-line::after {
  background: rgba(248, 248, 255, 0.92);
}

.hamb-line {
  width: 18px;
  height: 2px;
  border-radius: 1px;
}

.hamb-line::before {
  top: 6px;
}

.hamb-line::after {
  top: -6px;
}

.footer {
  margin-top: 2px;
  padding: var(--ui-footer-pad-top) var(--ui-gutter) var(--ui-footer-pad-bottom);
  border-top: 1px solid rgba(248, 248, 255, 0.1);
  background: var(--ui-shell-bg);
  color: var(--ui-ink-muted);
  font-size: 0.9rem;
}

.footer span {
  display: inline-block;
  max-width: min(var(--ui-content-max), 100%);
  line-height: 1.65;
}

.footerLink {
  color: var(--ui-ink);
  text-decoration-color: rgba(248, 248, 255, 0.4);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s ease;
}

.footerLink:hover,
.footerLink:focus-visible {
  text-decoration-color: rgba(248, 248, 255, 0.9);
  outline: none;
}

.content.vertical {
  padding: 28px var(--ui-gutter) 14px;
  box-sizing: border-box;
}

.indexWrapper {
  width: 100%;
  max-width: var(--ui-content-max);
  margin: 0 auto;
  padding: clamp(20px, 6vh, 56px) var(--ui-gutter) clamp(24px, 8vh, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.indexHeader {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.socialNavbar {
  margin-top: 4px;
}

.socialNavbar ul {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.socialNavbar ul li {
  display: inline-flex;
}

.socialNavbar a {
  margin: 0;
  padding: 3px 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  display: inline-block;
  color: var(--ui-ink-muted);
  text-shadow: none;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.socialNavbar a:hover,
.socialNavbar a:focus-visible {
  color: var(--ui-ink);
  border-color: rgba(248, 248, 255, 0.5);
  outline: none;
}

.listPage {
  width: 100%;
  max-width: var(--ui-content-max);
  margin: 0 auto;
  padding: 20px var(--ui-gutter) 24px;
  text-align: left;
}

.listHeader {
  margin-bottom: 10px;
}

.listHeader h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 2.4rem);
  line-height: 1.15;
}

.listContent {
  margin-bottom: 14px;
  color: var(--ui-ink-muted);
  line-height: 1.65;
}

.listFeed {
  display: grid;
  gap: 8px;
}

.postListLink {
  display: block;
}

.postListLink,
.postListLink:hover,
.postListLink:focus-visible,
.postListLink:hover * {
  text-decoration: none;
}

.postListItem {
  padding: 16px;
  border: 1px solid var(--ui-card-line);
  border-radius: var(--ui-card-radius);
  background: var(--ui-card-bg);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.postListLink:hover .postListItem,
.postListLink:focus-visible .postListItem {
  border-color: rgba(248, 248, 255, 0.18);
  background: #24262b;
}

.postHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  overflow: visible;
}

.postTitle,
.postDate {
  float: none;
}

.postTitle {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
  text-transform: none;
}

.postDate {
  margin-top: 1px;
  font-size: 0.82rem;
  line-height: 1.25;
  color: var(--ui-ink-muted);
  white-space: nowrap;
}

.postExcerpt {
  margin-top: 9px;
  text-align: left;
  color: var(--ui-ink-muted);
}

.postExcerpt p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.postExcerpt p + p {
  margin-top: 8px;
}

.postExcerpt a {
  color: var(--ui-link-blue);
}

.pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pagination a {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ui-link-blue);
  background: none;
  text-decoration: none;
}

.pagination a:hover,
.pagination a:focus-visible {
  color: var(--ui-ink);
  outline: none;
}

.postWrapper {
  width: 100%;
  max-width: var(--ui-content-max);
  margin: 0 auto;
  padding: 20px var(--ui-gutter) 24px;
  text-align: left;
}

.postPageTitle {
  margin: 0;
  font-size: clamp(2rem, 4.1vw, 2.5rem);
  line-height: 1.14;
}

.postDescription {
  margin: 8px 0 0;
  color: var(--ui-ink-muted);
  line-height: 1.7;
}

.post-feature-image {
  margin-top: 14px;
  border: 1px solid var(--ui-card-line);
  border-radius: var(--ui-card-radius);
  overflow: hidden;
  background: #1e2024;
}

.post-feature-image img {
  display: block;
  width: 100%;
  height: auto;
}

.postMetadata {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--ui-card-line);
  border-radius: 10px;
  background: transparent;
  font-size: 0.84rem;
  color: var(--ui-ink-muted);
}

.postMetadata dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 12px;
  row-gap: 6px;
}

.postMetadata dt {
  color: var(--ui-ink-muted);
  text-transform: lowercase;
  letter-spacing: 0.01em;
}

.postMetadata dd {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.postMetadata dd span {
  display: none;
}

.postMetadata a {
  color: var(--ui-link-blue);
  text-decoration: none;
}

.postMetadata a:hover,
.postMetadata a:focus-visible {
  color: var(--ui-link-blue);
  text-decoration: none;
  outline: none;
}

.postBody {
  color: var(--ui-ink);
  line-height: 1.8;
  font-size: 1rem;
}

.postBody > *:first-child {
  margin-top: 0;
}

.postBody p {
  margin: 0 0 1em;
}

.postBody h2,
.postBody h3,
.postBody h4 {
  margin-top: 1.35em;
  margin-bottom: 0.45em;
  line-height: 1.2;
}

.postBody ul,
.postBody ol {
  margin: 0 0 1em;
  padding-left: 1.25rem;
}

.postBody blockquote {
  margin: 1.1em 0;
  padding: 0.15em 0 0.15em 0.9em;
  border-left: 2px solid var(--ui-line);
  color: var(--ui-ink-muted);
}

.postBody a {
  color: var(--ui-link-blue);
  text-decoration-color: rgba(128, 170, 221, 0.55);
  text-underline-offset: 0.2em;
}

@media (max-width: 768px) {
  .content.vertical {
    padding-top: 20px;
  }

  .indexWrapper {
    padding: 24px var(--ui-gutter) 40px;
    gap: 12px;
  }

  .header {
    width: 100%;
    min-height: 60px;
    padding: 0 var(--ui-gutter);
  }

  .terminal {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .headerLinks {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--ui-gutter);
    right: var(--ui-gutter);
    width: auto;
    max-width: calc(100vw - (var(--ui-gutter) * 2));
    background: var(--ui-surface-soft);
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 24;
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }

  .side-menu:checked ~ .headerLinks {
    max-height: min(70vh, 420px);
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .headerLinks ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px;
  }

  .headerLinks ul li a {
    display: block;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
    border-radius: 0;
  }

  .hamb {
    display: inline-flex;
  }

  .socialNavbar ul {
    gap: 10px 14px;
  }

  .socialNavbar a {
    font-size: 0.9rem;
    padding: 4px 0;
  }

  .listPage {
    padding: 18px var(--ui-gutter) 20px;
  }

  .listFeed {
    gap: 8px;
  }

  .postListItem {
    padding: 14px;
    border-radius: 12px;
  }

  .postHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .postTitle {
    font-size: 1.02rem;
  }

  .postDate {
    white-space: normal;
  }

  .postExcerpt {
    margin-top: 10px;
  }

  .postExcerpt p {
    -webkit-line-clamp: 3;
  }

  .postWrapper {
    padding: 16px var(--ui-gutter) 18px;
  }

  .postPageTitle {
    font-size: clamp(1.72rem, 6.2vw, 2.1rem);
  }

  .postMetadata {
    padding: 10px;
  }

  .postMetadata dl {
    grid-template-columns: 1fr;
    row-gap: 2px;
  }

  .postMetadata dt,
  .postMetadata dd {
    grid-column: 1;
  }

  .postMetadata dd {
    margin-bottom: 6px;
  }

  .postBody {
    line-height: 1.75;
  }

}

@media (max-width: 420px) {
  :root {
    --ui-gutter: 12px;
  }

  .header {
    min-height: 56px;
  }

  .hamb {
    width: 34px;
    height: 34px;
    border-radius: 5px;
  }

  .terminal {
    max-width: 100%;
  }

  .indexHeader {
    font-size: clamp(1.9rem, 9vw, 2.4rem);
    overflow-wrap: anywhere;
    text-align: center;
  }

  .socialNavbar ul {
    gap: 8px 12px;
  }

  .postListItem {
    border-radius: 9px;
  }

  .postMetadata {
    border-radius: 9px;
  }

  .post-feature-image {
    border-radius: 9px;
  }
}
