@import url('https://fonts.googleapis.com/css2?family=Raleway&display=swap');

body {
  margin: 0;
  font-family: Raleway, Arial, sans-serif;

  /* A trick to always keep the footer at the bottom of the page. */
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.navbar {
  display: flex;
  box-shadow: 0 0.15rem 0.25rem rgba(0, 0, 0, 0.05);
}

.navbar a {
  padding: 0.6rem 1rem;
  text-align: center;
  text-decoration: none;
}

.footer {
  margin-top: auto;
  padding: 0.1rem 0;

  font-size: 0.8em;
  text-align: center;
}

.footer p { margin: 0.6em; }
.footer a { text-decoration: underline dotted; }
.footer a:hover { text-decoration: underline; }

/* ---------- *
 | About page |
 * ---------- */

.profile {
  margin: 2rem 2rem 1rem 2rem;
  display: flex;
  align-items: center;
}

.profile img {
  width: 7rem;
  height: auto;
  max-width: 512px;

  margin-right: 2rem;
  border-radius: 50%;
  box-shadow: 0.15rem 0.2rem 0.2rem rgba(0, 0, 0, 0.03);
}

.profile h1 { margin: 0 0 0.25em 0; }
.profile h2 {
  margin: 0.1em 0 0 0;
  font-size: 1.2em;
  font-weight: lighter;
}

.about {
  margin: 0 3rem 1.5rem 3rem;

  font-size: 1.1em;
  text-indent: 1.5em;
  line-height: 1.5em;
}

.about h1 {
  font-size: 1.7em;
  margin-top: 1.3em;
}

/* ------------- *
 | Catalog pages |
 * ------------- */

.catalog {
  padding: 0 1.25rem;
  line-height: 1.3em;
}

.catalog h1 {
  margin-top: 0.8em;
  font-size: 1.5em;
  line-height: 1.2em;
}

.catalog small {
  font-size: 0.85em;
  line-height: 1.3em;
}

.project, .cert {
  display: flex;
  margin: 1.25rem 0;
}
.project h1, .cert h1 { font-size: 1.2em; }

.project {
  flex-direction: column;
  padding: 1.5rem;

  border-radius: 0.5rem;
  box-shadow: 0.15rem 0.15rem 0.2rem rgba(0, 0, 0, 0.05);
}

.project h1 { margin: 0 0 0.4em 0; }
.project p { margin: 0.3em 0 0 0; }
.project small { font-size: 0.8em; }

.cert {
  padding: 0.75rem;
  align-items: center;

  border-style: solid;
  border-width: 0.1rem;
  border-radius: 1rem;
}

.cert img {
  width: 6rem;
  height: auto;
  max-width: 384px;
  margin-right: 0.75rem;
}

.cert h1 { margin-top: 0.5em; }
.cert p { margin-bottom: 0.5em; }

/* ------------- *
 | Media queries |
 * ------------- */

@media only screen and (max-width: 600px) {
  .navbar a {
    /* Center and fill free space. */
    flex-grow: 1;
    padding: 0.6rem 0;
  }

  .profile { margin: 1.25rem 1.25rem 0.7rem 1.25rem; }
  .profile img {
    width: 6rem;
    margin-right: 1.25rem;
  }
  .about {
    margin: 0 1.25rem 0.25rem 1.25rem;
    text-indent: 1em;
  }

  .catalog { padding: 0 1rem; }
  .project, .cert { margin: 1rem 0; }
  .project { padding: 0.8rem; }
  .cert { padding: 0.6rem; }
  .cert img {
    width: 5rem;
    margin-right: 0.6rem;
  }
}

@media (prefers-color-scheme: light) {
  body {
    color: #303030;
    background-color: #f0f0f0;
  }

  a:link, .navbar a.active { color: #f57f17; }
  a:visited { color: #ff5722; }

  .navbar, .project { background-color: #fafafa; }
  .navbar a { color: #212121; }
  .navbar a:hover { color: #f9a825; }
  .navbar a.active { background-color: #eee; }
  .footer { background-color: #e0e0e0; }
  .footer, .footer a { color: #757575; }

  .catalog small { color: #4a4a4a; }
  .project small { color: #aaa; }
  .cert { border-color: #ddd; }
}

@media (prefers-color-scheme: dark) {
  body {
    color: #f5f5f5;
    background-color: #212121;
  }

  a:link { color: #fbc02d; }
  a:visited { color: #f9a825; }

  .navbar, .project { background-color: #2a2a2a; }
  .navbar a { color: white; }
  .navbar a:hover { color: #fff59d; }
  .navbar a.active { color: #ffd54f; }
  .navbar a.active, .footer { background-color: #303030; }
  .footer, .footer a { color: #aaa; }

  .catalog small { color: #b5b5b5; }
  .project small { color: #757575; }
  .cert { border-color: #505050; }
}
