/* Import font */
@font-face {
  font-family: "NeueMontreal-Bold";
  src: url("../fonts/NeueMontreal-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "NeueMontreal-Medium";
  src: url("../fonts/NeueMontreal-Medium.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

/* Reset / Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

}
/*loading screen*/
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-background-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: var(--color-primary);
  transition: transform 1s ease;    
}

#progress-text {
  font-size: 2rem;
  font-weight: bold;
}

.preloader-finish {
  transform: translateY(-100%);
}

@keyframes zoomOut {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.2); opacity: 0; }
}




#main-content {
  scroll-behavior: smooth;     
  pointer-events: all; 
}

/*-----------------------------------------------------------------body---------------------------------------------------------------------------*/

body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
}

/* Container */
.container {
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/*----------------------------------------------nav bar-----------------------------------------------*/

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--spacing-sm) 0;
  background-color: var(--color-background);
  overflow: hidden;
}

/* navbar grain */
.navbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: repeating-conic-gradient(
    rgba(255,255,255,0.05) 0% 10%, 
    rgba(0,0,0,0.05) 10% 20%
  );
  background-size: 3px 3px;
  z-index: -1; /* Behind navbar content but above background */
  animation: grainMove 10s linear infinite;
}

.navbar .container {
  position: relative;
  z-index: 1;
}

.logo-img {
  height: 25px;
  width: auto;
  display: block;
}

/* Links (desktop) */
.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  margin-left: var(--spacing-md);
  text-decoration: none;
  color: var(--color-primary);
  font-weight: bold;
  font-size: 20px;
  padding-right: 15px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--color-tertiary);
}

/*hambuger button */
.menu-toggle {
  display: none; /* hidden by default (desktop) */
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: var(--color-primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hamburger → X animation */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

   .nav-links {
    position: fixed;
    top: 41px;           
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    max-height: 0;
    pointer-events: none;
    z-index: 999;
    transition: max-height 0.4s ease;
    background-color: var(--color-background-dark);
  }

  .nav-links.open {
    max-height: 350px; 
    pointer-events: all;
  }

  .nav-links a {
    padding: 1rem 0;
    width: 100%;
    text-align: center;
    font-size: 1.2rem;
    margin: 0;
  }
}

/*----------------------------------------------hero-----------------------------------------------*/

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--color-background);
  padding: var(--spacing-xl) var(--spacing-md);
  color: var(--color-white);
  z-index: 0;
}
.hero-text p {
  font-family: var(--font-body-medium);
}

/*----------------------------------------------grain overlay-----------------------------------------------*/

.grain {
  position: relative;
  overflow: hidden;
}

.grain::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: repeating-conic-gradient(
    rgba(255,255,255,0.05) 0% 10%, 
    rgba(0,0,0,0.05) 10% 20%
  );
  background-size: 3px 3px;
  z-index: 1;
  animation: grainMove 10s linear infinite;
}

/* Keep the same keyframes */
@keyframes grainMove {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

.hero-text,
.hero-animation {
  position: relative;
  z-index: 2;
}



/*----------------------------------------------about me-----------------------------------------------*/

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

.about-content {
  padding: 40px 50px 80px 50px;
  z-index: 1;
}

.sticky-image {
  position: sticky;
  top: 48px;
  width: 30%;
  margin: 0 auto;
  display: block;
  text-align: center;
  z-index: 5;
}

.sticky-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  padding: 0px 5px 0px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 100;
}


.about-content-text {
  padding: 25px 35% 25px;
  text-align: center;
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
  z-index: 1;


}
.about-content-text.visible {
  opacity: 1;
  transform: translateY(0);
}
.about-content-text p {
  color: var(--color-white);
  font-family: var(--font-body-medium);
}
.about-content-text h2 {
  color: var(--color-primary);
}
/* ------------------skills----------------- */


.skills {
display: flex;
flex-wrap: wrap;
gap: 5px;
justify-content: center;
padding-bottom: 130px;
}
.skills-content {
  padding: 0px 50px 0px 50px;
}

.tag {
padding: 5px 10px;
border-radius: 8px;
font-size: 14px;
font-weight: bold;
color: white;
display: inline-block;
}

.item { border: 2px solid var(--color-white); }

@media (max-width: 768px) {
  .skills {
    padding-bottom: 70px;
}
}

/* ------------------about me - max-width 768----------------- */
@media (max-width: 768px) {
  .about {
    display: block;
    height: auto;           
    
  }

  .sticky-image {
    position: sticky;
    width: 100%;
    top: 41px;
  } 
  .about-content-text {
    padding-left: 0;
    padding-right: 0;
  }
  .about-content {
    padding-left: 10%;
    padding-right: 10%;
    padding-bottom: 40px;
  }
}

/*----------------------------------------------gsap scroll-----------------------------------------------*/
.scroll-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/*----------------------------------------------projects-----------------------------------------------*/
.projects {
  text-align: center;
  overflow: visible; 
}

.projects-content {
      padding: 80px 10% 0% 10%;   
}
.projects-content-images {
   padding: 25px 0;
}
.projects-content h2 {
  margin-bottom: 20px;
  color: var(--color-white);
  }

.projects-content p {
  color: var(--color-white);
  font-family: var(--font-body-medium);
  }

.projects-content-images img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--color-white);
  }

  /* final project image */

.projects-content-final {
    padding: 80px 10% 10% 10%;   
}
.projects-content-final-images {
   padding: 25px 0;
}
.projects-content-final h2 {
  margin-bottom: 20px;
  color: var(--color-white);
}
.projects-content-final p {
  color: var(--color-white);
  font-family: var(--font-body-medium);
}
.projects-content-final-images img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--color-white);
}


  
@media (max-width: 768px) {
    .projects-content {
        padding: 25px 6% 5% 6%;
    }
    
    .projects-content-images {
        padding: 25px 0;
    }

    .projects-content-final {
        padding: 50px 6% 20% 6%;
    }
    
    .projects-content-final-images {
        padding: 25px 0;
    }
}
/* ------------------project link and github images----------------- */

