/* ============================================================
   Design tokens — petroleum blue palette
   ============================================================ */
:root {
  --c-primary:       #0b3d52;
  --c-primary-dark:  #072a38;
  --c-primary-mid:   #1a6882;
  --c-accent:        #29a0c1;
  --c-stripe-1:      #ffffff;
  --c-stripe-2:      #e4f3f9;
  --c-text:          #1a2c34;
  --c-text-muted:    #547a89;
  --c-border:        #bdd8e3;
  --font-body:       Georgia, 'Times New Roman', serif;
  --font-ui:         system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max-w:           860px;
  --nav-h:           64px;
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-stripe-1);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.7;
}

a { color: var(--c-accent); }
a:hover { color: var(--c-primary-mid); }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  background: var(--c-primary-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--c-primary-mid);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.site-title:hover { color: var(--c-accent); }

.site-logo {
  height: 48px;
  width: auto;
  vertical-align: middle;
  margin-right: 0.5rem;
  filter: brightness(0) invert(1);
  transition: filter 0.15s;
}

.site-title:hover .site-logo {
  filter: brightness(0) saturate(100%) invert(60%) sepia(80%) saturate(400%) hue-rotate(165deg) brightness(95%);
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: color 0.15s;
}

.nav-links a:hover { color: #ffffff; }

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 36px;
  height: 36px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Main — inner constraint for non-home pages
   ============================================================ */
.site-main { flex: 1; }

body:not(.home) .site-main {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* ============================================================
   Home — news list with full-width alternating stripes
   ============================================================ */
.news-list { width: 100%; }

.news-entry {
  background: var(--c-stripe-1);
  padding: 2.75rem 1.5rem;
}

.news-entry--alt { background: var(--c-stripe-2); }

.news-entry__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.news-entry__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.news-entry__title a {
  color: var(--c-primary);
  text-decoration: none;
}

.news-entry__title a:hover { color: var(--c-accent); }

.news-entry__excerpt {
  color: var(--c-text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

/* ============================================================
   News article (single post)
   ============================================================ */
.news-article__header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--c-border);
}

.news-article__header h1 {
  font-size: 2rem;
  color: var(--c-primary);
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.news-article__header time {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

.news-article__body { font-size: 1.05rem; line-height: 1.8; }
.news-article__body h2 { margin: 2rem 0 0.75rem; color: var(--c-primary); font-size: 1.4rem; }
.news-article__body h3 { margin: 1.5rem 0 0.5rem; color: var(--c-primary-mid); font-size: 1.15rem; }
.news-article__body p  { margin-bottom: 1.25rem; }
.news-article__body ul,
.news-article__body ol { margin: 0 0 1.25rem 1.5rem; }
.news-article__body li { margin-bottom: 0.3rem; }

.news-article__body code {
  background: var(--c-stripe-2);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

.news-article__body pre {
  background: var(--c-primary-dark);
  color: #d4eef7;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.news-article__body pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  color: inherit;
}

/* ============================================================
   Page with sections (about, contact, etc.)
   ============================================================ */
.page-section {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--c-border);
}

.page-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.page-section h2 {
  font-size: 1.6rem;
  color: var(--c-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--c-accent);
  display: inline-block;
}

.page-section__body { font-size: 1rem; line-height: 1.75; }
.page-section__body p { margin-bottom: 1rem; }
.page-section__body p:last-child { margin-bottom: 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--c-primary-dark);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  padding: 1.25rem 1.5rem;
  border-top: 3px solid var(--c-primary-mid);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer a { color: var(--c-accent); text-decoration: none; }
.site-footer a:hover { color: #ffffff; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  /* Nav */
  .nav-inner {
    padding: 0 1rem;
    flex-wrap: wrap;
    height: auto;
    min-height: var(--nav-h);
  }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding-bottom: 0.75rem;
  }

  .nav-links.is-open { display: flex; }

  .nav-links li { border-top: 1px solid rgba(255,255,255,0.08); }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.9rem;
  }

  /* Content */
  .news-entry { padding: 1.75rem 1rem; }
  .news-entry__title { font-size: 1.25rem; }

  body:not(.home) .site-main { padding: 2rem 1rem; }

  .news-article__header h1 { font-size: 1.6rem; }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
