:root {
  --primary-color: #99c822;
  --dark-color: #584034;
  --secondary-color:rgba(198, 240, 111, 0.5);
  --tertiary-color: #3b4c0f;
  --quartary-color: #6e9118;
  --navbar-height: 120px;
  --max-image-width: 200px;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  hyphens: manual;
}

body {
  font-family: sans-serif;
  color: var(--tertiary-color);
  line-height: 1.6;
}

ul {
  list-style-type: none;
}

li {
  padding: 5px 0;
}

a {
  text-decoration: none;
  color: #333;
}

h1, h2, h3, h4, h5 {
  font-weight: 300;
  line-height: 1.2;
  margin: 10px 0;
}

h6 {
  font-weight: 600;
  line-height: 1.2;
  margin: 10px 0;
}

h1 {
  font-size: 2.2em;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 1.8em;
}

h4 {
  font-size: 1.5em;
}

h5 {
  font-size: 1.2em;
}

h6 {
  font-size: 1em;
}

p {
  margin: 10px 0;
}

img {
  width: 100%;
}

pre, code {
  background-color: #333;
  color: #fff;
  padding: 10px;
}

/* Brand logo */
.brand-logo {
  height: calc(100vh - var(--navbar-height));
  background: url("./images/brandbackground.jpg");
  -webkit-background-size: cover;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  margin: 0;
  padding: 0;
}

.brand-logo .brand {
  height: inherit;
  width: 100%;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.5);
  display: flex;
  padding-left: 70px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.brand-logo .brand a {
  color: var(--tertiary-color);
  font-weight: 800;
  font-size: 1.7em;
  text-align: left;
  letter-spacing: 4px;
  vertical-align: center;
}

.brand-logo .brand img {
  max-width: 300px;
}

/* Navbar */
.navbar {
  display: block;
  height: var(--navbar-height);
  background-color: #fff;
  border-bottom: 1px solid var(--primary-color);
  border-top: 1px solid var(--primary-color);
}

.fixed {
  width: 100%;
  z-index: 10;
  position: fixed;
  top: 0;
}

.fixed + .content {
  padding-top: 120px;
}

.navbar .flex {
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.navbar ul {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}

.navbar li {
  padding: 5px;
  padding-right: 0.5em;
  padding-left: 0.5em;
  border-right: 1px dotted var(--primary-color);
  text-align: center;
}

.navbar li a {
  color: var(--tertiary-color);
}

.navbar ul > li:nth-child(6) {
  border-right: none;
}

.navbar li:hover {
  padding-bottom: 3px;
  border-bottom: 2px solid var(--tertiary-color);
}

.navbar .dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 160px;
  color: var(--tertiary-color); 
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  margin-top: 5px;
  margin-left: -0.5em;
  z-index: 1;
}

.navbar .dropdown-content ul { 
  display: flex;
  flex-direction: column;
}

.navbar .dropdown-content li { 
  border-right: none;
  padding: 1em;
  padding-top: 0.5em;
  padding-bottom: calc(0.5em - 1px);
  border-bottom: 1px dotted var(--primary-color);
  text-align: left;
}

.navbar .dropdown-content ul > li:last-child {
  border-bottom: none; 
}

.navbar .dropdown-content li:hover {
  text-decoration: underline;
}

.navbar li.references-dropdown:hover .dropdown-content {
  display: block;
}

.hide-small {
  padding-left: 3px;
}

/* About */
.about .grid {
  grid-template-columns: 45% 55%;
  gap: 2em;
  align-items: flex-end;
  justify-items: center;
}

.about ul {
  list-style-type: disc;
}

.about li {
  margin-left: 20px;
}

.about .card a {
  text-decoration: underline;
}

.about .card a:hover {
  color: #555;
}

/* Project samples */
.project-samples .grid {
  grid-template-columns: 3fr 1fr;
  gap: 2em;
  justify-items: center;
  align-items: flex-start;
}

.project-samples ul li {
  margin: 1em 0;
  padding: 0;
}

.project-samples ul li:first-of-type {
  margin: 0;
}

.project-samples img {
  max-width: var(--max-image-width);
}

.project-samples article p a {
  color: var(--tertiary-color);
  text-decoration: underline;
}

.project-samples article p a:hover {
  color: #555;
}

/* Teaser */
.teaser ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  justify-items: center;
  align-items: flex-start;
}

.teaser li {
  width: 80%;
  text-align: center;
  margin-bottom: 2px;
}

.teaser li:hover {
  border-bottom: 2px solid var(--tertiary-color);
  margin-bottom: 0px;
}

.teaser img {
  max-width: var(--max-image-width);
}

/* features */
.teaser h1, .features h1, .features h2 {
  margin-bottom: 1em;
}

.features .grid {
  grid-template-columns: 1fr 3fr;
  justify-items: center;
  align-items: flex-start;
  gap: 2em;
  margin-bottom: 4em;
}

.features .grid .grid-right {
  grid-column: 2; 
  grid-row: 1 / 3;
}

.features img {
  max-width: var(--max-image-width);
}

.features ul {
  list-style-type: disc;
}

