/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0b071d, #1f154a);
  color: #ddd;
  line-height: 1.6;
  min-height: 100vh;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
.header {
  background: rgba(20, 12, 47, 0.9);
  position: sticky;
  top: 0;
  z-index: 10000;
  box-shadow: 0 0 25px rgba(163, 103, 225, 0.35);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(163, 103, 225, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a367e1;
  font-weight: 800;
  font-size: 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
  text-decoration: none;
}

.logo:hover {
  color: #d1aaff;
}

.logo img {
  filter: drop-shadow(0 0 8px #a367e1);
}

/* NAVIGATION */
.nav-list {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-link {
  color: #bda3f1;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  padding: 6px 0;
  transition: color 0.3s ease;
  user-select: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background: #d3b8ff;
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #e4d5ff;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* NAV TOGGLE (MOBILE) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  user-select: none;
}

.nav-toggle svg rect {
  transition: fill 0.3s ease;
}

.nav-toggle:hover svg rect {
  fill: #d3b8ff;
}

/* SECTIONS */
.section {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* HOME */
.home-section {
  background: linear-gradient(135deg, #3a1c6a, #6b3ca9);
  color: #f5eaff;
  text-shadow: 0 0 12px #b29cfb;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  flex-direction: column;
  padding: 0 24px;
}

.home-content h1 {
  font-weight: 800;
  font-size: 3.8rem;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #dcb7ff, #7e56d6);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: gradient-text 5s ease infinite alternate;
  user-select: none;
  margin-left: 10px;
}

@keyframes gradient-text {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.subtitle {
  font-size: 1.3rem;
  margin-bottom: 50px;
  color: #cdbcfb;
  max-width: 520px;
  user-select: none;
  margin-left: 50px;
}

/* BUTTONS */
.btn {
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 50px;
  cursor: pointer;
  border: none;
  user-select: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(163, 103, 225, 0.7);
  font-size: 1.1rem;
}

.btn-gradient {
  background: linear-gradient(270deg, #8b5cf6, #a367e1, #7c3aed);
  background-size: 600% 600%;
  color: white;
  text-shadow: 0 0 6px #d3b8ff;
  animation: btn-gradient-anim 10s ease infinite;
}

@keyframes btn-gradient-anim {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.btn-gradient:hover {
  box-shadow: 0 12px 28px #c3a1ffcc;
  transform: scale(1.08);
}

.btn-large {
  padding: 18px 48px;
  font-size: 1.3rem;
}

/* ABOUT */
.about-section {
  background: linear-gradient(135deg, #221948, #3a2f71);
  color: #d1c5f8;
  padding: 80px 20px;
}

.about-content {
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.7;
  user-select: none;
}

/* PORTFOLIO */
.portfolio-section {
  background: #1e1745;
  padding: 80px 24px;
  color: #b8a9d6;
}

.portfolio-section h2 {
  margin-bottom: 40px;
  font-weight: 700;
  font-size: 2.6rem;
  color: #d1bbff;
  user-select: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  user-select: none;
}

.gallery-item {
  background: linear-gradient(135deg, #3f2a8e, #5c44c1);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(163, 103, 225, 0.4);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  outline-offset: 4px;
}

.gallery-item:focus,
.gallery-item:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 35px rgba(178, 122, 255, 0.9);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: brightness(0.8);
  transition: filter 0.3s ease;
  border-bottom: 2px solid #7e56d6;
}

.gallery-item:hover img,
.gallery-item:focus img {
  filter: brightness(1);
}

.gallery-item figcaption {
  padding: 15px 20px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #e0d5ff;
  background: linear-gradient(270deg, #7e56d6, #a367e1);
  user-select: none;
}

/* CONTACT */
.contact-section {
  background: linear-gradient(135deg, #2b2255, #1a1640);
  padding: 80px 24px;
  color: #cbb9ff;
}

.contact-section h2 {
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 30px;
  user-select: none;
}

.contact-content {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.contact-section label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #d4c9ff;
}

.contact-section input,
.contact-section textarea {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 24px;
  border-radius: 10px;
  border: 2px solid #5d4db2;
  background-color: #1a1640;
  color: #ccc;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.contact-section input:focus,
.contact-section textarea:focus {
  border-color: #bb93ff;
  outline: none;
  box-shadow: 0 0 10px #bb93ff99;
}

.contact-section textarea {
  min-height: 140px;
}

.contact-section button {
  width: 100%;
  max-width: 200px;
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

/* FOOTER */
footer {
  background: #160f3a;
  padding: 22px 24px;
  text-align: center;
  font-weight: 600;
  color: #8866cc;
  user-select: none;
  box-shadow: inset 0 1px 10px #452e9b88;
}

/* MEDIA QUERIES */
@media (max-width: 980px) {
  .nav-list {
    position: fixed;
    top: 70px;
    right: -100%;
    background: #1f154a;
    width: 260px;
    height: calc(100% - 70px);
    flex-direction: column;
    padding: 40px 20px;
    gap: 25px;
    transition: right 0.35s ease;
    box-shadow: -8px 0 30px rgba(163, 103, 225, 0.6);
  }

  .nav-list.open {
    right: 0;
  }

  .nav-toggle {
    display: block;
  }
}

@media (max-width: 540px) {
  .home-content h1 {
    font-size: 2.8rem;
  }

  .btn {
    padding: 12px 28px;
    font-size: 1rem;
  }

  .about-content {
    font-size: 1rem;
    padding: 0 10px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .contact-content {
    padding: 0 10px;
  }
}