/* ═══════════════════════════════════════════════════════
   BFUT SHARED STYLESHEET
   Edit this one file to update design across all pages.
   Version: 2.0 — June 2026
   ═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  --navy:       #0a1628;
  --navy-lt:    #0f2240;
  --navy-panel: #162d52;
  --orange:     #d4520a;
  --orange-lt:  #f07030;
  --orange-dk:  #a83d08;
  --white:      #ffffff;
  --off:        #e8f0f8;
  --text:       #e8e8e8;
  --border:     rgba(255,255,255,0.12);
  --nav-h:      64px;
  /* Typography */
  --font-ui:   'Syne', sans-serif;
  --font-body: 'Source Serif 4', serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-ui);
  background: var(--navy-lt);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html, body { max-width: 100vw; }
* { word-wrap: break-word; overflow-wrap: break-word; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--navy);
  border-bottom: 2px solid var(--orange);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: var(--nav-h);
}
.nav-logo {
  font-family: var(--font-body);
  font-size: 20px; font-weight: 700;
  color: var(--white); text-decoration: none;
  flex-shrink: 0; white-space: nowrap; letter-spacing: -0.01em;
}
.nav-logo span { color: var(--orange-lt); font-style: italic; }
.nav-links { display: flex; gap: 1.2rem; list-style: none; align-items: center; }
.nav-links a {
  font-size: 13px; font-weight: 700;
  color: var(--white); text-decoration: none;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--orange-lt); }
.nav-cta { background: var(--orange); padding: 0.45rem 1rem; border-radius: 2px; }
.nav-cta:hover { background: var(--orange-lt); }
/* article pages use a simpler nav */
.nav-back {
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.7);
  text-decoration: none; letter-spacing: 0.02em;
  transition: color 0.15s;
}
.nav-back:hover { color: var(--orange-lt); }

/* ── HAMBURGER ── */
.hbg {
  display: none; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px; width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  touch-action: manipulation; z-index: 300;
}
.hbg span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; }

/* ── MOBILE MENU ── */
.mmenu {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--navy); border-bottom: 2px solid var(--orange);
  z-index: 199; max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.mmenu a {
  display: block; font-size: 16px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--white); text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mmenu a:hover { color: var(--orange-lt); }
.mmenu.open { display: block; }

/* ── ANNOUNCEMENT BANNER ── */
.announce {
  background: var(--orange-dk); padding: 0.65rem 1rem;
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; flex-wrap: wrap; text-align: center;
}
.announce span { font-size: 15px; font-weight: 700; color: var(--white); }
.announce a {
  font-size: 14px; font-weight: 700; color: var(--white);
  text-decoration: none; border: 1.5px solid rgba(255,255,255,0.6);
  padding: 0.25rem 0.8rem; border-radius: 2px; white-space: nowrap;
}
.announce a:hover { background: rgba(255,255,255,0.15); }

/* ── TYPOGRAPHY PRIMITIVES ── */
h1, h2, h3 { font-family: var(--font-ui); }
p {
  font-family: var(--font-body);
  font-size: 18px; line-height: 1.85;
  color: rgba(255,255,255,0.9); margin-bottom: 1.2rem;
}
a { color: var(--orange-lt); }
a:hover { color: var(--white); }

/* ── SECTION TAGS ── */
.sec-tag {
  font-size: 13px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--orange-lt);
  margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.6rem;
}
.sec-tag::before { content: ''; width: 2rem; height: 2px; background: var(--orange); }
.sec-title {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 2.5vw, 2.075rem);
  font-weight: 600; color: var(--white);
  margin-bottom: 0.8rem; letter-spacing: -0.02em;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--orange); color: var(--white);
  font-family: var(--font-ui); font-size: 15px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.9rem 1.8rem; text-decoration: none;
  transition: background 0.15s; border: none; cursor: pointer;
}
.btn:hover { background: var(--orange-lt); color: var(--white); }
.btn-ghost {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover { border-color: var(--orange-lt); color: var(--orange-lt); }

/* ── CARDS ── */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border); margin: 2rem 0;
}
.card {
  background: var(--navy-panel); padding: 1.8rem;
  border-top: 3px solid transparent; transition: border-color 0.15s;
}
.card:hover { border-top-color: var(--orange); }
.card-cat {
  font-size: 12px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--orange-lt); margin-bottom: 0.7rem;
}
.card-title {
  font-family: var(--font-body); font-size: 18px; font-weight: 600;
  color: var(--white); line-height: 1.3; margin-bottom: 0.6rem;
  text-decoration: none; display: block;
}
.card-title:hover { color: var(--orange-lt); }
.card-desc { font-size: 15px; line-height: 1.65; color: rgba(255,255,255,0.85); margin-bottom: 1rem; }
.card-link { font-size: 14px; font-weight: 700; color: var(--orange-lt); text-decoration: none; }

