:root {
  --orange: #ff6f00;
  --lighter_orange: #ffa41c;
  --dark_gray: #222;
  --text-light: #555;
  --bg-dark: #32302f;
  --yellow: #ffd973;
  --bg: white;
  --text-dark: #ccc;
  --callisto-blue: var(--orange);
  --see-more-white-color: var(--orange);
}

/* #6b1456  */
/* #533f4f  */
/* #54afdc  */

/* -------------------- Base -------------------- */


@keyframes slideDownFromTop {
  from {
    transform: translateY(-150%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.top-left-background {
  animation: slideDownFromTop 1.2s ease forwards;
  /* Keep existing position absolute and styles */
}

body {
  overflow-x: hidden;
  margin: 0;
  font-family: 'Zain', sans-serif;
  background-color: var(--bg);
  color: var(--dark_gray);
  text-align: center;
  transition: background-color 0.2s, color 0.2s;
  user-select:none;
}



body.dark {
  background-color: var(--bg-dark);
  color: white;
}

.zain-bold {
  font-family: "Zain", sans-serif;
  font-weight: 700;
}

.page-wrapper {
  padding-left: 5rem;
  padding-right: 5rem;
}

/* -------------------- Navbar -------------------- */

.imagediv {
  margin-top: 70px;
  margin-bottom: 0px;
  width: 70%;
}

.top-left-background {
  position: absolute;
  top: -7rem;
  left: -3.5rem;
  width: 93%;
  height: 500px;
  background-image: url('images/papple.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: top left;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

body.dark .top-left-background {
  filter: brightness(85%);
}

.navbar {
  width: 100%;
  padding: 1.2rem 5rem 0rem 8rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  transition: background 0.5s ease;
  box-sizing: border-box;
}

.nav-right {
  margin-left: auto;
  margin-right: 18.5vw;
}

.nav-right ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-right a {
  position: relative;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--dark_gray);
  transition: color 0.3s ease;
}

.nav-right a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--lighter_orange);
  transition: width 0.3s ease;
}

.nav-right a:hover::after {
  width: 100%;
}

body.dark .nav-right a {
  color: var(--lighter_orange);
}

body.dark .nav-right a::after {
  background-color: var(--yellow);
}

body.dark .nav-right a:hover {
  color: var(--yellow);
}

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.8rem;
  color: var(--dark_gray);
}

body.dark .menu-toggle {
  color: var(--lighter_orange);
}

.mobile-theme-toggle {
  display: none;
}

/* -------------------- Hero -------------------- */

.hero {
  display: flex;
  justify-content: left;
  align-items: center;
  padding: 8rem 10%;
  min-height: 80vh;
  text-align: left;
  box-sizing: border-box;
}

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-text h1 {
  user-select: none;
  font-size: 6rem;
  margin-bottom: 0;
  font-weight: 800;
  color: var(--orange);
}

.hero-text p {
  font-size: 2rem;
  max-width: 800px;
  line-height: 1.6;
  color: var(--text-light);
}

body.dark .hero-text h1 {
  color: var(--lighter_orange);
}

body.dark .hero-text p {
  color: var(--text-dark);
}

/* Face and Mustache Animation */

#face-container {
  margin-top: 40px;
  margin-left: 5vw;
  position: relative;
  width: 150px;
  height: 200px;
}

#face {
  width: 100%;
  height: 100%;
}

#eyes {
  position: absolute;
  top: 42%;
  left: 25%;
  width: 50%;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.mustache-side {
  position: absolute;
  width: 50%;
  top: 55%;
  cursor: grab;
  transition: filter 0.2s ease;
}

.mustache-side:active {
  cursor: grabbing;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.3));
}

#left-mustache {
  left: 3%;
  transform-origin: right center;
}

#right-mustache {
  right: 2%;
  transform-origin: left center;
}

/* -------------------- Theme Rope -------------------- */

