/* ============================================================
 *  GCModeller — site theme
 *  Dark academic / life-science theme derived from the
 *  "Life Factor · 3D Knowledge Network" hero page.
 *  Palette: near-black · GCModeller red · steel gray-blue
 * ============================================================ */

:root {
  --bg: #0a0d12;
  --bg-elev: #10141c;
  --bg-code: #0d1117;
  --ink: #eef2f7;
  --ink-dim: #b9c6d6;
  --ink-faint: #8ba0b9;
  --ink-mute: #5f7290;
  --red: #ff3b2f;
  --red-soft: rgba(255, 59, 47, 0.12);
  --steel: #7d94ad;
  --line: rgba(146, 166, 196, 0.14);
  --line-soft: rgba(146, 166, 196, 0.08);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", "PingFang SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection {
  background: rgba(255, 59, 47, 0.35);
  color: #fff;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ------------------------------------------------------------
 *  Top navigation
 * ------------------------------------------------------------ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(10, 13, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(255, 59, 47, 0.25));
}
.brand-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-txt strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-txt em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.links a {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  transition: color 0.2s;
  position: relative;
  padding: 6px 0;
}
.links a:hover {
  color: var(--ink);
}
.links a.active {
  color: var(--ink);
}
.links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.links a.gh {
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 8px;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.links a.gh:hover {
  border-color: rgba(146, 166, 196, 0.4);
  background: rgba(146, 166, 196, 0.06);
}

@media (max-width: 860px) {
  .links {
    gap: 18px;
  }
  .brand-txt em {
    display: none;
  }
  .links a {
    font-size: 12.5px;
  }
}

/* ------------------------------------------------------------
 *  Buttons
 * ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--red);
  border: 1px solid transparent;
  transition:
    transform 0.18s,
    box-shadow 0.18s,
    background 0.18s;
  cursor: pointer;
}
.btn:hover {
  background: #ff4a3e;
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(255, 59, 47, 0.35);
}
.btn.ghost {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line);
}
.btn.ghost:hover {
  color: var(--ink);
  border-color: rgba(146, 166, 196, 0.42);
  background: rgba(146, 166, 196, 0.06);
  box-shadow: none;
}
.btn .arr {
  transition: transform 0.18s;
}
.btn:hover .arr {
  transform: translateX(3px);
}

/* ------------------------------------------------------------
 *  Content page scaffold
 * ------------------------------------------------------------ */
.page {
  padding: 150px 0 90px;
  min-height: 100vh;
  position: relative;
}
.page::before {
  /* faint red aurora, academic but alive */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      900px 480px at 85% -10%,
      rgba(255, 59, 47, 0.07),
      transparent 60%
    ),
    radial-gradient(
      700px 420px at -10% 25%,
      rgba(93, 122, 168, 0.08),
      transparent 62%
    ),
    var(--bg);
}
.page-hero {
  max-width: 860px;
  margin-bottom: 84px;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--steel);
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--red);
  display: inline-block;
}
.page-hero h1 {
  margin: 22px 0 0;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.06;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.page-hero h1 strong {
  font-weight: 600;
}
.lead {
  margin: 26px 0 0;
  max-width: 40em;
  font-size: 19px;
  line-height: 1.75;
  font-weight: 300;
  color: var(--ink-faint);
}
.lead strong {
  color: var(--ink-dim);
  font-weight: 500;
}

/* ------------------------------------------------------------
 *  Essay prose (science page)
 * ------------------------------------------------------------ */
.prose {
  max-width: 760px;
}
.prose p {
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.92;
  color: var(--ink-faint);
  margin: 0 0 26px;
}
.prose p strong {
  color: var(--ink-dim);
  font-weight: 600;
}
.prose p .hl {
  color: var(--ink);
}
.prose sup {
  font-size: 0.62em;
  color: var(--ink-mute);
}

.sec {
  padding: 72px 0 8px;
  border-top: 1px solid var(--line-soft);
  margin-top: 72px;
}
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 34px;
}
.sec-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.1em;
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.pull {
  max-width: 760px;
  margin: 46px 0;
  padding: 30px 34px;
  border-left: 2px solid var(--red);
  background: linear-gradient(90deg, var(--red-soft), transparent 70%);
  border-radius: 0 12px 12px 0;
}
.pull p {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.65;
  color: var(--ink);
  font-style: italic;
}
.pull p b {
  font-style: normal;
  font-weight: 600;
}

/* timeline (history milestones) */
.tl {
  margin: 40px 0 10px;
  border-left: 1px solid var(--line);
  padding-left: 30px;
}
.tl-item {
  position: relative;
  padding-bottom: 30px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -34.5px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--red);
}
.tl-item .tl-year {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.08em;
}
.tl-item h3 {
  margin: 6px 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.tl-item p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-faint);
  max-width: 42em;
}

