:root {
  --eb-bg: #05070a;
  --eb-bg-soft: #090d13;
  --eb-panel: #0b1017;
  --eb-panel-2: #0e141d;
  --eb-border: #263140;
  --eb-border-soft: rgba(124, 151, 184, .18);
  --eb-text: #eef3f8;
  --eb-muted: #98a5b3;
  --eb-blue: #315efb;
  --eb-blue-2: #2048d8;
  --eb-cyan: #28c5f5;
  --eb-green: #49e39a;
  --bs-body-font-family: "Stack Sans Headline", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-body-color: var(--eb-text);
  --bs-body-bg: var(--eb-bg);
  --bs-primary: var(--eb-blue);
  --bs-primary-rgb: 49, 94, 251;
  --bs-secondary-color: var(--eb-muted);
  --bs-border-color: var(--eb-border);
  --bs-link-color: #78a4ff;
  --bs-link-hover-color: #a8c3ff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--eb-blue) #070a0f; scrollbar-width: thin; }
body { min-height: 100vh; background: var(--eb-bg); color: var(--eb-text); font-size: 17px; line-height: 1.65; text-rendering: optimizeLegibility; }
body::-webkit-scrollbar { width: 12px; }
body::-webkit-scrollbar-track { background: #070a0f; }
body::-webkit-scrollbar-thumb { background: var(--eb-blue); border: 3px solid #070a0f; border-radius: 10px; }
body::-webkit-scrollbar-thumb:hover { background: #5277ff; }
::selection { color: #fff; background: rgba(49, 94, 251, .72); }
a { text-decoration: none; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; }

h1, h2, h3, h4, h5, h6 { color: #fff; font-family: "Special Elite", Georgia, serif !important; font-weight: 400; letter-spacing: -.02em; }
h1 { font-size: clamp(2.8rem, 6vw, 5.4rem); line-height: .98; }
h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.08; }
h3 { font-size: 1.55rem; }
.lead { color: #aeb9c5; font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.55; }
.py-lg-6 { padding-top: 5.5rem !important; padding-bottom: 5.5rem !important; }
.pb-lg-6 { padding-bottom: 5.5rem !important; }

.btn { border-radius: 3px; font-weight: 700; letter-spacing: .02em; transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { --bs-btn-bg: var(--eb-blue); --bs-btn-border-color: var(--eb-blue); --bs-btn-hover-bg: #466cff; --bs-btn-hover-border-color: #466cff; --bs-btn-active-bg: var(--eb-blue-2); --bs-btn-active-border-color: var(--eb-blue-2); box-shadow: 0 10px 30px rgba(49, 94, 251, .18); }
.btn-outline-light { --bs-btn-border-color: #536173; --bs-btn-color: #e5ebf2; --bs-btn-hover-bg: #e9eef5; --bs-btn-hover-color: #080b10; }
.btn-outline-secondary { --bs-btn-color: #aeb9c5; --bs-btn-border-color: #3b4655; --bs-btn-hover-bg: #151c26; --bs-btn-hover-border-color: #637084; --bs-btn-hover-color: #fff; }
.btn-light { --bs-btn-bg: #eef3f8; --bs-btn-border-color: #eef3f8; --bs-btn-color: #070a0f; }

.card { --bs-card-bg: var(--eb-panel); --bs-card-border-color: var(--eb-border); --bs-card-border-radius: 3px; background: linear-gradient(180deg, rgba(13, 19, 28, .98), rgba(8, 12, 18, .98)); border: 1px solid var(--eb-border); box-shadow: 0 14px 45px rgba(0, 0, 0, .18); }
.form-control { color: #f7f9fb; background: #05080d; border-color: #354151; border-radius: 3px; min-height: 48px; }
.form-control:focus { color: #fff; background: #070b11; border-color: var(--eb-blue); box-shadow: 0 0 0 .22rem rgba(49, 94, 251, .14); }
.form-control::placeholder { color: #6f7c8a; }
.input-group-lg > .form-control, .input-group-lg > .btn { min-height: 54px; font-size: 1rem; }
.alert { border-radius: 3px; }
.breadcrumb { --bs-breadcrumb-divider-color: #5d6a79; --bs-breadcrumb-item-active-color: #909dad; font-size: .95rem; }
.breadcrumb a { color: #b6c0cb; }

.eyebrow { display: inline-block; color: var(--eb-cyan); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: #fff; }
.brand:hover { color: #fff; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand span { display: grid; line-height: 1.05; }
.brand b { font-size: .92rem; letter-spacing: .13em; }
.brand small { color: #6384a4; font-size: .57rem; font-weight: 700; letter-spacing: .16em; margin-top: .35rem; }

/* Header */
.site-header { background: rgba(4, 6, 9, .94); border-bottom: 1px solid #202a36; backdrop-filter: blur(18px); z-index: 1030; }
.site-header .navbar { min-height: 72px; padding: .7rem 0; }
.navbar-nav .nav-link { position: relative; color: #9ba7b5; font-size: .91rem; font-weight: 700; padding: .8rem 1rem !important; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: #fff; }
.navbar-nav .nav-link.active::after { position: absolute; content: ""; left: 1rem; right: 1rem; bottom: .3rem; height: 2px; background: var(--eb-blue); }
.navbar-toggler { border-color: #354151; border-radius: 3px; }
.site-offcanvas { --bs-offcanvas-bg: #080c12; --bs-offcanvas-width: min(86vw, 360px); border-left: 1px solid var(--eb-border); }
.site-offcanvas .offcanvas-header { border-bottom: 1px solid var(--eb-border); padding: 1.25rem; }
.site-offcanvas .offcanvas-body { padding: 1.25rem; }
.mobile-nav .nav-link { color: #d8e0e8; border-bottom: 1px solid #202a36; padding: 1rem .2rem; font-size: 1.15rem; font-weight: 600; }
.mobile-nav .nav-link:hover { color: #fff; padding-left: .5rem; }
.reading-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 2000; pointer-events: none; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--eb-blue); box-shadow: 0 0 12px rgba(49, 94, 251, .8); }

/* Home */
.home-page { overflow-x: hidden; background: #000; }
.home-shell { position: relative; min-height: 100svh; display: flex; flex-direction: column; isolation: isolate; background: #000; }
.home-background { position: absolute; inset: 0; z-index: -3; background-image: linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.36) 42%, rgba(0,0,0,.22) 58%, rgba(0,0,0,.84) 100%), linear-gradient(180deg, rgba(0,0,0,.05) 35%, #000 92%), url('../../images/ebonexus-hero.png'); background-repeat: no-repeat; background-position: center top; background-size: cover; }
.home-runes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .16; pointer-events: none; }
.home-header { background: linear-gradient(180deg, rgba(0,0,0,.92), rgba(0,0,0,.38)); border-bottom: 1px solid rgba(134, 157, 181, .18); }
.home-header .navbar { min-height: 76px; }
.home-header .nav-link { color: #b4bdc8; }
.home-main { flex: 1; display: flex; align-items: flex-end; padding-top: 8rem; padding-bottom: 3rem; }
.home-content-row { width: 100%; }
.home-copy { max-width: 650px; padding: 1.75rem 0; text-shadow: 0 3px 20px #000; }
.home-lead { max-width: 620px; margin: 0 0 1.5rem; color: #e0e7ef; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.55; }
.home-tags .badge { color: #d7e0e9; background: rgba(8, 13, 20, .72); border: 1px solid rgba(129, 151, 175, .34); border-radius: 2px; padding: .58rem .72rem; font-size: .74rem; font-weight: 600; }
.home-latest { background: rgba(7, 11, 17, .88); backdrop-filter: blur(12px); border-color: rgba(134, 157, 181, .4); }
.home-latest .card-body { padding: 1.5rem; }
.home-latest h2 { font-size: 1.8rem; margin-bottom: .8rem; }
.home-latest p { color: #aeb9c5; font-size: .96rem; line-height: 1.55; }
.home-latest time { color: #8492a1; font-size: .85rem; }
.home-bottom { position: relative; margin-top: auto; background: linear-gradient(180deg, transparent, rgba(0,0,0,.98) 3rem); }
.home-updates { padding-top: 1.5rem; padding-bottom: 1.25rem; }
.home-updates h2 { font-size: 2rem; margin: 0; }
.home-updates .updates-form small { display: block; color: #8793a0; margin-top: .55rem; font-size: .82rem; }
.home-footer { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1.4rem; padding-top: 1.1rem; padding-bottom: 1.2rem; color: #697684; border-top: 1px solid rgba(130, 152, 177, .18); font-size: .78rem; }
.home-footer a { color: #8b98a6; margin-left: auto; }
.home-footer a:hover { color: #fff; }

/* Platform marquee */
.platform-strip { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; color: #dbe3eb; background: rgba(6, 9, 14, .92); border-top: 1px solid var(--eb-border); border-bottom: 1px solid var(--eb-border); overflow: hidden; }
.platform-strip-title { display: flex; align-items: center; padding: .8rem 1.4rem; background: #0c121b; border-right: 1px solid var(--eb-border); white-space: nowrap; }
.platform-strip-title span { color: #fff; font-family: "Special Elite", Georgia, serif; font-size: 1.15rem; }
.platform-marquee { min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.platform-track { display: flex; align-items: center; width: max-content; transform: translate3d(0,0,0); will-change: transform; backface-visibility: hidden; animation: platform-scroll 42s linear infinite; }
.platform-loop { display: flex; flex: 0 0 auto; align-items: center; contain: layout paint; }
.platform-item { display: inline-flex; flex: 0 0 190px; align-items: center; justify-content: center; gap: .65rem; width: 190px; padding: .92rem 1rem; color: #aeb9c5; border-right: 1px solid rgba(104, 126, 151, .16); pointer-events: none; user-select: none; }
.platform-item iconify-icon { color: #fff; font-size: 1.45rem; }
.platform-item b { font-size: .88rem; font-weight: 600; }
.platform-strip-compact { margin-top: 0; background: #070a0f; }
.platform-strip-compact .platform-strip-title { padding-left: max(1.4rem, calc((100vw - 1320px) / 2)); }
@keyframes platform-scroll { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }

/* Internal page structure */
.site-main { min-height: 64vh; background-image: radial-gradient(circle at 80% 0%, rgba(49,94,251,.08), transparent 26rem), linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px); background-size: auto, 64px 64px, 64px 64px; }
.page-hero, .article-header { background: linear-gradient(135deg, #080d14 0%, #05070a 62%, #080b15 100%); border-color: var(--eb-border) !important; }
.page-hero h1 { margin-bottom: 1.1rem; }
.post-count { display: inline-block; color: #c2ccd6; background: #0c121b; border: 1px solid var(--eb-border); border-radius: 2px; padding: .7rem 1rem; font-size: .9rem; }
.empty-state { color: #aab5c0; text-align: center; }

/* Dev Log cards */
.devlog-card { overflow: hidden; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.devlog-card:hover { transform: translateY(-5px); border-color: #46566b; box-shadow: 0 20px 60px rgba(0,0,0,.36); }
.card-img-link { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #030507; border-bottom: 1px solid var(--eb-border); }
.devlog-card .card-img-top { width: 100%; height: 100%; object-fit: cover; filter: saturate(.72) brightness(.78); transition: transform .4s ease, filter .3s ease; }
.devlog-card:hover .card-img-top { transform: scale(1.025); filter: saturate(.95) brightness(.92); }
.devlog-card .card-body { padding: 1.35rem; }
.devlog-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.devlog-meta .badge { border-radius: 2px; font-size: .72rem; letter-spacing: .04em; }
.devlog-meta time { color: #8693a1; font-size: .82rem; }
.devlog-card .card-title { font-size: 1.75rem; line-height: 1.15; margin-bottom: .8rem; }
.devlog-card .card-title a { color: #fff; }
.devlog-card .card-title a:hover { color: #a8c3ff; }
.devlog-card .card-text { color: #9eabb8; font-size: .98rem; line-height: 1.6; }
.devlog-card small { color: #71808f; }
.read-more { color: #dce7ff; font-size: .89rem; font-weight: 700; }
.read-more span { color: var(--eb-cyan); margin-left: .25rem; transition: margin-left .15s ease; }
.read-more:hover span { margin-left: .5rem; }

/* Updates */
.updates-card { color: #dfe6ee; background: linear-gradient(110deg, #10182a, #0a0f18 60%, #0d1421); border: 1px solid #34425a !important; }
.updates-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--eb-blue); }
.updates-card h2 { font-size: 2.15rem; margin-bottom: .65rem; }
.updates-card p { color: #a7b3c0; }
.updates-form .form-text { display: block; color: #7d8a98; margin-top: .55rem; }
.article-sidebar .updates-card .card-body { padding: 1.25rem !important; }
.article-sidebar .updates-card .row { display: block; }
.article-sidebar .updates-card [class*="col-"] { width: 100%; }
.article-sidebar .updates-card h2 { font-size: 1.55rem; }
.article-sidebar .updates-card p { font-size: .9rem; }
.article-sidebar .updates-card .input-group { display: block; }
.article-sidebar .updates-card .form-control, .article-sidebar .updates-card .btn { width: 100%; border-radius: 3px !important; }
.article-sidebar .updates-card .btn { margin-top: .6rem; }

/* Article */
.article-header h1 { margin-bottom: 1.1rem; }
.article-excerpt { color: #b6c0ca; font-size: clamp(1.08rem, 1.7vw, 1.35rem); line-height: 1.55; max-width: 800px; }
.article-meta { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; color: #8592a0; font-size: .9rem; margin-top: 1.5rem; }
.article-featured { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid #334052; border-radius: 3px; box-shadow: 18px 18px 0 rgba(49,94,251,.08); filter: saturate(.82) brightness(.9); }
.article-actions { border-color: var(--eb-border) !important; background: #070a0f; }
.back-link { color: #b8c4d0; font-size: .92rem; font-weight: 700; }
.back-link:hover { color: #fff; }
.article-content { color: #d9e0e7; font-size: 1.1rem; line-height: 1.82; }
.article-content > :first-child { margin-top: 0; }
.article-content p { margin-bottom: 1.45rem; }
.article-content :is(h1, h2, h3, h4, h5, h6) { font-family: "Special Elite", Georgia, serif !important; font-weight: 400 !important; color: #fff; line-height: 1.16; }
.article-content h1 { margin-top: 3.25rem; margin-bottom: 1.15rem; font-size: clamp(2.35rem, 5vw, 3.5rem); }
.article-content h2 { margin-top: 3rem; margin-bottom: 1rem; font-size: 2.25rem; }
.article-content h3 { margin-top: 2.3rem; margin-bottom: .9rem; font-size: 1.8rem; }
.article-content h4 { margin-top: 2rem; margin-bottom: .8rem; font-size: 1.5rem; }
.article-content h5 { margin-top: 1.8rem; margin-bottom: .7rem; font-size: 1.28rem; }
.article-content h6 { margin-top: 1.6rem; margin-bottom: .65rem; font-size: 1.08rem; }
.article-content a { color: #85aaff; text-decoration: underline; text-decoration-color: rgba(133,170,255,.42); text-underline-offset: 3px; }
.article-content img { display: block; height: auto; margin: 2rem auto; border: 1px solid #354154; border-radius: 3px; }
.article-content figure { margin: 2.2rem 0; }
.article-content figure img { margin-bottom: .7rem; }
.article-content figcaption { color: #7d8a98; text-align: center; font-size: .86rem; }
.article-content blockquote { margin: 2.1rem 0; padding: 1.3rem 1.5rem; color: #e5ebf1; background: #0b1119; border-left: 4px solid var(--eb-blue); font-family: "Special Elite", Georgia, serif; font-size: 1.2rem; }
.article-content pre { padding: 1.2rem; color: #d6e2f0; background: #04070b; border: 1px solid #263241; border-radius: 3px; overflow: auto; }
.article-content table { width: 100%; margin: 2rem 0; border-collapse: collapse; }
.article-content th, .article-content td { padding: .8rem; border: 1px solid #303d4e; }
.article-content th { background: #0d141e; }
.article-sidebar { font-size: .95rem; }
.sidebar-sticky { top: 96px; }
.sidebar-card .card-body { padding: 1.25rem; }
.sidebar-card h2 { font-size: 1.45rem; margin-bottom: 1rem; }
.sidebar-card p { color: #98a5b3; margin: 1rem 0 0; line-height: 1.6; }
.status-pill { display: inline-flex; align-items: center; gap: .55rem; color: #dbe5ec; font-size: .8rem; font-weight: 700; }
.status-pill i { width: 8px; height: 8px; background: var(--eb-green); border-radius: 50%; box-shadow: 0 0 12px var(--eb-green); }
.recent-list { --bs-list-group-bg: transparent; --bs-list-group-border-color: #263140; }
.recent-list .list-group-item { display: grid; gap: .15rem; padding: .8rem 0; color: #cbd4dd; background: transparent; border-left: 0; border-right: 0; }
.recent-list .list-group-item:hover { color: #fff; background: transparent; }
.recent-list .list-group-item.active { color: #9eb7ff; background: transparent; border-color: #263140; }
.recent-list small { color: #758291; font-size: .76rem; }
.article-nav-card { color: #dce4ec; }
.article-nav-card:hover { color: #fff; border-color: #4a5a71; }
.article-nav-card .card-body { display: grid; gap: .3rem; padding: 1rem; }
.article-nav-card small { color: #7f8c99; }
.article-nav-card b { font-family: "Special Elite", Georgia, serif; font-size: 1.05rem; }

/* Footer */
.site-footer { color: #9aa7b4; background: #05070a; border-top: 1px solid var(--eb-border); }
.footer-brand small { max-width: 230px; line-height: 1.3; }
.footer-copy p { margin: 0; color: #b4bec8; font-size: .88rem; }
.footer-copy small { color: #727f8d; font-size: .78rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; }
.footer-nav a { color: #8d99a6; font-size: .86rem; font-weight: 600; }
.footer-nav a:hover { color: #fff; }
.back-to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 1000; width: 42px; height: 42px; color: #fff; background: #111825; border: 1px solid #3a4759; border-radius: 3px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, background .2s ease; }
.back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--eb-blue); border-color: var(--eb-blue); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .48s ease var(--delay, 0ms), transform .48s ease var(--delay, 0ms); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1199.98px) {
  .home-main { padding-top: 6rem; }
  .article-content { font-size: 1.05rem; }
}

@media (max-width: 991.98px) {
  body { font-size: 16px; }
  .py-lg-6 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
  .pb-lg-6 { padding-bottom: 4rem !important; }
  .home-shell { min-height: auto; }
  .home-background { background-position: 58% top; background-size: auto 780px; }
  .home-main { min-height: 760px; padding-top: 25rem; padding-bottom: 2rem; }
  .home-copy { padding: 1.3rem; background: rgba(0,0,0,.66); border-left: 3px solid var(--eb-blue); backdrop-filter: blur(8px); }
  .home-latest { margin-bottom: 1rem; }
  .platform-strip { grid-template-columns: 1fr; }
  .platform-strip-title { justify-content: center; border-right: 0; border-bottom: 1px solid var(--eb-border); }
  .platform-strip-compact .platform-strip-title { padding-left: 1rem; }
  .article-featured { box-shadow: 10px 10px 0 rgba(49,94,251,.08); }
  .sidebar-sticky { position: static !important; }
  .footer-nav { justify-content: flex-start !important; }
}

@media (max-width: 767.98px) {
  h1 { font-size: clamp(2.45rem, 14vw, 4rem); }
  h2 { font-size: 1.8rem; }
  .home-main { min-height: 700px; padding-top: 22rem; }
  .home-background { background-size: auto 700px; background-position: 51% top; }
  .home-copy { margin-inline: -.2rem; }
  .home-lead { font-size: 1.05rem; }
  .home-copy .btn { width: 100%; }
  .home-latest h2 { font-size: 1.55rem; }
  .home-updates { padding-top: 2rem; }
  .home-updates .input-group, .updates-form .input-group { display: block; }
  .home-updates .form-control, .home-updates .btn, .updates-form .form-control, .updates-form .btn { width: 100%; border-radius: 3px !important; }
  .home-updates .btn, .updates-form .btn { margin-top: .65rem; }
  .home-footer { align-items: flex-start; flex-direction: column; }
  .home-footer a { margin-left: 0; }
  .platform-item { flex-basis: 160px; width: 160px; padding: .8rem .8rem; }
  .platform-item b { font-size: .82rem; }
  .article-content { font-size: 1rem; line-height: 1.75; }
  .article-content h1 { font-size: 2.25rem; }
  .article-content h2 { font-size: 1.8rem; }
  .article-content h3 { font-size: 1.55rem; }
  .article-content h4 { font-size: 1.35rem; }
  .article-actions .container-xl { align-items: flex-start !important; flex-direction: column; }
  .devlog-card .card-title { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .platform-track { animation: none; }
}