.rope-theme-container {
  position: fixed;
  top: 20px;
  right: -200px;
  width: 500px;
  height: 200px;
  display: flex;
  justify-content: left;
  background-color: transparent;
  z-index: 1000;
}

.rope-theme-container .cord-container {
  position: relative;
  transform: translateY(-80px);
  transition: transform 0.3s ease-out;
}

.rope-theme-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.rope-theme-container .handle {
  width: 55px;
  height: 55px;
  background: url('images/tip.png') center/contain no-repeat;
  cursor: grab;
  position: absolute;
}

/* -------------------- Technical Projects -------------------- */

.project-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}


.proj-title-section h2 {
  font-size: 6rem;
  font-weight: 800;
  color: var(--orange);
  margin: 0;
}

body.dark .proj-title-section h2 {
  color: var(--lighter_orange);
}

.project-row {
  z-index: 3;
  padding: 2rem;
  /*border: 4px solid var(--callisto-blue);*/
  background-color: #fff0dc;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0rem 0rem 0rem;
  gap: 0rem;
  flex-wrap: nowrap;
}

body.dark .project-row {
  background-color: #413e3d;
}

.project-row.reverse {
  flex-direction: row-reverse;
}

.project-text {
  flex: 1;
  text-align: left;
}

.project-row.reverse .project-text {
  text-align: right;
  padding-right: 0;
  padding-left: 2rem;
}

.project-text h3 {
  font-size: 2.4rem;
  color: var(--see-more-white-color);
  margin: 0rem;
  font-weight: 800;
}

body.dark .project-text h3 {
  color: var(--lighter_orange);
}

.project-text p {
  font-size: 1.35rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0rem;
}

body.dark .project-text p {
  color: var(--text-dark);
}

.project-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.project-row.reverse .project-image {
  justify-content: flex-start;
}

.project-image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 6px;
  transition: transform 0.2s ease;
  object-fit: cover;

}

.project-image img:hover {
  transform: scale(1.02);
}

.see-all-container {
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 3rem;
}

/* -------------------- Art Portfolio -------------------- */

.img-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 6px;
  padding: 0px;
  padding-left: 2rem;
  padding-right: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.image-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 15px;
  width: 100%;
  align-items: start;
}

.image-row img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
  object-fit: cover;
}

.image-row img:hover {
  transform: scale(1.02);
}

/* Common Button */

.see-more {
  display: inline-block;
  margin-top: 30px;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--orange);
  background-color: transparent;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 6px;
  border: 4px solid var(--orange);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.see-more:hover {
  background-color: var(--orange);
  color: white;
}

body.dark .see-more {
  border: 4px solid var(--lighter_orange);
  color: var(--lighter_orange);
  background-color: var(--bg-dark);
}

body.dark .see-more:hover {
  background-color: var(--lighter_orange);
  color: var(--bg-dark);
}

.see-more.white {
  color: var(--see-more-white-color);
  border: 4px solid var(--see-more-white-color);
}

.see-more.white:hover {
  background-color: var(--see-more-white-color);
  color: white;
}

.see-more.big {
  margin-top: 0px;
  font-weight: 700;
  font-size: 2.4rem;
  border: 6px solid var(--orange);
  padding: 10px 24px;
}

/* -------------------- Art Titles -------------------- */

.art-title-section {
  text-align: center;
  margin-left:auto;
  margin-right:auto;
}

.art-title-section h2 {
  font-size: 6rem;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: -0.5em;
}

.art-title-section p {
  font-size: 1.5rem;
  color: var(--text-light);
}

body.dark .art-title-section h2 {
  color: var(--lighter_orange);
}

body.dark .art-title-section p {
  color: #ddd;
}

/* -------------------- Footer -------------------- */

footer {
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10;
}

.social-icons {
  display: flex;
  gap: 2rem;
  
}

.social-icons i {
  color: var(--dark_gray);
  font-size: 2.8rem;
  padding-bottom: 2rem;
}

body.dark .social-icons i {
  color: var(--lighter_orange);
}

