/* ----------------------------------------
If Mess Up 
git checkout v1.0-clean
Or to restore just the CSS:
git checkout v1.0-clean -- css/style.css
---------------------------------------- */

/* ----------------------------------------
   Reset
---------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ----------------------------------------
   Base
---------------------------------------- */
:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-accent: #0066cc;
  --color-border: #e0e0e0;
  --font-body:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  --max-width: 680px;
}

html {
  font-size: 18px;
  line-height: 1.7;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  padding: 0 1rem;
}

/* ----------------------------------------
   Layout
---------------------------------------- */
header,
main,
footer {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ----------------------------------------
   Header & Nav
---------------------------------------- */
header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 3rem;
}

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

.site-title {
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--color-text);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav ul a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

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

/* ----------------------------------------
   Post List
---------------------------------------- */
.post-list h1 {
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.post-list ul {
  list-style: none;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  gap: 1rem;
}

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

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

.post-item time {
  font-size: 0.85rem;
  color: var(--color-muted);
  white-space: nowrap;
}

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

.post-header h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

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

.tags {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tag {
  font-size: 0.8rem;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
}

/* ----------------------------------------
   Post Content (Markdown)
---------------------------------------- */
.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-content li {
  margin-bottom: 0.25rem;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #f4f4f4;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.post-content pre {
  background: #f4f4f4;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border-radius: 4px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 1rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

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

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
}

/* ----------------------------------------
   Back link
---------------------------------------- */
.back-link {
  display: inline-block;
  margin-top: 3rem;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--color-text);
}

/* ----------------------------------------
   Footer
---------------------------------------- */
footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ----------------------------------------
   About
---------------------------------------- */
.about h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
