/* =======================
   Global Styles
======================= */
body {
  padding-top: 72px;
  font-family: "Inter", "Open Sans", "Roboto", sans-serif;
}

/* =======================
   Header / Navbar Layout
======================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: white;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  opacity: 0;
  transform: translateY(-20px);
  animation: headerFadeIn 0.8s ease-out forwards;
}

/* Main nav wrapper */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  min-height: 72px;
}

/* Logo + Name group */
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateX(-60px);
  animation: slideInLeft 0.7s ease-out 0.2s forwards;
}

.logo {
  display: inline-block;
  height: 48px;
  width: 48px;
  border-radius: 50%;
}

/* Developer name + title */
.name-list {
  display: flex;
  flex-direction: column;
  padding: 0 10px;
}

.name-list a {
  font-weight: 400;
  font-size: 1.2em;
  color: black;
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}

/* =======================
   Navigation Links
======================= */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px;
  margin: 0;
  list-style: none;
}

.nav-list li {
  display: inline-block;
  padding: 0.5rem 2rem;
  border-right: 2px solid black;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInUp 0.5s ease-out forwards;
}

.nav-list li:nth-child(1) {
  animation-delay: 0.5s;
}
.nav-list li:nth-child(2) {
  animation-delay: 0.7s;
}
.nav-list li:nth-child(3) {
  animation-delay: 0.9s;
}
.nav-list li:nth-child(4) {
  animation-delay: 1.1s;
}

.nav-list li:last-child {
  border-right: none;
}

/* Hover + Active states */
.nav-list li:hover:not(:has(a[aria-current="page"])) {
  border-color: #e4b484;
  border-width: 5px;
  font-weight: 900;
}

.nav-list a {
  text-decoration: none;
  color: black;
}

.nav-list a[aria-current="page"] {
  font-weight: 900;
  color: #e9af76;
  cursor: default;
}

/* =======================
   Hamburger Menu (Mobile)
======================= */
.menu-btn {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-btn .bar {
  position: absolute;
  left: 50%;
  width: 24px;
  height: 2px;
  background: #000;
  border-radius: 1px;
  transform: translateX(-50%);
  transition: top 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.menu-btn .bar:nth-child(1) {
  top: 16px;
}
.menu-btn .bar:nth-child(2) {
  top: 22px;
}
.menu-btn .bar:nth-child(3) {
  top: 28px;
}

.header.is-open .menu-btn .bar:nth-child(1) {
  top: 22px;
  transform: translateX(-50%) rotate(45deg);
}
.header.is-open .menu-btn .bar:nth-child(2) {
  opacity: 0;
}
.header.is-open .menu-btn .bar:nth-child(3) {
  top: 22px;
  transform: translateX(-50%) rotate(-45deg);
}

/* =======================
   Mobile Dropdown
======================= */
@media (max-width: 1200px) {
  .menu-btn {
    display: inline-flex;
    visibility: visible;
  }

  .navbar {
    gap: 8px;
    padding: 0.5rem 1rem;
    min-height: 100px;
  }

  .nav-list {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: transform 0.5s ease, opacity 0.5s ease;
  }

  .nav-list.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-list li {
    display: block;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding: 0;
  }

  .nav-list li a {
    display: block;
    padding: 14px 16px;
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .header.is-open .nav-list {
    max-height: calc(100vh - 56px);
  }

  .header.is-open .menu-btn .bar:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }
  .header.is-open .menu-btn .bar:nth-child(2) {
    opacity: 0;
  }
  .header.is-open .menu-btn .bar:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

  .nav-list li:hover:not(:has(a[aria-current="page"])) {
    border-bottom: none;
    font-weight: normal;
  }
}

/* =======================
   Animations
======================= */
@keyframes headerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