/* ── FORMS ── */
input, textarea, select {
  width: 100%; background: var(--navy-panel);
  border: 2px solid var(--border); color: var(--white);
  padding: 0.85rem 1rem; font-family: var(--font-ui);
  font-size: 16px; outline: none;
  transition: border-color 0.15s; appearance: none; margin-bottom: 1rem;
}
input:focus, textarea:focus { border-color: var(--orange); }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.35); }
textarea { resize: vertical; min-height: 120px; }

/* ── PAGE HERO (non-article pages) ── */
.page-hero {
  background: var(--navy); padding: 4rem 3rem;
  border-bottom: 2px solid var(--orange);
}
.ph-inner { max-width: 1160px; margin: 0 auto; }
.ph-tag {
  font-size: 13px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--orange-lt);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem;
}
.ph-tag::before { content: ''; width: 2rem; height: 2px; background: var(--orange); }
.ph-title {
  font-family: var(--font-body);
  font-size: clamp(2rem, 4vw, 3.075rem);
  font-weight: 600; color: var(--white);
  line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 0.8rem;
}
.ph-title em { font-style: italic; color: var(--orange-lt); }
.ph-sub {
  font-size: 18px; line-height: 1.75;
  color: rgba(255,255,255,0.85); max-width: 640px;
  border-left: 3px solid var(--orange); padding-left: 1.2rem;
}

/* ── MAIN CONTENT AREA ── */
.main { max-width: 1160px; margin: 0 auto; padding: 4rem 3rem; }

/* ── ARTICLE LAYOUT ── */
.article-wrap {
  max-width: 1160px; margin: 0 auto; padding: 3rem 2rem;
  display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start;
}
.article-main {}
.article-cat { margin-bottom: 0.8rem; }
.article-cat a {
  font-size: 13px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--orange-lt); text-decoration: none;
}
.article-cat a:hover { color: var(--white); }
.article-h1 {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600; color: var(--white);
  line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 1rem;
}
.article-subtitle {
  font-family: var(--font-body); font-size: 19px; line-height: 1.65;
  color: rgba(255,255,255,0.75); font-style: italic;
  border-left: 3px solid var(--orange); padding-left: 1rem; margin-bottom: 1.2rem;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem;
  font-size: 14px; color: rgba(255,255,255,0.55);
  margin-bottom: 2rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.article-meta span { display: flex; align-items: center; }
.article-body h2 {
  font-family: var(--font-ui); font-size: 20px; font-weight: 800;
  color: var(--white); margin: 2.5rem 0 1rem; padding-top: 0.5rem;
  border-top: 2px solid var(--border);
}
.article-body p { font-family: var(--font-body); font-size: 18px; line-height: 1.85; color: rgba(255,255,255,0.9); margin-bottom: 1.2rem; }
.article-lead { font-size: 20px !important; line-height: 1.75 !important; color: rgba(255,255,255,0.95) !important; }
.article-math {
  background: var(--navy); border-left: 3px solid var(--orange);
  padding: 1rem 1.4rem; margin: 1.5rem 0;
  font-family: 'Courier New', monospace; font-size: 16px;
  color: var(--off); line-height: 1.5;
}

/* ── SHARE SECTION ── */
.share-section { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--border); }
.share-title { font-size: 13px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 0.8rem; }
.share-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.share-btn {
  font-size: 14px; font-weight: 700; color: var(--white);
  text-decoration: none; background: var(--navy-panel);
  padding: 0.5rem 0.9rem; transition: background 0.15s;
}
.share-btn:hover { background: var(--orange); color: var(--white); }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.sb-box {
  background: var(--navy); border: 1px solid var(--border);
  padding: 1.4rem; margin-bottom: 1.2rem;
}
.sb-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--orange-lt); margin-bottom: 1rem;
}
.sb-cat-list { list-style: none; }
.sb-cat-list li { border-bottom: 1px solid var(--border); }
.sb-cat-list li:last-child { border-bottom: none; }
.sb-cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0; font-size: 14px; color: rgba(255,255,255,0.8);
  text-decoration: none; transition: color 0.15s;
}
.sb-cat-list a:hover { color: var(--orange-lt); }
.sb-cat-count {
  font-size: 12px; color: rgba(255,255,255,0.4);
  background: var(--navy-panel); padding: 0.1rem 0.45rem;
}
.sb-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--orange);
  padding: 0.6rem 0 0.3rem; margin-top: 0.4rem;
  border-top: 1px solid var(--border);
}
.sb-section-label:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.rss-btn {
  display: block; font-size: 14px; font-weight: 700;
  color: var(--orange-lt); text-decoration: none;
  padding: 0.5rem 0; transition: color 0.15s;
}
.rss-btn:hover { color: var(--white); }
.nl-box input { margin-bottom: 0.6rem; }
.nl-box button {
  width: 100%; background: var(--orange); color: var(--white);
  border: none; padding: 0.75rem; font-family: var(--font-ui);
  font-size: 14px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: background 0.15s;
}
.nl-box button:hover { background: var(--orange-lt); }

