/*! HTML5 Boilerplate v9.0.0-RC1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: var(--color-brand-green);
  text-shadow: none;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

img,
svg {
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
  }

  nav {
    display: none;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}


/* ==========================================================================
   VARIABLES
   ========================================================================== */

:root {
  --color-white: rgba(255, 255, 255, 1);
  --color-background: var(--color-white);
  --color-light: var(--color-gray);
  --color-text: rgba(17, 17, 17, 1);
  --color-gray: rgba(241, 241, 241, 1);
  --color-brand-orange: rgba(242, 113, 65, 1);
  --color-brand-yellow: rgba(242, 208, 39, 1);
  --color-brand-green: rgba(220, 242, 48, 1);
  --color-brand-blue: rgba(26, 198, 217, 1);
  --color-brand-pink: rgba(242, 41, 135, 1);
  --color-action: rgba(26, 77, 217, 1);
  --size-xxs: 0.5rem;
  --size-xs: 0.75rem;
  --size-s: 1rem;
  --size-m: 1.25rem;
  --size-l: 1.5rem;
  --size-xl: 3rem;
  --size-xxl: 5rem;
  --size-xxxl: 6rem;
  --grid-l: repeat(17,1fr);

  @media (prefers-color-scheme: dark) {
    --color-background: rgba(17, 17, 17, 1);
    --color-text: rgba(241, 241, 241, 1);
    --color-light: rgba(241, 241, 241, 0.1);
  }
}


/* ==========================================================================
   GENERAL
   ========================================================================== */

html {
  color: var(--color-text);
  font-size: var(--size-s);
  line-height: 1.5;
  border-style: solid;
  border-width: 20px 0 0 0;
  border-image: url("../img/border.svg") 20 0 0 0 repeat repeat;
  scroll-behavior: smooth;
  min-height: 100vh;

  @media (min-width: 1000px) {
    border-width: 0 0 0 40px;
    border-image: url("../img/border.svg") 0 0 0 40 repeat repeat;
  }
}

body {
  font-family: "Syne", Helvetica, Arial, sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  background-color: var(--color-background);
}

main,
footer {
  max-width: 1440px;
  margin: 0 auto;
}

header {
  h1 {
    grid-column: 2/17;
    font-size: clamp(2.25rem, 1.18rem + 5.36vw, var(--size-xxxl));
    margin-top: var(--size-xl);

    @media (min-width: 800px) {
      margin-top: var(--size-xxl);
    }
  }

  .primary-content {
    @media (max-width: 799px) {
      margin-bottom: var(--size-s);
    }
  }

  img {
    border-radius: var(--size-xxs);
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: top left;

    @media (min-width: 800px) {
      height: auto;
      aspect-ratio: 1 / 1;
    }

    @media (min-width: 1280px) {
      height: 248px;
    }
  }

  nav {
    grid-column: 2/17;
    margin-top: var(--size-xs);

    @media (min-width: 480px) {
      margin-top: var(--size-m);
    }

    ul {
      margin: 0;
    }

    li {
      flex: 1 0 100%;

      @media (min-width: 480px) {
        flex-basis: auto;
      }

      @media (min-width: 800px) {
        flex-grow: 0;
      }
    }

    a {
      background-color: var(--color-light);
      border-radius: var(--size-xxs);
      padding: var(--size-xs) var(--size-m);
      display: flex;
      justify-content: space-between;
      gap: var(--size-xs);

      &:hover {
        background-color: var(--color-action);
        color: var(--color-light);

        @media (prefers-color-scheme: dark) {
          color: var(--color-white);
        }
      }

      &:focus-visible {
        color: var(--color-action);
        padding: var(--size-xs) var(--size-m);
        outline: 2px solid var(--color-action);
        text-decoration: none;
        border-radius: var(--size-xxs);
        background-color: var(--color-light);

        @media (prefers-color-scheme: dark) {
          outline: 2px solid var(--color-white);
          color: var(--color-text);
        }
      }
    }
  }
}

footer {
  display: grid;
  grid-template-columns: var(--grid-l);
}

