html {
  scroll-behavior: smooth;
}
body.no-scroll {
  overflow: hidden;
}

section {
  padding: var(--section-padding-desktop) 0;
}

.navbar {
  padding-block: var(--space-sm);
  background: var(--color-bg);
  position: relative;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
}
.logo {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}
.nav-links a {
  font-size: var(--font-sm);
  color: var(--color-subtle);
  position: relative;
}
.nav-links a:hover {
  color: var(--color-text);
}
.nav-links a.active {
  color: var(--color-text);
  font-weight: 400;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  background: var(--color-bg);
}

.hero-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
}
.hero-text {
  text-align: left;
  max-width: 600px;
}

.hero-text .intro {
  font-size: var(--font-);
  color: var(--color-subtle);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.1rem;
}
.hero-text h1 {
  font-size: var(--font-xxl);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  word-break: break-word;
}
.hero-text h1 span {
  display: block;
  font-size: var(--font-xxl);
  font-weight: 500;
}

.hero-text .subtitle {
  font-size: var(--font-md);
  color: var(--color-subtle);
  margin-bottom: var(--space-md);
  letter-spacing: 0.1rem;
}
.hero-visual {
  display: flex;
  justify-content: center;
}
.hero-visual img {
  width: 100%;
  max-width: 500px;
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: var(--space-md);
}
.tech-stack h3 {
  font-size: var(--font-sm);
  margin-bottom: var(--space-xs);
  color: var(--color-text);
  font-weight: normal;
}
.tech-stack ul {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  text-align: center;
}
.tech-stack li {
  padding: var(--space-sm);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  text-align: center;
}

.tech-stack li img {
  width: 24px;
  height: 24px;
  margin-bottom: var(--space-xs);
}
.tech-stack li span {
  font-size: var(--font-xs);
  color: var(--color-subtle);
  white-space: nowrap;
}

.hero-contact {
  text-align: right;
  font-size: var(--font-sm);
}
.hero-contact a {
  color: var(--color-subtle);
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeScale {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(60px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-text {
  opacity: 0;
  animation: fadeUp 0.8s ease-out forwards;
  animation-delay: 0.2s;
}

.hero-visual {
  opacity: 0;
  animation: fadeRight 1s ease-out forwards;
  animation-delay: 0.6s;
}

.tech-stack ul,
.tech-stack h3,
.tech-stack li {
  opacity: 0;
  animation: fadeScale 0.5s ease-out forwards;
}
.tech-stack ul,
.tech-stack h3 {
  animation-delay: 1s;
}
.tech-stack li:nth-child(1) {
  animation-delay: 1s;
}
.tech-stack li:nth-child(2) {
  animation-delay: 1.1s;
}
.tech-stack li:nth-child(3) {
  animation-delay: 1.2s;
}
.tech-stack li:nth-child(4) {
  animation-delay: 1.3s;
}
.tech-stack li:nth-child(5) {
  animation-delay: 1.4s;
}
.tech-stack li:nth-child(6) {
  animation-delay: 1.5s;
}
.tech-stack li:nth-child(7) {
  animation-delay: 1.6s;
}

.hero-contact {
  opacity: 0;
  animation: slideInRight 0.8s ease-out forwards;
  animation-delay: 2s;
}

.featured-work {
  background: var(--color-bg);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);

  align-items: stretch;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
  text-align: left;
  max-width: 100%;

  min-height: 500px;
  padding-bottom: var(--space-sm);
}

.work-card a.btn {
  margin-top: auto;
}

.work-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.work-image img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.work-title {
  font-size: var(--font-lg);
  font-weight: 600;
}

.work-desc {
  font-size: var(--font-sm);
  color: var(--color-subtle);
  margin-bottom: var(--space-sm);
  text-align: left;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.work-tags span {
  font-size: var(--font-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.btn {
  display: inline-flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--space-xs) var(--space-md);
  border-radius: 8px;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--color-text);
  transition: transform 0.3s ease, background 0.3s ease;
}
.btn:hover {
  transform: translateX(5px);
}

.btn-orange {
  background: #e67e22;
}
.btn-orange:hover {
  background: #d35400;
}
.btn-teal {
  background: #00a896;
}
.btn-teal:hover {
  background: #006d6f;
}

.btn-arrow {
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 179, 159, 0.16);
}
.btn-cta:hover .btn-arrow {
  transform: translateX(6px);
}

/* Featured Work  */
.featured-work {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.featured-work.animate {
  opacity: 1;
  transform: translateY(0);
}

.contact {
  padding: var(--section-padding-desktop) 0;
  background: var(--color-bg);
  text-align: center;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.contact.animate {
  opacity: 1;
  transform: translateY(0);
}

.contact-title {
  font-size: var(--font-lg);
  margin-bottom: var(--space-sm);
}

.contact-subtitle {
  font-size: var(--font-md);
  color: var(--color-subtle);
  margin-bottom: var(--space-lg);
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.contact-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, background 0.3s ease;
}

.contact-icons img {
  width: 20px;
  height: 20px;
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 4rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 1000;
}

#backToTop i {
  width: 20px;
  height: 20px;
  color: var(--color-text);
}

#backToTop:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}
.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-toggle {
  display: none;
  background: #0c0c1d;
  border: none;
  border-radius: 8px;
  padding: var(--space-xs);
  cursor: pointer;
}

.nav-toggle i {
  width: 24px;
  height: 24px;
  color: #fff;
}

/* Hide burger by default */
.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 6px;
  padding: var(--space-xs);
  cursor: pointer;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.09);
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: var(--space-xs);
  position: absolute;
  top: 100%;
  right: 2rem;
  z-index: 9999;
  min-width: 150px;
  background: transparent;
  padding: 0;
}

.nav-mobile.active {
  display: flex;
}

.nav-mobile a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-sm);
  border-radius: 6px;
  background: #333;
  color: #fff;
  text-decoration: none;
  font-size: var(--font-sm);
  transition: background 0.3s ease;
  min-width: 120px;
}

.nav-mobile a:hover {
  background: rgba(255, 255, 255, 0.09);
}

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 900;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.navbar {
  position: relative;
  z-index: 1000;
}

.nav-mobile {
  z-index: 1001;
}
