* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background-color: #f5f5f7;
  color: #222;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #111827;
  color: #f9fafb;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.logo i {
  color: #38bdf8;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover {
  color: #38bdf8;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #f9fafb;
  font-size: 1.5rem;
}

.content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  background: #111827;
  color: #9ca3af;
  font-size: 0.9rem;
}

.site-footer i {
  color: #22c55e;
}

/* Typography */
h1, h2, h3 {
  color: #111827;
}

h1 {
  margin-top: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #2563eb;
  color: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn:hover {
  background: #1d4ed8;
}

/* Post list */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

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

/* Blog post */
.blog-post {
  padding-bottom: 2rem;
}

.blog-post pre {
  background: #0f172a;
  color: #e5e7eb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
textarea {
  padding: 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  font-size: 1rem;
}

input:focus,
textarea:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.error-message {
  color: #b91c1c;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.alert.success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Responsive nav */
@media (max-width: 700px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 60px;
    right: 0;
    background: #111827;
    width: 200px;
    transform: translateX(100%);
    transition: transform 0.2s ease-out;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
  }

  .main-nav.nav-open {
    transform: translateX(0);
  }
}
