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 {
  background-color: #000;
  background-image: url('asset/dark-wall.png');
  background-repeat: repeat;
  background-size: auto;
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 9999;
}

.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;
  color: #ddd;
  padding: 0 12px;
  font-size: 1rem;
}

.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;
  color: #ddd;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.dropbtn:hover {
  color: #fff;
}

.dropdown-content {
  display: none;
  position: absolute;
  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;
}

/* Back Button */
.back-button {
  position: fixed;
  font-size: 1rem;
  font-weight: 100;
  top: 6rem;
  margin-left: 1.5rem;
  padding: 0.5rem 1rem;
  background: #444;
  color: #fff;
  border-radius: 100px;
  transition: background 0.3s ease;
  z-index: 1000;
}

.back-button:hover {
  background: #fff;
}

a.back-button::after {
  display: none !important;
}

.top-button {
  position: fixed;
  font-size: 1rem;
  bottom: 1rem;
  right: 1.5rem;
  margin-left: 1.5rem;
  padding: 0.5rem 1rem;
  filter: tra;
  background: #444;
  color: #fff;
  border-radius: 100px;
  transition: background 0.3s ease;
  z-index: 1000;
}

.top-button:hover {
  background: #fff;
}

a.top-button::after {
  display: none !important;
}


/* Presentation */
.hero {
  position: relative;
  text-align: center;
  padding: 2rem;
}

.hero h1 {
  font-size: 2rem;
  color: #000;
}

.hero p {
  font-size: 1.2rem;
  font-weight: 300;
  color: #666;
}

/* Parallax */
.case {
  position: relative;
  overflow: hidden;
  text-align: center;
  height: 50vh;
}

.case-bg {
  background: url('asset/skulls.png');
  background-color: #222;
  background-repeat: repeat;
  background-size: auto;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300%;
  z-index: 1;
}

.case-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.mockup-container {
  margin-top: 2rem;
}

.mockup {
  max-width: 300px;
  transition: transform 0.2s ease-out;
}

.mockup-laptop {
  max-width: 600px;
  transition: transform 0.2s ease-out;
}

/* Overview */
.overview {
  max-width: 840px;
  padding: 2rem 2rem 0 2rem;
  margin: auto;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}

/* product */
.product {
  max-width: 840px;
  padding: 1rem 2rem 0 2rem;
  margin: auto;
}

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

/* Double */
.double {
  max-width: 840px;
  padding: 2rem 2rem 0 2rem;
  margin: auto;
}

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

.double-grid ul {
  list-style-type: square;
  padding-left: 1rem;
}

/* Single */
.single {
  max-width: 840px;
  padding: 2rem 2rem 0 2rem;
  margin: auto;
}

.single-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 2rem;
}

.photo {
  width: 100%;
  max-width: 840px;
  display: block;
  height: auto;
  border-radius: 0.1rem;
}

.photo-caption {
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  right: 0px;
  padding-bottom: 1rem;
}

.photo-caption .badge {
  background: #444;
  color: #fff;
  font-size: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  text-transform: uppercase;
}

/* More Projects */
.more-projects {
  margin-top: 4rem;
  padding: 4rem 2rem;
  text-align: center;
}

.more-projects h2 {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.project-card {
  display: block;
  background-color: #fff;
  background-image: url('asset/tile.png');
  background-repeat: repeat;
  background-size: auto;
  text-decoration: none;
  border-radius: 0.1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
}

.project-card p {
  padding: 0.5rem;
  font-size: 1rem;
}


/* Footer */
.footer-dark {
  margin-top: 10vh;
  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);
}

.label {
  font-weight: 500;
  opacity: 0.8;
}

.value {
  line-height: 1.6;
}

.h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

@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;
  }
}