/* ibm plex sans font */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');

:root {
  --accent: oklch(0.726 0.174 338.433);
  --text: oklch(0.435 0.043 279.325);
  --background: oklch(0.958 0.006 264.532);
  --container-background: oklch(0.933 0.009 264.521);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: oklch(0.870 0.075 336.304);
    --text: oklch(0.879 0.043 272.277);
    --background: oklch(0.243 0.030 283.911);
    --container-background: oklch(0.216 0.025 284.065);
  }
}

body {
  background-color: var(--background);
  width: min(40rem, 90vw);
  color: var(--text);
  margin: auto;

  font-family: "IBM Plex Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

/* General styles */
a {
  color: var(--text);
  text-decoration-color: var(--accent);
  transition-duration: 0.2s;
  display: inline-block;
}

a:hover {
  color: var(--accent);
  transform: translateY(-0.2em);
}

img {
  max-width: min(40rem, 90vw);
  height: auto;
  border-radius: 1rem;
}

header {
  margin: 1rem 0px 1rem 0px;
  nav {
    font-size: 1.5em;
    padding: 0.5em;
    display: flex;
    justify-content: space-between;
  }

  img {
    max-width: 6rem;
  }
}

hr {
  border: none;
  border-top: 1px solid var(--container-background);
}

footer {
  padding: 1rem;
  margin: 1rem 0px 1rem 0px;
  background-color: var(--container-background);
  border-radius: 1rem;

  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;

  * {
    flex: 1;
  }

  #footer-left * {
    margin: 0px;
  }

  nav {
    height: 100%;
    text-align: right;
  }
}

/* Detail grid for CTF info */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.detail-item {
  background-color: var(--container-background);
  padding: 1rem 1.25rem;
  border-radius: 1rem;

  h3 {
    margin: 0 0 0.25rem 0;
    font-size: 0.85em;
    font-weight: 400;
    color: var(--accent);
  }

  p {
    margin: 0;
    font-weight: 500;
  }
}

@media (max-width: 30rem) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Sponsors */
.sponsor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin: 1rem 0;

  img {
    max-width: 10rem;
    max-height: 4rem;
    object-fit: contain;
  }
}

.subtle {
  font-size: 0.9em;
  opacity: 0.75;
}
