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

:root {
  --primary-color: #2563eb;
  --text-color: #1f2937;
  --light-text: #6b7280;
  --border-color: #e5e7eb;
  --bg-color: #ffffff;
  --light-bg: #f9fafb;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  --container-width: 1000px;
  --line-height-normal: 1.7;
  --line-height-heading: 1.3;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: var(--line-height-normal);
  color: var(--text-color);
  background-color: var(--bg-color);
  padding-top: 70px;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--line-height-heading);
  margin: 1.5em 0 0.8em 0;
  font-weight: 700;
  color: var(--text-color);
}

h1 {
  font-size: 2.2rem;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.8rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.3em;
}

h3 {
  font-size: 1.4rem;
}

p {
  margin-bottom: 1em;
}

ul, ol {
  margin: 0 0 1em 2em;
}

li {
  margin-bottom: 0.5em;
}

blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1em;
  margin: 1em 0;
  color: var(--light-text);
  background-color: var(--light-bg);
  padding: 1em 1.5em;
  border-radius: 4px;
}

pre, code {
  font-family: var(--font-code);
  font-size: 0.9rem;
  border-radius: 4px;
  background-color: var(--light-bg);
}

code {
  padding: 0.2em 0.4em;
}

pre {
  padding: 1em;
  overflow-x: auto;
  margin: 1em 0;
  line-height: 1.5;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  height: 70px;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
}

.site-title:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5em;
}

.site-nav a {
  color: var(--text-color);
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.page-content {
  min-height: calc(100vh - 140px);
  padding: 2em 0;
}

.welcome-section {
  margin-bottom: 3em;
  padding: 2em 0;
  border-bottom: 1px solid var(--border-color);
}

.welcome-section h1 {
  font-size: 2rem;
  margin-bottom: 0.5em;
}

.welcome-section p {
  font-size: 1.1rem;
  color: var(--light-text);
  max-width: 800px;
}

.posts-list {
  list-style: none;
  margin: 0;
}

.post-item {
  margin-bottom: 2.5em;
  padding-bottom: 2.5em;
  border-bottom: 1px solid var(--border-color);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item h3 {
  margin: 0 0 0.5em 0;
  font-size: 1.5rem;
}

.post-item h3 a {
  color: var(--text-color);
}

.post-item h3 a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.post-date {
  color: var(--light-text);
  font-size: 0.9rem;
  display: inline-block;
  margin-right: 1em;
}

.post-tags {
  display: inline-block;
}

.tag {
  display: inline-block;
  background-color: var(--light-bg);
  color: var(--primary-color);
  padding: 0.2em 0.6em;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-right: 0.5em;
  margin-bottom: 0.5em;
}

.tag:hover {
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
}

.post-excerpt {
  margin-top: 0.8em;
  color: var(--light-text);
  line-height: 1.6;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  margin-top: 2em;
  padding-top: 2em;
  border-top: 1px solid var(--border-color);
}

.archive-year {
  margin-bottom: 2.5em;
}

.archive-year h2 {
  margin-bottom: 1em;
  border: none;
  padding: 0;
}

.archive-list {
  list-style: none;
  margin: 0;
}

.archive-list li {
  display: flex;
  align-items: center;
  margin-bottom: 0.8em;
}

.archive-date {
  color: var(--light-text);
  width: 60px;
  flex-shrink: 0;
}

.tag-cloud {
  margin: 2em 0;
  padding: 1.5em;
  background-color: var(--light-bg);
  border-radius: 8px;
}

.tag-section {
  margin-bottom: 3em;
}

.tag-posts {
  list-style: none;
  margin: 0;
}

.tag-posts li {
  margin-bottom: 0.8em;
}

.post-header {
  margin-bottom: 2em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid var(--border-color);
}

.post-title {
  font-size: 2.2rem;
  margin-bottom: 0.5em;
}

.post-meta {
  color: var(--light-text);
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
}

.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 2em 0;
  text-align: center;
  color: var(--light-text);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: 0.5em;
}

@media (max-width: 768px) {
  :root {
    --container-width: 100%;
  }

  body {
    padding-top: 60px;
    font-size: 15px;
  }

  .site-header {
    height: 60px;
  }

  .site-nav {
    gap: 1em;
    font-size: 0.9rem;
  }

  .site-title {
    font-size: 1.2rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .welcome-section h1 {
    font-size: 1.6rem;
  }

  .archive-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}
