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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: #1a1a1a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Layout ===== */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 96px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

/* ===== Navigation ===== */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0;
  border-bottom: 1px solid #ebebeb;
  margin-bottom: 48px;
}

nav .site-name {
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a1a;
  text-decoration: none;
}

nav .site-name:hover {
  color: #2563eb;
}

nav .nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

nav .nav-links a {
  font-size: 0.9rem;
  color: #666;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.15s ease;
}

nav .nav-links a:hover {
  color: #1a1a1a;
}

nav .nav-links a.active {
  color: #1a1a1a;
  font-weight: 500;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #1a1a1a;
  margin: 4px 0;
  transition: transform 0.2s ease;
}

@media (max-width: 480px) {
  .nav-toggle {
    display: block;
  }

  nav .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    right: 24px;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 5px;
    padding: 12px 20px;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 100;
  }

  nav .nav-links.open {
    display: flex;
  }

  nav {
    position: relative;
  }
}

/* ===== Home / About ===== */
.hero {
  padding: 24px 0 16px;
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
}

.hero .tagline {
  font-size: 1rem;
  color: #666;
  margin-bottom: 40px;
}

.bio {
  padding-bottom: 48px;
}

.bio p {
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #1a1a1a;
  line-height: 1.75;
}

.bio a {
  color: #2563eb;
  text-decoration: none;
}

.bio a:hover {
  text-decoration: underline;
}

/* ===== Blog List ===== */
.page-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 32px;
  line-height: 1.3;
}

.blog-list {
  list-style: none;
  padding-bottom: 48px;
}

.blog-list li {
  padding: 16px 0;
  border-bottom: 1px solid #ebebeb;
}

.blog-list li:first-child {
  border-top: 1px solid #ebebeb;
}

.blog-list .post-date {
  font-size: 0.8rem;
  color: #999;
  display: block;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.blog-list .post-title {
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  line-height: 1.4;
}

.blog-list .post-title:hover {
  color: #2563eb;
}

.blog-list .post-excerpt {
  font-size: 0.875rem;
  color: #666;
  margin-top: 4px;
  line-height: 1.5;
}

/* ===== Blog Post ===== */
.post-header {
  margin-bottom: 32px;
}

.post-header .post-date {
  font-size: 0.8rem;
  color: #999;
  display: block;
  margin-bottom: 8px;
}

.post-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
}

.post-content {
  padding-bottom: 48px;
}

.post-content p {
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #1a1a1a;
}

.post-content h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 36px 0 16px;
  line-height: 1.35;
}

.post-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 28px 0 12px;
  line-height: 1.35;
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px 20px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content blockquote {
  border-left: 3px solid #ebebeb;
  padding-left: 20px;
  margin: 24px 0;
  color: #666;
  font-style: italic;
}

.post-content a {
  color: #2563eb;
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.post-nav {
  padding: 24px 0 48px;
  border-top: 1px solid #ebebeb;
}

.post-nav a {
  font-size: 0.9rem;
  color: #2563eb;
  text-decoration: none;
}

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

/* ===== Reading List ===== */
.reading-section {
  margin-bottom: 40px;
}

.reading-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.reading-month {
  margin-bottom: 28px;
}

.reading-month h3 {
  font-size: 0.85rem;
  font-weight: 500;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.reading-month ul {
  list-style: none;
}

.reading-month li {
  padding: 6px 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.reading-month a {
  color: #2563eb;
  text-decoration: none;
}

.reading-month a:hover {
  text-decoration: underline;
}

.reading-month .source {
  color: #999;
  font-size: 0.8rem;
}

.books-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #ebebeb;
  margin-bottom: 48px;
}

.books-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.books-section ul {
  list-style: none;
}

.books-section li {
  padding: 8px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #1a1a1a;
}

.books-section .book-author {
  color: #999;
  font-size: 0.8rem;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid #ebebeb;
  padding: 24px 0 48px;
  font-size: 0.8rem;
  color: #999;
}

footer a {
  color: #666;
  text-decoration: none;
}

footer a:hover {
  color: #1a1a1a;
}

/* ===== 404 ===== */
.not-found {
  text-align: center;
  padding: 80px 0;
}

.not-found h1 {
  font-size: 4rem;
  font-weight: 600;
  color: #ebebeb;
  margin-bottom: 16px;
}

.not-found p {
  font-size: 1rem;
  color: #666;
  margin-bottom: 24px;
}

.not-found a {
  color: #2563eb;
  text-decoration: none;
}

.not-found a:hover {
  text-decoration: underline;
}

/* ===== Selection ===== */
::selection {
  background: #2563eb;
  color: #fff;
}
