:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --border: rgba(255,255,255,0.12);
  --shadow: 0 14px 30px rgba(0,0,0,0.35);
  --radius: 16px;
}

*{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin: 0;
  background: radial-gradient(1200px 800px at 15% 10%, rgba(80,120,255,0.22), transparent 50%),
              radial-gradient(1000px 700px at 80% 30%, rgba(80,255,200,0.14), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.45;
}

.container{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header{
  position: static;
  z-index: auto;
  backdrop-filter: blur(10px);
  background: rgba(10, 18, 35, 0.65);
  border-bottom: 1px solid var(--border);
}


.header-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}

.title{
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
}
.subtitle{
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.nav{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-link{
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
}
.nav-link:hover{
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
}
.nav-link[aria-current="page"]{
  border-color: var(--border);
  background: rgba(255,255,255,0.06);
}

main{ padding: 22px 0 34px; }

.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.grid > .card, .grid > article{
  grid-column: span 6;
}

@media (max-width: 800px){
  .header-row{ flex-direction: column; align-items: flex-start; }
  .grid > .card, .grid > article{ grid-column: span 12; }
}

.bullets{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.bullets b{ color: var(--text); }

.cta-row{
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.button{
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.button:hover{ background: rgba(255,255,255,0.14); }
.button:active{ transform: translateY(1px); }
.button-secondary{
  background: rgba(255,255,255,0.06);
}

.text-link{
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.25);
}
.text-link:hover{
  border-bottom-color: rgba(255,255,255,0.55);
}

.muted{ color: var(--muted); }
.tiny{ font-size: 12px; }

.site-footer{
  border-top: 1px solid var(--border);
  padding: 16px 0;
  background: rgba(10, 18, 35, 0.35);
}
.footer-row{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.charts-grid{
  grid-template-columns: repeat(12, 1fr);
  margin-top: 14px;
}
.chart-card{
  grid-column: span 6;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.chart-card h3{
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text);
}
.chart-card canvas{
  width: 100% !important;
  height: 260px !important;
}
.chart-wide{ grid-column: span 8; }
@media (max-width: 900px){
  .chart-card{ grid-column: span 12; }
  .chart-wide{ grid-column: span 12; }
}

.controls{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.field{
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field span{
  font-size: 12px;
  color: var(--muted);
}
.field input, .field select{
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline: none;
}
.field input:focus, .field select:focus{
  border-color: rgba(255,255,255,0.30);
}

.hint{
  color: rgba(255,255,255,0.55);
  font-size: 11px;
}

.param-fields{
  grid-column: span 6;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.param-fields .field{ grid-column: span 6; }

.buttons{
  grid-column: span 3;
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: flex-start;
  flex-wrap: wrap;
}
@media (max-width: 900px){
  .field{ grid-column: span 12; }
  .param-fields{ grid-column: span 12; }
  .buttons{ grid-column: span 12; }
}

.summary{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.summary-row{
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
}

/* ===== Home hero ===== */
body.home{
  overflow-x: hidden;
}

#neuron-canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.home .site-header{
  position: relative;
  z-index: 2;
}

/* .home-hero{
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 86px);
  display: grid;
  place-items: center;
  padding: 26px 16px 40px;
} */

.home-hero{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 16px;
}

/* .hero-inner{
  text-align: center;
  padding: 22px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10, 18, 35, 0.42);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
} */

.hero-inner{
  text-align: center;
  padding: 0;               /* no panel padding */
  border-radius: 0;
  border: none;             /* remove border */
  background: transparent;  /* remove background */
  backdrop-filter: none;
  box-shadow: none;         /* remove shadow */
}

.hero-title{
  margin: 0 0 14px;   /* remove default top margin that pushes content up */
  font-size: clamp(34px, 6vw, 64px);
  letter-spacing: 0.6px;
  line-height: 1.05;
}

/* .hero-button{
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 15px;
} */

.hero-button{
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 15px;
  background: rgba(255,255,255,0.14);
}
.hero-button:hover{
  background: rgba(255,255,255,0.18);
}

/* ===== Modal (subwindow) ===== */
.modal{
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;

  /* NEW: vertical + horizontal centering */
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
}
.modal[aria-hidden="false"]{
  display: flex; /* was block */
}

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}

.modal-panel{
  position: relative;
  width: min(900px, calc(100% - 28px));
  margin: 0; /* was: 10vh auto; */
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(12, 20, 40, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  overflow: hidden;
}

.modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.modal-header h2{
  margin: 0;
  font-size: 16px;
  color: rgba(255,255,255,0.92);
}

.icon-btn{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
}
.icon-btn:hover{
  background: rgba(255,255,255,0.10);
}

.modal-content{
  padding: 16px;
}

.modal-grid{
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.modal-card{
  grid-column: span 6;
  display: block;
  text-decoration: none;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  padding: 14px;
  transition: transform 120ms ease, background 120ms ease;
}
.modal-card:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.09);
}

.modal-card-title{
  font-size: 15px;
  color: rgba(255,255,255,0.92);
  margin-bottom: 8px;
}
.modal-card-desc{
  font-size: 13px;
  color: rgba(255,255,255,0.70);
  line-height: 1.4;
  margin-bottom: 10px;
}
.modal-card-cta{
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 10px;
}

@media (max-width: 820px){
  .modal-panel{ margin: 12vh auto; }
  .modal-card{ grid-column: span 12; }
}

.about-text p{
  margin: 0 0 12px;
  color: rgba(255,255,255,0.80);
  line-height: 1.55;
}

.corner-actions{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  display: flex;
  gap: 10px;         /* spacing between Graph and About */
  align-items: center;
}

#exploreModal .modal-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  justify-content: center;
}

#exploreModal .modal-card{
  width: 260px;     /* fixed size */
  height: 170px;    /* fixed size */
  padding: 0;       /* actions handle padding */
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* keeps split bar clean */
}

#exploreModal .card-body{
  padding: 14px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#exploreModal .modal-card-title{
  font-size: 15px;
  color: rgba(255,255,255,0.92);
  margin: 0;
}

#exploreModal .modal-card-desc{
  font-size: 13px;
  color: rgba(255,255,255,0.70);
  line-height: 1.4;
  margin: 0;

  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;     /* keeps text tidy */
  -webkit-box-orient: vertical;
}

/* Bottom action bar */
#exploreModal .card-actions{
  display: grid;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
}

#exploreModal .card-actions.two{
  grid-template-columns: 1fr 1fr;
}

#exploreModal .card-actions.one{
  grid-template-columns: 1fr;
}

#exploreModal .card-action{
  padding: 11px 10px;
  text-decoration: none;
  color: rgba(255,255,255,0.90);
  font-size: 13px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.10);
}

