:root {
  --bg: #070b12;
  --card: #0e1520;
  --text: #dde4ec;
  --muted: #8898aa;
  --accent: #60a5fa;
  --gold: #fbbf24;
  --border: #1a2535;
  --serif: 'Georgia', 'Times New Roman', serif;
  --mono: 'Menlo', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 17px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 54px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--text);
  font-weight: bold;
}
.nav-logo span { color: var(--accent); }

nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
nav ul li a { color: var(--muted); }
nav ul li a:hover { color: var(--text); text-decoration: none; }

/* HERO */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  padding: 4rem 2rem 3rem;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 12%, transparent 60%);
}
.hero-content {
  position: relative;
  max-width: 680px;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: normal;
  color: #f0f4f8;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.hero p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 520px;
}

/* MAIN LAYOUT */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.page-header h1 {
  font-size: 1.9rem;
  font-weight: normal;
  margin-bottom: 0.4rem;
}
.page-header .sub {
  color: var(--muted);
  font-size: 0.9rem;
  font-family: var(--mono);
}

/* SECTION */
section { padding: 3rem 0; }
section + section { border-top: 1px solid var(--border); }
section h2 {
  font-size: 1rem;
  font-family: var(--mono);
  font-weight: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* POST CARD */
.post-list { list-style: none; }
.post-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.post-item:first-child { border-top: 1px solid var(--border); }
.post-item-title { font-size: 1.05rem; color: var(--text); }
.post-item-title a { color: inherit; }
.post-item-title a:hover { color: var(--accent); text-decoration: none; }
.post-item-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.post-item-desc {
  color: var(--muted);
  font-size: 0.9rem;
  grid-column: 1;
  margin-top: -0.2rem;
}

/* ARTICLE */
.article-header { padding: 3rem 0 2rem; }
.article-header h1 {
  font-size: 2rem;
  font-weight: normal;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}
.article-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  display: flex;
  gap: 1.5rem;
}
.article-hero {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  margin: 1.5rem 0 2.5rem;
  border-radius: 3px;
  opacity: 0.85;
}
.article-body { max-width: 660px; }
.article-body p { margin-bottom: 1.4rem; }
.article-body h2 {
  font-size: 1.2rem;
  font-weight: normal;
  margin: 2.2rem 0 0.8rem;
  color: var(--text);
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: 0;
}
.article-body h3 {
  font-size: 1rem;
  font-family: var(--mono);
  color: var(--muted);
  margin: 1.8rem 0 0.6rem;
  font-weight: normal;
  letter-spacing: 0.06em;
}
.article-body ul, .article-body ol {
  padding-left: 1.6rem;
  margin-bottom: 1.4rem;
}
.article-body li { margin-bottom: 0.4rem; }
.article-body code {
  font-family: var(--mono);
  font-size: 0.83rem;
  background: var(--card);
  padding: 0.12em 0.4em;
  border-radius: 3px;
  color: var(--accent);
}
.article-body pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.2rem;
  overflow-x: auto;
  margin-bottom: 1.4rem;
}
.article-body pre code {
  background: none;
  padding: 0;
  color: #a8c7fa;
  font-size: 0.82rem;
  line-height: 1.6;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.2rem;
  margin: 1.8rem 0;
  color: var(--muted);
  font-style: italic;
}
.article-body .figure {
  margin: 2rem 0;
  text-align: center;
}
.article-body .figure img {
  max-width: 100%;
  border-radius: 3px;
  opacity: 0.85;
}
.article-body .figure figcaption {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--muted);
}

/* DATA TABLE */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.6rem;
  font-size: 0.9rem;
}
.data-table th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0.5rem 1rem 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.65rem 1rem 0.65rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}
.data-table td:first-child { color: var(--accent); font-family: var(--mono); font-size: 0.85rem; }

/* GEAR CARD */
.gear-grid {
  display: grid;
  gap: 1.2rem;
}
.gear-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.4rem 1.6rem;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0 1.2rem;
  align-items: start;
}
.gear-icon {
  width: 2.2rem;
  height: 2.2rem;
  opacity: 0.7;
  margin-top: 0.15rem;
}
.gear-card h3 {
  font-size: 0.95rem;
  font-family: var(--mono);
  color: var(--accent);
  margin-bottom: 0.15rem;
  font-weight: normal;
}
.gear-card .gear-name {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.gear-card .gear-notes { font-size: 0.87rem; color: var(--muted); }

/* FOOTER */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  margin-top: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
footer .footer-brand {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
footer .footer-links {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}
footer .footer-links a { color: var(--muted); }
footer .footer-links a:hover { color: var(--text); text-decoration: none; }

/* BACK LINK */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}
.back-link:hover { color: var(--text); text-decoration: none; }

/* 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}
.error-code {
  font-family: var(--mono);
  font-size: 4rem;
  color: var(--border);
  margin-bottom: 1rem;
}
.error-msg { color: var(--muted); margin-bottom: 1.5rem; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.7rem; }
  nav ul { gap: 1rem; }
  .post-item { grid-template-columns: 1fr; }
  .post-item-meta { margin-top: -0.8rem; }
  footer { flex-direction: column; align-items: flex-start; }
}
