:root {
  --bg: #ffffff;
  --text: #222222;
  --text-muted: #666666;
  --link: #0066cc;
  --link-hover: #004499;
  --border: #e0e0e0;
  --code-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --text-muted: #999999;
    --link: #66b3ff;
    --link-hover: #99ccff;
    --border: #333333;
    --code-bg: #2a2a2a;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--text);
  font-weight: 600;
  border-bottom: 2px solid var(--link);
  padding-bottom: 2px;
}

.radio1-logo {
  max-width: 200px;
  height: auto;
  margin: 1rem 0;
}

.about-avatar {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  margin: 1rem 0;
}

.button {
  display: inline-block;
  background: var(--link);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-weight: 500;
  margin: 1rem 0;
}

.button:hover {
  background: var(--link-hover);
  color: var(--bg);
  text-decoration: none;
}

.button-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: #333;
  border: 1px solid var(--border);
}

.button-logo:hover {
  background: #f5f5f5;
  color: #333;
}

.button-icon {
  height: 24px;
  width: auto;
}

/* Links */
a {
  color: var(--link);
  text-decoration: none;
}

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

/* Main content */
main {
  min-height: 60vh;
}

h1, h2, h3 {
  margin: 1.5rem 0 0.75rem;
  line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

p {
  margin-bottom: 1rem;
}

/* Intro */
.intro {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.intro p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0;
}

/* Latest post */
.latest-post {
  margin-bottom: 2.5rem;
}

.featured {
  padding: 1.5rem;
  background: var(--code-bg);
  border-radius: 8px;
}

.featured h3 {
  margin: 0.5rem 0;
  font-size: 1.4rem;
}

.featured p {
  margin-bottom: 1rem;
}

.read-more {
  font-weight: 500;
}

/* Post list */
.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 2rem;
}

.post-list time {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-list h2 {
  margin: 0.25rem 0;
  font-size: 1.25rem;
}

.post-list p {
  color: var(--text-muted);
  margin: 0;
}

/* Post */
.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  margin: 0 0 0.5rem;
}

.post-header time {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.post-content h2:first-child,
.post-content h3:first-child {
  margin-top: 0;
}

/* Code */
code {
  font-family: "SF Mono", Monaco, "Consolas", monospace;
  font-size: 0.875rem;
  background: var(--code-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background: none;
  padding: 0;
}

/* Lists */
ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

/* Blockquote */
blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}
