/* --- FONT IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=IBM+Plex+Mono&display=swap');

/* --- ROOT VARIABLES & GLOBAL STYLES --- */
:root {
  --bg-color: #FDFBF7;
  --element-bg: #FFFFFF;
  --text-color: #000000;
  --border-color: #000000;
  --accent-color: #FFFF00;
  --meta-text-color: #555555;

  --main-font: 'Archivo Black', sans-serif;
  --mono-font: 'IBM Plex Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--main-font);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* --- TYPOGRAPHY & LINKS --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--main-font);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s ease-out;
}

a:hover {
  background-color: var(--accent-color);
}

/* --- LAYOUT & MAIN CONTAINERS --- */
#site-header, main, footer {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

#site-header {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  background-color: var(--element-bg);
  border: 2px solid var(--border-color);
  box-shadow: 6px 6px 0px var(--border-color);
}

#site-header nav {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  gap: 1.5rem;
  /* v11 FINAL: Removed justify-content rule. Alignment is now handled by the logo's margin. */
}

/* v11 FINAL: This new rule cleanly pushes the entire navbar group to the right. */
#site-header nav .site-logo {
    margin-left: 0;
}

/* v11 FINAL: Removed !important override as it's no longer needed. */
#site-header h1 {
    margin-right: 0;
}

#site-header h1 a {
  padding-left: 0;
  margin-left: 0;
}

footer {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
  font-family: var(--mono-font);
  font-size: 0.9rem;
}

/* --- POSTS LIST PAGE --- */
.posts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 0;
  margin: 0;
}

article.post-preview {
  background-color: var(--element-bg);
  border: 2px solid var(--border-color);
  box-shadow: 6px 6px 0px var(--border-color);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease-out;
}

article.post-preview:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0px var(--accent-color);
}

.post-preview .featured-image-preview {
  width: 100%;
  height: auto;
  display: block;
}

.post-preview .post-content {
  padding: 1.5rem;
  flex-grow: 1;
}

.post-preview h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
}

.post-preview .meta {
  font-family: var(--mono-font);
  font-size: 0.85rem;
  color: var(--meta-text-color);
  margin-bottom: 1rem;
}

/* --- SINGLE POST PAGE --- */
article > header {
  margin-bottom: 2rem;
  text-align: center;
}

article > header .title-with-badge,
article > header .meta {
  text-align: left;
}

article > header .featured-image {
  display: inline-block;
  margin-top: 2rem;
  max-width: 80%;
  width: auto;
  height: auto;
  border: 2px solid var(--border-color);
  box-shadow: 6px 6px 0px var(--border-color);
  border-radius: 0;
}

.rating-badge {
  border: 2px solid var(--border-color) !important;
  box-shadow: 6px 6px 0px var(--border-color) !important;
  border-radius: 0 !important;
  background: var(--accent-color) !important;
  color: var(--text-color) !important;
  padding: 0.6rem 1rem !important;
  backdrop-filter: none !important;
}

.review-layout.card {
  background: var(--element-bg);
  border-radius: 0;
  padding: 2rem;
  text-align: left;
}

.review-layout .content {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.7;
}

table.specs, table.ratings {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  border: 3px solid #000;
  font-family: var(--mono-font);
}

/* Overall rating styling for review layouts */
table.ratings tr.overall-rating {
  font-weight: bold;
  border-top: 3px solid #000;
}

.ratings ul li.overall-rating {
  font-weight: bold;
  border-top: 2px solid #000;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

table.specs th, table.specs td,
table.ratings th, table.ratings td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

table.specs th {
  width: 30%;
}

/* ============================================= */
/* --- RESPONSIVE ADJUSTMENTS --- */
/* ============================================= */

@media (max-width: 600px) {
  body {
    font-size: 18px;
  }

  h1 { font-size: 2rem; }
  h3 { font-size: 1.6rem; }

  #site-header, main {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  #site-header nav {
    padding-left: 0;
    padding-right: 0;
  }

  main {
      margin-top: 1rem;
      padding: 0;
  }

  .posts-list {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .review-layout.card {
    padding: 1.5rem;
  }
}