/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}
::view-transition-group(*) {
  animation-duration: 1s;
}

::view-transition-old(root) {
  animation-name: slide-out;
}

::view-transition-in(root) {
  animation-name: slide-in;
}

@keyframes slide-in {
  from {
    translate: 100vw 0;
  }
}

@keyframes slide-out {
  to {
    translate: -100vw 0;
  }
}

.header-nav,
.mobile-nav {
  view-transition-name: header-nav;
}
footer {
  view-transition-name: footer;
}
.header-banner,
.header-banner-small {
  view-transition-name: header-banner;
}

/*  === COLORS === */
:root {
  --bodybg: #ebebeb;
  --textcolor: #2a2a2a;
  --linkcolor: #2e41b8;
  --linkhovercolor: #da6f39;
  --blue: #3140a0;
  --orange: #da6f39;
  --darkgrey: #1e1e1e;
  --lightgrey: #686869;
  --headerbg: #a9b2bb;
  color-scheme: light dark;
  --bodybg: light-dark(#ebebeb, #262626);
  --textcolor: light-dark(#2a2a2a, #b6b6b6);
  --linkcolor: light-dark(#2e41b8, #606fcb);
}

/* === GLOBAL === */

body {
  background-color: var(--bodybg);
  color: var(--textcolor);
  margin: 0;
  font-family: "Raleway", "Lato", "Helvetica Neue", "Arial", sans-serif;
  font-size: 1rem;
  min-width: 20rem;
}

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

a:link {
  color: var(--linkcolor);
  text-decoration: none;
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}
a:visited {
  color: var(--linkcolor);
  text-decoration: none;
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}

a:hover {
  color: var(--linkhovercolor);
  text-decoration: none;
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}
a:active {
  color: var(--linkcolor);
  text-decoration: none;
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}

/* === GENERAL === */

.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

.active {
  background-color: var(--orange) !important;
}

/* === DESKTOP NAVIGATION === */

.header-nav {
  position: fixed;
  top: 0px;
  width: 100%;
  height: 3.125rem;
  background-color: var(--headerbg);
  font-family: "Consolas", "Courier New", "monospace";
  font-weight: bold;
  font-size: 1rem;
}

.header-nav a {
  display: inline-block;
}

.header-nav a > img {
  height: 1.875rem;
  width: auto;
  float: left;
  margin-top: 0.6rem;
}

.header-nav ul {
  margin: 0;
  padding: 0;
  float: right;
  height: 100%;
}

.header-nav ul > li {
  display: inline-block;
  height: 100%;
  padding: 0 0.4rem 0 0.4rem;
}

.header-nav ul > li > a {
  display: inline-block;
  margin-top: 0.8rem;
}

.header-nav ul > li > a:link {
  color: var(--blue);
  text-decoration: none;
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}
.header-nav ul > li > a:visited {
  color: var(--blue);
  text-decoration: none;
}
.header-nav ul > li > a:hover {
  color: #fff;
  text-decoration: none;
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}
.header-nav ul > li > a:active {
  color: var(--lightgrey);
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
  text-decoration: none;
}

.header-nav .col-6 {
  padding-top: 0;
  padding-bottom: 0;
}

.header-nav .container,
.header-nav .row,
.header-nav .col-6 {
  height: 100%;
}

/* === MOBILE NAVIGATION === */

.mobile-nav-button {
  color: var(--darkgrey);
  float: right;
  font-size: 2.2rem;
  border: 2px solid var(--darkgrey);
  width: 2.3rem;
  height: 2.3rem;
  position: relative;
  margin-top: 0.375rem;
  margin-bottom: 0.44rem;
}

.mobile-nav-button > img {
  position: absolute;
  width: 1.2rem;
  height: auto;
  bottom: 0.55rem;
  left: 0.43rem;
}

.mobile-nav-content > ul > li {
  display: block;
  background-color: var(--headerbg);
  height: 2rem;
  line-height: 0.4rem;
  padding: 0 1.2rem;
  text-align: center;
}

.mobile-nav-dropdown {
  position: relative;
  float: right;
}

.mobile-nav-content {
  display: none;
  position: absolute;
  right: 0;
  top: 3.125rem;
}

.mobile-nav-dropdown:hover > .mobile-nav-content {
  display: block;
}

@media only screen and (min-width: 30rem) {
  .mobile-nav {
    display: none;
  }
}

@media only screen and (max-width: calc(30rem - 1px)) {
  .desktop-nav {
    display: none;
  }
}

/* === HEADER BANNER === */

.header-banner {
  margin-top: 3.125rem;
  width: 100%;
  height: 0;
  padding-top: calc(100% / 1920 * 400);
  background: url("../media/Elektroptiker_bg.png");
  background-size: contain;
  z-index: -1;
  position: relative;
  animation: fade-out linear forwards;
  animation-timeline: view(3.125rem);
  animation-range: exit;
}

.header-banner-small {
  margin-top: 3.125rem;
  width: 100%;
  height: 0;
  padding-top: calc(100% / 1920 * 300);
  background: url("../media/Elektroptiker_bg_small.png");
  background-size: contain;
  z-index: -1;
  position: relative;
  animation: fade-out linear forwards;
  animation-timeline: view(3.125rem);
  animation-range: exit;
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

/* === FOOTER === */

#spacer {
  display: block;
  clear: both;
  height: 2.5rem;
}

#footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: var(--headerbg);
  height: 2.5rem;
  color: var(--darkgrey);
  font-size: 0.8rem;
}

#footer-nav {
  display: block;
  float: right;
}

#footer-nav a {
  text-decoration: none;
  color: var(--darkgrey);
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}

