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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #1a1a2e;
  background: #fafafa;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Header === */
header {
  padding: 2rem 0 1rem;
  border-bottom: 2px solid #eaeaea;
  margin-bottom: 2rem;
}

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

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a2e;
  text-decoration: none;
}

.nav-links a {
  margin-left: 1.5rem;
  color: #555;
  text-decoration: none;
  font-weight: 500;
}

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

/* === Main Content === */
main {
  min-height: 60vh;
}

article h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

article time {
  display: block;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

article p {
  margin-bottom: 1rem;
}

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

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

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

/* === Post List (homepage) === */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eaeaea;
}

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

.post-list a {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
}

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

.post-list time {
  display: block;
  color: #999;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 2px solid #eaeaea;
  margin-top: 3rem;
  color: #888;
  font-size: 0.9rem;
}

footer a {
  color: #2563eb;
}

/* ============================================
   🌙 Dark Mode
   ============================================ */
@media (prefers-color-scheme: dark) {
  body {
    color: #e2e2e9;
    background: #0f0f17;
  }

  header {
    border-bottom-color: #272736;
  }

  .logo {
    color: #e2e2e9;
  }

  .nav-links a {
    color: #999;
  }

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

  article time {
    color: #777;
  }

  article a {
    color: #6ea8fe;
  }

  .post-list li {
    border-bottom-color: #272736;
  }

  .post-list a {
    color: #e2e2e9;
  }

  .post-list a:hover {
    color: #6ea8fe;
  }

  .post-list time {
    color: #666;
  }

  footer {
    border-top-color: #272736;
    color: #777;
  }

  footer a {
    color: #6ea8fe;
  }
}
