@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
}

:root {
  --bg-color: #081b29;
  --second-bg-color: #112e42;
  --text-color: #ededed;
  --main-color: #00abf0;
}

html {
  font-size: 68.75%;
  overflow-x: hidden;
}

@media (max-width: 1385px) {
  html {
    font-size: 60.5%;
  }
}

@media (max-width: 520px) {
  html {
    font-size: 55%;
  }
}

/* For very small screens */
@media (max-width: 371px) {
  .home-content h1 {
    font-size: 5.5rem;
  }
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Custom Scrollbar Style */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1f242d;
}

::-webkit-scrollbar-thumb {
  background: var(--main-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0ef;
  box-shadow: 0 0 8px #0ef;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  background-color: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: 0.3s;
}

.header a img {
  width: 2.5rem;
  margin-right: 0.5rem;
}

.header.sticky {
  background: var(--bg-color);
}

.logo {
  position: relative;
  font-size: 2.5rem;
  color: var(--text-color);
  font-weight: 600;
}

.navbar {
  position: relative;
}

.navbar a {
  font-size: 1.7rem;
  color: var(--text-color);
  font-weight: 500;
  margin-left: 3.5rem;
  transition: 0.3s;
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
}

#menu-icon {
  position: relative;
  font-size: 3.6rem;
  color: var(--text-color);
  cursor: pointer;
  display: none;
}

section {
  min-height: 100vh;
  padding: 10rem 9% 2rem;
}

.home {
  display: flex;
  align-items: center;
  padding: 0 9%;
  background: url(image/image1.png) no-repeat;
  background-size: cover;
  background-position: center;
}

.home-content {
  max-width: 60rem;
  z-index: 10;
}

.home-content h1 {
  position: relative;
  display: inline-block;
  font-size: 5.6rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-content .text-animate {
  position: relative;
}

.home-content .text-animate h3 {
  font-size: 3.2rem;
  font-weight: 700;
  opacity: 1;
  animation: none !important;
  background: none;
  color: var(--main-color);
  -webkit-text-stroke: 0;
}

.text-animate h3 span {
  display: inline-block;
  opacity: 0;
  animation-duration: 0.3s;
  animation-fill-mode: forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

.home-content .text-animate h3::before {
  display: none;
}

.home.show-animate .home-content .text-animate h3 {
  animation: homeBgText 6s linear infinite;
  animation-delay: 2s;
}

.home-content p {
  position: relative;
  font-size: 1.6rem;
  margin: 2rem 0 4rem;
}

.btn-box {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 34.5rem;
  height: 5rem;
}

.btn-box .btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 15rem;
  height: 100%;
  background-color: var(--main-color);
  border: 0.2rem solid var(--main-color);
  border-radius: 0.8rem;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.1rem;
  color: var(--bg-color);
  z-index: 1;
  overflow: hidden;
  transition: 0.5s;
}

.btn-box .btn:hover {
  color: var(--main-color);
}

.btn-box .btn:nth-child(2) {
  background: transparent;
  color: var(--main-color);
}

.btn-box .btn:nth-child(2):hover {
  color: var(--bg-color);
}

.btn-box .btn:nth-child(2)::before {
  background: var(--main-color);
}

.btn-box .btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-color: var(--bg-color);
  z-index: -1;
  transition: 0.5s;
}

.btn-box .btn:hover::before {
  width: 100%;
}

@keyframes loading {
  100% {
    left: 100%;
  }
}

.home-sci {
  position: absolute;
  bottom: 4rem;
  width: 200px;
  display: flex;
  justify-content: space-between;
}

.home-sci a {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 20px;
  color: var(--main-color);
  z-index: 1;
  overflow: hidden;
  transition: 0.5s;
}

.home-sci a:hover {
  color: var(--bg-color);
}

.home-sci a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--main-color);
  z-index: -1;
  transition: 0.5s;
}

.home-sci a:hover::before {
  width: 100%;
}

.home-imgHover {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  transition: 3s;
  transition-delay: 0.3s;
  opacity: 0.6;
}

.home-imgHover:hover {
  background: var(--bg-color);
  opacity: 0.9;
}

.about {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 2rem;
  background: var(--second-bg-color);
  padding-bottom: 6rem;
}

.heading {
  position: relative;
  font-size: 5rem;
  margin-bottom: 3rem;
  text-align: center;
}

span {
  color: var(--main-color);
}

