/* nbld.io - Minimalist Design/Build/Make Blog */

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

:root {
  --text: #1a1a1a;
  --text-light: #666;
  --bg: #ffffff;
  --bg-alt: #f9f9f9;
  --border: #e5e5e5;
  --accent: #000;
  --color: #d63384;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s, color 0.2s;
}

a:hover {
  color: var(--color);
  opacity: 1;
}

code {
  background: var(--bg-alt);
  padding: 0.2em 0.4em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 0.9em;
  border-radius: 2px;
}

pre {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.9rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: lowercase;
}

.site-title:hover {
  opacity: 0.7;
}

.site-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.site-nav a {
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
  text-transform: lowercase;
}

.site-nav a:hover {
  border-bottom-color: var(--accent);
  opacity: 1;
}

/* Main Content */
.site-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: calc(100vh - 200px);
}

/* Home Page */
.home-intro {
  margin-bottom: 4rem;
}

.home-intro h1 {
  margin-bottom: 2rem;
}

.bracket {
  color: var(--color);
}

.d-word {
  display: inline-block;
  min-width: 2.5rem;
  color: var(--color);
}

.site-title:hover .d-word {
  color: var(--color);
}

.home-intro > p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.home-intro a {
  display: inline-block;
  margin-top: 1rem;
}

/* Blog Listing */
.blog-list {
  list-style: none;
}

.blog-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

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

.blog-item-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.blog-item-title a {
  text-decoration: none;
}

.blog-item-title a:hover {
  opacity: 0.6;
}

.blog-item-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.blog-item-excerpt {
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.blog-item-excerpt a {
  color: var(--accent);
}

/* Blog Post */
.blog-post {
  max-width: 800px;
}

.blog-post-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.blog-post-date {
  font-size: 0.9rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 0.5rem;
}

.blog-post-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.blog-post-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.category-tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--text);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

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

.blog-post-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}

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

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

.blog-post-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-style: italic;
}

/* 404 Page */
.page-404 {
  text-align: center;
  padding: 4rem 2rem;
}

.page-404 h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.page-404 p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

.page-404 a {
  display: inline-block;
  margin-top: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  background: var(--bg-alt);
  margin-top: 4rem;
}

.site-footer p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .site-nav {
    gap: 1.5rem;
  }

  .site-main {
    padding: 2rem 1.5rem;
  }

  .blog-post-title {
    font-size: 1.8rem;
  }

  .page-404 h1 {
    font-size: 2.5rem;
  }
}
