/* ---------- Base & Utilities (no color changes) ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: rgb(228, 228, 228);
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

/* Screen-reader only (used in HTML) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

img, video { max-width: 100%; height: auto; display: block; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

#background-overlay {
  position: fixed; inset: 0;
  background-color: #f7f7f7;
  z-index: 1000;
  animation: fadeOut 3s forwards;
}
@keyframes fadeOut { 0%{opacity:1} 100%{opacity:0} }

#bg { background-color: rgb(228,228,228); width: 100%; min-height: 100%; }

#toolbar {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 80px;
  background-color: hsla(0, 0%, 31%, 0.214);
  display: flex; align-items: center; gap: 16px;
  box-shadow: inset 0 0 10px rgba(125,125,125,0.3);
  backdrop-filter: blur(10px);
  z-index: 999;
  padding-inline: clamp(12px, 3vw, 32px);
  padding-top: env(safe-area-inset-top);
}
#toolbar-inside { display: flex; flex: 3; align-items: center; padding: 8px 0; }
#btn-div { flex: 1; text-align: center; }

#hdname { 
 font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: bold;
 }

/* Buttons (colors kept) */
#contact-btn,
#home-about-btn {
  font-family: 'Inter', sans-serif;
  font-weight: bold;
  padding: 6px 15px;
  background-color: rgb(235,235,235);
  color: rgb(0,0,0);
  border: 1.5px solid rgb(58,58,58);
  border-radius: 15px;
  font-size: 12px;
  box-shadow: 6px 6px 14px rgba(0,0,0,0.4), -8px -8px 9px rgb(255,255,255);
  transition: transform 0.4s ease-in-out, background-color 1s, box-shadow 0.3s ease;
  cursor: pointer;
}
#home-about-btn { padding: 9px 15px; }

#contact-btn:hover,
#home-about-btn:hover {
  background-color: rgb(49,49,49);
  color: whitesmoke;
  border-radius: 2rem;
  box-shadow: 3px 3px 5px rgba(0,0,0,0.4), -3px -3px 5px rgb(204,203,203);
  transform: scale(1.10);
}

#-contact-button:active,
#home-about-button:active { opacity: 0.7; } /* (kept selectors if used elsewhere) */

/* ---------- Social icons ---------- */
/* You used class="social-media" in HTML; using the class here (old #social-media kept below if needed) */
.social-media,
#social-media {
  width: 100%;
  margin-top: 25px;
  display: flex; justify-content: center; align-items: center; gap: 12px;
  flex-wrap: wrap;
}

#linkedin-logo, #inst-logo, #github-logo, #x-logo {
  width: 40px; height: 40px;
  margin-inline: 7px;
  background-color: rgb(224,224,224);
  box-shadow: 6px 6px 14px rgba(0,0,0,0.4), -8px -8px 9px rgb(255,255,255);
  border-radius: 8px;
  transition: transform 0.4s ease-in-out, box-shadow 0.3s ease, border-radius 0.3s ease;
  cursor: pointer;
}
#linkedin-logo:hover, #inst-logo:hover, #github-logo:hover, #x-logo:hover {
  border-radius: 8%;
  box-shadow: 3px 3px 5px rgba(0,0,0,0.4), -3px -3px 5px rgb(204,203,203);
  transform: scale(1.08);
}

#logo {
  height: 30px; width: auto; margin-right: 8px; border-radius: 15px;
  box-shadow: 6px 6px 14px rgba(0,0,0,0.4), -8px -8px 9px rgb(255,255,255);
}

/* ---------- Home ---------- */
#home {
  width: 100%;
  min-height: calc(100vh - 80px);
  background-color: rgb(228,228,228);
  display: flex; gap: 16px;
  padding-top: 80px; /* equals toolbar height */
  padding-inline: clamp(12px, 4vw, 40px);
  align-items: center;
}
#home-left, #home-right {
  background-color: rgb(228,228,228);
  flex: 1; display: flex; justify-content: center; align-items: center; flex-direction: column;
}
#home-text1, #about-head {
  font-size: 30px; font-weight: bold; animation: fadeInSlow 2.5s ease-in-out;
}
#home-text2 { font-size: 18px; animation: fadeInLeft 2s ease-out; }

@keyframes fadeInSlow { from {opacity:0} to {opacity:1} }
@keyframes fadeInLeft { from {opacity:0; transform:translateX(-50px)} to {opacity:1; transform:none} }