.about-img {
  position: relative;
  width: 25rem;
  height: 25rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-img img {
  width: 90%;
  height: 90%;
  border-radius: 50%;
  border: 0.2rem solid var(--main-color);
}

.about-img .circle-spin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border-top: 0.2rem solid var(--second-bg-color);
  border-bottom: 0.2rem solid var(--second-bg-color);
  border-left: 0.2rem solid var(--main-color);
  border-right: 0.2rem solid var(--main-color);
  animation: aboutSpinner 8s linear infinite;
}

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

.about-contend h3 {
  position: relative;
  display: inline-block;
  font-size: 2.6rem;
}

.about-contend p {
  position: relative;
  font-size: 1.6rem;
  margin: 2rem 0 3rem;
}

.btn-box.btns {
  display: inline-block;
  width: 15rem;
}

.about-contend .btn-box .btn i {
  padding-left: 0.3rem;
}

.btn-box.btns a::before {
  background: var(--second-bg-color);
}

.education {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: auto;
  padding-bottom: 5rem;
}

.education .education-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5rem;
}

.education .education-column {
  flex: 1 1 40rem;
}

.education-column .title {
  position: relative;
  display: inline-block;
  font-size: 2.5rem;
  margin: 0 0 1.5rem 2rem;
}

.education-column .education-box {
  position: relative;
  border-left: 0.2rem solid var(--main-color);
}

.education-box .education-content {
  position: relative;
  padding-left: 2rem;
}

.education-box .education-content::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--main-color);
  border-radius: 50%;
}

.education-content .content {
  position: relative;
  padding: 1.5rem;
  border: 0.2rem solid var(--main-color);
  border-radius: 0.6rem;
  margin-top: 2rem;
  overflow: hidden;
}

.education-content .content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--second-bg-color);
  z-index: -1;
  transition: 0.5s;
}

.education-content .content:hover:before {
  width: 100%;
}

.education-content .content .year {
  font-size: 1.5rem;
  color: var(--main-color);
  padding-bottom: 0.5rem;
}

.education-content .content .year i {
  padding-right: 0.5rem;
}

.education-content .content h3 {
  font-size: 2rem;
}

.education-content .content p {
  font-size: 1.6rem;
  padding-top: 0.5rem;
}

.skills {
  min-height: auto;
  padding-bottom: 7rem;
  background: var(--second-bg-color);
}

.skills h2 {
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.skills .skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5rem;
}

.skills-row .skills-column {
  flex: 1 1 40rem;
}

.skills-column .title {
  position: relative;
  display: inline-block;
  font-size: 2.5rem;
  margin: 0 0 1.5rem;
}

.skills-column .skills-box {
  position: relative;
}

.skills-box .skills-content {
  position: relative;
  border: 0.2rem solid var(--main-color);
  border-radius: 0.6rem;
  padding: 0.5rem 1.5rem;
  z-index: 1;
  overflow: hidden;
}

.skills-box .skills-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--bg-color);
  z-index: -1;
  transition: 0.5s;
}

.skills-box .skills-content:hover:before {
  width: 100%;
}

.skills-column .progress {
  padding: 1rem 0;
}

.skills-content .progress h3 {
  font-size: 1.7rem;
  display: flex;
  justify-content: space-between;
}

.skills-column .progress h3 span {
  color: var(--text-color);
}

.skills-content .progress .bar {
  height: 2.5rem;
  border-radius: 0.6rem;
  border: 0.2rem solid var(--main-color);
  padding: 0.5rem;
  margin: 1rem 0;
}

.skills-content .progress .bar span {
  display: block;
  height: 100%;
  border-radius: 0.3rem;
  background: var(--main-color);
}

.skills-column:nth-child(1) .skills-content .progress:nth-child(1) .bar span {
  width: 90%;
}

.skills-column:nth-child(1) .skills-content .progress:nth-child(2) .bar span {
  width: 60%;
}

.skills-column:nth-child(1) .skills-content .progress:nth-child(3) .bar span {
  width: 75%;
}

.skills-column:nth-child(1) .skills-content .progress:nth-child(4) .bar span {
  width: 35%;
}

.skills-column:nth-child(2) .skills-content .progress:nth-child(1) .bar span {
  width: 85%;
}

.skills-column:nth-child(2) .skills-content .progress:nth-child(2) .bar span {
  width: 67%;
}

.skills-column:nth-child(2) .skills-content .progress:nth-child(3) .bar span {
  width: 65%;
}

.skills-column:nth-child(2) .skills-content .progress:nth-child(4) .bar span {
  width: 60%;
}

/* Projects Section */
.projects {
  min-height: auto;
  padding-bottom: 7rem;
  background: var(--bg-color);
}

.projects h2 {
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.projects-container {
  position: relative;
  width: 100%;
  min-height: 300px;
}

.projects-loading,
.projects-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-color);
}

