/*<!-------------------------------Global Style------------------------------------------------> */
html {
  overflow-x: hidden;
}


body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  background-color: #313131;
  color: #fff;
  transition: padding-left 0.3s ease;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

  main section:not(.hero)  {
    padding: 80px 20px;
    max-width: 900px;
    margin: auto;
  }

h3, h4 {
  font-family: "Special Gothic Expanded One", sans-serif;
  font-weight: 400;
  font-style: normal;
}

h2 {
  font-size: clamp(1.5rem, 2.5rem, 3.0rem);
}

h3 {
  font-size: clamp(2.5rem, 3rem, 3.5rem);
}

h4 {
  font-size: clamp(1.5rem, 2rem, 2.5rem);
}

p {
  font-size: clamp(0.5rem, 1.2rem, 1.5rem);
  font-family: 'Poppins', sans-serif;
}


/*<!-------------------------------Back to top button------------------------------------------------> */

.back-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  background-color: #00adb5;
  color: white;
  text-align: center;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  line-height: 40px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top a {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #00adb5;
  color: white;
  text-decoration: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-to-top:hover {
  background-color: #028f98;
  transform: scale(1.1);
}

/* Entrance animation */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutSlide {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px); 
  }
}

.back-to-top.hidden {
  opacity: 0;
  pointer-events: none;
}


/*<!-------------------------------Hero Area------------------------------------------------> */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #313131;
  text-align: left;
  padding: 0 40px;
}

.intro-text {
  max-width: 90%;
  width: 100%;
  position: relative;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #313131;
  padding: 0 40px;
  text-align: center;
}

.intro-text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.name {
  font-family: 'Clash Display', sans-serif;
  font-weight: 700;
  font-size: clamp(9rem, 23vw, 20rem);
  background: linear-gradient(90deg, #00adb5, #00ffc6);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin: 0;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.typed-wrapper {
  margin-top: 20px;
}

.typed-wrapper h2 {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
}

.name::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90%;
  height: 80%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,173,181,0.15), transparent 70%);
  z-index: -1;
  filter: blur(30px);
}

.scroll-prompt {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  color: #ffffff;
  background-color: rgba(0, 173, 181, 0.3);
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  animation: bounce 2s infinite;
  font-weight: bold;
  z-index: 1100; 
}

.scroll-prompt:hover {
  background-color: rgba(0, 173, 181, 0.6);
  transform: translateX(-50%) scale(1.05);
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

/*<!-------------------------------About Section------------------------------------------------> */
.about-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.about-text {
  flex: 1;
  min-width: 250px;
}

.about-photo {
  flex: 0 0 auto;
  text-align: center;
}

.mugshot {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #00adb5;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

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

  .mugshot {
    width: 250px;
    height: 250px;
  }
}

/*<!-------------------------------Project Section------------------------------------------------> */

.project-card:hover {
  transform: scale(1.03);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.project-card {
  background: #1E1E1E; 
  color: #fff;
  padding: 20px;
  margin: 15px 0;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.github-link {
  text-decoration: underline;
  color: #00adb5;
  text-decoration: underline;
  margin: 0 5px;
  font-weight: bold;
}

/*<!-------------------------------Skill Section (tagcanvas)------------------------------------------------> */
#myCanvasContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto;
  max-width: 100%;
}

#myCanvas {
  display: block;
}
/*<!-------------------------------When I'm not coding (Personal Interest)------------------------------------------------> */
.photo-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 900px;
  margin: auto;
  padding: 16px;
  grid-auto-flow: row;
  align-items: start;
  transition: transform 0.3s ease;
  transform-origin: top center;
}

@media (max-width: 900px) {
  .photo-collage {
    transform: scale(calc(100vw / 920)); /* 920 ≈ width + padding */
  }
}

.my-gallery {
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.photo-collage img {
  width: 100%;
  display: block;
  margin-bottom: 12px;
  border-radius: 8px;
  break-inside: avoid;     
}

.last-column img{
    break-inside: avoid;  
    display: block;
    width : 106%;
}

.captionHeading{
  font-size: 18px;
  line-height: 1.4;
  color: #00adb5;
  padding: 12px;
}

.caption{
  font-size: 14px;
  color: white;
  padding: 12px;
  text-decoration: none;;
}

.caption-container{  
  background: rgba(0,0,0,0.6);  
}
/*<!-------------------------------When I'm not coding (extra-curricular)------------------------------------------------> */

.links {
  color: #00adb5;
  text-decoration: underline;
  margin: 0 5px;
  font-weight: bold;
}

#extracurriculars .your-class img {
  width: 60%;
  height: auto;
  margin: 0 auto;
  display: block;
}

.your-class {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}


/*<!-------------------------------Contact Section with Formspree------------------------------------------------> */
form input, form textarea {
  width: 100%;
  margin: 10px 0;
  padding: 13px;
  border-radius: 20px;
  border-color: black;
  border: 1px solid #ccc;
}

form button {
  background-color: #00adb5;
  border: none;
  padding: 12px 30px;
  color: white;
  align-items: center;
  display: block;
  margin: 20px auto 0 auto;
  border-radius: 50px;
  padding-top: 10px;  
  font-size: 0.9rem;
  font-weight: bold;
}

form button:hover {
  background-color: #008e96;
  cursor:pointer;
  transform: scale(1.05);
}

form textarea{
  resize: none;
  min-height:100px
}

/*<!-------------------------------Footer area with contact details------------------------------------------------> */
footer {
  padding: 40px 20px;
  background-color: #2b2b2b;
  color: #ccc;
  font-size: 0.95rem;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: auto;
}

.footer-left,
.footer-right {
  margin: 10px 0;
}

.footer-left {
  font-style: italic;
  font-family: 'Times New Roman', serif;
  color: #aaa;
}

.footer-right a {
  color: #00adb5;
  text-decoration: none;
  margin: 0 5px;
  font-weight: bold;
}

.footer-right a:hover {
  text-decoration: underline;
}

.footer-right p {
  margin: 4px 0;
}


/*<!-------------------------------Mobile Optimization------------------------------------------------> */
@media (max-width: 768px) {

  .name {
    font-size: clamp(2.5rem, 9vw, 6rem);
    white-space: nowrap;
  }

  .typed-wrapper h2 {
    font-size: 1.3rem;
    padding: 0 10px;
  }

  .hero {
    padding: 0 15px;
  }

  form input, 
  form textarea {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  form button {
    font-size: 0.9rem;
    padding: 10px 20px;
    width: 100%;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-right, .footer-left {
    margin-bottom: 15px;
  }

  .back-to-top {
    width: 35px;
    height: 35px;
    bottom: 15px;
    right: 15px;
    left: auto;
    font-size: 1rem;
  }
}
