@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 200;
  src: url("../fonts/inter-v20-latin-200.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  src: url("../fonts/inter-v20-latin-300.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/inter-v20-latin-regular.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/inter-v20-latin-500.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  src: url("../fonts/inter-v20-latin-600.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/inter-v20-latin-700.woff2") format("woff2");
}

:root {
  --font-family: "Inter", sans-serif;
  --content-width: 900px;

  /* Light mode (default) */
  --primary-bg: #ffffff;
  --secondary-bg: #f8f8f8;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --border-color: #dee2e6;
  --shadow: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark mode */
    --primary-bg: #2a2a2a;
    --secondary-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #404040;
    --shadow: rgba(255, 255, 255, 0.1);
  }
}

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

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--primary-bg);
  color: var(--text-primary);
}

/* Navigation styles */

.navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  margin-bottom: 2rem;
  max-width: var(--content-width);
  margin: 0 auto;
  position: relative;
}

.navigation__brand {
  color: var(--text-secondary);
  padding: 0.625rem 0;
  text-decoration: none;
}

.navigation__menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

.navigation__menu-toggle img {
  width: 24px;
  height: 24px;
}

.navigation__list {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background-color: var(--primary-bg);
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
  margin: 0;
  transition: right 0.3s ease-in-out;
  box-shadow: -2px 0 10px var(--shadow);
  z-index: 1000;
}

.navigation__list.active {
  right: 0;
}

.navigation__menu-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navigation__menu-close img {
  width: 24px;
  height: 24px;
}

.navigation-item--close {
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.navigation-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.navigation-item__link {
  color: var(--text-secondary);
  font-weight: 400;
  text-decoration: none;
  transition: color 0.3s ease-in-out;
  display: block;
  width: 100%;
  font-size: 1.1rem;
}

.navigation-item__link:hover {
  color: var(--text-primary);
}

.navigation-item__link--active {
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .navigation {
    gap: 1.25rem;
  }

  .navigation__brand {
    padding: 0.625rem 1.25rem;
    padding-left: 0;
  }

  .navigation__menu-toggle {
    display: none;
  }

  .navigation__list {
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 1.25rem;
    transition: none;
    box-shadow: none;
    z-index: auto;
  }

  .navigation-item--close {
    display: none;
  }

  .navigation-item {
    padding: 0.625rem 1.25rem;
    border-bottom: none;
  }

  .navigation-item__link {
    display: inline;
    width: auto;
    font-size: inherit;
  }
}

/* Intro styles */

.intro {
  max-width: var(--content-width);
  margin: 1rem auto;
  padding: 1.25rem;
}

.intro__title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.intro__description {
  font-size: 1rem;
  font-weight: 300;
  max-width: 600px;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Selected projects styles */

.selected-projects {
  max-width: var(--content-width);
  margin: 1rem auto;
  padding: 1.25rem;
}

.selected-projects__title {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.project-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card-list__item {
  margin-bottom: 3rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media screen and (min-width: 610px) {
  .project-card {
    align-items: center;
    flex-direction: row;
    gap: 4rem;
    justify-content: space-between;
  }
}

.project-card-info {
  margin-top: 0.5rem;
}

.project-card-info__timespan {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.project-card-info__title {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.project-card-info__description {
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-card-info__links {
  display: flex;
  gap: 1rem;
}

.project-card__image {
  height: 14rem;
  width: 14rem;
  background-color: var(--secondary-bg);
  border-radius: 2rem;
  overflow: hidden;
  flex-shrink: 0;
}

.project-card__image img {
  margin: 1.5rem 2.5rem auto 2.5rem;
  width: 9rem;
  height: auto;
  filter: grayscale(100%);
  transition: filter 0.3s ease-in-out;
}

.project-card__image:hover img {
  filter: grayscale(0%);
}

/* About styles */

.about {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.25rem;
}

.about__title {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.about__description {
  font-weight: 300;
  line-height: 1.5;
  max-width: 600px;
}

/* Legal styles */

.footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem auto;
  padding: 1.25rem;
}

@media screen and (min-width: 610px) {
  .footer {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    max-width: var(--content-width);
  }
}

.footer__text {
  font-weight: 300;
  color: var(--text-secondary);
}

.footer__links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.footer-links__item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

.footer-links__item a:hover {
  color: var(--text-primary);
}

/* Legal styles */
.impressum {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.25rem;
  line-height: 1.5;
}

.impressum strong {
  display: block;
  margin-bottom: 0.2rem;
  margin-top: 1rem;
}

.impressum p {
  display: block;
  margin-bottom: 1rem;
}

.impressum h1 {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Link styles */

.link {
  display: inline-block;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 0.1rem;
  position: relative;
}

.link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 1.075rem; /* Excludes the icon width + margin */
  height: 1px;
  background-color: var(--text-primary);
}

.link::after {
  content: "";
  display: inline-block;
  width: 0.875em;
  height: 0.875em;
  margin-left: 0.2rem;
  margin-top: 0.2rem;
  background-image: url("../img/icon_arrow_outward.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: top;
}

@media (prefers-color-scheme: dark) {
  .link::after {
    filter: invert(100%);
  }

  .icon {
    filter: invert(100%);
  }
}