#home-img {
  width: min(40%, 320px);
  border-radius: 10px;
  box-shadow: 6px 6px 14px rgba(0,0,0,0.664), -8px -8px 9px rgb(255,255,255);
  transition: transform 0.5s ease-in-out, box-shadow 0.3s ease, border-radius 0.3s ease;
  animation: fadeIn 5s;
}
@keyframes fadeIn { from {opacity:0} to {opacity:1} }
#home-img:hover {
  border-radius: 4%;
  box-shadow: 3px 3px 5px rgba(0,0,0,0.4), -3px -3px 5px rgb(204,203,203);
  transform: scale(1.10);
}

/* ---------- About ---------- */
#about { width: 100%; background-color: rgb(228,228,228); }
#about-head, #skill-head { font-size: 30px; font-weight: bold; padding-top: 20px; }

#about-inside {
  display: flex; justify-content: center; align-items: center; gap: 16px;
  padding: 30px clamp(12px, 4vw, 40px) 25px;
  width: 100%;
}
#about-left, #about-right {
  display: flex; justify-content: center; align-items: center; padding: 30px;
}
#about-right { background-color: rgb(228,228,228); } /* kept as your design */
#about-img { width: min(300px, 30%); height: auto; }

/* Text */
#about-text1 {
  font-size: 18px; font-weight: bold; color: rgb(102,101,101); margin: 0;
}
#about-text2 {
  font-size: 15px; color: rgb(102,101,101); font-weight: bold;
}

/* ---------- Skills ---------- */
#skill { width: 100%; background-color: rgb(229,229,229); }
#skill-head{
    font-family: 'Inter', sans-serif;
    font-weight: bold;
    margin: 0;
    padding-bottom: 100px;
}
#skill-inside{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
    padding-bottom: 70px;
    gap: 10px;
}
.skill-items{
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgb(240, 240, 240);
    border-radius: 15px;
    padding: 15px;
    margin: 8px;
    box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.664),
    -8px -8px 9px rgb(255, 255, 255);
    transition: transform 0.4s ease-in-out ;

}
.skill-items:hover{
    border-radius: 13%;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4), 
    -3px -3px 5px rgb(204, 203, 203);
    transform: scale(1.08); 
}
.skill-img{
    width: 50px;
}

.skill-txt{
    font-size: 16px;
    font-family: 'Inter', sans-serif;    font-weight: 500;
    margin: 0px;
    margin-top: 5px;

}
/* ---------- Education (Timeline) ---------- */
#education { width: 100%; background-color: rgb(228,228,228); }
#education-head { font-weight: bold; padding-top: 60px; padding-bottom: 40px; margin: 0; }
#education-txt { font-size: 20px; font-weight: bold; }

#education-text1 { font-size: 13px; }
#education-text2 { font-size: 16px; }

.timeline {
    position: relative;
    padding-left: 50px;
    margin-top: 40px;
    background-color: rgb(227, 227, 227); /* Greyish white background */
    padding-bottom: 1px;
  }
  
  .line {
    position: absolute;
  left: 20px;
  top: 0;
  width: 4px;
  height: 0; /* Start at 0 */
  background: black;
  transition: height 12s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 10px 3px rgba(0, 0, 0, 0.5);
  }

  .line.animate {
    height: 100%; /* Grow when 'animate' class is added */
  }
  
  .timeline-item {
    position: relative;
    margin-bottom: 190px; /* More space between items */
    opacity: 0;
    transform: translateY(30px);
    transition: all 2.5s ease; /* Slower and smoother item reveal */
  }
  
  .timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .timeline-item::before {
    content: '';
    position: absolute;
    left: -11px;
    top: 0;
    width: 24px;
    height: 24px;
    background: white; /* White circle */
    border: 4px solid black; /* Black border */
    border-radius: 50%;
    box-shadow: 0 0 10px 3px rgba(0, 0, 0, 0.5); /* Black shadow glow effect on circle */
  }
  
  .timeline-content {
    background: white; /* White background for each item */
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    color: black; /* Black text */
  }
  
  .timeline-content h3 {
    margin: 0;
    color: black;
    font-size: 15px;
    font-weight: 600;
  }
  
  .timeline-content h4 {
    margin-top: 4px;
    font-size: 18px;
    color: black;
  }
  
  .timeline-content p {
    margin: 10px 0;
    color: black;
    line-height: 1.5;
  }
