/*------------------------------------------------------------------------------
  Fonts
------------------------------------------------------------------------------*/
@font-face {
  font-family: "Lato";
  src: url("../assets/fonts/LatoLatin-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
  unicode-range: U+000-5FF;
}

@font-face {
  font-family: "Lato";
  src: url("../assets/fonts/LatoLatin-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+000-5FF;
}

@font-face {
  font-family: "Lato";
  src: url("../assets/fonts/LatoLatin-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+000-5FF;
}

@font-face {
  font-family: "Lato";
  src: url("../assets/fonts/LatoLatin-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+000-5FF;
}

@font-face {
  font-family: "Lato";
  src: url("../assets/fonts/LatoLatin-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+000-5FF;
}

@font-face {
  font-family: "Lato";
  src: url("../assets/fonts/LatoLatin-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+000-5FF;
}

/*------------------------------------------------------------------------------
  Plasma Background
------------------------------------------------------------------------------*/
/* Prevent mobile overscroll + viewport bounce */
html, body {
  overscroll-behavior: none;
}

/* Lock the WebGL background to a stable viewport */
#plasma_background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh; /* stable viewport height (iOS-safe) */
  z-index: -1;
  overflow: hidden;
  pointer-events: none;

  /* Static fallback */
  background: #000;
}



/*------------------------------------------------------------------------------
  Root Scaling
------------------------------------------------------------------------------*/
html {
  font-size: 140%;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/*------------------------------------------------------------------------------
  Basic Page Setup
------------------------------------------------------------------------------*/
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Lato", sans-serif;
  font-weight: 400;
  background-color: #000000;
  color: #ffffff;
  overflow-x: hidden;
}

/*------------------------------------------------------------------------------
  Center Content
------------------------------------------------------------------------------*/
.center {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
  /* Adds space at top and bottom */
}

/*------------------------------------------------------------------------------
  Content Wrapper
------------------------------------------------------------------------------*/
.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/*------------------------------------------------------------------------------
  Headings
------------------------------------------------------------------------------*/
h1 {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: clamp(0.06em, 1vw, 0.15em);
}

#home p {
  margin: 0;
  font-weight: 100;
  text-transform: lowercase;
}


/*------------------------------------------------------------------------------
  Lato Font Weights
------------------------------------------------------------------------------*/
.lato-thin {
  font-weight: 100;
}

.lato-light {
  font-weight: 300;
}

.lato-regular {
  font-weight: 400;
}

.lato-bold {
  font-weight: 700;
}

.lato-black {
  font-weight: 900;
}

/*------------------------------------------------------------------------------
  Product Section
------------------------------------------------------------------------------*/
#products {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 850px;
  text-align: left;
  padding: 0 1rem;
}

.product {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 1.25rem;
  gap: 0.3rem;
  text-decoration: none;
  color: inherit;
  background-color: #00000000;
  border-radius: 0.5rem;
  border: 1px solid #bcbcbc;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.product h2 {
  margin: 0;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.product p {
  margin: 0;
  font-weight: 400;
  color: #eeeeee;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.product span {
  margin: 0;
  font-weight: 300;
  font-size: 0.7rem;
  color: #bcbcbc;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

.product:hover {
  border-color: #ffffff;
  transform: translateX(3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/*------------------------------------------------------------------------------
  Description Section
------------------------------------------------------------------------------*/
#description {
  width: 100%;
  max-width: 1400px;
  /* Matches #benchmarks for consistent page width */
  padding: 0 1rem;
}

.section-lead {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #bcbcbc;
  text-align: justify;
  /* Always justified – even on mobile */
  hyphens: auto;
  max-width: 1400px;
  /* Comfortable reading width */
  padding: 0 1rem;
}

/*------------------------------------------------------------------------------
  Benchmarks Section
------------------------------------------------------------------------------*/
#benchmarks {
  width: 100%;
  max-width: 1100px;
  padding: 0 1rem;
  margin-top: 3rem;
}

#benchmarks h2 {
  margin: 0 0 1rem 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.benchmark-note {
  font-size: 0.9rem;
  color: #bcbcbc;
  text-align: justify;
  hyphens: auto;
  margin: 0 auto 2.5rem auto;
  padding: 0 1rem;
  line-height: 1.6;
}

.benchmark-grid {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.benchmark {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.benchmark h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cccccc;
  text-align: center;
  line-height: 1.2;
}

.position-detail {
  margin: 0;
  font-size: 0.8rem;
  color: #cccccc;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

/*------------------------------------------------------------------------------
  Benchmarks Row Layout
------------------------------------------------------------------------------*/
.benchmark-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: nowrap;
  min-width: 0;
}

/*------------------------------------------------------------------------------
  Bookmark Image
------------------------------------------------------------------------------*/
.benchmark-image {
  width: 180px;
  aspect-ratio: 1 / 1;
  object-fit: contain;

  background-color: #000000;
  border: 1px solid #666666;

  border-radius: 0;
  /* ← important */
  flex-shrink: 0;
  min-width: 120px;
}

/*------------------------------------------------------------------------------
  Bar Chart
------------------------------------------------------------------------------*/
.bar-chart {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.bar-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.bar {
  padding: 0.6rem 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;

  display: flex;
  justify-content: space-between;
  align-items: center;

  width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

.bar .label {
  min-width: 0;
}

.bar .time {
  font-weight: 700;
  flex-shrink: 0;
  text-align: right;
}

/* Bar colors */
.bar.artemis {
  background-color: #ffffff;
  color: #000000;
}

.bar.stockfish {
  background-color: #555555;
  color: #ffffff;
}

/*------------------------------------------------------------------------------
  Bookmark Footer
------------------------------------------------------------------------------*/
.benchmark-footnote {
  margin: 3rem auto 0 auto;
  max-width: 1100px;
  width: 100%;
  padding: 0 1rem;
  font-size: 0.8rem;
  color: #888888;
  text-align: justify;
  hyphens: auto;
  line-height: 1.6;
}

/*------------------------------------------------------------------------------
  Responsive
------------------------------------------------------------------------------*/
@media (max-width: 900px) {
  .benchmark-image {
    width: 150px;
    height: auto;
    /* keep square via aspect-ratio */
    border-radius: 0;
  }

  .bar {
    font-size: 0.78rem;
  }

  .bar .label {
    overflow: hidden;
    text-overflow: ellipsis;
    /* show ellipsis */
    white-space: nowrap;
  }
}

@media (max-width: 700px) {
  .benchmark-image {
    width: 130px;
    height: auto;
    border-radius: 0;
  }

  .bar {
    font-size: 0.72rem;
  }

  .benchmark-row {
    gap: 0.5rem;
  }

  .bar .label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 550px) {
  .benchmark-image {
    width: 110px;
    height: auto;
    border-radius: 0;
  }

  .bar {
    font-size: 0.68rem;
  }

  .bar .label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    /* optional max width to avoid too-long text */
  }
}

/*------------------------------------------------------------------------------
  GitHub Links
------------------------------------------------------------------------------*/
.source-link {
  display: inline-block;
  padding: 0.6rem 1.1rem;

  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.75rem;

  border: 1px solid #bcbcbc;
  border-radius: 0.45rem;
  background-color: transparent;

  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.source-link:hover {
  border-color: #ffffff;
  transform: translateX(3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.source-link:focus-visible {
  outline: none;
  border-color: #ffffff;
}
