/* Peter Butcher CV */
/* Copyright Peter Butcher 2024 */

html,
body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: 1em;
  background-image: url("../../img/homepage-background.jpg");
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  position: relative;
  overflow: auto;
  scroll-behavior: smooth;
}

header.page-header {
}

.back,
.show-menu {
  z-index: 2;
}

.back {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-size: 1.5em;
  border-radius: 4px;
  padding: 15px;
  animation: appear 1s ease-in-out forwards;
  animation-iteration-count: 1;
  animation-delay: 1s;
  opacity: 0;
}

.show-menu {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  font-size: 1.5em;
  border-radius: 4px;
  padding: 15px;
  animation: appear 1s ease-in-out forwards;
  animation-iteration-count: 1;
  animation-delay: 1s;
  opacity: 0;
  background-color: transparent;
  border: none;
  cursor: pointer;
  z-index: 2;
}

.show-menu.active {
  color: black;
}

.close-menu {
  color: black;
  position: fixed;
  display: none;
  z-index: 4;
  top: 10px;
  right: 10px;
  font-size: 1.5em;
  border-radius: 4px;
  padding: 15px;
  animation: appear 1s ease-in-out forwards;
  animation-iteration-count: 1;
  animation-delay: 0s;
  opacity: 0;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.close-menu {
}

.back:hover,
.show-menu:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.menu {
  position: fixed;
  z-index: 3;
  background-color: white;
  box-sizing: border-box;
  right: -370px;
  top: 10px;
  width: 370px;
  transition: 0.2s right ease-in-out;
  border-radius: 4px;
  padding: 10px 10px 50px 10px;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);
  overflow: scroll;
  height: calc(100% - 20px);
}

.menu.visible {
  right: 10px;
  transition: 0.2s right ease-in-out;
}

.menu h2 {
  font-style: normal;
  font-size: 1em;
  font-weight: 700;
  padding: 10px;
}

.close-menu.visible {
  display: block;
}

.menu ul {
  list-style-type: none;
  padding: 0px 0px 0px 10px;
  margin: 0px;
}

.menu ul ul {
  padding: 5px 20px 0px;
}

.menu li {
  padding: 5px 0px;
}

.menu li a {
  color: black;
}

.menu li a:hover {
  opacity: 0.5;
}

.scroll-nav {
  justify-content: space-between;
  align-items: center;
  position: fixed;
  bottom: 0px;
  box-sizing: border-box;
  padding: 0px 10px;
  height: 75px;
  z-index: 2;
  display: flex;
  opacity: 0;
  background-color: white;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);
  width: 100%;
  box-sizing: border-box;
  transition: opacity 0.25s ease-in-out;
  max-width: 250px;
  left: 0;
  right: 0;
  margin: auto auto 10px auto;
  border-radius: 4px;
  pointer-events: none;
}

.scroll-nav.visible {
  opacity: 100;
  transition: opacity 0.25s ease-in-out;
  pointer-events: all;
}

.scroll-nav-item:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.scroll-nav-item {
  color: white;
  font-size: 1.5em;
  border-radius: 4px;
  padding: 15px;
  color: black;
  /* background-color: rgba(0, 0, 0, 0.5); */
  border: none;
  cursor: pointer;
  display: flex;
  text-decoration: none;
}

h1.title {
  color: white;
  text-align: center;
  font-weight: 300;
  margin: 50px 0px 25px 0px;
  animation: appear 1s ease-in-out forwards;
  animation-iteration-count: 1;
  animation-delay: 0.25s;
  opacity: 0;
}

.printcv {
  padding: 15px 25px;
  border: 0;
  border-radius: 0px;
  box-shadow: none;
  color: white;
  background-color: #245e96;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0px auto 50px auto;
  display: block;
  border-radius: 4px;
  cursor: pointer;
  animation: appear 1s ease-in-out forwards;
  animation-iteration-count: 1;
  animation-delay: 0.5s;
  opacity: 0;
}

.printcv:hover {
  background-color: #245e96cc;
}

.wrapper {
  box-sizing: border-box;
  margin: 25px auto;
  background-color: #ffffff;
  padding: 50px;
  width: 1025px;
  border-radius: 4px;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);
  animation: rise 1s ease-in-out forwards;
  animation-iteration-count: 1;
  animation-delay: 0.75s;
  opacity: 0;
}