/* ------------------------------------------------------------
 *  Cards / grids
 * ------------------------------------------------------------ */
.grid {
  display: grid;
  gap: 18px;
}
.grid.c2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid.c3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid.c4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 980px) {
  .grid.c3,
  .grid.c4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .grid.c2,
  .grid.c3,
  .grid.c4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 26px 26px 24px;
  transition:
    border-color 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: rgba(255, 59, 47, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}
.card .ic {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-soft);
  color: var(--red);
  font-size: 17px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 59, 47, 0.22);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}
.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-faint);
}
.card .go {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card a.go:hover {
  text-decoration: underline;
}

.pill {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--red-soft);
  color: #ff7a6e;
  border: 1px solid rgba(255, 59, 47, 0.25);
  margin: 0 4px 6px 0;
}

/* ------------------------------------------------------------
 *  Code blocks
 * ------------------------------------------------------------ */
.code {
  background: var(--bg-code);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  margin: 22px 0;
}
.code .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(146, 166, 196, 0.04);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.code .code-head .dots {
  display: flex;
  gap: 6px;
}
.code .code-head .dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(146, 166, 196, 0.22);
}
.code .code-head .dots i:first-child {
  background: rgba(255, 59, 47, 0.55);
}
.code pre {
  margin: 0;
  padding: 18px 22px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.85;
  color: #c9d6e6;
  overflow-x: auto;
}
.code .cm {
  color: #56637a;
} /* comment */
.code .kw {
  color: #ff7a6e;
} /* keyword */
.code .st {
  color: #9ecb8f;
} /* string  */
.code .fn {
  color: #7fb3e0;
} /* function*/

/* ------------------------------------------------------------
 *  Steps (install page)
 * ------------------------------------------------------------ */
.step {
  display: flex;
  gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--line-soft);
}
.step:first-of-type {
  border-top: none;
}
.step-n {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(255, 59, 47, 0.25);
}
.step-body {
  flex: 1;
  min-width: 0;
}
.step-body h3 {
  margin: 4px 0 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.step-body p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-faint);
  max-width: 46em;
}
.step-body code.inl {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-code);
  border: 1px solid var(--line-soft);
  padding: 2px 8px;
  border-radius: 6px;
  color: #ff9d92;
}

/* ------------------------------------------------------------
 *  Notes / citations
 * ------------------------------------------------------------ */
.note {
  display: flex;
  gap: 14px;
  background: rgba(125, 148, 173, 0.07);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-faint);
  max-width: 760px;
}
.note .n-ic {
  color: var(--steel);
  font-weight: 700;
}
.cite {
  max-width: 760px;
  padding: 24px 28px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-family: var(--serif);
  font-size: 15.5px;
  color: var(--ink-faint);
  line-height: 1.8;
}
.cite b {
  color: var(--ink-dim);
  font-weight: 600;
}
.cite .doi {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--steel);
}

/* ------------------------------------------------------------
 *  Footer
 * ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: rgba(13, 17, 23, 0.6);
  padding: 58px 0 30px;
  margin-top: 90px;
}
.foot-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: start;
}
@media (max-width: 860px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }
}
.foot-brand {
  display: flex;
  gap: 16px;
}
.foot-brand img {
  /* width: 52px; */
  height: 150px;
  object-fit: contain;
}
.foot-brand strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}
.foot-brand p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--ink-mute);
  max-width: 24em;
  line-height: 1.7;
}
.foot-h {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 16px;
}
.foot-links a,
.foot-contact p {
  display: block;
  font-size: 14px;
  color: var(--ink-faint);
  padding: 4px 0;
  transition: color 0.2s;
}
.foot-links a:hover {
  color: var(--ink);
}
.foot-contact a {
  color: var(--steel);
}
.foot-contact a:hover {
  text-decoration: underline;
}
.foot-legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-mute);
}
.foot-legal .mono {
  font-family: var(--mono);
  font-size: 12px;
}

/* ------------------------------------------------------------
 *  Homepage-specific helpers (used by index.html)
 * ------------------------------------------------------------ */
.strip {
  position: fixed;
  left: 30px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 1s ease 0.8s;
}
body.ready .strip {
  opacity: 1;
}
.strip a {
  color: var(--ink-mute);
  transition: color 0.2s;
}
.strip a:hover {
  color: var(--ink);
}
.strip .sep {
  opacity: 0.4;
}
@media (max-width: 860px) {
  .strip {
    display: none;
  }
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease 0.15s;
}
.boot img {
  /* width: 74px; */
  height: 400px;
  object-fit: contain;
  animation: bootpulse 1.6s ease-in-out infinite;
}
.boot span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
@keyframes bootpulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.97);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}
body.ready .boot {
  opacity: 0;
  pointer-events: none;
}
