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

:root {
  --navy:       #0E1410;
  --navy-mid:   #131914;
  --navy-light: #1C2420;
  --amber:      #C4903A;
  --amber-dim:  rgba(196,144,58,0.12);
  --off-white:  #E2E0D8;
  --muted:      #6E7868;
  --subdued:    #3D4A3A;
  --font-d: 'Bebas Neue', sans-serif;
  --font-b: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--off-white);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* GRAIN */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 5%;
  background: rgba(14,20,16,0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(196,144,58,0.08);
}

.nav-logo {
  font-family: var(--font-d);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--off-white);
  text-decoration: none;
}

.nav-logo em { color: var(--amber); font-style: normal; }

.nav-links { display: flex; gap: 2rem; list-style: none; }

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--off-white); }

/* MAIN */
main { flex: 1; }

/* FOOTER */
footer {
  padding: 1.75rem 5%;
  border-top: 1px solid rgba(60,74,50,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--subdued);
  letter-spacing: 0.05em;
  font-style: italic;
}

footer a { color: var(--subdued); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--off-white); }

/* SHARED */
.eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--amber);
}

.section-title {
  font-family: var(--font-d);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  line-height: 0.95;
  color: var(--off-white);
  margin-bottom: 1rem;
}

/* POSTS INDEX */
.posts-index {
  padding: 5rem 5%;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.posts-header { margin-bottom: 4rem; }

.posts-intro {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(226,224,216,0.6);
  max-width: 500px;
  line-height: 1.75;
  margin-top: 1rem;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  display: block;
  padding: 2.25rem 0;
  border-bottom: 1px solid rgba(60,74,50,0.2);
  text-decoration: none;
  transition: background 0.2s;
}

.post-card:first-child { border-top: 1px solid rgba(60,74,50,0.2); }

.post-card:hover .post-card-title { color: var(--amber); }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.post-date {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.post-tag {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  background: var(--amber-dim);
  border: 1px solid rgba(196,144,58,0.25);
  color: rgba(196,144,58,0.8);
}

.post-card-title {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1;
  color: var(--off-white);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.post-card-desc {
  font-size: 0.92rem;
  color: rgba(226,224,216,0.55);
  line-height: 1.7;
  font-style: italic;
  font-weight: 300;
  max-width: 580px;
  margin-bottom: 1rem;
}

.post-read-more {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

.posts-empty {
  font-size: 0.92rem;
  color: var(--muted);
  font-style: italic;
  padding: 3rem 0;
}

/* SINGLE POST */
.post { max-width: 100%; }

.post-header {
  background: var(--navy-mid);
  padding: 5rem 5% 4rem;
  border-bottom: 1px solid rgba(60,74,50,0.2);
  position: relative;
  overflow: hidden;
}

.post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 250px 250px;
}

.post-header-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-back {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.post-back:hover { color: var(--off-white); }

.post-title {
  font-family: var(--font-d);
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.92;
  color: var(--off-white);
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
  margin-top: 0.75rem;
}

.post-subtitle {
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(226,224,216,0.65);
  line-height: 1.7;
  max-width: 580px;
}

.post-cover {
  max-height: 480px;
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) saturate(0.9);
}

/* POST BODY */
.post-body {
  padding: 4rem 5%;
}

.post-content {
  max-width: 700px;
  margin: 0 auto;
}

/* TYPOGRAPHY FOR POST CONTENT */
.post-content p {
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(226,224,216,0.78);
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-family: var(--font-d);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  color: var(--off-white);
  letter-spacing: 0.02em;
  margin: 3rem 0 1rem;
}

.post-content h3 {
  font-family: var(--font-d);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
  color: var(--off-white);
  letter-spacing: 0.02em;
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 1.5rem 0 0.5rem;
}

.post-content strong {
  font-weight: 600;
  color: var(--off-white);
}

.post-content em {
  font-style: italic;
  color: rgba(226,224,216,0.85);
}

.post-content a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(196,144,58,0.3);
  transition: border-color 0.2s;
}

.post-content a:hover { border-color: var(--amber); }

.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: rgba(226,224,216,0.78);
}

.post-content li {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 0.4rem;
}

/* Pull quote */
.post-content blockquote {
  border-left: 2px solid var(--amber);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2.5rem 0;
}

.post-content blockquote p {
  font-family: var(--font-d);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-style: normal;
  line-height: 1.2;
  color: var(--off-white);
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

/* Code / technical specs */
.post-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  background: rgba(60,74,50,0.25);
  border: 1px solid rgba(60,74,50,0.4);
  padding: 0.15rem 0.4rem;
  color: rgba(196,144,58,0.9);
}

.post-content pre {
  background: rgba(60,74,50,0.15);
  border: 1px solid rgba(60,74,50,0.3);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Images in posts */
.post-content img {
  width: 100%;
  display: block;
  margin: 2rem 0;
  filter: brightness(0.88) saturate(0.9);
  border: 1px solid rgba(60,74,50,0.2);
}

.post-content figure {
  margin: 2rem 0;
}

.post-content figcaption {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: center;
  letter-spacing: 0.04em;
}

/* Horizontal rule */
.post-content hr {
  border: none;
  border-top: 1px solid rgba(60,74,50,0.25);
  margin: 3rem 0;
}

/* POST FOOTER */
.post-footer {
  padding: 2rem 5% 4rem;
  max-width: 700px;
  margin: 0 auto;
  border-top: 1px solid rgba(60,74,50,0.2);
}

.post-back-bottom {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.post-back-bottom:hover { color: var(--off-white); }

/* MOBILE */
@media (max-width: 768px) {
  .nav-links { gap: 1.25rem; }
  .post-header { padding: 3rem 5% 2.5rem; }
  .post-body { padding: 2.5rem 5%; }
  .post-header-meta { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}
