:root{
  --bg:#fff;
  --fg:#111;
  --muted:#586069;
  --accent:#0b5cff;
  --rule:rgba(0,0,0,0.08);
  --mono:ui-monospace,SFMono-Regular,Menlo,Monaco,'Roboto Mono','Courier New',monospace;
  color-scheme:light;
}

[data-theme="light"]{
  --bg:#fff;
  --fg:#111;
  --muted:#586069;
  --accent:#0b5cff;
  --rule:rgba(0,0,0,0.08);
  color-scheme:light;
}

[data-theme="dark"]{
  --bg:#0b0b0c;
  --fg:#e6eef8;
  --muted:#94a3b8;
  --accent:#6ea8ff;
  --rule:rgba(230,238,248,0.12);
  color-scheme:dark;
}

html,body{height:100%}
body{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial;
  background:var(--bg);
  color:var(--fg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.58;
  padding:32px 20px;
  display:flex;
  justify-content:center;
}

a{color:inherit;text-decoration:none}

.wrap{max-width:780px;width:100%}

.site-header{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:16px;
  margin-bottom:34px;
}

.brand{
  display:flex;
  flex-direction:column;
}

.brand-title{
  font-size:22px;
  margin:0;
  font-weight:600;
  letter-spacing:-0.2px;
}

.subtitle{
  color:var(--muted);
  font-size:13px;
}

.nav{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
}

.link{
  font-size:13px;
  color:var(--muted);
}

.link:hover{
  color:var(--fg);
  text-decoration:underline;
}

#theme-toggle{
  font-size:13px;
  padding:6px 12px;
  border:1px solid var(--muted);
  border-radius:6px;
  background:transparent;
  color:var(--muted);
  transition:all 0.2s ease;
}

#theme-toggle:hover{
  background:var(--muted);
  color:var(--bg);
  border-color:var(--fg);
  text-decoration:none;
}

.intro{
  margin-bottom:28px;
}

.intro h1{
  font-size:30px;
  margin:0 0 12px;
  letter-spacing:-0.02em;
}

.intro p{
  margin:0;
  color:var(--muted);
  max-width:38rem;
  font-size:17px;
  line-height:1.7;
}

.posts{
  display:flex;
  flex-direction:column;
}

.post{
  padding:16px 0;
  border-top:1px solid var(--rule);
}

.post:first-child{
  border-top:0;
  padding-top:0;
}

.post-title{
  font-size:20px;
  margin:0;
  font-weight:600;
  letter-spacing:-0.01em;
}

.post-title a:hover{
  color:var(--accent);
}

.meta{
  font-size:12px;
  color:var(--muted);
  margin-top:7px;
  font-family:var(--mono);
}

.excerpt{
  margin:9px 0 0;
  color:var(--muted);
  font-size:16px;
  line-height:1.65;
  max-width:42rem;
}

.post-page{
  border-top:1px solid var(--rule);
  padding-top:20px;
}

.post-page h1{
  font-size:34px;
  margin:0 0 10px;
  letter-spacing:-0.02em;
}

.post-body{
  font-size:18px;
  line-height:1.72;
  max-width:40rem;
}

.post-body p{
  margin:0 0 20px;
}

.backlink{
  margin-top:28px;
  font-size:14px;
}

.backlink a{
  color:var(--muted);
}

.backlink a:hover{
  color:var(--fg);
  text-decoration:underline;
}

footer{
  margin-top:42px;
  color:var(--muted);
  font-size:13px;
}

@media (max-width:520px){
  body{padding:20px}
  .site-header{flex-direction:column;align-items:flex-start;gap:8px}
  .intro h1{font-size:26px}
  .brand-title{font-size:20px}
  .intro p{font-size:16px}
  .post-title{font-size:19px}
  .excerpt{font-size:15px}
  .post-page h1{font-size:28px}
  .post-body{font-size:17px}
}
