html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: monospace;
  color: #fff;
  background: #000;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: #000c;
  padding: 12px 0;
  text-align: center;
  z-index: 1000;
  white-space: nowrap;
}

nav a {
  color: #f5d76e;
  margin: 0 8px;
  text-decoration: none;
  font-size: 18px;
  padding: 8px 10px;
  display: inline-block;
}

nav a:hover {
  color: #fff;
  text-shadow: 0 0 8px #f5d76e;
}

/* Sections */
.section {
  min-height: 100vh;
  padding-top: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

/* Parallax desktop only */
.bg-home, .bg-portfolio, .bg-skills {
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .bg-home, .bg-portfolio, .bg-skills {
    background-attachment: scroll;
  }
}

.bg-home { background-image: url('img/0_1B.jpg'); }
.bg-portfolio { background-image: url('img/0_22.jpg'); }
.bg-skills { background-image: url('img/0_0.jpg'); }
.bg-contact { background-image: url('img/bg_contact.png'); }

/* CLOUDS — FINAL */
.cloud {
  position: absolute;
  width: clamp(260px, 45vw, 520px);
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 1;
}

.cloud-1 {
  top: 10%;
  transform: translateX(-140%);
  animation: cloudSlow 140s linear infinite;
}

.cloud-2 {
  top: 20%;
  transform: translateX(-60%);
  animation: cloudFast 70s linear infinite;
}

@keyframes cloudSlow {
  from { transform: translateX(-140%); }
  to   { transform: translateX(120%); }
}

@keyframes cloudFast {
  from { transform: translateX(-60%); }
  to   { transform: translateX(120%); }
}

/* Panels */
.panel {
  background: #000a;
  border: 4px solid #3fa9f5;
  padding: 30px;
  max-width: 900px;
  margin: 20px;
  z-index: 2;
}

/* Projects */
.project {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  align-items: center;
}

.project img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border: 4px solid #3fa9f5;
}

.project a {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 20px;
  font-size: 18px;
  color: #f5d76e;
  border: 2px solid #f5d76e;
  text-decoration: none;
}

.project a:hover {
  background: #f5d76e;
  color: #000;
}

/* Contact */
.contact-layout {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* Mobile */
@media (max-width: 768px) {
  nav {
    padding: 10px 0;
  }

  nav a {
    font-size: 16px;
    margin: 0 6px;
    padding: 6px 8px;
  }

  .project {
    flex-direction: column;
    text-align: center;
  }

  .contact-layout {
    flex-direction: column;
    text-align: center;
  }

  .cloud {
    width: clamp(220px, 70vw, 420px);
  }
}
