/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

h1 {
  font-family: "Lexend", sans-serif;
  font-weight: 500;
}

h2 {
  font-family: "Lexend", sans-serif;
  font-weight: 500; /* Bold */
}

h3 {
  font-family: "Lexend", sans-serif;
  font-weight: 400; /* Bold */
}

h4 {
  font-family: "Lexend", sans-serif;
  font-weight: 300; /* Bold */
}

p{
  font-family: "Albert Sans", sans-serif;
}

a {
  font-family: "Albert Sans", sans-serif;
}

body {
  font-family: "Albert Sans", sans-serif;
  line-height: 1.6;
    background-color: rgb(44, 44, 44); /* base background color */
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.05) 2px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 2px, transparent 1px);
  background-size: 70px 70px;
  color: #e7e7e7;
  padding: 0;
  background-position: center;
  transition: background-position 0.1s ease;
}

header {
  height: 60px; /* or match whatever the visual height is */
  background: #ffc850;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #2b2b2b;
  padding: 10px 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header.scrolled {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: box-shadow 0.3s ease;
}

header h1 {
  font-size: 1.8rem;
  letter-spacing: 2px;
}


nav a {
  color: #2b2b2b;
  text-decoration: none;
  margin-left: 25px;
  margin-right: 25px;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
  font-size: 1.1rem;
}

nav a:hover {
  color: #FFF; /* tomato */
}

.nav-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  text-align: center;
  width: 320px;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;


  border-radius: 12px;
  background: #ffefd0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.nav-popup.active {
  opacity: 1;
  pointer-events: auto;
}

.nav-popup a {
  opacity: 1;
  color: #2b2b2b;
  text-decoration: none;
  font-size: 1.3rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  transition: background 0.2s ease;
  border-bottom: #2b2b2b solid 1px;
}

.nav-popup a:hover {
  color: #ffc850;
}

.nav-popup a:last-child {
  border-bottom: none;
}

.nav-popup .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: #2b2b2b;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  user-select: none;
  z-index: 1100; /* above popup content */
}


.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001; /* above menu if needed */
}

.hamburger span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background-color: #2b2b2b;
  transition: 0.4s;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
  bottom: 0;
}

/* Animate to X when menu is active */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 50%;
}

.hamburger.active span:nth-child(2) {
  transition: 0.2s;
  opacity: 0%;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: auto;
  top: 50%;
}


.nav-link {
  opacity: 1;
  transform: translateX(0);
  transition: none; /* disable animation on desktop */
}

nav.active .nav-link {
  opacity: 1;
  transform: translateX(0);
}




#home {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: -45px;
  opacity: 0;
  transition: opacity 1s ease-out, transform 1s ease-out;
}

#home.reveal {
  opacity: 1;
}


#home #three-js{
transform: scale(0.8);
}

#home #home-phone{
  display: none;
}

#home h2 {
  z-index: 333;
  position: absolute;
  font-size: 4rem;
  color: #3b3b3b;
  background-color: #ffc850;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-top: 0;
  margin-bottom: 0;
}

.chevron_link {
  width: 80px;
  height: 80px;
  border-right: 12px solid white;
  border-bottom: 12px solid white;
  transform: rotate(45deg);
  z-index: 333;
  position: absolute;
  margin-top: 20rem;
  animation: flash 3s infinite ease-in-out;
}

@keyframes flash {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}


section {
  margin: auto;
  border-radius: 8px;
  width: 100%;
}

section h2 {
  margin-bottom: 20px;
  font-size: 2rem;
  display: inline-block;
  padding-bottom: 5px;
}

#portfolio {
  padding-top: 10rem;
  padding-left: 15rem;
  padding-right: 15rem;
  padding-bottom: 2rem;
}

#portfolio h2{
  font-size: 2.5rem;
  color: #e7e7e7;
  display: flex;
  justify-content: center;
  }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.portfolio-item {
  position: relative; /* Needed so overlay positions correctly */
  display: flex;
  flex-direction: column; /* Stack text vertically */
  align-items: center;
  text-align: center;
  cursor: pointer;

  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.portfolio-item.reveal {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-item:hover {
  transform: translateY(-10px);
}

.portfolio-item img {
  width: 100%;
  display: block;
}

/* Overlay styling */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffc850e7; /* Transparent black */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column; /* Stack overlay text vertically */
  justify-content: center; /* Center vertically */
  align-items: center; /* Center horizontally */
  color: #2b2b2b;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover .overlay {
  opacity: 1;
}

.portfolio-item h3 {
  font-size: 2rem;
  font-weight: 600;
  color: #2b2b2b;
  margin-bottom: 0.3em;
  letter-spacing: 0.5px;
  border-bottom: #2b2b2b solid 1px;
}

.portfolio-item h4 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #2b2b2b;
  margin-bottom: 0.6em;
  font-style: italic;
}

.portfolio-item p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #2b2b2b;
  max-width: 80%;
  margin: 0 auto;
  text-align: left;
  background-color: #ffefd0;
  padding: 2rem;
}


.portfolio-item:hover .overlay {
  opacity: 1; /* Show overlay */
}

.mobile-info {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffc850b7;
  color: #2b2b2b;
  padding: 0.5em;
  padding-top: 1em;
  text-align: center;
}