/* ── FOOTER ── */
footer {
  background: var(--navy); border-top: 2px solid var(--orange);
  padding: 2.5rem 3rem; margin-top: 4rem;
}
.ft-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem;
}
.ft-brand { font-size: 16px; font-weight: 800; color: var(--white); }
.ft-brand span { color: var(--orange-lt); }
.ft-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.ft-links a { font-size: 13px; color: rgba(255,255,255,0.6); text-decoration: none; }
.ft-links a:hover { color: var(--orange-lt); }
.ft-cp { max-width: 1160px; margin: 0 auto; font-size: 12px; color: rgba(255,255,255,0.35); }

/* ── CATEGORY PAGE ── */
.cat-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--border); margin: 2rem 0;
}
.cat-card {
  background: var(--navy-panel); padding: 1.6rem;
  border-top: 3px solid transparent; transition: border-color 0.15s;
}
.cat-card:hover { border-top-color: var(--orange); }
.cat-card-cat {
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--orange-lt); margin-bottom: 0.5rem;
}
.cat-card-title {
  font-family: var(--font-body); font-size: 17px; font-weight: 600;
  color: var(--white); line-height: 1.3; margin-bottom: 0.5rem;
  text-decoration: none; display: block;
}
.cat-card-title:hover { color: var(--orange-lt); }
.cat-card-exc { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.75); margin-bottom: 0.8rem; }
.cat-read { font-size: 13px; font-weight: 700; color: var(--orange-lt); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .announce { padding: 0.45rem 0.75rem; gap: 0.5rem; }
  .announce span { font-size: 13px; }
  .announce a { font-size: 12px; padding: 0.2rem 0.6rem; }
  nav { padding: 0 1rem; }
  .nav-logo { font-size: 17px; }
  .nav-links { display: none; }
  .hbg { display: flex; }
  .page-hero { padding: 2.5rem 1rem; }
  .main { padding: 2rem 1rem; }
  .article-wrap { grid-template-columns: 1fr; padding: 2rem 1rem; }
  .sidebar { position: static; }
  .card-grid, .cat-grid { grid-template-columns: 1fr; }
  footer { padding: 2rem 1rem; }
  .ft-inner { flex-direction: column; align-items: flex-start; }
  .announce { padding: 0.7rem 1rem; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .nav-logo { font-size: 15px; }
  .article-h1 { font-size: 1.5rem; }
}
