
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/fira-mono-v16-latin-regular.woff2') format('woff2'); 
}

@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/fira-mono-v16-latin-500.woff2') format('woff2'); 
}

@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/fira-mono-v16-latin-700.woff2') format('woff2'); 
}

@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/karla-v33-latin-regular.woff2') format('woff2'); 
}

@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/karla-v33-latin-500.woff2') format('woff2'); 
}

@font-face {
  font-family: 'Karla';
  font-style: bold;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/karla-v33-latin-700.woff2') format('woff2'); 
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%;
}

:root {
  --font-main: "Karla", sans-serif;
  --font-code: "Fira Code", monospace;
}

body {
  font-family: var(--font-main);
  overflow-x: hidden;
  width: 100%;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 130px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(
    to bottom,
    #000000 40%,
    #000000 50%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 40;
  padding: 0 96px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.lang-switch {
  width: 84px;
  height: 28px;
  background-color: transparent;
  border: 1px solid #3dcfb6;
  border-radius: 100px;
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: bold;
  font-size: 1.6rem;
  line-height: 1.2;
  overflow: hidden;
}

.switch-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-color: #3dcfb6;
  border-radius: 100px;
  transition: transform 0.3s ease;
  z-index: 1;
}

.lang-option.active {
  color: #ffffff;
}

.lang-option {
  flex: 1;
  text-align: center;
  z-index: 2;
  color: #3dcfb6;
  transition: color 0.3s ease;
}

.switch-de .switch-bg {
  transform: translateX(100%);
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  text-decoration: none;
  font-family: var(--font-code);
  font-weight: 400;
  font-size: 2rem;
  line-height: 100%;
  color: #ffffff;
  letter-spacing: -3%;
  transition: color 0.3s ease;
  cursor: pointer;
  position: relative;
}

.logo-container {
  position: relative;
  width: 132px;
  height: 48px;
  overflow: hidden;
  cursor: pointer;
}

.logo-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 300ms ease-in;
}

.logo-solid {
  opacity: 1;
  z-index: 2;
}

.logo-outline {
  opacity: 0;
  z-index: 1;
}

.logo-mobile {
  display: none;
}

.burger-container {
  display: none;
}

.burger-menu {
  display: none;
}

@media (hover: hover) {
  .nav a::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translate(-50%) scale(0);
    width: 8px;
    height: 8px;
    background-color: #3dcfb6;
    border-radius: 50%;
    transition: transform 300ms ease-out;
  }

  .nav a:hover::after {
    transform: translateX(-50%) scale(1);
  }

  .nav a:hover {
    color: #3dcfb6;
  }

  .logo-container:hover .logo-solid {
    opacity: 0;
  }

  .logo-container:hover .logo-outline {
    opacity: 1;
  }

  .mobile-nav .nav a:hover {
    color: #3dcfb6;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 24px;
  }

  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .nav {
    display: none;
  }

  .logo-outline,
  .logo-solid,
  .logo-image {
    display: none;
  }

  .logo-mobile {
    display: inline-block;
    width: 35px;
    height: 48px;
  }
  .burger-container {
    width: 35px;
    height: 48px;
    display: flex;
  }

  .burger-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2000;
  }

  .burger-menu span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: #3dcfb6;
    transition: all 0.3s ease-in-out;
  }

  .mobile-nav {
    position: fixed;
    top: 17px;
    right: -100%;
    width: 200px;
    height: 252px;
    border-radius: 30px;
    border: 1px solid #3dcfb6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: linear-gradient(40deg, #1c1c1c 40%, #08463b 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease-in-out;
    z-index: 1000;
  }

  .mobile-nav.is-open {
    right: 15px;
  }

  .burger-menu.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .burger-menu.is-active span:nth-child(2) {
    opacity: 0;
  }

  .burger-menu.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 900;

    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
  }

  .menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  .mobile-nav .nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
  }

  .mobile-nav .nav a {
    color: #ffffff;
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 1.8rem;
    transition: color 0.3s ease;
  }

  .mobile-nav .nav a:active {
    transform: scale(0.95);
    opacity: 0.7;
    transition: transform 0.1s ease;
  }

  .mobile-lang-wrapper {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    width: 100%;
  }
}
