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

body {
  background-color: #0d1117;
  color: #c9d1d9;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background-color: #161b22;
  border-bottom: 1px solid #21262d;
  padding: 2rem 0;
  margin-bottom: 3rem;
}

.site-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.site-title a {
  color: #c9d1d9;
  text-decoration: none;
}

.site-title a:hover {
  color: #58a6ff;
}

.site-description {
  color: #8b949e;
  font-size: 1rem;
  margin-bottom: 1rem;
}

nav {
  margin-top: 1rem;
}

nav a {
  color: #58a6ff;
  text-decoration: none;
  margin-right: 1.5rem;
  font-size: 0.95rem;
}

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

/* Main Content */
main {
  min-height: calc(100vh - 300px);
  padding-bottom: 3rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: #f0f6fc;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; border-bottom: 1px solid #21262d; padding-bottom: 0.3rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: #58a6ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

li {
  margin-bottom: 0.25rem;
}

/* Code and Pre */
code {
  background-color: #161b22;
  color: #f0f6fc;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85em;
}

pre {
  background-color: #161b22;
  border: 1px solid #21262d;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 1rem;
  line-height: 1.45;
}

pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.85rem;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid #21262d;
  padding-left: 1rem;
  color: #8b949e;
  margin-bottom: 1rem;
  font-style: italic;
}

/* Home Page */
.home h2 {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

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

.post-list li {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #21262d;
}

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

.post-meta {
  color: #8b949e;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.post-list h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.post-list h3 a {
  color: #f0f6fc;
}

.post-list h3 a:hover {
  color: #58a6ff;
  text-decoration: none;
}

.post-excerpt {
  color: #8b949e;
  margin-bottom: 0;
}

/* Post Page */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #21262d;
}

.post-title {
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.post-content {
  margin-bottom: 3rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
}

.post-footer {
  padding-top: 2rem;
  border-top: 1px solid #21262d;
}

.post-footer a {
  color: #58a6ff;
}

/* Page Layout */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #21262d;
}

.page-title {
  margin-top: 0;
}

.page-content {
  margin-bottom: 2rem;
}

/* Footer */
footer {
  background-color: #161b22;
  border-top: 1px solid #21262d;
  padding: 2rem 0;
  margin-top: 3rem;
  color: #8b949e;
  font-size: 0.9rem;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1rem;
}

th, td {
  border: 1px solid #21262d;
  padding: 0.5rem;
  text-align: left;
}

th {
  background-color: #161b22;
  font-weight: 600;
}

/* Horizontal Rule */
hr {
  border: 0;
  border-top: 1px solid #21262d;
  margin: 2rem 0;
}

/* Syntax Highlighting (Rouge GitHub Dark theme) */
.highlight .c { color: #8b949e; font-style: italic; } /* Comment */
.highlight .err { color: #f85149; } /* Error */
.highlight .k { color: #ff7b72; } /* Keyword */
.highlight .o { color: #ff7b72; } /* Operator */
.highlight .cm { color: #8b949e; font-style: italic; } /* Comment.Multiline */
.highlight .cp { color: #8b949e; font-weight: bold; } /* Comment.Preproc */
.highlight .c1 { color: #8b949e; font-style: italic; } /* Comment.Single */
.highlight .cs { color: #8b949e; font-weight: bold; font-style: italic; } /* Comment.Special */
.highlight .gd { color: #ffa198; background-color: #490202; } /* Generic.Deleted */
.highlight .ge { font-style: italic; } /* Generic.Emph */
.highlight .gr { color: #f85149; } /* Generic.Error */
.highlight .gh { color: #79c0ff; font-weight: bold; } /* Generic.Heading */
.highlight .gi { color: #56d364; background-color: #0f5323; } /* Generic.Inserted */
.highlight .go { color: #8b949e; } /* Generic.Output */
.highlight .gp { color: #8b949e; } /* Generic.Prompt */
.highlight .gs { font-weight: bold; } /* Generic.Strong */
.highlight .gu { color: #79c0ff; font-weight: bold; } /* Generic.Subheading */
.highlight .gt { color: #f85149; } /* Generic.Traceback */
.highlight .kc { color: #79c0ff; } /* Keyword.Constant */
.highlight .kd { color: #ff7b72; } /* Keyword.Declaration */
.highlight .kn { color: #ff7b72; } /* Keyword.Namespace */
.highlight .kp { color: #79c0ff; } /* Keyword.Pseudo */
.highlight .kr { color: #ff7b72; } /* Keyword.Reserved */
.highlight .kt { color: #ff7b72; } /* Keyword.Type */
.highlight .m { color: #79c0ff; } /* Literal.Number */
.highlight .s { color: #a5d6ff; } /* Literal.String */
.highlight .na { color: #79c0ff; } /* Name.Attribute */
.highlight .nb { color: #d2a8ff; } /* Name.Builtin */
.highlight .nc { color: #f0883e; } /* Name.Class */
.highlight .no { color: #79c0ff; } /* Name.Constant */
.highlight .nd { color: #d2a8ff; } /* Name.Decorator */
.highlight .ni { color: #ffa657; } /* Name.Entity */
.highlight .ne { color: #f0883e; } /* Name.Exception */
.highlight .nf { color: #d2a8ff; } /* Name.Function */
.highlight .nl { color: #79c0ff; } /* Name.Label */
.highlight .nn { color: #ff7b72; } /* Name.Namespace */
.highlight .nt { color: #7ee787; } /* Name.Tag */
.highlight .nv { color: #79c0ff; } /* Name.Variable */
.highlight .ow { color: #ff7b72; } /* Operator.Word */
.highlight .w { color: #c9d1d9; } /* Text.Whitespace */
.highlight .mb { color: #79c0ff; } /* Literal.Number.Bin */
.highlight .mf { color: #79c0ff; } /* Literal.Number.Float */
.highlight .mh { color: #79c0ff; } /* Literal.Number.Hex */
.highlight .mi { color: #79c0ff; } /* Literal.Number.Integer */
.highlight .mo { color: #79c0ff; } /* Literal.Number.Oct */
.highlight .sb { color: #a5d6ff; } /* Literal.String.Backtick */
.highlight .sc { color: #a5d6ff; } /* Literal.String.Char */
.highlight .sd { color: #a5d6ff; } /* Literal.String.Doc */
.highlight .s2 { color: #a5d6ff; } /* Literal.String.Double */
.highlight .se { color: #79c0ff; } /* Literal.String.Escape */
.highlight .sh { color: #a5d6ff; } /* Literal.String.Heredoc */
.highlight .si { color: #a5d6ff; } /* Literal.String.Interpol */
.highlight .sx { color: #a5d6ff; } /* Literal.String.Other */
.highlight .sr { color: #7ee787; } /* Literal.String.Regex */
.highlight .s1 { color: #a5d6ff; } /* Literal.String.Single */
.highlight .ss { color: #a5d6ff; } /* Literal.String.Symbol */
.highlight .bp { color: #79c0ff; } /* Name.Builtin.Pseudo */
.highlight .vc { color: #79c0ff; } /* Name.Variable.Class */
.highlight .vg { color: #79c0ff; } /* Name.Variable.Global */
.highlight .vi { color: #79c0ff; } /* Name.Variable.Instance */
.highlight .il { color: #79c0ff; } /* Literal.Number.Integer.Long */

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  header {
    padding: 1.5rem 0;
  }
  
  .site-title {
    font-size: 1.5rem;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.15rem; }
  
  nav a {
    margin-right: 1rem;
  }
}