.img-placeholder img {
  width: 100%; height: 220px; object-fit: cover; border-radius: 8px; margin-top: 10px;
}

#certificate { width: 100%; background-color: rgb(228,228,228); padding-bottom: 40px; }
#certificate-head { font-weight: bold; padding: 60px 0 40px; margin: 0; }
#certificate-txt { font-size: 20px; font-weight: bold; }

.certificate-containers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  padding-inline: clamp(12px, 4vw, 40px);
  margin-bottom: 1rem;
}
.certificate-container {
  padding: 1rem 1.5rem;
  background-color: rgb(226,226,226);
  border-radius: 2rem;
  margin: 10px 0;
  text-align: start; overflow: hidden;
  box-shadow: 3px 3px 5px rgba(0,0,0,0.4), -3px -3px 5px rgb(204,203,203);
  transition: transform 0.5s ease-in-out, box-shadow 0.3s ease, border-radius 0.3s ease, background-color 0.3s ease;
}
.certificate-container:hover {
    border-radius: 120;
    background-color: rgb(227, 227, 227);
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4), 
    -3px -3px 5px rgb(204, 203, 203);
    transform: scale(0.9); 
}
#certificate-image {
  width: 100%; max-width: 720px;
  height: auto;
  padding-top: 16px;
  border-radius: 10px;
}
#certificate-text { font-size: 20px; font-weight: bold; color: black; }
.icon {
  height: 2rem;
  box-shadow: 6px 6px 14px rgba(0,0,0,0.664), -8px -8px 9px rgb(255,255,255);
  border-radius: 20px;
}

#footer { width: 100%; background-color: rgb(35,35,35); }
#footer-inside {
  width: 100%; padding: 15px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
#footer-txt1, #footer-txt2 { color: white; text-align: center; }
#hr-line { width: 100%; height: 1px; background-color: antiquewhite; color: rgb(31,31,31); }
#copyright-img { width: 20px; height: 20px; }
#tap { font-weight: bold; }
.heading-logo { height: 40px; width: 40px; }

#loading-screen {
  position: fixed; inset: 0;
  background-color: rgb(36,36,36);
  background-image: url(assets/loading-screen-white.gif);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
}
#loading-screen::before {
  content: ""; width: 50px; height: 50px;
  border: 5px solid #fff; border-top-color: #000000; border-radius: 50%;
  animation: loading 8s linear infinite;
}
@keyframes loading { from {transform: rotate(0)} to {transform: rotate(360deg)} }


/* Mobile View */



@media (max-width: 400px) {
  #contact-btn { font-size: 0.70rem; padding: 3px 8px; max-width: 140px; margin: 0 auto; border-radius: 20px;display: block; }
  #home { flex-direction: column; gap: 0; }
  #home-img { width: 60%; }
  #home-left, #home-right { width: 100%; }
  #home-right { padding: 30px 0 20px; }
  #home-text1 { height: auto; font-size: 32px; }
  .social-media, #social-media 
  { padding-bottom: 24px; 
    height: auto; }

  #about-inside { flex-direction: column; padding-bottom: 0; }
  #about-left, #about-right { width: 100%; }

 .skill-items {
    width: 85px;
    height: 95px;
}

  .certificate-containers { grid-template-columns: 1fr; }
}

@media (min-width: 401px) {
  #toolbar-inside { padding-left: 30px; }

  #home { flex-direction: row; }
  #home-img { width: 75%; max-width: 280px; }
  #home-left, #home-right { width: 50%; }
  #home-text1 { font-size: clamp(36px, 6vw, 60px); font-weight: bold; margin-bottom: 4px; padding-bottom: 20px; }
  #home-text2 { font-size: clamp(18px, 2.2vw, 22px); margin-top: 0; }

  .social-media, #social-media { height: auto; width: min(100%, 420px); }

  #about-inside { flex-direction: row; padding-bottom: 25px; }
  #about-left, #about-right { width: 50%; }
  #about-img { width: 150px; height: 150px; }

  .timeline { height: auto; }
  .line { height: 100%; }

  .img-placeholder { width: 100%; display: flex; justify-content: center; align-items: center; }
  .img-placeholder img { width: 100%; height: 300px; object-fit: cover; border-radius: 8px; margin-top: 10px; }
}
