/* 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; }
}
/*sideways transition*/




#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: 10;
  padding: var(--spacing-sm) 0;
}
.navbar .logo {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.5rem;
}
.nav-links a {
  margin-left: var(--spacing-md);
  text-decoration: none;
  color: var(--color-primary);
  font-weight: bold;
  font-size: 20px;
  padding-right: 15px;
}
.nav-links a:hover {
  color: var(--color-secondary);
}
.logo-img {
  height: 25px;  adjust as needed 
  width: auto;
  display: block;
}*/



.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;
}

/* Make sure container content stays on top */
.navbar .container {
  position: relative;
  z-index: 1;
}

/* Logo styling */
.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-secondary);
}

/*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);
}

/* mobile sizing */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

   .nav-links {
    position: fixed;      /* stick to top */
    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;         /* above page content */
    transition: max-height 0.4s ease;
    background-color: var(--color-background-dark);
  }

  .nav-links.open {
    max-height: 300px;    /*  number of links */
    pointer-events: all;
  }

  .nav-links a {
    padding: 1rem 0;
    width: 100%;
    text-align: center;
    font-size: 1.2rem;
  }
}

/*----------------------------------------------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); /* keep your existing color */
  padding: var(--spacing-xl) var(--spacing-md);
  color: var(--color-white);
  z-index: 0; /* base layer */
}
.hero-text p {
  font-family: var(--font-body-medium);
}

/*----------------------------------------------grain overlay-----------------------------------------------*/

.grain {
  position: relative; /* make sure ::after positions correctly */
  overflow: hidden;   /* optional: prevents grain overflow */
}

.grain::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* allows clicks through */
  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; /* adjust grain density */
  z-index: 1; /* sits above background but below content */
  animation: grainMove 10s linear infinite;
}

/* Keep the same keyframes */
@keyframes grainMove {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

/* Keep your hero content above the overlay 
.hero-text,
.hero-animation {
  position: relative;
  z-index: 2;
}*/



/*----------------------------------------------about me-----------------------------------------------*/

.about {
  text-align: center;
  overflow: visible; /* allows sticky to work */
}

.about-content {
  padding: 100px 50px 0px 50px;
  z-index: 1;
}

.sticky-image {
  position: sticky;
  top: 48px;
  width: 30%;         /* or max-width: 800px if you prefer fixed limit */
  margin: 0 auto;     /* centers the container */
  display: block;
  text-align: center; /* ensures inner image stays centered */
  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 30% 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);
  
}
/* ------------------skills----------------- */


.skills {
display: flex;
flex-wrap: wrap;
gap: 5px;
justify-content: center;
padding-bottom: 12%;
}
.skills-content {
  padding: 50px;

}

.tag {
padding: 5px 10px;
border-radius: 8px;
font-size: 14px;
font-weight: bold;
color: white;
display: inline-block;
}


.html { border: 2px solid var(--color-white); }
.css { border: 2px solid var(--color-white); }
.js{ border: 2px solid var(--color-white); }
.git { border: 2px solid var(--color-white); }
.node { border: 2px solid var(--color-white); }
.crm { border: 2px solid var(--color-white); }
.brevo { border: 2px solid var(--color-white); }


/* ------------------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%;
  }
}

/*----------------------------------------------gsap scroll-----------------------------------------------*/
.scroll-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/*----------------------------------------------projects-----------------------------------------------*/
.projects {
  text-align: center;
  /*border: 1px solid rgb(255, 230, 0);*/
  overflow: visible; /* allows sticky to work */
  

}
.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: 50px 6% 5% 6%;  /* Remove bottom padding */
    }
    
    .projects-content-images {
        padding: 25px 0;  /* Remove side padding */
    }

    .projects-content-final {
        padding: 50px 6% 20% 6%;  /* bottom padding so projects img fits */
    }
    
    .projects-content-final-images {
        padding: 25px 0;  /* Remove side padding */
    }
}
/* ------------------project link and github images----------------- */

.project-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-left: 10px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  margin-left: 15px;
  margin-right: 15px;
}

.project-link:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

/* Base icon styling */
.icon {
  width: 25px;              /* adjust to fit your images */
  height: 25px;
  vertical-align: middle;
  transition: transform 0.2s ease, opacity 0.3s ease, filter 0.3s ease;
  filter: brightness(0) invert(1); /* makes dark icons white */
}



/*----------------------------------------------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; /* ensure it can animate */
    display: block;      /* take full width of content */
  margin: 0 auto;      /* center horizontally */
  }

  .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 :hover {
    transform: translateY(-2px);
    opacity: 0.8;
  }

  .contact-image img{
    width: 30px;
    margin: 10px;
    margin-top: 50px;
    filter: brightness(0) invert(1);
  }
  .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-secondary);
  }

  .footer p {
    margin: 0;
    font-family: var(--font-body-);
  }


/* Responsive */
@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; /* anchor scale to top edge */
}
/* 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); }
}

/* Optional: Add grain effect to transition */
#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;
}

/* Colors for feedback */
.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; }


