:root {
  color-scheme: light;
  --fg: #1a1a1a;
  --bg: #ffffff;
  --muted: #6b6b6b;
  --accent: #cc0000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header,
main,
footer {
  width: 100%;
  max-width: 58rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem;
}

main { flex: 1 0 auto; }

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.site-id { max-width: 100%; }

.site-title {
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
}

.site-subtitle {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a {
  margin-left: 1rem;
  color: var(--accent);
  text-decoration: none;
}

nav a:first-child { margin-left: 0; }

.lang-switch {
  flex-basis: 100%;
  font-size: 0.85rem;
}

.lang-switch a,
.lang-switch .lang-current {
  margin-left: 1rem;
}

.lang-switch a:first-child,
.lang-switch .lang-current:first-child { margin-left: 0; }

.lang-switch .lang-current {
  color: var(--muted);
  font-weight: 700;
}

a { color: var(--accent); }

h1, h2 { line-height: 1.25; }

.intro { margin-bottom: 2.5rem; }

.sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 40rem) {
  .sections {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.section-block { min-width: 0; }

.section-block h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.3rem 0;
}

.post-list li a {
  min-width: 0;
  overflow-wrap: break-word;
}

.post-list time {
  flex: none;
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  line-height: inherit;
  padding-top: 0.15rem;
}

article { max-width: 42rem; }

article img,
main img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
}

.home-image {
  margin-top: 2.5rem;
}

article time {
  display: block;
  margin: 0.25rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  flex-shrink: 0;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

footer .kaos {
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  color: var(--fg);
  letter-spacing: -0.01em;
  -webkit-text-stroke: 0.4px var(--fg);
}

footer .rss-badge {
  background: red;
  color: #fff;
  padding: 0.05rem 0.35rem;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 700;
}
