html,
body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #333333;
}

body {
  background-image: url('assets/img/poly.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

/* NAVIGATION */
nav {
  position: sticky;
  top: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  padding: 1em;
  background: #333333;
  border-radius: 8px;
  opacity: 90%;
  text-align: center;
}

nav a {
  position: relative;
  margin: 0 1em;
  padding: 0.2em;
  font-size: 1.2rem;
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: #3BA676;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

nav a:hover {
  color: #3BA676;
}

nav a:hover::after {
  transform: scaleX(1);
}

.nav-icon {
  height: 16px;
  width: 16px;
}

#about:target~nav a[href="#about"]::after,
#resume:target~nav a[href="#resume"]::after {
  transform: scaleX(1);
}

/* WRAPPER */
.wrapper {
  position: relative;
  z-index: 0;
  height: 100vh;
  width: 800px;
  margin: auto;
  padding: 2em;
  background-color: #FAFAFA;
  box-sizing: border-box;
  overflow: auto;
  scrollbar-width: thin;
}

/* SECTIONS */
section {
  display: none;
  background-color: #FAFAFA;
  padding: 2em;
  max-width: 800px;
  margin: auto;
  scroll-margin-top: 100px;
  position: relative;
}

#about:target,
#resume:target,
#lb-img1:target~.wrapper #about,
#lb-img2:target~.wrapper #about,
#lb-img3:target~.wrapper #about,
#lb-img4:target~.wrapper #about {
  display: block;
  animation: slideIn 0.5s ease forwards;
}

/* PROFILE */
.profile {
  text-align: center;
}

.profile-pic {
  width: 200px;
  border-radius: 50%;
}

/* IMAGE GRID */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.image-grid img {
  width: 100%;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.image-grid img:hover {
  transform: scale(1.05);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  padding: 2em;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 8px;
  animation: zoomIn 0.4s ease forwards;
  z-index: 2;
}

.overlay-close {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-decoration: none;
  z-index: 1;
}

body:has(#lb-img1:target) #about,
body:has(#lb-img2:target) #about,
body:has(#lb-img3:target) #about,
body:has(#lb-img4:target) #about {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}

/* RESUME SECTION */
.resume-item {
  cursor: pointer;
  margin-bottom: 1em;
  border-left: 3px solid #3BA676;
  padding-left: 0.5em;
}

.resume-item:hover {
  border-color: #63daa4;
}

.resume-item:has(.no-click) {
  cursor: default;
}

.resume-title {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5em;
  user-select: none;
}

.resume-chapter {
  margin-top: 48px;
}

.arrow {
  display: inline-block;
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

.resume-details {
  max-height: 0;
  overflow: hidden;
  padding-left: 1.5em;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.resume-item.expanded .arrow {
  transform: rotate(90deg);
}

.resume-item.expanded .resume-details {
  max-height: 200px;
  padding-top: 0.5em;
}

/* BUTTON */
button.btn,
a.btn {
  appearance: none;
  border: none;
  padding: 0.5em 1em;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  background-color: #3BA676;
  color: white;
  font-family: inherit;
  font-size: inherit;
  text-align: center;
  line-height: 1.2;
  text-decoration: none;
  margin-bottom: 1em;
  transition: background-color 0.3s ease;
  box-sizing: border-box;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.btn:hover {
  opacity: 0.5;
}

/* CREDIT */
.credit {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 12px;
  color: #888;
  font-family: sans-serif;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 1000;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 1em;
  }

  nav a {
    margin: 0.3em 0;
    font-size: 1.1em;
  }

  section {
    padding: 1em 0.5em;
    max-width: 100%;
    min-height: 100%;
  }

  .profile-pic {
    width: 120px;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 6px;
  }

  .image-grid img:hover {
    transform: none;
  }

  .lightbox {
    padding: 1em;
  }

  body {
    font-size: 16px;
  }

  h2 {
    font-size: 1.5em;
  }

  p {
    font-size: 1em;
  }
}

/* ANIMATIONS */
@keyframes zoomIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideIn {
  0% {
    transform: translateY(20px);
  }
  100% {
    transform: translateY(0);
  }
}