footer {
  background: #ffc850;
  color: #2b2b2b;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  font-size: 0.9rem;
}

/* FOR PAGES__________________________________________________________________________________________________________________________________________________ */

.project-page{
  width: 80%;
  max-width: 1800px;
  margin: 0 auto;
  margin-top: 5rem;
  opacity: 0;
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.project-page.reveal {
  opacity: 1;
}

.project-page h1,
.project-page h2,
.project-page h3,
.project-page h4,
.project-page p {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 1rem;
}

.project-hero h1{
  font-size: 3rem;
  color: #3b3b3b;
  background-color: #ffc850;
  padding-left: 1rem;
  padding-right: 1rem;
  display: block;        /* full width */
  width: max-content;
}

.project-hero h2{
  font-size: 2rem;
  color: #e7e7e7;
}

.project-hero h3{
  font-size: 1.5rem;
  color: #cacaca;
  padding-bottom: 1rem;
  border-bottom: #e7e7e7 solid 1px;
  
}

.project-hero p{
  color: #e7e7e7;
  background-color: #3b3b3b;
  padding: 1rem;
  
}

.project-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem; /* space between columns */
  width: 80%;
  margin: 0 auto;
}

.project-left {
  flex: 1; /* take up half the space */
}

.project-right {
  flex: 1; /* take up the other half */
}

.project-right img {
  max-width: 100%;
  min-width: 600px;
  height: auto;
  margin-top: 1rem;
}

.project-visuals {
  display: flex;
  flex-direction: column;   /* stack video and images */
  align-items: center;      /* center horizontally */
  padding: 2rem 1rem;
}

/* Center the video and make it responsive */
.video-container {
  width: 80%;               /* responsive width */
  max-width: 960px;
  margin-bottom: 3rem;      /* space between video and images */
  aspect-ratio: 16/9;       /* keeps video ratio */
}

.video-container iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* Image grid below video */
.project-media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-media-grid img {
  width: 100%;
  display: block;
  object-fit: cover;
}


.gif-video video {
  display: block;
  width: 100%;
  height: auto;
}

.project-visuals p{
  margin-top: 2rem;
  color: #e7e7e7;
  background-color: #3b3b3b;
  padding: 1rem;
  max-width: 600px;
  border-top: #e7e7e7 solid 1px;
  
}

.project-workflow {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 0rem;
}

.project-workflow h2{
  font-size: 2.5rem;
  color: #e7e7e7;
  margin-bottom: 2rem;
}

.project-workflow p{
  margin-top: 2rem;
  color: #e7e7e7;
  background-color: #3b3b3b;
  padding: 1rem;
  max-width: 600px;
  border-top: #e7e7e7 solid 1px;
  }


/* FOR SMALLER SCREENS_______________________________________________________________________________________________________ */

@media (max-width: 1750px) {
  #portfolio {
  padding-left: 3rem;
  padding-right: 3rem;
}
}

@media (max-width: 1350px) {
  #portfolio {
  padding-left: 6rem;
  padding-right: 6rem;
}

.portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
.project-media-grid {
  grid-template-columns: repeat(1, 1fr);
}


.project-hero {
  flex-direction: column;
    align-items: center;  
}

.project-left {
  flex: unset;
  width: 100%;  
}

.project-right {
  flex: unset;
  width: 100%;  
}

.project-right img {
    width: 100%;              /* fill its container */
    max-width: 100%;   
    min-width: 100%;       /* never overflow */
    height: auto; 
}

}



/* FOR SMALL SCREENS  */
@media (max-width: 1100px) {
  #portfolio {
  padding-left: 2rem;
  padding-right: 2rem;
}

}




/* FOR PHONE */



@media (max-width: 768px) {
  nav {
    display: flex; /* keep flex for layout */
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;

    width: 200px;
    padding: 10px 0;
    gap: 10px;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);

    /* Hide menu by default */
    opacity: 0;
    pointer-events: none;
  }


  nav a {
    padding: 12px 16px;
    border-bottom: 1px solid #8687a7;
    color: #e7e7e7;
    text-decoration: none;
  }



  
  .nav-link {
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
  }


  nav.active .nav-link:nth-child(1) { transition-delay: 0.05s; }
  nav.active .nav-link:nth-child(2) { transition-delay: 0.1s; }
  nav.active .nav-link:nth-child(3) { transition-delay: 0.15s; }

  .hamburger {
    display: flex;
  }


  #home {
  margin-top: 0px;
}

#home #three-js{
display: none;
}

#home #home-phone{
  display: flex;
}

#home #home-phone img{
  width: 100%;
}

  .portfolio-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .portfolio-item:hover .overlay {
  opacity: 0;
}

  .mobile-info {
    display: block; /* Show info bar */
    background: #ffc850e7; /* Transparent black */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

    .portfolio-item:hover .mobile-info {
  background-color: #ffc850;
}


.project-page{
  width: 90%;
}

.video-container {
  width: 100%; 
}

.project-hero h1{
  font-size: 2.2rem;
  display: flex;
}

}


@media (max-width: 768px) {

.mobile-info h3 {
  font-size: 1.5rem;
}

.mobile-info h4 {
  font-size: 1.2rem;
}

.project-hero h1{
  display: flex;
  max-width: 100%;
  width: 100%;
  text-align: center;
  background-color: rgb(255, 200, 80);
}




}