body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #0b0f19;
  color: #e9eefc;
}

a {
  color: inherit;
  text-decoration: none;
}

/* HEADER */
.top {
  position: sticky;
  top: 0;
  z-index: 9999; /* prevents content showing behind */
  background: #0b0f19;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease;
}

.top.hide {
  transform: translateY(-100%);
}

.nav {
  width: min(1000px, 92%);
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  letter-spacing: 0.08em;
}

.menu {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e9eefc;
  padding: 10px 12px;
  border-radius: 10px;
}

.navlinks {
  display: flex;
  gap: 16px;
  align-items: center;
}

.navlinks a {
  opacity: 0.8;
  font-weight: 600;
}

.navlinks a:hover {
  opacity: 1;
}

/* MAIN WRAP (top padding prevents underlap with sticky header) */
.wrap {
  width: min(1000px, 92%);
  margin: 0 auto;
  padding: 90px 0 40px;
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: center;
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  opacity: 0.85;
  margin: 0 0 12px;
}

h1 {
  margin: 0 0 12px;
  line-height: 1.15;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

h1 span {
  color: #ffd54f;
}

.muted {
  opacity: 0.75;
  line-height: 1.8;
}

.small {
  font-size: 0.92rem;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn {
  background: #ffd54f;
  color: #111;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  border-radius: 12px;
}

.icons {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  font-size: 1.3rem;
  justify-content: center;
}

.icons a {
  opacity: 0.85;
}

.icons a:hover {
  opacity: 1;
}

.avatar {
  width: 100%;
  max-width: 280px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* SECTIONS */
.section {
  padding: 34px 0 0;
}

h2 {
  margin: 0 0 10px;
  text-align: center;
}

h3 {
  margin: 0 0 6px;
}

/* PROJECTS */
.proj {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.proj img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.link {
  color: #ffd54f;
  font-weight: 700;
}

.link:hover {
  text-decoration: underline;
}

/* FOOTER */
.foot {
  padding: 22px 0;
  text-align: center;
  opacity: 0.7;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 40px;
}

/* SKILLS ICON CAROUSEL */
.skills-carousel {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.skills-track {
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  padding: 14px;
  will-change: transform;
  animation: skills-scroll 20s linear infinite;
}

.skills-track img {
  height: 40px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.8;
  transition: 0.2s ease;
}

.skills-track img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.skills-carousel:hover .skills-track {
  animation-play-state: paused;
}

/* uses px distance set by JS */
@keyframes skills-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--scrollDist, 0px)));
  }
}

/* MOBILE */
@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .menu {
    display: inline-flex;
  }

  .navlinks {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .navlinks.show {
    display: flex;
  }

  .proj {
    grid-template-columns: 1fr;
  }

  .avatar {
    max-width: 220px;
  }
}