.projects-loading i,
.projects-error i {
  font-size: 4rem;
  color: var(--main-color);
  margin-bottom: 1rem;
}

.projects-loading p,
.projects-error p {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  padding: 1rem;
}

.project-card {
  position: relative;
  background: linear-gradient(135deg, rgba(17, 46, 66, 0.8) 0%, rgba(8, 27, 41, 0.9) 100%);
  border: 0.2rem solid var(--main-color);
  border-radius: 1.2rem;
  padding: 2rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 171, 240, 0.1), transparent);
  transition: 0.5s;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 171, 240, 0.3),
    0 0 20px rgba(0, 171, 240, 0.2);
  border-color: #0ef;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.project-icon {
  font-size: 3.5rem;
  color: var(--main-color);
  transition: 0.3s;
}

.project-card:hover .project-icon {
  transform: rotate(-10deg) scale(1.1);
  color: #0ef;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  font-size: 2rem;
  color: var(--text-color);
  transition: 0.3s;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.project-links a:hover {
  color: var(--main-color);
  background: rgba(0, 171, 240, 0.1);
  transform: translateY(-3px);
}

.project-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
  transition: 0.3s;
}

.project-card:hover .project-title {
  color: var(--main-color);
}

.project-description {
  font-size: 1.4rem;
  color: rgba(237, 237, 237, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  min-height: 4.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.project-tech span {
  font-size: 1.2rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 171, 240, 0.15);
  color: var(--main-color);
  border-radius: 2rem;
  border: 1px solid rgba(0, 171, 240, 0.3);
  transition: 0.3s;
}

.project-tech span:hover {
  background: rgba(0, 171, 240, 0.3);
  transform: translateY(-2px);
}

.project-stats {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 171, 240, 0.2);
}

.project-stats span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  color: rgba(237, 237, 237, 0.7);
}

.project-stats span i {
  font-size: 1.5rem;
  color: var(--main-color);
}

.project-stats .stars i {
  color: #ffd700;
}

.project-stats .forks i {
  color: #0ef;
}

.project-stats .language-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  display: inline-block;
}

.projects-cta {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  position: relative;
}

.projects-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-color);
}

.projects-cta .btn i {
  font-size: 2rem;
}

/* Language colors */
.lang-javascript {
  background-color: #f1e05a;
}

.lang-html {
  background-color: #e34c26;
}

.lang-css {
  background-color: #563d7c;
}

.lang-python {
  background-color: #3572A5;
}

.lang-java {
  background-color: #b07219;
}

.lang-typescript {
  background-color: #2b7489;
}

.lang-cpp {
  background-color: #f34b7d;
}

.lang-c {
  background-color: #555555;
}

.lang-shell {
  background-color: #89e051;
}

.lang-default {
  background-color: var(--main-color);
}

/* Projects section animation */
.projects.show-animate .animate.scroll {
  animation-delay: calc(0.3s * var(--i));
  width: 0;
}

.certificates {
  min-height: auto;
  padding: 5rem 9% 7rem;
  background: var(--second-bg-color);
}

.certificates h2 {
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.certificates-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2rem 0;
}

.certificates-row .certificate-box {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: flex-start;
  color: var(--text-color);
  max-width: 400px;
  transition: transform 0.3s ease;
}

.certificates-row .certificate-box:hover {
  transform: translateY(-5px);
}

.certificates-row .certificate-box .cer-about {
  padding: 1rem 0;
}