.features li {
  margin-left: 20px;
}

/* Samples */
.samples {
  background-color: var(--secondary-color);
}

.samples .grid {
  justify-items: center;
  align-items: center;
}

.samples img {
  max-width: var(--max-image-width);
}

/* References */
.references h2 {
  margin-bottom: 0.5em;
}

.references article {
  padding-top: var(--navbar-height);
}

.references article:first-of-type {
  padding-top: 2em;
}

.references ul {
  list-style-type: disc;
}

.references ul li ul {
  list-style-type: circle;
}

.references li {
  margin-left: 20px;
  margin-bottom: 0.5em;
}

.references .small li {
  margin-bottom: 0;
}

.references ul li ul > li:last-child {
  margin-bottom: 0; 
}

.references li p {
  margin: 0;
}

.references img {
  max-width: var(--max-image-width);
}

/* About full */
.about-full h1, .about-overview h2, .about-full h4 {
  margin-bottom: 1em;
}

.about-full ul {
  margin: 0;
  padding: 0;
}

.about-full li {
  margin: 0;
  padding: 0;
  padding-bottom: 0.5em;
}

.about-full .flex {
  justify-items: center;
  align-items: flex-start;
  gap: 2em;
}

.about-full img {
  max-width: var(--max-image-width);
}

.about-overview {
  background-color: var(--secondary-color);
}

.about-overview a {
  color: var(--tertiary-color);
  text-decoration: underline;
}

.about-overview a:hover {
  color: #555;
}

/* Contact */
.contact .grid {
  grid-template-columns: 45% 55%;
  gap: 2em;
  align-items: flex-end;
  justify-items: center;
}

/* Publications */
.publications h1 {
  margin-bottom: 1em;
}

.publications h6 {
  text-transform: uppercase;
}

.publications li {
  margin-bottom: 0.25em;
}

.publications a, .references a {
  color: var(--tertiary-color);
}

/* Impressum */
.impressum .grid {
  grid-template-columns: 45% 55%;
  gap: 2em;
  align-items: flex-start;
  justify-items: center;
}

.impressum img {
  max-width: var(--max-image-width);
}

.impressum a {
  color: var(--tertiary-color);
  text-decoration: underline;
}

.impressum a:hover {
  color: #555;
}

.impressum a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--dark-color);
  border-bottom: 1px solid var(--dark-color);
  color: var(--tertiary-color);
}

.footer .grid {
  align-items: flex-start;
  gap: 3em;
  justify-items: center;
}

.footer p {
  margin: 0;
}

.footer nav {
  width: 100%;
}

.footer ul {
  display: flex;
  flex-direction: column;
}

.footer li {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  border-bottom: 1px dotted var(--primary-color);
}

.footer ul > li:last-child {
  border-bottom: none; 
}

.footer a {
  color: var(--tertiary-color);
}

.footer p a:hover {
  text-decoration: underline;
}

/* Tablets and under */
@media(max-width: 768px) {
  .grid, .about .grid, .contact .grid, .project-samples .grid, .impressum .grid, .features .grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .features .grid .grid-right {
    grid-column: unset; 
    grid-row: unset;
  }

  .footer nav {
    width: 50%;
  }

  .navbar .flex {
    flex-direction: column;
    gap: 2em;
  }

  .navbar ul {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 1em;
  }

  .navbar ul > li:nth-child(3) {
    border-right: none;
  }

  .navbar li {
    text-align: left;
  }

  .teaser ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-samples ul {
    display: flex;
    flex-direction: row;
    gap: 1em;
    justify-items: center;
    align-items: center;
  }

  .project-samples ul li {
    margin: 0;
  }

  .features .flex, .about-full .flex {
    flex-direction: column;
    gap: 2em;
    justify-items: center;
    align-items: center;
  }

  .float-right {
    display: block;
    float: unset;
    margin: auto;
    margin-bottom: 20px;
  }

  .fixed {
    position: unset;
  }
  
  .fixed + .content {
    padding-top: 0;
  }

  .hide-small {
    display: none;
  }

  .conditional-center {
    text-align: center;
  }
}

/* Mobile */
@media(max-width: 500px) {
  .brand-logo {
    height: 40vh;
  }

  .brand-logo .brand {
    padding-left: 0;
    align-items: center;
  }

  .navbar ul, .teaser ul {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 1em;
  }

  .navbar {
    height: auto;
    padding: 10px 0;
  }

  .navbar nav {
    width: 50%;
  }

  .navbar li {
    border: none;
    text-align: left;
    border-bottom: 1px dotted var(--primary-color);
  }
  
  .navbar ul > li:last-child {
    border-bottom: none; 
  }

  .navbar .dropdown-content, .navbar li.references-dropdown:hover .dropdown-content {
    display: none;
  }

  .navbar li:hover {
    padding-bottom: 5px;
    border-bottom: 1px dotted var(--primary-color);
  }

  .project-samples ul {
    flex-direction: column;
  }

  .card {
    width: unset;
    margin: 0;
  }

  .footer .grid {
    justify-items: center;
    width: unset;
  }
}