.project-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-left: 15px;
  margin-right: 15px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.project-link:hover {
  transform: translateY(-2px);
}

.project-link .icon {
  width: 25px;
  height: 25px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease, opacity 0.2s ease;
}

.project-link:hover .icon {
  filter: invert(80%) sepia(30%) saturate(300%) hue-rotate(150deg) brightness(1.2);
}




/*----------------------------------------------components-----------------------------------------------*/
.components {
  text-align: center;
  color: var(--color-white);
  overflow: visible; /* allows sticky to work */

}

/* Grid layout */
.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  padding: 70px 10% 120px 10%; 
}

/* Component Card */
.component-card {
  background-color: var(--color-background-dark);
  border-radius: 16px;
  overflow: hidden;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.component-card img {
  width: 100%;
  border-radius: 8px;
  border: 2px solid var(--color-white);
  margin-bottom: 15px;
}

.component-card h3 {
  margin-bottom: 10px;
  font-family: var(--font-body-medium);
}

.component-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

/* Component Link 
.component-link img {
  width: 25px;
  height: 25px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s ease, opacity 0.2s ease;
  border: 0;
  
}
.component-link:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}*/
/* Responsive */
@media (max-width: 768px) {
  .components {
  }

  .components-header h2 {
    font-size: 1.6rem;
  }

  .components-grid {
    gap: 25px;
  }
}
@media (max-width: 400px) {
  .components-grid {
    grid-template-columns: 1fr;
    padding: 50px 20px;
  }

  .component-card {
    width: 100%;
  }
}
/*----------------------------------------------contact-----------------------------------------------*/

#contact {
    color: var(--color-white);
      overflow: visible; /* allows sticky to work */

  }

  #contact h3 {
    margin-bottom: 30px;
  }

  #contact form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    padding: 50px 20px 100px 20px;

  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-white);
  }

  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--color-white);
    border-radius: 8px;
    background-color: transparent;
    color: var(--color-white);
    font-family: var(--font-body-medium);
  }

  .form-group input:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
  }

  .submit-btn {
    background-color: var(--color-white);
    color: var(--color-background);
    font-family: var(--font-body-medium);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    display: block;
  margin: 0 auto;
  }

  .submit-btn:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
  }
  
  .contact-image {
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .contact-image img {
  width: 30px;
  margin: 10px;
  margin-top: 50px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s ease, opacity 0.2s ease, filter 0.3s ease;
}

.contact-image img:hover {
  transform: translateY(-2px);
  filter: invert(80%) sepia(30%) saturate(300%) hue-rotate(150deg) brightness(1.2);
}

  .circle-image {
    text-align: center;
    padding: 50px;
    padding-bottom: 120px;
  }
  .circle-image img {
    max-width: 350px;
    border-radius: 50%;
    border: 2px solid var(--color-white);
  }
  @media (max-width: 768px) {
    .circle-image {
      padding: 20px;
      padding-bottom: 100px;

    }
    .circle-image img {
      max-width: 60%;
    }
  }

/*----------------------------------------------footer-----------------------------------------------*/
.footer {
    background-color: var(--color-background-dark);
    color: var(--color-white);
    padding: 40px 20px;
    text-align: center;
  }

  .footer-container {
    max-width: 1000px;
    margin: 0 auto;
  }
  .footer-container p {
    font-size: 13px;
  }

  .footer-links {
    margin-top: 10px;
  }

  .footer-links a {
    color: var(--color-primary);
    margin: 0 12px;
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .footer-links a:hover {
    color: var(--color-tertiary);
  }

  .footer p {
    margin: 0;
    font-family: var(--font-body-);
  }

@media(min-width: 640px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(min-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    justify-content: center;  
    align-items: center;
  }
  .hero-text h1 {
    font-size: 3rem;
  }
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* Page Transition Overlay */
#page-transition {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background-color: var(--color-background-dark);
  z-index: 9998;
  transition: left 0.35s cubic-bezier(0.77, 0, 0.175, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

#page-transition.active {
  left: 0;
}
.sticky-image img {
  transform-origin: top center;
}
/* Loading Text */
#page-transition .loading-text {
  color: var(--color-primary);
  font-size: 1.5rem;
  font-family: var(--font-body);
}

/* Loading Spinner */
#page-transition .loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--color-primary);
  border-top-color: var(--color-background-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#page-transition::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: repeating-conic-gradient(
    rgba(255,255,255,0.05) 0% 10%, 
    rgba(0,0,0,0.05) 10% 20%
  );
  background-size: 3px 3px;
  animation: grainMove 10s linear infinite;
}

.form-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-background-dark);
  color: var(--color-white);
  border: 2px solid var(--color-primary);
  padding: 14px 28px;
  border-radius: 12px;
  font-family: var(--font-body-medium);
  font-size: 1rem;
  opacity: 0;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.5s ease;
  z-index: 9999;
  text-align: center;
}

/* Visible state */
.form-toast.show {
  display: block !important;
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* Hidden state (display:none avoids focus traps) */
.form-toast.hidden {
   display: none !important;
}

.form-toast.success {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.form-toast.error {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

/* Mobile sizing */
@media (max-width: 600px) {
  .form-toast {
    width: 90%;
    font-size: 0.95rem;
    padding: 12px 20px;
  }
}

/* Honeypot styling - keeps field visually hidden while still present in DOM */
.hp-wrapper { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.hp-wrapper input { opacity: 0 !important; pointer-events: none !important; }