.social-icons a,
.email-icon {
  width: 32px;
  height: 32px;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s;
  margin-right: 1rem;
  margin-left: 1rem;
}

.social-icons a:hover,
.email-icon:hover {
  transform: scale(1.2);
}

.email-popup {
  visibility: hidden;
  opacity: 0;
  background-color: #ffffff;
  color: var(--dark_gray);
  text-align: center;
  padding: 5px 10px;
  border-radius: 6px;
  position: absolute;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-size: 0.9rem;
}

.email-icon:hover .email-popup {
  visibility: visible;
  opacity: 1;
}

/* -------------------- Popup Overlay -------------------- */

.popup-overlay {
  padding-top: 3em;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-overlay img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 6px;
}

.popup-caption {
  margin-top: 30px;
  font-size: 1.3em;
  color: #fff;
  font-weight: 300;
}

/* -------------------- Responsive -------------------- */

@media (max-width: 980px) {
  .navbar {
    padding-right: 30px;
  }

  .hero {
    text-align: center;
    justify-content: center;
    padding-top: 4em;
  }

  #face-container {
    margin: 0 auto;
  }

  .hero-content {
    flex-direction: column;
    align-items: center;
  }

  .hero-face {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .rope-theme-container {
    display: none;
  }

  .nav-right {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
  }

  body.dark .nav-right {
    background-color: rgb(40, 36, 34);
  }

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

  .nav-right ul {
    flex-direction: column;
    gap: 1rem;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .mobile-theme-toggle {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--dark_gray);
    cursor: pointer;
    transition: color 0.3s ease;
  }

  .mobile-theme-toggle:hover {
    color: var(--lighter_orange);
  }

  body.dark .mobile-theme-toggle {
    color: var(--yellow);
  }

  .page-wrapper {
    padding-left: 0rem;
    padding-right: 0rem;
  }

  .imagediv {
    margin-top: 50px;
    margin-bottom: 50px;
    width: 100%;
  }

  .proj-title-section h2 {
    font-size: 10vw;
  }

  .hero-text h1 {
    font-size: 10vw;
  }

  .hero-text p {
    font-size: 1.4rem;

  }

  .top-left-background {
    position: absolute;
    top: -7rem;
    left: -4rem;
    width: 1000px;
    height: 500px;
  }


}

@media (max-width: 1145px) {
  .image-row {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center;
  }

  .img-header {
    align-items: center;
  }

  .art-title-section {
    text-align: center;
  }

  .see-more {
    align-self: center;
  }


  .project-row,
  .project-row.reverse {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .project-text {
    max-width: 100%;
    text-align: center;
    padding: 0;
  }

  .project-row.reverse .project-text {
    max-width: 100%;
    text-align: center;
    padding: 0;
  }

  .project-image {
    justify-content: center;
  }


}

/* -------------------- About Me -------------------- */

.about-me {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: left;
  padding: 6rem 10%;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  gap: 3rem;
  flex-wrap: nowrap;
}

.about-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 0rem;
  margin-top: 0rem;
}

body.dark .about-text h2 {
  color: var(--lighter_orange);
}

.about-text p {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--text-light);
  max-width: 700px;
}

body.dark .about-text p {
  color: var(--text-dark);
}

/* Responsive adjustments */
@media (max-width: 1145px) {
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    text-align: center;
  }
}

#dont-pull-label {
  z-index:-1;
  position: absolute;
  top: 120px; /* adjust vertical alignment */
  right: -100px; /* distance to the left side of face container, adjust as needed */
  transform: translateY(-50%);
  background: transparent;
  color: var(--orange);
  font-weight: 700;
  font-family: 'Zain', sans-serif;
  font-size: 1.2rem;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  transform: rotate(-20deg);
  opacity:0.5;
}

body.dark #dont-pull-label {
  color: var(--lighter_orange);
}

#dont-pull-label svg {
  transform: rotate(50deg);
  display: block;
}

body.dark #dont-pull-label svg path {
  stroke: var(--lighter_orange);
}