/* ---- PiShield landing page styles (Bulma + custom) ---- */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem; /* offset for fixed navbar when jumping to anchors */
}

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Narrower content column so the page reads less like a wide landscape banner,
   with generous side margins. `body .container` raises specificity above Bulma's
   own responsive `.container` max-width rules so this always wins. */
body .container {
  max-width: 540px;
}

/* Navbar */
.navbar.is-fixed-top {
  box-shadow: 0 2px 6px rgba(10, 10, 10, 0.08);
}
/* Logo at top-left; override Bulma's 1.75rem navbar image cap */
.navbar-item.brand-logo img {
  max-height: 2.4rem;
}
.navbar-item.is-tab {
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.navbar-item.is-tab:hover {
  border-bottom-color: #1f9e8f;
  background-color: transparent;
  color: #1f9e8f;
}

/* Hero (white, lets the colourful logo stand out) */
.hero-light {
  background: #ffffff;
}
.hero-logo img {
  max-height: 150px;
  width: auto;
  margin: 0 auto;
}
.hero-light .authors a {
  color: #1f9e8f;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.install-snippet {
  background: #f0f3f6;
  color: #137a6e;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
}

/* Overview image: keep aspect ratio (no horizontal stretch) */
.overview-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 340px;
  height: auto;
  margin: 0 auto;
}

/* Feature + requirement boxes */
.feature-box,
.req-box,
.example-box {
  height: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(10, 10, 10, 0.06);
}
.feature-box pre {
  background: #f5f7fa;
  border-radius: 6px;
  font-size: 0.78rem;
}
/* Elbow (tree) connectors from the Shield Layer box to the three requirement types.
   Box centres sit at 1/6, 1/2 and 5/6 of the container width (three equal columns). */
.elbow-connector {
  position: relative;
  height: 52px;
  margin-top: 0.75rem;
}
.elbow-connector span {
  position: absolute;
  background: #1f9e8f;
}
.elbow-connector .trunk { left: 50%; top: 0; width: 2px; height: 50%; transform: translateX(-1px); }
.elbow-connector .bus { left: 16.667%; right: 16.667%; top: 50%; height: 2px; }
.elbow-connector .drop { top: 50%; width: 2px; height: 50%; transform: translateX(-1px); }
.elbow-connector .drop-1 { left: 16.667%; }
.elbow-connector .drop-2 { left: 50%; }
.elbow-connector .drop-3 { left: 83.333%; }
.elbow-connector .head {
  background: transparent;
  bottom: -1px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid #1f9e8f;
  transform: translateX(-5px);
}
.elbow-connector .head-1 { left: 16.667%; }
.elbow-connector .head-2 { left: 50%; }
.elbow-connector .head-3 { left: 83.333%; }

/* Papers — flip cards */
.flip-card {
  background: transparent;
  perspective: 1200px;
  height: 200px;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}
/* On touch devices a flipped card needs a pointer cue */
.flip-card { cursor: pointer; }
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(10, 10, 10, 0.08);
}
.flip-card-front {
  background: #ffffff;
  border-top: 4px solid #1f9e8f;
}
.flip-card-back {
  background: #f6fbfa;
  border-top: 4px solid #1f9e8f;
  transform: rotateY(180deg);
}
.paper-venue {
  align-self: flex-start;
  margin-bottom: 0.6rem;
}
/* Card front with a figure on the right: text on the left, image on the right */
.flip-card-front.has-figure {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 1.1rem 1.2rem;
}
.flip-card-front.has-figure .paper-text {
  flex: 1 1 auto;
  min-width: 0;
}
.flip-card-front.has-figure .paper-fig {
  flex: 0 0 44%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.flip-card-front.has-figure .paper-fig img {
  max-width: 100%;
  max-height: 148px;
  object-fit: contain;
  border-radius: 4px;
}
.paper-title {
  font-weight: 600;
  line-height: 1.3;
  color: #2b2b2b;
}
.paper-authors {
  font-size: 0.82rem;
  color: #4a4a4a;
  margin-bottom: 0.5rem;
}
.paper-contrib {
  font-size: 0.9rem;
  color: #137a6e;
}

/* Memory-efficient loss card */
.loss-box {
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 10, 10, 0.06);
}

/* Performance tables */
.perf-box {
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(10, 10, 10, 0.06);
}
.table td.win {
  color: #157f43;
  font-weight: 700;
}
.table tr.avg-row {
  border-top: 2px solid #dbdbdb;
}
.table tr.avg-row td:first-child {
  font-weight: 600;
}

/* Authorship & maintenance — compact inline icon links after each name */
.inline-links {
  white-space: nowrap;
}
.inline-links a {
  margin: 0 0.12rem;
  color: #7a7a7a;
  font-size: 0.9rem;
}
.inline-links a:hover {
  color: #1f9e8f;
}
.authorship ul > li {
  margin-bottom: 0.5rem;
}

/* Team */
.team-links a {
  font-size: 1.25rem;
  margin: 0 0.4rem;
  color: #4a4a4a;
}
.team-links a:hover {
  color: #1f9e8f;
}

/* "Read the full documentation" button — a soft, pleasant green */
.read-docs-btn {
  background-color: #3aa564;
  border-color: transparent;
  color: #ffffff;
}
.read-docs-btn:hover,
.read-docs-btn:focus {
  background-color: #32925a;
  border-color: transparent;
  color: #ffffff;
}

/* Citation box (BibTeX) */
.cite-box {
  box-shadow: 0 4px 14px rgba(10, 10, 10, 0.06);
}
.cite-box pre {
  background: transparent;
  padding: 0;
  margin: 0;
}

/* References */
.references p {
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}