#footer-nav a:hover {
  color: var(--linkhovercolor);
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}

@media only screen and (max-width: 285px) {
  #footer span {
    display: none;
  }
}

/* === GRID SYSTEM === */

.container {
  width: 95%;
  margin-left: auto;
  margin-right: auto;
}

.row::after {
  content: "";
  clear: both;
  display: block;
}

[class*="col"] {
  /* selects all class "col-*" */
  float: left;
  min-height: 1px;
  padding: 0.8rem;
}

.col-1 {
  width: 16.666%;
}

.col-2 {
  width: 33.333%;
}

.col-3 {
  width: 50%;
}

.col-4 {
  width: 66.667%;
}

.col-6 {
  width: 100%;
}

/* 

=== IMPORTANT BREAKPOINTS ===
320   px  iPhone portrait
480   px  iPhone landscape
768   px  iPad portrait
1024  px  iPad landscape
1200  px  laptop
>1200 px  large screens

Extra small devices (phones, 600px and down)
@media only screen and (max-width: 600px) {...}

Small devices (portrait tablets and large phones, 600px and up)
@media only screen and (min-width: 600px) {...}

Medium devices (landscape tablets, 768px and up)
@media only screen and (min-width: 768px) {...}

Large devices (laptops/desktops, 992px and up)
@media only screen and (min-width: 992px) {...}

Extra large devices (large laptops and desktops, 1200px and up)
@media only screen and (min-width: 1200px) {...}

*/

@media only screen and (max-width: 1024px) {
  .col-1 {
    width: 33.333%;
  }
}

@media only screen and (max-width: 915px) {
  .col-4 {
    width: 100%;
  }
  .col-2 {
    width: 100%;
  }
}

@media only screen and (max-width: 768px) {
  .col-1 {
    width: 50%;
  }
  .col-2 {
    width: 100%;
  }
  .col-3 {
    width: 100%;
  }
  .col-4 {
    width: 100%;
  }
}

@media only screen and (max-width: 600px) {
  .col-1 {
    width: 100%;
  }
  .col-2 {
    width: 100%;
  }
  .col-3 {
    width: 100%;
  }
}

/* === HOME PAGE === */

#about-box img {
  float: left;
  width: 40%;
  max-width: 300px;
  height: auto;
  margin-right: 2rem;
  margin-bottom: 1.5rem;
  -webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2),
    0 6px 20px 0 rgba(0, 0, 0, 0.19);
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

#about-box h1 {
  text-transform: uppercase;
  font-size: 1.2rem;
}

#cv-box {
  color: var(--bodybg);
  background-color: var(--lightgrey);
  margin-top: 1rem;
  padding: 0.5rem 1rem 1rem;
  width: 90%;
  height: 100%;
  margin-left: auto;
  margin-right: auto;
  animation: fade-in 1.5s;
}

#cv-box h1 {
  text-transform: uppercase;
  font-size: 1.2rem;
}

@media only screen and (max-width: 915px) {
  #about-box {
    display: block;
    width: 90%;
    margin-left: 5%;
    margin-right: 5%;
  }
  #cv-box {
    display: block;
    width: 90%;
  }
}
@media only screen and (max-width: 768px) {
  #about-box {
    width: 90%;
    margin-left: 5%;
    margin-right: 5%;
  }
}

/* === PROJECTS PAGE === */

/* #flex-row > [class*="col"] {
  flex-grow: 1;
  } */

.intro-container {
  text-align: center;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}
.intro-container > h1 {
  text-transform: uppercase;
  font-size: 1.4rem;
}
.intro-container > p {
  font-size: 1.2rem;
}

.project-box {
  color: var(--bodybg);
  background-color: var(--lightgrey);
  padding: 1rem 3rem 2.5rem;
  width: 90%;
  height: 100%;
  margin-left: auto;
  margin-right: auto;
  animation: fade-in 1s;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.project-box > p > a {
  color: rgb(252, 204, 174);
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}
.project-box > p > a:hover {
  color: var(--linkhovercolor);
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}

.project-box > a {
  height: 2.5rem;
  border: 2px solid var(--bodybg);
  display: inline-block;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
}
.project-box > a:link {
  color: var(--bodybg);
  text-decoration: none;
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}
.project-box > a:visited {
  color: var(--bodybg);
  text-decoration: none;
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}
.project-box > a:active {
  color: var(--bodybg);
  text-decoration: none;
  -webkit-transition: color 0.3s;
  -o-transition: color 0.3s;
  transition: color 0.3s;
}
.project-box > a:hover {
  border: 2px solid var(--linkhovercolor);
  color: var(--linkhovercolor);
  text-decoration: none;
  -webkit-transition: color 0.3s, border 0.3s;
  -o-transition: color 0.3s, border 0.3s;
  transition: color 0.3s, border 0.3s;
}
.project-box > div > video {
  /* border-radius: 50%; */
  width: 50%;
  height: auto;
  float: right;
  padding-left: 1rem;
  padding-bottom: 1rem;
}
.project-box::after {
  content: "";
  clear: both;
  display: block;
}

/* li alternating background */

@media only screen and (min-width: 768px) {
  #flex-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
  }
  #projects .row > .col-3:nth-of-type(even) > .project-box {
    margin-left: 1rem;
    margin-right: auto;
  }
  #projects .row > .col-3:nth-of-type(odd) > .project-box {
    margin-left: auto;
    margin-right: 1rem;
  }
}

/* === LEGAL PAGE === */
#legal {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}
#legal h1 {
  margin-top: 2rem;
  text-transform: uppercase;
  font-size: 1.4rem;
}
#legal h2 {
  font-size: 1.2rem;
}
#legal p {
  font-size: 1rem;
}