.wrapper a[href]:hover {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

footer {
  color: white;
  text-align: center;
  margin: 50px 50px 125px 50px;
}

@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

@keyframes appear {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Main Header */

header.main-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
}

/* Left section*/
header.main-header div:first-child {
  text-align: left;
  align-self: flex-end;
}

header.main-header div:first-child h2 {
  margin-bottom: 0;
}

/* Right section */
header.main-header div:last-child {
  text-align: right;
  font-style: italic;
  color: #245e96;
  line-height: 1.4;
}

header.main-header div:last-child p:first-child {
  margin-top: 0px;
}

header.main-header div:last-child p:last-child {
  margin-bottom: 0px;
}

header.main-header div:last-child a {
  text-decoration: none;
  color: inherit;
}

header.main-header div:last-child i {
  margin-left: 5px;
}

/* Headings */

h1 {
  font-weight: 400;
  margin-bottom: 5px;
  font-size: 2.5em;
}

h2 {
  font-weight: 400;
  margin-top: 0;
  font-style: italic;
}

/* Sections */

main > header {
  display: flex;
  font-size: 1.25em;
  margin-top: 30px;
  margin-bottom: 25px;
}

main header h3 {
  position: relative;
  background-color: #ffffff;
  white-space: nowrap;
  margin: 0px 15px 0px 0px;
}

main header .header-line {
  height: 1px;
  background-color: #245e96;
  width: 100%;
  align-self: center;
}

/* Listings */

.listing {
  margin-top: 20px;
}

.list-item {
  margin-bottom: 10px;
}

.list-item header {
  display: flex;
  font-size: 1em;
  margin-top: 12px;
}

.list-item header .list-item-icon {
  width: 50px;
  font-size: 1.5em;
  color: #245e96;
  flex: none;
}

.list-item header h4 {
  position: relative;
  margin: 0;
  font-size: 1.25em;
  font-weight: 500;
}

.list-item header h4.current-position::after {
  position: absolute;
  content: "current position";
  white-space: nowrap;
  background-color: #245e96;
  padding: 3px;
  font-size: 0.6em;
  color: white;
  text-transform: uppercase;
  margin-top: 1px;
  margin-left: 12px;
  font-weight: 700;
}

.list-item header .list-item-datestamp {
  font-style: italic;
  font-weight: 300;
  font-size: 1em;
  text-align: right;
  flex-grow: 1;
}

.list-item-content {
  margin: 0px 0px 0px 50px;
  /* margin-left: 34px; */
  font-size: 0.9em;
  line-height: 1.7em;
}

.list-item .list-item-record {
  display: flex;
  font-size: 0.9em;
  line-height: 1.6em;
}

.list-item .list-item-record:not(:first-child) {
  margin-top: 10px;
}

.list-item-record .list-item-record-index {
  min-width: 40px;
  font-weight: 700;
  flex: none;
  margin-right: 10px;
}

.list-item-record .list-item-record-index.wide {
  min-width: 105px;
  font-weight: 700;
  flex: none;
  margin-right: 10px;
}

.list-item-record .list-item-record-index.datestamp {
  font-weight: 400;
}

.list-item-record .list-item-record-content p {
  margin: 0;
}

.list-item-record .list-item-record-content a {
  color: black;
}

.list-item-record .list-item-record-content p:not(:first-child) {
  color: #245e96;
  font-style: italic;
}

.sub-heading {
  display: block;
  min-width: 150px;
  margin-right: 15px;
}

.sub-heading-wide {
  display: block;
  min-width: 220px;
  margin-right: 15px;
}

.doi,
.isbn,
.hdl,
.url {
  font-family: monospace;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

/* Media */

@media screen and (max-width: 700px) {
  h1.title {
    margin-top: 25px;
    font-size: 1.5em;
  }
  .printcv {
    margin-bottom: 30px;
  }
  .wrapper {
    font-size: 0.8em;
  }
  .list-item header .list-item-icon {
    width: 35px;
  }
  .list-item-record .list-item-record-index {
    margin-right: 0px;
    min-width: 35px;
  }
  .list-item-content {
    margin: 0px 0px 0px 35px;
  }
  .table .list-item .list-item-record {
    display: block;
  }
  .table .list-item-record .list-item-record-index.wide {
    min-width: 1px;
  }
  .sub-heading {
    min-width: 0px;
  }
  .list-item-record .list-item-record-index.datestamp {
    font-weight: 700;
    font-style: italic;
  }
  .listing .list-item header {
    display: block;
  }
  .listing .list-item .list-item-icon {
    float: left;
  }
  .listing .list-item .list-item-datestamp {
    text-align: left;
    padding-left: 35px;
    margin: 5px 0px;
  }
}

@media screen and (max-width: 800px) {
  .list-item header h4.current-position::after {
    display: none;
  }
}

@media screen and (max-width: 1025px) {
  .wrapper {
    width: 100%;
    border-radius: 0px;
    padding: 25px;
  }
  header.main-header {
    display: block;
  }
  header.main-header div h1,
  header.main-header div h2,
  header.main-header div p {
    text-align: center;
  }
  header.main-header div:first-child h2 {
    margin-bottom: 20px;
  }
  .list-item-datestamp {
    /* width: 100%; */
    padding-left: 15px;
    white-space: nowrap;
  }
}