.certificates-row .certificate-box .cer-about h3 {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.certificates-row .certificate-box .cer-about p {
  font-size: 1.4rem;
  color: rgba(237, 237, 237, 0.8);
}

.certificates-row .certificate-box .certificate-img {
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 4/3;
  border: 0.2rem solid var(--main-color);
  overflow: hidden;
  transition: all 0.4s ease;
}

.certificates-row .certificate-box .certificate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.certificates-row .certificate-box .certificate-img:hover {
  box-shadow: 0 0.8rem 2rem rgba(0, 171, 240, 0.4);
  border-color: #0ef;
}

.certificates-row .certificate-box .certificate-img:hover img {
  transform: scale(1.05);
}

.certificate-image {
  cursor: pointer;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox - Improved */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.show {
  opacity: 1;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border: 3px solid var(--main-color);
  border-radius: 1rem;
  box-shadow: 0 0 30px rgba(0, 171, 240, 0.5);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox img:hover {
  box-shadow: 0 0 40px rgba(0, 171, 240, 0.7);
}

.close {
  position: fixed;
  top: 2rem;
  right: 3rem;
  color: var(--text-color);
  font-size: 4rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  width: 5rem;
  height: 5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.close:hover {
  background: var(--main-color);
  color: var(--bg-color);
  transform: rotate(90deg);
}

.contact {
  min-height: auto;
  padding-bottom: 7rem;
  background: var(--bg-color);
}

.contact h2 {
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.contact form {
  max-width: 70rem;
  margin: 0 auto;
  text-align: center;
}

.contact form .input-box {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contact form .input-box .input-field {
  position: relative;
  width: 49%;
  margin: 0.8rem 0;
}

.contact form .input-box .input-field input,
.contact form .textarea-field textarea {
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  font-size: 1.6rem;
  color: var(--text-color);
  background: transparent;
  border-radius: 0.6rem;
  border: 0.2rem solid var(--main-color);
  z-index: 1;
  transition: 0.5s;
  position: relative;
}

.contact form .input-box .input-field input::placeholder,
.contact form .textarea-field textarea::placeholder {
  color: var(--text-color);
}

.contact form .focus {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--bg-color);
  border-radius: 0.6rem;
  z-index: 0;
  transition: 0.5s;
}

.contact form .input-box .input-field input:focus~.focus,
.contact form .input-box .input-field input:valid~.focus,
.contact form .textarea-field textarea:focus~.focus,
.contact form .textarea-field textarea:valid~.focus {
  width: 100%;
}

.contact form .textarea-field {
  position: relative;
  margin: 0.8rem 0 2.7rem;
}

.contact form .textarea-field textarea {
  resize: none;
}

.contact form .btn-box.btns .btn {
  cursor: pointer;
}

.input-field,
.textarea-field {
  position: relative;
  margin-bottom: 1rem;
}

.input-field input.error,
.textarea-field textarea.error {
  border-color: #ff4444;
  animation: shake 0.5s ease-in-out;
}

.input-field input.valid,
.textarea-field textarea.valid {
  border-color: #00ff00;
}

.error-message {
  position: absolute;
  bottom: -2.2rem;
  left: 0;
  color: #ff4444;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(-10px);
  animation: slideDown 0.3s forwards;
  background: rgba(8, 27, 41, 0.95);
  /* Semi-transparent dark background */
  padding: 0.3rem 0.8rem;
  border-radius: 0.4rem;
  z-index: 2;
}

.error-message::before {
  content: '⚠';
  margin-right: 0.5rem;
  font-size: 1.4rem;
}

@keyframes slideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px);
  }

  75% {
    transform: translateX(10px);
  }
}

.input-field input,
.textarea-field textarea {
  transition: all 0.3s ease;
}

.input-field input:focus,
.textarea-field textarea:focus {
  box-shadow: 0 0 10px rgba(0, 171, 240, 0.3);
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--bg-color);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 300px;
}

.popup.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.popup i {
  font-size: 60px;
  margin-bottom: 15px;
}

.popup.success i {
  color: #4BB543;
}

.popup.error i {
  color: #FF3333;
}

.popup h2 {
  margin-bottom: 10px;
  color: var(--text-color);
}

.popup p {
  color: var(--text-color);
  margin-bottom: 15px;
}

.popup button {
  padding: 8px 20px;
  background: var(--main-color);
  color: var(--bg-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.popup button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(0, 171, 240, 0.3);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 9%;
  background: var(--second-bg-color);
}

.footer-text,
.footer-iconTop {
  position: relative;
}

.footer-text p {
  font-size: 1.6rem;
}

.footer-iconTop a {
  position: relative;
  display: inline-block;
  justify-content: center;
  align-items: center;
  padding: 0.8rem;
  background: var(--main-color);
  border: 0.2rem solid var(--main-color);
  border-radius: 0.6rem;
  z-index: 1;
  overflow: hidden;
}

.footer-iconTop a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--bg-color);
  z-index: -1;
  transition: 0.5s;
}

.footer-iconTop a:hover:before {
  width: 100%;
}

.footer-iconTop a i {
  font-size: 2.4rem;
  color: var(--bg-color);
  transition: 0.5s;
}

.footer-iconTop a:hover i {
  color: var(--main-color);
}

/* ANIMATION RELOAD AND SCROLL */
.animate {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 98;
  transition: all 0.3s ease;
}

#dynamic-text {
  transition: all 0.5s ease-in-out;
  display: inline-block;
  position: relative;
  margin: 0;
  padding: 0;
}

.animate.home-img {
  width: 60%;
  z-index: 0;
}

