html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
}

body {
  background-color: #fff;
  color: #222;
  line-height: 1.6;
  background-image: url('asset/paper.png');
  background-repeat: repeat;
  background-size: auto;
  text-align: justify;
}

/* Preloader container */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ddd;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.5s ease;
}

.loading-text {
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: #222;
  text-transform: uppercase;
}

.dots::after {
  content: '';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 1000;
}

.navbar.transparent {
  background-color: transparent;
  box-shadow: none;
}

.navbar.solid {
  background-color: #000;
  background-image: url('asset/dark-wall.png');
  background-repeat: repeat;
  background-size: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-left {
  font-weight: 500;
  font-size: 1.2rem;
}

.nav-left img {
  height: 32px;
  width: auto;
  transition: all 0.3s ease;
  cursor: pointer;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-45deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.logo-rotate {
  animation: spin 0.4s ease-in-out;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.resume-btn {
  text-decoration: none;
  padding: 0 12px;
  font-size: 1rem;
  color: #ddd;
}

.resume-btn:hover {
  color: #fff;
}

.burger {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #ddd;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: none;
  padding: 6px 12px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #ddd;
}

.dropbtn:hover {
  color: #fff;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 120px;
  z-index: 1;
}

.dropdown-content.show {
  display: block;
}

.dropdown-content a {
  padding: 8px 12px;
  display: block;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Hero Section */
.hero {
  padding: 2rem;
  text-align: center;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -1;
}

.heroimage img {
  width: 100%;
  max-width: 800px;
  height: auto;
}

.hero h2 {
  font-size: 1.5rem;
  color: #222;
  font-weight: 100;
}

.hero p {
  display: inline-flex;
  align-items: center;
  color: #fff;
}

.mob {
  height: 48px;
  width: 48px;
  border-radius: 999px;
  margin: 0 0.4rem;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 2rem;
}

.scroll-indicator span {
  display: block;
  width: 1rem;
  height: 1rem;
  border-bottom: 2px solid #999;
  border-right: 2px solid #999;
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(45deg);
  }
  40% {
    transform: translateY(6px) rotate(45deg);
  }
  60% {
    transform: translateY(3px) rotate(45deg);
  }
}

/* Projects */
.projects {
  margin: 20vh 0;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 20vh;
}

.project-list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.desc {
  width: 100%;
  max-width: 800px;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

.desc p:first-child i {
  color: #666;
  font-style: italic;
}

.project-card {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #222;
  border-radius: 0.1rem;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}

.project-card:hover {
  transform: translateY(-0.2rem) scale(1.005);
  box-shadow: 0 1rem 1.5rem rgba(0, 0, 0, 0.4);
}

.project-card img {
  width: 100%;
  height: 100%;
  filter: grayscale(100%);
  object-fit: cover;
  transition: filter 0.3s ease;
}

.project-card img:hover {
  filter: grayscale(0);
}

/* Gallery */
.gallery {
  margin: 10vh 0;
  padding: 8rem 2rem;
  text-align: center;
}

.gallery p {
  margin-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  overflow: hidden;
  aspect-ratio: 16/9;
  border-radius: 0.1rem;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: all 0.2s ease;
}

.gallery-item:hover img {
  filter: grayscale(0%);
}

/* Footer */
.footer-dark {
  padding: 4rem 2rem;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.left {
  display: flex;
  gap: 4rem;
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  min-width: 80px;
}

.link-group span {
  font-size: 0.8rem;
  color: #666;
}

.link-group a {
  font-size: 0.95rem;
}

.right {
  margin-top: auto;
  font-size: 0.75rem;
  color: #444;
}

.right span {
  color: #666;
}

/* General */
a {
  position: relative;
  text-decoration: none;
  color: #444;
}

a:hover {
  color: #000;
}

a::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #000;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

a:hover::after {
  transform: scaleX(1);
}

@media (max-width: 768px) {
  .nav-right {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    padding: 1rem;
    border: 1px solid #ddd;
  }

  .nav-right.show {
    display: flex;
  }

  .resume-btn {
    color: #444;
  }

  .resume-btn:hover {
    color: #000;
  }

  .dropbtn {
    display: none;
  }

  .dropdown-content {
    display: block;
    position: static;
    text-decoration: none;
    padding: 0 12px;
    font-size: 1rem;
    text-align: center;
  }

  .dropdown-content a {
    margin-bottom: 0.5rem;
  }

  .burger {
    display: block;
  }

  .project-card img {
    filter: grayscale(0);
  }

  .gallery-item img {
    filter: grayscale(0);
  }
}