/* ---------- CSS Variables ---------- */
:root {
  --bg: #0f1a14;
  --bg-soft: #16251d;
  --bg-dark: #0b1510;
  --text: #e6efe9;
  --muted: #b6c8bc;
  --accent: #7fbf9b;
  --accent-soft: rgba(127, 191, 155, 0.15);
  --border: #274235;
  --font-body: Inter, system-ui, sans-serif;
  --font-serif: "Crimson Text", serif;
}

/* ---------- Reset & Base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--bg-dark), var(--bg));
  color: var(--text);
  line-height: 1.7;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.4px;
}

h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 0;
}

p {
  margin: 0.8rem 0;
}

small {
  color: var(--muted);
}

/* ---------- Links ---------- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Icon Fonts Fix ---------- */
/* Font Awesome and RPG Awesome handle their own font-family via their CSS */
/* We only need to ensure proper display and alignment */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands, .ra {
  display: inline-block;
  text-decoration: inherit;
  vertical-align: middle;
}

/* ---------- Layout ---------- */
header {
  padding: 3rem 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(
      1200px 400px at 50% -100px,
      rgba(31, 58, 44, 0.85),
      rgba(15, 26, 20, 0.95)
    ),
    url("https://sprigandquill.neocities.org/Images/headerbackground.png"),
    var(--bg-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
}

header p {
  color: var(--muted);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Logo ---------- */
.site-logo {
  max-width: 220px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

/* ---------- Navigation ---------- */
nav {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

nav a {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

nav a:hover {
  background: rgba(127, 191, 155, 0.25);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

nav a:active {
  transform: translateY(0);
}

nav a i {
  font-size: 1rem;
}

/* ---------- Main ---------- */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--bg-dark);
}

/* ---------- Blog Posts ---------- */
.post {
  background: linear-gradient(180deg, var(--bg-soft), #101c15);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.post .meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* ---------- Tags ---------- */
.tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent);
}

/* ---------- Utilities ---------- */
.center {
  text-align: center;
}

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

.spacer {
  margin-top: 2rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  h1 {
    font-size: 2.2rem;
  }
  
  .post {
    padding: 1.5rem;
  }
  
  nav {
    gap: 0.5rem;
  }
  
  nav a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .site-logo {
    max-width: 180px;
  }
}