/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* Navigation */
nav {
  border-bottom: 1px solid #e1e4e8;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

nav a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  color: #0969da;
}

nav a.active {
  color: #0969da;
  font-weight: 600;
  border-bottom: 2px solid #0969da;
  padding-bottom: 0.25rem;
}

/* Main Content Area */
main {
  max-width: min(1400px, 90vw);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* Article Typography */
article h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: #f6f8fa;
  border-radius: 16px;
  border: 1px solid #d0d7de;
  color: #57606a;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.75rem;
}

article h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
  color: #1a1a1a;
  border-bottom: 1px solid #e1e4e8;
  padding-bottom: 0.3rem;
}

article h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.8rem;
  font-weight: 600;
  color: #1a1a1a;
}

article p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

article ul,
article ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

article li {
  margin-bottom: 0.5rem;
}

/* Article Media */
article img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  border: 1px solid #e1e4e8;
}

/* Code Blocks */
article pre {
  background: #f6f8fa;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid #e1e4e8;
}

article code {
  background: #f6f8fa;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

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

/* Blockquotes */
article blockquote {
  border-left: 4px solid #d0d7de;
  padding-left: 1rem;
  color: #57606a;
  margin: 1rem 0;
}

/* Links */
article a {
  color: #0969da;
  text-decoration: none;
}

article a:hover {
  text-decoration: underline;
}

/* Tables */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

article table th,
article table td {
  padding: 0.5rem;
  text-align: left;
  border: 1px solid #d0d7de;
}

article table th {
  background: #f6f8fa;
  font-weight: 600;
  color: #1a1a1a;
}

article table tr:hover {
  background: #f6f8fa;
}

/* Footer */
footer {
  border-top: 1px solid #e1e4e8;
  padding: 2rem 1rem;
  text-align: center;
  color: #57606a;
  margin-top: 4rem;
}

footer a {
  color: #57606a;
  margin: 0 1rem;
  text-decoration: none;
}

footer a:hover {
  color: #0969da;
}
