@font-face {
  font-family: Dosis;
  src: url(fonts/Dosis-Medium.ttf);
}
@font-face {
  font-family: Roboto;
  src: url(fonts/RobotoSlab-Light.ttf);
}
@font-face {
  font-family: RobotoReg;
  src: url(fonts/RobotoSlab-Regular.ttf);
}
html {
  --paleHighlight: rgb(180, 200, 210);
  --paleColour: rgb(190, 220, 230);
  --palerColour: rgb(200, 230, 240);
  --palerVery: rgb(240, 255, 255);
  --darkColour: rgb(50, 90, 110);
  --neutralPale: rgb(240, 240, 240);
}
body {
  margin: 0;
  font-family: Roboto, sans-serif;
  font-size: 1em;
  overflow: hidden;
  background: var(--darkColour);
}

/* ====== Headings ====== */
h1, h2, h3, nav {
  font-family: Dosis, sans-serif;
}
h1, h2, h3 {
  margin: 0;
  color: var(--darkColour);
}
h1 {
  font-size: 2.5em;
  padding-top: 1.25em;
  text-align: center;
}
h2, h3 { padding-top: .5em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.25em; }

/* ====== Links ====== */
a, p a:hover { text-decoration: none; }
p a { color: var(--darkColour); }
p a, h2 a, h3 a {
  text-decoration: underline;
}

/* ====== Quotations ====== */
blockquote {
  position: relative;
  margin: 1em 1em 1em 20px;
  padding: .5em 1em;
  background: var(--neutralPale);
  border: 2px solid var(--darkColour);
  border-radius: 6px;
  color: var(--darkColour);
}
blockquote::before {
  content: "“";
  font-size: 7em;
  color: var(--paleHighlight);
  font-family: times, serif;
  position: absolute;
  top: -35px;
  left: -20px;
}

/* ====== Main menu ====== */
nav {
  display: block;
  margin: 0 auto;
  text-align: center;
  line-height: 2em;
  font-size: 1em;
  opacity: .94;
  background: var(--darkColour);
  position: fixed;
  width: 100%;
  transition: .5s;
  z-index: 1000;
}
nav a {
  color: var(--neutralPale);
  padding: 0 5px;
  box-sizing: border-box;
  display: inline-block;
  transition: color .5s;
}

/* ====== Page body container ====== */
main {
  /* height cannot be auto or 100% or min-height */
  height: 100vh;
  position: relative;
  overflow-y: scroll;
  scroll-behavior: smooth;
  background: var(--paleColour);
}

/* ====== Page body sections ====== */
section[id^="page"] {
  min-height: 100vh;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1em .5em;
  background: white;
}
section img {
  width: 100%;
}
section:nth-child(odd) {
  background: var(--neutralPale);
}

#page_01.backgroundImg {
  background: var(--paleColour) url("/images/net.png") no-repeat fixed center;
  background-size: cover;
}
#page_02.backgroundImg {
  background: var(--darkColour) url("/images/web.png") no-repeat fixed center;
  background-size: cover;
  color: var(--palerVery);
}
#page_02.backgroundImg h1,
#page_02.backgroundImg h2,
#page_02.backgroundImg h3,
#page_02.backgroundImg a {
  color: var(--palerVery);  
}
#page_01 h1 img {
  padding-top: .25em;
  width: 40%;
  min-width: 228px;
}

/* ====== Research section ====== */
.panels.faces {
  display: flex;
  flex-direction: row;
}
.panels figure {
  margin: 1em .5em;
  width: 30%;
  text-align: center;
}
.panels figure:first-child {
  margin-left: 0;
}
.panels figure:last-child {
  margin-right: 0;
}
.panels figure {
  padding-bottom: .5em;
  border-bottom: 2px solid var(--paleColour);
}
.panels figure img {
  width: 100%;
  height: auto;
  border-radius: 50%;
}
.panels figcaption strong {
  display: block;
}
/* generic 3-pane section */
/* .panels section {
  box-sizing: border-box;
  width: 98%;
  padding: .75em;
  margin-bottom: .25em;
  background: white;
  border: 2px solid var(--paleColour);
  border-radius: 4px;
  font-size: .75em;
}
.panels h2 {
  padding: 0 0 .25em;
} */

a.top {
  position: absolute;
  box-sizing: border-box;
  display: block;
  bottom: 0;
  width: 100%;
  font-size: .75em;
  line-height: 2em;
  text-align: center;
  color: var(--palerVery);
  background: var(--darkColour);
  font-family: Dosis, sans-serif;
  opacity: .94;
}

/* ====== Contact form ====== */
form {
  clear: both;
  text-align: right;
}
label {
  /* width: 9em; */
  text-align: right;
  display: inline-block;
  padding-right: .5em;
  width: 25%;
}
input, textarea {
  padding: 6px;
  font-size: 1em;
  width: 70%;
  border: 1px solid var(--paleColour);
  box-sizing: border-box;
}
textarea {
  float: right;
}
input:focus, textarea:focus {
  border: 1px solid var(--darkColour);
}
.buttons {
  clear: both;
  padding-top: 1em;
  text-align: right;
}
.buttons input {
  width: 8em;
}


/* ===== First breakpoint ====== */
@media screen and (min-width: 600px) {
  body {
    font-size: 1.25em;
  }
  nav {
    font-size: 1.5em;
    line-height: 2em;
  }
  .smallhead {
    font-size: 1em;
    opacity: .96;
  }
  section[id^="page"] {
    padding: 0 2em 1em;
  }
  .panels {
    justify-content: space-around;
    flex-direction: row;
    flex-wrap: wrap;
  }
  /* generic 3-pane section */
  /* .panels section {
    margin: 0.5em;
    width: 30%;
  } */
  nav a:hover {
    color: var(--paleHighlight);
  }
  a.top {
    bottom: 6px;
    right: 12px;
    width: 2.5em;
    border-radius: 0.8em;
    font-size: 1em;
    line-height: 1.5em;
  }
  a.top:hover {
    opacity: 1;
  }
}