.footer {
  grid-column: 2/17;
  display: flex;
  flex-flow: row wrap;
  gap: 0 var(--size-xl);
  justify-content: center;
  align-items: baseline;
  padding-top: var(--size-xxl);
  padding-bottom: var(--size-l);
  text-align: center;

  @media (min-width: 800px) {
    justify-content: space-between;
  }

  p {
    font-size: var(--size-s);
    margin-bottom: var(--size-l);
  }

  nav {
    ul {
      justify-content: center;
      gap: var(--size-m);
      font-size: var(--size-s);

      li a:hover {
        text-decoration: underline;
        text-decoration-thickness: 2px;
      }

      @media (min-width: 680px) {
        justify-content: space-between;
      }
    }
  }
}


/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1 {
  font-size: clamp(var(--size-l), 1.07rem + 2.14vw, var(--size-xl));
  font-weight: 800;
  line-height: 1.25;
  margin-top: var(--size-m);
  margin-bottom: var(--size-xs);

  @media (min-width: 1280px) {
    margin-top: var(--size-l);
    margin-bottom: var(--size-l);
  }
}

h2,
h3 {
  font-size: clamp(var(--size-m), 1.18rem + 0.36vw, var(--size-l));
}

h2 {
  margin-top: var(--size-xl);
  font-weight: 700;
}

h3 {
  font-weight: 800;
}

section {
  h2 {
    font-size: var(--size-s);
    font-weight: 700;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: var(--size-xl);
    margin-bottom: var(--size-xl);

      &:before,
      &:after {
        content: '';
        border-top: 4px solid;
        margin: 0 var(--size-l) 0 0;
        flex: 1 0 var(--size-l);
        border-radius: 2px;
        border-color: var(--color-light);
      }

      &:after {
        margin: 0 0 0 var(--size-l);
      }

      @media (min-width: 680px) {
        margin-top: var(--size-xxl);
        margin-bottom: var(--size-xxl);
      }

      @media (min-width: 1280px) {
        margin-top: var(--size-xxxl);
        margin-bottom: var(--size-xxxl);
      }
  }
}

h4 {
  font-size: clamp(var(--size-s), 0.93rem + 0.36vw, var(--size-m));
  font-weight: 800;
}

p,
ul,
address {
  font-size: clamp(var(--size-s), 0.93rem + 0.36vw, var(--size-m));
  margin-top: 0;
}

ul {
  padding-left: var(--size-m);

  li {
    padding-left: var(--size-xs);
  }
}

address {
  font-style: normal;
}

.p-lead {
  font-size: clamp(var(--size-m), 1.18rem + 0.36vw, var(--size-l));
}

a {
  color: var(--color-action);
  transition: all ease-in 0.1s;

  @media (prefers-color-scheme: dark) {
    color: var(--color-white);
  }

  &:hover {
    text-decoration-thickness: 2px;
  }

  &:focus-visible {
    padding: 4px;
    background-color: var(--color-action);
    color: var(--color-white);
    outline: 0;
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    border-radius: 2px;
  }
}

a.button {
  font-size: clamp(var(--size-m), 1.18rem + 0.36vw, var(--size-l));
  font-weight: 700;
  color: var(--color-action);
  background-color: var(--color-white);
  border-radius: var(--size-xl);
  padding: var(--size-xs);
  display: block;
  text-decoration: none;

  &:hover {
    background-color: var(--color-action);
    outline: 2px solid var(--color-white);
    color: var(--color-white);
  }

  &:focus-visible {
    outline: var(--size-xxs) double var(--color-white);
    color: var(--color-action);
  }

  @media (min-width: 680px) {
    display: inline-block;
    padding: var(--size-l) var(--size-xl);
  }
}

ul.list-of-links {
  font-size: clamp(var(--size-s), 0.93rem + 0.36vw, var(--size-m));
  display: flex;
  flex-flow: row wrap;
  padding-left: 0;
  gap: var(--size-xs);

  li {
    list-style-type: none;
    padding-left: 0;

    a {
      text-decoration: none;
    }
  }
}


/* ==========================================================================
   LAYOUT
   ========================================================================== */

.grid-container {
  display: grid;
  grid-template-columns: var(--grid-l);

  .primary-content {
    grid-column: 2/17;

    @media (min-width: 800px) {
      grid-column: 2/12;
    }
  }

  .secondary-content {
    grid-column: 2/17;

    @media (min-width: 800px) {
      grid-column: 13/17;
    }
  }
}


/* ==========================================================================
   CONTENT
   ========================================================================== */

