html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  font-family: 'Courier New', Courier, monospace;
  background: #000;
  color: #fff;
}

html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
}

.nav-container {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.85);
  box-shadow: 0 0 10px #0f0;
  backdrop-filter: blur(4px);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0.5rem;
}

nav a {
  color: #0f0;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
}

nav a:hover {
  background-color: rgba(0, 255, 0, 0.1);
  border-color: #0f0;
  box-shadow: 0 0 5px #0f0;
  color: #00ffee;
}

.hamburger {
  display: none;
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.hamburger:hover {
  transform: scale(1.2);
}

#main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0.5rem;
}

.language-switch {
  position: fixed;
  top: 0;
  right: 0;
  margin: 1rem 1rem 0 0;
  background-color: rgba(0, 0, 0, 0.85);
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  z-index: 9999;
  font-size: 0.9rem;
  box-shadow: 0 0 8px #00ffcc;
}

.language-switch a {
  color: #00ffcc;
  text-decoration: none;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  transition: all 0.2s ease;
}

.language-switch a:hover,
.language-switch a.active {
  background-color: #00ffcc;
  color: #000;
  border-radius: 5px;
}

.typewriter-container {
  margin-top: 110px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #00ffcc;
  font-size: 1.1rem;
  white-space: pre-wrap;
  background-color: rgba(0, 0, 0, 0.75);
  border: 1px solid #00ffcc;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 0 20px #00ffcc;
  position: relative;
  z-index: 1;
}

.foreground {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1rem 3rem;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.foreground img {
  width: 220px;
  height: auto;
  border-radius: 50%;
  filter: grayscale(100%);
  transition: all 0.5s ease-in-out;
  box-shadow: 0 0 10px #000;
}

.foreground img:hover {
  filter: grayscale(0%);
  box-shadow: 0 0 20px #0f0;
}

.foreground h1 {
  font-size: 2rem;
  margin: 0;
}

.foreground p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0.5rem auto 0;
  padding: 0 1rem;
}

.hero-video-placeholder {
  width: min(100%, 760px);
  margin: 0.5rem auto;
  border: 1px solid #00ffcc;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 0 16px rgba(0, 255, 204, 0.22);
  padding: 1rem;
}

.hero-video-placeholder h3 {
  margin: 0.2rem 0 0.7rem;
  color: #66ffe0;
}

.hero-video {
  width: 100%;
  max-height: 360px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 204, 0.45);
  background: #000;
}

.hero-video-placeholder p {
  margin: 0.7rem 0 0;
  font-size: 0.95rem;
  color: #ccffef;
}

.cta-button,
.cv-button {
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: #0f0;
  background-color: transparent;
  border: 2px solid #0f0;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-button:hover,
.cv-button:hover {
  background-color: #0f0;
  color: #000;
  box-shadow: 0 0 10px #0f0;
}

section {
  position: relative;
  z-index: 1;
  padding: 3rem 1rem;
  background-color: rgba(0, 0, 0, 0.85);
}

section h2 {
  color: #00ffee;
  text-align: center;
  margin-bottom: 2rem;
}

.services,
.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.service,
.project {
  background-color: rgba(0, 0, 0, 0.6);
  border: 1px solid #0f0;
  border-radius: 10px;
  padding: 1rem;
  width: 280px;
  text-align: center;
}

.service h3,
.project h3 {
  color: #0f0;
  margin: 0.5rem 0;
}

.service p,
.project p {
  font-size: 0.95rem;
}

.project a {
  display: inline-block;
  margin-top: 0.5rem;
  color: #00ffee;
  text-decoration: underline;
}

#technologiak {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
  background-color: rgba(0, 0, 0, 0.85);
  color: #00ffcc;
  border-top: 2px solid #00ffcc;
  border-bottom: 2px solid #00ffcc;
  box-shadow: 0 0 30px rgba(0, 255, 204, 0.2);
  border-radius: 10px;
}

#technologiak h2 {
  font-size: 2rem;
  color: #00ffcc;
}

#technologiak h3 {
  font-size: 1.4rem;
  color: #66ffe0;
  margin-top: 2rem;
  border-left: 4px solid #00ffcc;
  padding-left: 0.5rem;
}

#technologiak ul {
  list-style-type: '➤ ';
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

#technologiak ul li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #ccffef;
}

#kapcsolat {
  text-align: center;
}

.contact-info {
  color: #fff;
  margin-bottom: 2rem;
}

.contact-info p {
  font-size: 1.1rem;
  line-height: 1.8;
}

.contact-info a {
  color: #00ffee;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
  color: #0f0;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem;
  font-family: monospace;
  background-color: #000;
  color: #0f0;
  border: 1px solid #0f0;
  border-radius: 5px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #0f0a;
}

.contact-form button {
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: bold;
  color: #000;
  background-color: #0f0;
  border: 2px solid #0f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form button:hover {
  background-color: #000;
  color: #0f0;
  box-shadow: 0 0 10px #0f0;
}

.form-success {
  color: #0f0;
  font-weight: bold;
  background: rgba(0, 255, 0, 0.1);
  padding: 1rem;
  border: 1px solid #0f0;
  margin-bottom: 1.5rem;
  border-radius: 8px;
}

.form-error {
  color: red;
  font-weight: bold;
  background: rgba(255, 0, 0, 0.1);
  padding: 1rem;
  border: 1px solid red;
  margin-bottom: 1.5rem;
  border-radius: 8px;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

#typewriter::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1rem;
  margin-left: 4px;
  background-color: #00ffcc;
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  0%,
  100% {
    border-color: transparent;
  }

  50% {
    border-color: #00ffcc;
  }
}

#preloader {
  position: fixed;
  z-index: 99999;
  background: #000;
  color: #00ffcc;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-family: monospace;
  display: flex;
  justify-content: center;
  align-items: center;
}

#preloader-text {
  white-space: pre-wrap;
  font-size: 1.2rem;
  padding: 2rem;
  max-width: 80%;
}

@media (max-width: 768px) {
  #technologiak {
    padding: 2rem 1rem;
  }

  #technologiak h2 {
    font-size: 1.6rem;
  }

  #technologiak h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 600px) {
  .hamburger {
    display: block;
  }

  .hero-video-placeholder {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0.7rem;
  }

  .hero-video {
    max-height: 240px;
  }

  #main-nav {
    display: none;
    flex-direction: column;
    align-items: center;
  }

  #main-nav.active {
    display: flex;
  }

  #main-nav a {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid #0f0;
    text-align: center;
  }

  .foreground h1 {
    font-size: 1.6rem;
  }

  .foreground p {
    font-size: 0.95rem;
  }

  .cta-button,
  .cv-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .service,
  .project {
    width: 90%;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in,
  #typewriter::after {
    animation: none;
    transition: none;
  }
}
