:root {
  --bg: #ffffff;
  --text: #242424;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --max-layout: 70rem;
  --max-reading: 44rem;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Charter", "Iowan Old Style", "Noto Serif TC", "PingFang TC", serif;
  font-size: 1.125rem;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: #a9a9a9;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: #fff;
  border: 1px solid #333;
  padding: 0.4rem 0.6rem;
}

.site-header,
main,
.site-footer {
  width: min(100% - 2rem, var(--max-layout));
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.home-link {
  color: #111;
  text-decoration: none;
  font-family: "Helvetica Neue", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-nav a {
  color: #555;
  text-decoration: none;
  font-family: "Helvetica Neue", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 0.94rem;
  margin-left: 0.8rem;
}

main {
  padding: 2rem 0;
}

.home-intro {
  max-width: var(--max-reading);
  margin: 0 auto 1.5rem;
}

.home-intro h1 {
  font-family: "Helvetica Neue", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

.home-intro p {
  margin: 0;
  color: var(--muted);
}

.post-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--max-reading);
}

.post-list li {
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.1rem;
}

.post-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.post-link {
  color: #191919;
  text-decoration: none;
  font-family: "Helvetica Neue", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 600;
}

.post-link:hover {
  color: #191919;
}

.post-list-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-family: "Helvetica Neue", "Noto Sans TC", "PingFang TC", sans-serif;
}

.post-list-meta span::before {
  content: "·";
  margin-inline: 0.35rem;
}

.post {
  max-width: var(--max-reading);
  margin: 0 auto;
}

.post-header h1 {
  margin: 0 0 0.8rem;
  color: #111;
  font-family: "Helvetica Neue", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.post .meta {
  margin: 0 0 1.8rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.92rem;
  font-family: "Helvetica Neue", "Noto Sans TC", "PingFang TC", sans-serif;
}

.post .meta span::before,
.post .meta a::before {
  content: "·";
  margin-inline: 0.15rem 0.55rem;
  color: #b9b9b9;
}

.post .meta a {
  color: inherit;
}

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

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: "Helvetica Neue", "Noto Sans TC", "PingFang TC", sans-serif;
  color: #111;
  line-height: 1.3;
  margin-top: 2.1em;
  margin-bottom: 0.55em;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote {
  margin: 0 0 1.15em;
}

.post-content blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid #d3d3d3;
  color: #4a4a4a;
}

.post-content img,
.post-content iframe,
.post-content video {
  display: block;
  max-width: 100%;
  height: auto;
}

.post-content iframe[src*="youtube.com"],
.post-content iframe[src*="youtu.be"] {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.post-content figure {
  margin: 1.75rem 0;
}

.post-content figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0 2rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-family: "Helvetica Neue", "Noto Sans TC", "PingFang TC", sans-serif;
}

@media (max-width: 42rem) {
  body {
    font-size: 1.04rem;
    line-height: 1.72;
  }

  .site-header {
    padding: 0.8rem 0;
  }

  .home-intro h1 {
    font-size: 1.65rem;
  }
}