.list-of-logos {
  padding: 0;
  display: grid;
  grid-template-columns: var(--grid-l);

  ul {
    grid-column: 2/17;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: var(--size-xxs);
    padding: 0;

    @media (min-width: 680px) {
      grid-template-columns: repeat(9, 1fr);
      grid-gap: var(--size-m);
    }

    @media (min-width: 1024px) {
      grid-template-columns: repeat(15, 1fr);
    }
  }

  li {
    list-style-type: none;
    padding: var(--size-xxs);
    grid-column: span 2;
    border-radius: var(--size-xxs);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    background-color: var(--color-gray);

    @media (min-width: 680px) {
      padding: var(--size-xs);
      grid-column: span 3;
    }
  }
}

ul.list-of-usp {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-flow: row wrap;
  gap: var(--size-xxs);
  font-size: var(--size-s);

  @media (min-width: 800px) {
    padding-left: var(--size-s);
    flex-direction: column;
    list-style-type: inherit;
  }

  li {
    padding-left: 0;

    &::after {
      content: "·";
      padding-left: var(--size-xxs);
    }

    &:last-child {
      &::after {
        display: none;
      }
    }

    @media (min-width: 800px) {
      padding-left: var(--size-xs);

      &::after {
        display: none;
      }
    }
  }
}

ul.list-of-publications {
  padding-left: 0;
  list-style-type: none;
  font-size: var(--size-s);

  li {
    padding-top: var(--size-s);
    padding-bottom: var(--size-s);
    padding-left: 0;
    border-top: 1px dashed var(--color-text);
  }
}

.milestones {
  display: grid;
  grid-template-columns: var(--grid-l);
  align-items: baseline;
  margin-top: var(--size-l);
  margin-bottom: var(--size-l);

  @media (min-width: 680px) {
    margin-bottom: var(--size-xl);
  }

  @media (min-width: 1024px) {
    margin-bottom: var(--size-xxl);
  }

  .milestones-header {
    grid-column: 2/17;
  }

  .milestones-container {
    grid-column: 1/18;
    padding: 0;
  }

  .milestone-year {
    display: grid;
    grid-template-columns: var(--grid-l);
    grid-gap: var(--size-m);
    align-items: baseline;
    border-radius: var(--size-xs);

    &:nth-child(odd) {
      background-color: var(--color-light);
    }

    h4 {
      grid-column: 2/5;
      font-size: clamp(var(--size-s), 0.70rem + 0.89vw, var(--size-l));
      margin-top: var(--size-s);
      margin-bottom: var(--size-s);
      font-weight: 700;

      @media (min-width: 680px) {
        margin-top: var(--size-l);
        margin-bottom: var(--size-l);
      }
    }

    .milestone {
      grid-column: 5/17;

      @media (min-width: 680px) {
        padding-bottom: var(--size-xs);
      }

      p {
        font-size: var(--size-s);
      }
    }
  }

  summary {
    color: var(--color-action);
    text-align: center;
    font-size: clamp(var(--size-s), 0.93rem + 0.36vw, var(--size-m));
    font-weight: 700;
    padding: var(--size-l) var(--size-m);
    border-radius: var(--size-xs);
    background-color: var(--color-light);
    cursor: pointer;
    transition: all ease-in 0.1s;

    @media (prefers-color-scheme: dark) {
      background-color: var(--color-white);
    }

    &:hover {
      color: var(--color-white);
      background-color: var(--color-action);

      @media (prefers-color-scheme: dark) {
        color: var(--color-white);
        background-color: var(--color-action);
      }
    }

    &:focus-visible {
      outline: 2px solid var(--color-action);

      @media (prefers-color-scheme: dark) {
        color: var(--color-white);
        background-color: var(--color-action);
      }
    }
  }
}

.contact {
  text-align: center;
  background-color: var(--color-action);
  border-radius: var(--size-s);
  padding-top: var(--size-xl);
  padding-right: var(--size-xs);
  padding-bottom: var(--size-m);
  padding-left: var(--size-xs);

  @media (min-width: 680px) {
    padding-top: var(--size-xxl);
    padding-bottom: var(--size-xl);
  }

  p {
    font-size: var(--size-s);
    color: var(--color-white);
    padding-bottom: 0;
  }
}

.breadcrumb {
  margin-top: var(--size-xl);

  @media (min-width: 1000px) {
    margin-top: var(--size-xxl);
  }
}