#exploreModal .card-actions.one .card-action{
  border-right: none;
}

#exploreModal .card-actions.two .card-action:last-child{
  border-right: none;
}

#exploreModal .card-action:hover{
  background: rgba(255,255,255,0.06);
}

#exploreModal .modal-card-cta{
  margin-top: 10px;
}

/* Mobile */
@media (max-width: 820px){
  .modal-panel{ width: calc(100% - 20px); }
  .modal-card{ grid-column: span 12; }
}

#exploreModal .card-action-disabled{
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}


/* #exploreModal .modal-grid{ justify-content: center; } */

.modal-card-disabled{
  opacity: 0.4;
  cursor: not-allowed;
}
.modal-card-disabled:hover{
  transform: none;
  background: rgba(255,255,255,0.06);
}

/* Make Explore modal panel fit the viewport and allow scrolling inside */
#exploreModal .modal-panel{
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
}

/* Scroll only the content area (cards) */
#exploreModal .modal-content{
  overflow: auto;
  max-height: 100%;
  padding: 16px;
}

/* Keep header fixed at top of the modal while content scrolls */
#exploreModal .modal-header{
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(12, 20, 40, 0.92);
  backdrop-filter: blur(14px);
}

/* Home page buttons: outline only, fill on hover */
body.home .button{
  background: transparent;                 /* no fill */
}

body.home .button:hover{
  background: rgba(255,255,255,0.12);      /* fill on hover */
}

/* ===== Graph modal canvas container ===== */
#graphModal .graph-wrap{
  display: grid;
  gap: 12px;
}

#graphModal .graph-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#graphModal .graph-canvas-shell{
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  background: rgba(0,0,0,0.18);
  overflow: hidden;
}

#graphModal #graphCanvas{
  display: block;
  width: 100%;
  height: 420px; /* visual height */
}

#graphModal .graph-canvas-shell{
  cursor: grab;
}
#graphModal .graph-canvas-shell.dragging{
  cursor: grabbing;
}

/* Bigger left/right padding for Home buttons */
body.home .hero-button,
body.home .corner-actions .button{
  padding-left: 30px;
  padding-right: 30px;
}

.nav-link.is-current{
  pointer-events: none;          /* not clickable */
  opacity: 0.6;                  /* disabled look */
  cursor: default;
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
}

main.container{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cards-columns{
  display: grid;
  gap: 14px;
  grid-template-columns: var(--grid-cols, 1fr 1fr);
  align-items: start;
}

.cards-columns .col{
  display: flex;
  flex-direction: column;
  gap: 14px;          /* spacing between cards in a column */
}

@media (max-width: 900px){
  .cards-columns{
    grid-template-columns: 1fr; /* collapse to single column */
  }
}

