/* Global Styles */
* {
  box-sizing: border-box;
}

/* Sticky banner styles */
.sticky-banner {
  position: fixed;  /* <- changed from sticky */
  top: 0;
  left: 0;
  width: 100%;
  background-color: #005f99;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Nav container */
.nav-buttons {
  display: flex;
  gap: 1.5rem;
}

/* Nav buttons */
.nav-btn {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

/* Hover effect */
.nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #fff;  /* pure white */
  scroll-behavior: smooth;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
}

html {
  scroll-padding-top: 0px; /* for example, your sticky banner height */
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  scroll-behavior: smooth;
}

/* Fullscreen Visitor Splash */
.visitor-splash {
  margin-top: 0; /* remove negative margin */
  padding-top: 1rem;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    to bottom,
    rgba(0, 95, 153, 0.9),   /* strong blue at top */
    rgba(0, 150, 200, 0.7),  /* lighter blue in middle */
    rgba(255, 255, 255, 1)   /* white at bottom */
  );
  color: white; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  text-align: center;
  overflow: hidden;
  position: relative;

  /* Move splash upward smoothly */
  top: 0vh;  /* adjust value to your liking */
  z-index: 1; /* make sure it's on top */
}

.visitor-content {
  margin-top: -15vh; /* adjust this value to move content upward */
}

.welcome-text {
  font-size: 5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.typing-line {
  font-size: 2rem;
  font-weight: 500;
  margin: 0.5rem 0;
  height: 2.2rem; /* Prevent layout shift */
  line-height: 1.5; /* or 1.4 */
  display: flex;
  justify-content: center;
  align-items: baseline; /* 👈 aligns child elements to text baseline */
  padding-bottom: 0.1em; /* small padding so descenders fit */
}


#typing-text {
  color: #000000;
  border-right: 2px solid black;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: black;     /* optional: set a specific color */
  text-underline-offset: 4px;       /* optional: adjust spacing */
  overflow: hidden;
  display: inline-block;
  line-height: 1.5rem; /* 👈 matches surrounding text */
  padding-bottom: 0.3em; /* 👈 add bottom padding to prevent descender cutoff */
}

/* Visitor splash content fade-in */
.visitor-content {
  animation: fadeIn 1.5s ease forwards;
}

/* Scroll down arrow animation */
.scroll-down {
  font-size: 2rem;
  margin-top: 2rem;
  animation: bounce 1.5s infinite;
  color: black;
  text-align: center;
  display: inline-block;
  transition: color 0.3s ease; /* smooth color change */
}

.scroll-down:hover {
  color: #ffdd57; /* or any color you want on hover */
}

/* Visitor count styling */
#visitor-count {
  font-weight: bold;
}

/* Containers */
.container {
  min-height: 100vh;
  max-width: 850px;
  width: 100%;
  margin: 0 auto;
  padding: 6rem 1rem 2rem; /* top padding adjusted for banner height + spacing */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* align to top */
  align-items: center;         /* center horizontally */
  scroll-snap-align: start;
  text-align: left;
}

/* Even tighter spacing between sections */
#resume-style .section {
  margin-bottom: 0.5rem;  /* half the previous gap */
}

/* Tighter heading margins */
#resume-style h1, 
#resume-style h2, 
#resume-style h3 {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Reduce list spacing */
#resume-style ul.certs,
#resume-style ul.exp-list {
  margin-top: 0.1rem;
  margin-bottom: 0.1rem;
  padding-left: 1rem;
}

/* Reduce paragraph spacing */
#resume-style p {
  margin-top: 0.1rem;
  margin-bottom: 0.1rem;
}

/* Tighten gap below Education section */
#resume-style .section:nth-of-type(1) {
  margin-bottom: 0.1rem; /* less space below Education */
}

/* Tighten gap below Certifications list */
#resume-style .section:nth-of-type(2) {
  margin-bottom: 0.1rem; /* less space below Certifications list */
}

/* Tighten gap above Certificate Gallery */
#resume-style .cert-gallery-section {
  margin-top: 0.1rem; /* less space above the gallery */
}

.section {
  width: 100%;
  max-width: 850px;
  margin: 0 auto 2rem;
}

/* Typography */
h1, h2 {
  color: #005f99;
}

h1 {
  text-align: center;
}

#about .section h2 {
  text-align: center;
  margin-bottom: 1rem; /* Adjust spacing as needed */
}

.section h2 {
  border-bottom: 2px solid #005f99;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

ul {
  padding-left: 1.2rem;
}

.certs, .exp-list {
  margin-top: 0.5rem;
}

.certs {
  columns: 2; /* 👈 creates two columns */
  column-gap: 0rem; /* space between columns */
  list-style-position: inside;
  padding-left: 0;  /* remove left padding since it's handled inside */
  margin-top: 0.5rem;
}

/* Visitor Banner (if used) */
.visitor-banner {
  width: 100%;
  background-color: #005f99;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Certificate Gallery */
.cert-gallery-section {
  margin-top: 2rem;
  text-align: center;
}

.cert-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-top: 1rem;
  padding: 0 1rem;
}

.cert-img {
  width: 100%;
  max-width: 180px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.cert-img.visible {
  opacity: 1;
  transform: translateY(0);
}

.cert-img.visible:hover {
  transform: translateY(0) scale(1.05);
  transition: transform 0.2s ease-in-out;
}

/* Fade-In Utility for lines */
.fade-line {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.no-margin {
  margin-top: 0;
  margin-bottom: 0.3rem; /* or 0 if you want it flush */
}

.project {
  width: 100%;
  max-width: 850px;
  margin: 0 auto 2rem;
}

.project h3 {
  font-size: 1.2rem;
  color: black;    /* change text color to black */
  font-weight: bold; /* make it bold */
  margin-bottom: 0.5rem;
}

.project p {
  margin: 0;
  line-height: 1.5;
}

#projects.container {
  padding-left: 1;
  padding-right: 1;
}

/* Footer text */
.footer {
  width: 100vw;             /* full viewport width */
  position: relative;       /* keep normal flow */
  left: 0;                  /* align to left */
  background-color: #005f99; /* match your top banner or choose your color */
  color: white;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.footer a {
  color: #ffdd57;            /* highlight links nicely */
  text-decoration: none;
}

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

/* Animations */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}

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

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#viewer-number.spin {
  display: inline-block;
  animation: spin 1s ease-out;
}

/* Small devices: phones (portrait, ≤ 600px) */
@media (max-width: 600px) {
  html {
    font-size: 14px; /* scale down everything relative */
  }

  .nav-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .welcome-text {
    font-size: 2.5rem;
  }

  .typing-line {
    font-size: 1.2rem;
  }

  .cert-gallery {
    grid-template-columns: repeat(1, 1fr); /* one per row */
    gap: 0.75rem;
  }

  .container,
  .project,
  .section {
    padding: 2rem 0.5rem;
    max-width: 95%;
  }

  .nav-btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }

  .scroll-down {
    font-size: 1.5rem;
  }
}

/* Medium devices: tablets (601px to 900px) */
@media (min-width: 601px) and (max-width: 900px) {
  html {
    font-size: 15px;
  }

  .welcome-text {
    font-size: 3.5rem;
  }

  .typing-line {
    font-size: 1.6rem;
  }

  .cert-gallery {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
  }

  .container,
  .project,
  .section {
    padding: 3rem 1rem;
    max-width: 90%;
  }

  .nav-btn {
    font-size: 1rem;
  }

  .scroll-down {
    font-size: 1.7rem;
  }
}