.logo .animate,
.navbar .animate,
#menu-icon .animate,
.home.show-animate .animate {
  animation: showRight 1s ease forwards;
  animation-delay: calc(0.3s * var(--i));
}

/* BREAKPOINTS */

@media (max-width: 1385px) {
  html {
    font-size: 60.5%;
    /* Increased from 55% */
  }

  .certificates-row .certificate-box .certificate-img:hover {
    transform: scale(1.1);
  }

  .certificates h2 {
    margin-top: 5rem;
  }

  .close {
    top: 12rem;
    left: auto;
  }
}

@media (max-width: 991px) {
  .header {
    padding: 2rem 4%;
  }

  section {
    padding: 10rem 4% 2rem;
  }

  .home {
    padding: 0 4%;
  }

  .certificates {
    padding: 0 4%;
  }

  .certificates h2 {
    margin-top: 15rem;
  }

  .close {
    top: 12rem;
    right: 22rem;
  }

  .footer {
    padding: 2rem 4%;
  }
}

@media (max-width: 850px) {
  .animate.home-img {
    width: 55%;
  }

  .close {
    top: 13rem;
    right: 15rem;
  }
}

@media (max-width: 768px) {
  .header {
    background: var(--bg-color);
  }

  #menu-icon {
    display: block;
  }

  .home {
    background: none;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: -100%;
    width: 100%;
    padding: 1rem 4%;
    background: var(--main-color);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    transition: 0.25s ease;
    transition-delay: 0.25s;
    z-index: 1;
  }

  .navbar.active {
    left: 0;
    transition-delay: 0s;
  }

  .navbar .active-nav {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-top: 0.1rem solid rgba(0, 0, 0, 0.2);
    z-index: -1;
    transition: 0.25s ease;
    transition-delay: 0s;
  }

  .navbar.active .active-nav {
    left: 0;
    transition-delay: 0.25s;
  }

  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 3rem 0;
    transition: 0.25s ease;
    transition-delay: 0s;
  }

  .navbar.active a {
    transform: translateX(0);
    transition-delay: 0.25s;
  }

  .certificates {
    padding: 0 4% 5rem;
  }

  .certificates-row {
    gap: 2rem;
  }

  .certificates-row .certificate-box {
    max-width: 350px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-card {
    padding: 1.5rem;
  }
}

@media (max-width: 520px) {
  html {
    font-size: 55%;
  }

  .home-content h1 {
    display: flex;
    flex-direction: column;
  }

  .home-sci {
    width: 160px;
  }

  .home-sci a {
    width: 38px;
    height: 38px;
  }

  .certificates {
    padding: 0 4% 4rem;
  }

  .certificates-row {
    gap: 1.5rem;
    flex-direction: column;
    align-items: center;
  }

  .certificates-row .certificate-box {
    max-width: 90%;
  }

  .certificates-row .certificate-box .certificate-img {
    max-width: 100%;
  }
}

@media (max-width: 462px) {
  .home-content h1 {
    font-size: 5.2rem;
  }

  .education {
    padding: 10rem 4% 5rem 5%;
  }

  .contact form .input-box .input-field {
    width: 100%;
  }

  .certificates {
    padding: 0 3% 3rem;
  }

  .certificates-row .certificate-box {
    max-width: 100%;
    width: 100%;
  }

  .close {
    top: 1.5rem;
    right: 1.5rem;
    width: 4rem;
    height: 4rem;
    font-size: 3rem;
  }

  .lightbox img {
    max-width: 95%;
    max-height: 80vh;
  }

  .footer {
    flex-direction: column-reverse;
  }

  .footer p {
    margin-top: 2rem;
    text-align: center;
  }
}

@media (max-width: 399px) {
  .certificates {
    padding: 0 2% 2rem;
  }

  .certificates-row .certificate-box .cer-about h3 {
    font-size: 1.5rem;
  }

  .certificates-row .certificate-box .cer-about p {
    font-size: 1.2rem;
  }
}

@media (max-width: 371px) {
  .home {
    justify-content: center;
  }

  .home-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .home-content h1 {
    font-size: 5rem;
  }
}

/* KEYFRAMES ANIMATION */
@keyframes homeBgText {

  0%,
  10%,
  100% {
    background-position: -33rem 0;
  }

  65%,
  85% {
    background-position: -0 0;
  }
}

@keyframes homeCursorText {

  0%,
  10%,
  100% {
    width: 0;
  }

  65%,
  75%,
  85% {
    width: 100%;
    opacity: 1;
  }

  75%,
  81% {
    opacity: 0;
  }
}

@keyframes aboutSpinner {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes showRight {
  100% {
    width: 0;
  }
}