
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');
canvas {
  position: fixed;
  width: 120vw;
  height: 120vh;
  top: 0;
  left: 0;
  overflow: hidden;
}
html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--second-color);
}

h1, h2, p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
}

/*===== VARIABLES CSS =====*/
:root {
  --dark-bg: rgba(15, 15, 15, .95);
  --spacing: 200px;
  --header-height: 3rem;
  --font-semi: 600;
  /*===== Colores =====*/
  /*Purple 260 - Red 355 - Blue 224 - Pink 340*/
  /* HSL color mode */
  --hue-color: 225;
  --first-color: hsl(var(--hue-color), 56%, 40%);
  --second-color: hsl(var(--hue-color), 56%, 12%);
  /*===== Fuente y tipografia =====*/
  --body-font: 'Nunito', sans-serif;
  --big-font-size: 2rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;
  --smaller-font-size: .75rem;
  /*===== Margenes =====*/
  --mb-2: 1rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;
  /*===== z index =====*/
  --z-back: -10;
  --z-fixed: 100;
  /*===== Card =====*/
  --ff-primary: "Open Sans", sans-serif;
  --ff-accent: "Source Sans Pro", sans-serif;

  --clr-neutral-100: #fff;
  --clr-neutral-300: #ddd;
  --clr-neutral-500: #555555;
  --clr-neutral-800: #111827;
  --clr-primary: #041964;

  --transition: 250ms ease-in-out;
}

/*===== LAYOUT =====*/
.bd-grid {
  max-width: 1024px;
  display: grid;
  /* margin-left: var(--mb-2);
  margin-right: var(--mb-2); */
  height: 100%;
  margin-left: auto;
  margin-right: auto;
}

.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: #fff;
  box-shadow: 0 1px 4px #92a1b026;
}

h1, h2, h3, blockquote {
  font-family: elevon, sans-serif;
  font-weight: 700;
  font-style: normal;
}

blockquote {
  /* margin: 0; */
  padding: 0;
  /* grid-column: 2 / span 9; */
  margin-bottom: 13px;
  height: 0.2 vh;
  /* color: black; */
  /* background-color: white; */
  position: relative;
}
blockquote p {
  color: black;
  background-color: white;
  font-size: 3rem;
  display: inline;
  /* line-height: 1; */
}

/*===== NAV =====*/
.nav {
  /* width: 100vw; */
  height: calc(var(--header-height) + 2.5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--font-semi);
  /* padding-left: 6vw; */
}

.nav__logo {
  display: flex;
  color: var(--second-color);
  font-size: 3.5rem;
  font-weight: 800;
  text-decoration: none; 
  /* margin-right: 10%; */
  /* width: 30%; */
  align-items: flex-end;
}

.nav__logo, .nav__logo:active, .nav__logo:visited, .nav__logo:focus {
  text-decoration:none;
  color: var(--second-color);
}
.nav__logo:hover, .nav__item:hover, .nav__link:hover {
  text-decoration:none;
  color: var(--first-color);
}

.name_logo {
  font-family: 'Calibri', 'Segoe UI', sans-serif;
  font-weight: 700;
}

.cde_logo{
  height: calc(var(--header-height) + 2rem);
}

.nav__menu{
  padding-right: 20px;
  height: calc(var(--header-height) + 2.5rem);
  padding-top: 0;
  background-color: #fff;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    top: calc(var(--header-height) + 2.5rem);
    right: -100%;
    width: 80%;
    height: 100%;
    padding: 2rem;
    background-color: white;
    transition: .5s;
  }
}

.nav__list {
  display: flex;
  padding-top: 20px;
}

.nav__item {
  margin-left: var(--mb-6);
  margin-bottom: 0;
  font-size: 18px;
}

.nav__link {
  position: relative;
  color: #000;
}

.nav__toggle {
  color: var(--second-color);
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

/*Active menu*/
.active::after {
  position: absolute;
  content: '';
  width: 100%;
  height: 0.3rem;
  left: 0;
  top: 2.5rem;
  background-color: var(--first-color);
}

/*=== Show menu ===*/
.show {
  right: 0;
}

/*===== SECTION =====*/
.section {
  padding-top: 8rem;
  padding-bottom: 2rem;
}
.section_header{
  margin-bottom: 13px;
  color: #000;
  font-family: elevon, sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 3rem;
  display: inline;
  opacity: 0.99;
  border-radius: 25px;
  padding-left: 20px;
}
.info-section{
  margin-left: 20px;
  color: #000;
  background: white;
  font-size: 20px;
  padding: 2rem;
  /* margin-top: 10vh; */
  /* width: 900px; */
  height: 300px;
  width: 500px;
  border-radius: 25px;
  opacity: 0.9;
}
.about_head{
  width: 180px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}

.bg_head{
  width: 210px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}

.skills_head{
  width: 118px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}

.project_head{
  width: 156px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}

.achieve_head{
  width: 365px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
  white-space: nowrap; 
}

.excursion_head{
  width: 177px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}

.summerschool_head{
  width: 270px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}

.intern_head{
  width: 177px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}

.publications_head{
  width: 200px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}

.certifications_head {
  width: 220px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}
.services_head {
  width: 150px;
  background: white;
  padding-left: 19px;
  border-radius: 25px;
}

/*===== SERVICES =====*/
.services__container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.service__card {
  background: white;
  border-radius: 15px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service__card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--first-color), #3b82f6);
}

.service__icon {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  margin: 0 auto 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.service__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--second-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.service__description {
  font-size: 14px;
  color: var(--clr-neutral-500);
  line-height: 1.5;
  margin: 0;
}

/* Responsive Services */
@media screen and (max-width: 992px) {
  .services__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 15px;
  }
  
  .service__card {
    padding: 25px 15px;
  }
  
  .service__icon {
    width: 95px;
    height: 95px;
    
  }
  
  .service__title {
    font-size: 16px;
  }
  
  .service__description {
    font-size: 13px;
  }
}

@media screen and (max-width: 575px) {
  .services__container {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 10px;
  }
  
  .service__card {
    padding: 20px 15px;
  }
  
  .service__icon {
    width: 85px;
    height: 85px;
    
  }
  
  .service__title {
    font-size: 15px;
  }
  
  .service__description {
    font-size: 12px;
  }
}

/*===== HOME =====*/
.home {
  position: relative;
  row-gap: 5rem;
  padding: 5rem 0 2rem;
  /* max-width: 1024px; */
  color: white;
  /* z-index: 99; */
  /* position: absolute; */
  width: 100%;
  /* margin: 0px auto; */
}

.home__container{
  background: white;
  color: #000;
  grid-column: 2 / span 6;
  grid-column-start: 2;
  font-size: 1.5rem;
  padding: 3rem;
  margin-top: 10px;
  margin-bottom: var(--spacing);
  width: 500px;
  height: 600px;
  border-radius: 25px;
  display: inherit;
  flex-direction: row;
  /* opacity: 0.95; */
}

.home__title {
  font-size: 40px;
  /* margin-bottom: var(--mb-4); */
}

.home__title-color {
  color: var(--first-color);
}
.home__pos {
  font-size: 30px;
  margin-bottom: 0;
  font-weight: 700;
}
.home__social {
  display: flex;
  flex-direction: row;
  margin-top: var(--mb-2);
}

.home__social-icon {
  width: max-content;
  font-size: 32px;
  color: black;
  padding-left: 10px;
  /* padding-top: 4px; */
}

.home__social-icon:hover {
  color: var(--first-color);
}

/* Font Awesome icon animations */
@keyframes fa-tada {
  0% {transform: scale(1);}
  10%, 20% {transform: scale(0.9) rotate(-3deg);}
  30%, 50%, 70%, 90% {transform: scale(1.1) rotate(3deg);}
  40%, 60%, 80% {transform: scale(1.1) rotate(-3deg);}
  100% {transform: scale(1) rotate(0);}
}
.home__social-icon:hover .fa-brands {
  animation: fa-tada 1s;
}

.home__img {
  position: absolute;
  right: 0;
  bottom: 0;
  /* width: 180px; */
}

.home__blob {
  fill: var(--first-color);
  height: 100%;
  margin-left: 10%;
}

.home__blob-img {
  margin-left: 0;
}

.resume:hover{
  color: #000;
  text-decoration: none;
}
/*BUTTONS*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: .75rem 2.5rem;
  font-weight: var(--font-semi);
  border-radius: .5rem;
  transition: .3s;
  margin-bottom: 10px;
  width: auto;
}

.button:hover {
  box-shadow: 0px 10px 36px rgba(0, 0, 0, 0.15);
}

/*===== ABOUT =====*/
.background__imgcu{
width: 260px;
height: 130px;
object-fit: contain;
background-color: #ffffff;
border-radius: 5px;
}



.background__imgsz{
  width: 260px;
  height: 130px;
  object-fit: contain;
  background-color: #ffffff;
  border-radius: 5px;
}
.background__imgpl{
  width: 260px;
  height: 130px;
  object-fit: contain;
  background-color: #ffffff;
  border-radius: 5px;
}
.background__imgabout1{
  width: 260px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}
.background__imgabout2{
  width: 200px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}
.background__imgcu, .background__imgsz, .background__imgpl {
  object-fit: contain;
  background-color: #ffffff;
  border-radius: 4px;
}

.about_img_container{
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 15px;
  width: 100%;
  justify-content: space-evenly;
  align-items: center;
}
.about_container{
  display: flex;
  width: 100%;
  justify-content: center;
}
.about_text{
  padding: 11.9px;
  font-size: 20px;
  text-align: justify;
}

.about_img_container {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 15px;
  width: 100%;
  justify-content: space-evenly;
  align-items: center;
}
.info-section{
  color: #000;
  background: white;
  font-size: 20px;
  padding: 2rem;
  /* margin-top: 10vh; */
   width: 800px;
  height: auto;
  /* width: 750px; */
  border-radius: 25px;
  opacity: 0.9;
}
/*=====BACKGROUND====*/
.info-sectionbackgroundcu{
  color: #000;
  background: white;
  font-size: 20px;
  padding: 2rem;
  margin-left: 20px;
  /* margin-top: 10vh; */
  /* width: 900px; */
  height: auto;
  width: 900px;
  border-radius: 25px;
  opacity: 0.9;
}
.bg__container{
  display:flex;
  justify-content:center;
}
.bg__title{
  padding-top: 20px;
  font-size: 20px;
  padding-left: 15px;
}
.timeline {
  border-left: 4px solid var(--first-color);
  border-bottom-right-radius: 4px;
  border-top-right-radius: 4px;
  background:white;
  color: rgba(10, 9, 9, 0.8);
  font-family: 'Source Sans Pro', sans-serif;
  margin: 10px auto;
  /* letter-spacing: 0.5px; */
  position: relative;
  line-height: 1.4em;
  font-size: 1.03em;
  padding: 50px;
  list-style: none;
  text-align: left;
  font-weight: 100;
  max-width: 60%;
}
.timeline h1, .timeline h2, .timeline h3 {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 1.5px;
  font-weight: 100;
  font-size: 1.4em;
}
.timeline .event {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
  padding-bottom: 25px;
  margin-bottom: 50px;
  position: relative;
  width: 600px;
}
.timeline .event:last-of-type {
  padding-bottom: 0;
  margin-bottom: 0;
  border: none;
  color: black;
}
.timeline .event:before, .timeline .event:after {
  position: absolute;
  display: block;
  top: 0;
}
.timeline .event:before {
  left: -270px;
  top: -4px;
  color: black;
  content: attr(data-date);
  text-align: right;
  font-weight: 600;
  font-size: 13px;
  width: 200px;
}
.timeline .event:after {
  box-shadow: 0 0 0 4px var(--first-color);
  left: -57.85px;
  background: white;
  border-radius: 50%;
  height: 11px;
  width: 11px;
  content: "";
  top: 5px;
}
.uni_title{
  font-weight: 400;
  margin-top: 5px;
  font-size: 19px;
}
.event_head{
  font-weight: 600;
  margin-top: 5px;
  font-size: 22px;
}
.event_subhead{
  font-weight: 500;
  font-size: 20px;
}

.event_content{
  font-weight: 300;
  font-size: 18px;
}  

.company__logo {
  width: 260px;
  height: 130px;
  object-fit: contain;
  margin: 15px 0;
  padding: 10px;
  background-color: #ffffff;
  
  border-radius: 5px;
  display: block;
}

/*===== SKILLS =====*/
.skills__container {
  padding-top: 20px;
  grid-template-columns: .7fr;
  justify-content: space-evenly;
  column-gap: 1rem;
  position: relative;
}

.skills__content {
  row-gap: 4rem;
  /* margin-left: 5%; */
  display: grid ;
  justify-content: space-between;
}

.skills__title {
  font-size: var(--h3-font-size);
  text-align: center;
  margin-bottom: 1.5rem;
}

.skills__box {
  display: flex;
  justify-content: center;
  column-gap: 3rem;
}
.skills__area{
  display: grid;
  justify-items: center;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 15px;
}

.skills__group {
  display: flex;
  flex-direction: column;
  justify-items: center;
  align-items: center;
  box-shadow: 0 2px 6px 0 rgba(0,0,0,0.12);
  border-radius: 10px;
  background-color: #fff;
  color: #000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 10px 6px ;
  width: 100%;
  max-width: 105px;
  height: auto;
  min-height: 100px;
}
.skills__group:hover {
  box-shadow: 0 4px 8px 0 rgb(19, 221, 243);
}
.skills__data {
  height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}  

.skills__data i {
  font-size: 1rem;
  color: var(--first-color);
}
.skills_name_container{
  display: grid;
  justify-content: center;
  align-items: center;
}
.skills__name {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.3;
}
.skills__category {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 25px;
  margin-bottom: 10px;
  padding-bottom: 0px;
}

.skills__category:first-child {
  margin-top: 0;
}

.skills__category h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--second-color);
  margin: 0;
}

.skills_img_container{
  height: 50px;
  width: 50px;
  align-items: center;
  justify-content: center;
}
.skills__level {
  font-size: var(--smaller-font-size);
}

.skills__img {
  max-width: 65px;;
  max-height: 65px;
  object-fit: contain;
}


/*===== PROJECTS =====*/
.projs__container{
  display: grid;
  grid-template-columns: repeat(3, 330px);
  /* gap: 10px; */
  justify-items: center;
  justify-content: space-evenly;
}
/* Project Subcategories */
.project__subcategory {
  grid-column: 1 / -1; /* Spans all columns */
  width: 100%;
  margin-top: 40px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  /*border-bottom: 2px solid var(--first-color); */
}

.project__subcategory:first-child {
  margin-top: 20px; /* Less margin for the first category */
}

.project__subcategory h3 {
  font-size: 24px; /* Smaller than main "Projects" heading */
  font-weight: 600;
  color: var(--second-color);
  margin: 0;
  padding: 5px 15px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
  display: inline-block;
  border-radius: 5px;
}

/* Responsive adjustments */
@media screen and (max-width: 767px) {
  .project__subcategory h3 {
    font-size: 20px;
  }
}

@media screen and (max-width: 575px) {
  .project__subcategory h3 {
    font-size: 18px;
  }
}


.card {
  display: grid;
  position: relative;
  width: 300px;
  height: auto;
  background-color: var(--clr-neutral-100);
  overflow: hidden;
  border-radius: 0.8em;
  box-shadow: 0px 4px 3px rgb(0 0 0 / 10%);
  transition: var(--transition);
  margin-bottom: 30px;
  align-content: stretch;
}

.card-l {
  display: grid;
  position: relative;
  width: 400px;
  height: 400px;
  background-color: var(--clr-neutral-100);
  overflow: hidden;
  border-radius: 0.8em;
  box-shadow: 0px 4px 3px rgb(0 0 0 / 10%);
  transition: var(--transition);
  margin-bottom: 30px;
  align-content: stretch; 
}

.card:is(:hover, :focus) {
  transform: translateY(-5px);
  box-shadow: 0px 10px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.card:focus-visible {
  outline: 2px dashed;
  outline-offset: 0.4em;
  text-decoration: none;

}

.card__img-container{
  width: 100%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 16 / 9;
}

/* image overlay */
.card__img-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  z-index: 1;
  transition: var(--transition);
}

.card__tags {
  --_pad: 10px;
  position: absolute;
  inset: var(--_pad) var(--_pad) auto var(--_pad);

  display: flex;
  justify-content: end;
  flex-wrap: wrap;
  gap: 0.25em;

  opacity: 0;
  transition: var(--transition);
}

.card__tag {
  display: inline-block;
  padding: 0.1em 0.5em;

  font-size: 14px;
  text-transform: uppercase;

  background-color: rgba(0, 0, 0, 0.6);
  color: var(--clr-neutral-100);
  border-radius: 5px;
  z-index: 2;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__img.intern{
  width: 160px;
  height: 160px;
  object-fit: cover;
  margin-left: 65px;
}
.card__img_coming_soon{
  width: 100%;
  margin-top: -3px;
  margin-left: 30px;
}
.card__body {
  padding: 12px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 4px;
  height: auto;
}

.card__title {
  margin: 0;
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  text-transform: capitalize;
  color: var(--clr-neutral-800);
  line-height: 1.3;
}

h5.card__title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-neutral-500);
  margin: 0;
  text-transform: none;
}

.card__title__organized {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.5rem);
  text-transform: capitalize;
  color: var(--clr-neutral-800);
}

.card__detail {
  padding-top: 5px;
  font-size: 1.05rem;
  color: var(--clr-neutral-500);
  text-decoration: none;

}

.card__cta {
  position: relative;
  width: fit-content;
  margin-top: 8px;
  color: var(--clr-primary);
  font-size: 0.85rem;
  display: block;
}

/* underline */
.card__cta::before {
  content: "";
  position: absolute;
  inset: 100% 0 0 0;
  height: 2px;

  background-color: currentColor;
  transition: var(--transition);
  transform-origin: right;
}

/* right arrow */
.card__cta::after {
  content: " →";
  display: inline-block;
  margin-left: 5px;
  transition: var(--transition);
}

/* image overlay */
.card:is(:hover, :focus) .card__img-container::before {
  opacity: 1;
}

/* remove underline */
.card:is(:hover, :focus) .card__cta::before {
  transform: scale(0);
}

/* move arrow */
.card:is(:hover, :focus) .card__cta::after {
  transform: translateX(6px);
}

/* show tag */
.card:is(:hover, :focus) .card__tags {
  opacity: 1;
}

/*===== CONTACT =====*/
.l-footer{
  width: 100%;
  /* height: calc(var(--header-height) + 1.5rem); */
  position: relative;
  bottom: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(146, 161, 176, 0.15);
  height: 300px;
}
.message{
  width: 100%;
  justify-items: center;
  align-content: center;
  display: flex;
  background-color: #fff;
  position: relative;
}
.left-contact{
  /* height: 100%; */
  width: 100%;
  justify-items: center;
  align-items: center;
  display: grid;
  align-content: space-evenly;
}
.partner_logo{
  /* height: 10px; */
  width: 80%;
  max-width: 500px;
}
.partner_logo_foot{
  display: none;
}
form{
  width:60%;
}
.form-body{
  height: 300px;
  width: 90%;
  justify-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.form-holder{
  width: 100%;
}
.contact__input {
  /* width: 500px; */
  font-size: var(--normal-font-size);
  font-weight: var(--font-semi);
  padding: 1rem;
  border-radius: .5rem;
  border: 1.5px solid var(--second-color);
  outline: none;
  margin-bottom: var(--mb-4);
}

.contact__button {
  display: block;
  border: none;
  outline: none;
  font-size: var(--normal-font-size);
  cursor: pointer;
  margin-left: auto;
}

label{
  font-size: 20px;
}

.submit-row{
  margin-top: 10px;
}

input,textarea {
  resize: none;
  width: 100%;
}

/* ===== MEDIA QUERIES=====*/

@media screen and (max-width: 992px){
  /* 768-992px */
  .info-sectionbackgroundcu{
    color: #000;
    background: white;
    font-size: 20px;
    padding: 2rem;
    /* margin-left: 20px; */
    /* margin-top: 10vh; */
    /* width: 900px; */
    height: 1880px;
    width: 700px;
    border-radius: 25px;
    opacity: 0.9;
    /* margin-left:70px; */
  }
  .timeline .event {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 25px;
    margin-bottom: 50px;
    position: relative;
    width: 500px;
  }
  
    .skills__container{
      /* margin-left:70px; */
      width: 700px;
    }
    .skills__area{
      display: grid;
      justify-items: space-evenly;
      align-items: center;
      grid-template-columns: repeat(3, 180px);
      gap: 40px;
    }
    .skills__img {
      width: 85%;
      max-height: 85%;
      /* height: 150px; */
    }
    .timeline .event:before {
      left: -214.5px;
      top: -4px;
      color: black;
      content: attr(data-date);
      text-align: right;
      font-weight: 500;
      font-size: 11px;
      width: 145px;
    }
    .projs__container{
      display: grid;
      grid-template-columns: repeat(2, 300px);
      /* gap: 10px; */
      justify-items: center;
      justify-content: space-evenly;
    }
    .left-contact{
      /* height: 100%; */
      justify-content: center;
      width: 50%;
      justify-items: center;
      align-items: center;
      display: grid;
      align-content: space-evenly;
    }
    .message{
      justify-content: center;
    }
    .partner_logo{
      /* height: 10px; */
      width: 90%;
    }
    .form-body{
      height: 300px;
      width: 90%;
      justify-items: center;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    form{
      width:60%;
    }
}

@media screen and (max-width: 767px){
  /* //576-767px */
  .bd-grid {
    max-width: 767px;
    display: grid;
    margin-left: var(--mb-2);
    margin-right: var(--mb-2);
    height: 100%;
    margin-left: auto;
    margin-right: auto;
  }
    .nav__logo {
    display: flex;
    color: var(--second-color);
    font-size: 3.5rem;
    font-weight: 800;
    text-decoration: none;
    /* margin-right: 10%; */
    /* width:100%; */
    align-items: flex-end;
  }
  .nav__item {
    margin-left: var(--mb-6);
    margin-bottom: 0;
  }
  .name_logo{
    font-size: 3rem;
  }
  .cde_logo{
    height: calc(var(--header-height) + 2rem);
  }
  header{
    position: fixed;
  }
  .nav {
    width: 100%; 
    height: calc(var(--header-height) + 2.5rem);
    display: flex;
    justify-content: space-between;
    /* align-items: center; */
    font-weight: var(--font-semi);
  }
  div.nav__logo{
    width:80%;
  }
  .nav__toggle {
    color: var(--second-color);
    font-size: 3rem;
    cursor: pointer;
    display: inherit;
    /* margin-left: 100px; */
  }
  .nav__list {
    display: inline-grid;
    padding-top: 0;
  }
  .active::after {
    position: absolute;
    content: '';
    width: 100%;
    height: 0.3rem;
    left: 0;
    top: 2rem;
    background-color: var(--first-color);
    margin-top: -1px;
  }

  .home__container{
    width: 360px;
    height: 500px;

  }
  
  .home__title {
    font-size: 30px;
    /* margin-bottom: var(--mb-4); */
  }

  .home__title-color {
    color: var(--first-color);
  }
  .home__pos {
    font-size: 25px;
    margin-bottom: 0;
    font-weight: 700;
  }
  .home__social {
    display: flex;
    flex-direction: row;
    margin-top: var(--mb-2);
  }

  .home__social-icon {
    width: max-content;
    font-size: 23px;
    color: black;
    padding-left: 6px;
    padding-top: 4px;
  }

  .home__social-icon:hover {
    color: var(--first-color);
  }

  .home__img {
    position: absolute;
    right: 0;
    bottom: 0;
    /* width: 180px; */
  }

  .home__blob {
    fill: var(--first-color);
    height: 100%;
    margin-left: 10%;
  }

  .home__blob-img {
    margin-left: 300px;
  }

  .resume:hover{
    color: #000;
    text-decoration: none;
  }
  /*BUTTONS*/
  .button {
    display: inline-block;
    background-color: var(--first-color);
    color: #fff;
    padding: .5rem 1rem;
    font-weight: var(--font-semi);
    border-radius: .5rem;
    transition: .3s;
    margin-bottom: 10px;
    width: 135px;
    font-size: 15px;
  }

  .button:hover {
    box-shadow: 0px 10px 36px rgba(0, 0, 0, 0.15);
  }

  /* ABOUT */
 
  .info-section{
    color: #000;
    background: white;
    font-size: 10px;
    padding: 2rem;
    margin-left: 0;
     width: 550px;
    height: 400px;
    border-radius: 25px;
    opacity: 0.9;
  }
  .background__imgabout1{
    width: 208px;
    height: 144px;
  }
  .background__imgabout2{
    width: 152px;
    height: 144px;
  }
  .about_text{
    padding: 13px;
    font-size: 17.5px;
    text-align: justify;
  }
  
  /* Background */
  .info-sectionbackgroundcu {
    color: #000;
    background: white;
    font-size: 20px;
    padding: 2rem;
    margin-top: 5vh;
    margin-left: 0;
    height: 1800px;
    width: 550px;
    border-radius: 25px;
    opacity: 0.9;
  }
  .timeline{
    margin: 10px auto 10px 135px;
  }
  .timeline h1, .timeline h2, .timeline h3 {
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1.5px;
    font-weight: 100;
    font-size: 0.7em;
  }
  .timeline .event {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 25px;
    margin-bottom: 50px;
    position: relative;
    width: 290px;
  }
  .timeline .event:before {
    left: -214.5px;
    top: -4px;
    color: black;
    content: attr(data-date);
    text-align: right;
    font-weight: 400;
    font-size: 11px;
    width: 145px;
  }
  .uni_title{
    font-weight: 600;
    margin-top: 5px;
    font-size: 15px;
  }
  .event_head{
    font-weight: 700;
    margin-top: 0px;
    font-size: 20px;
  }
  .event_subhead{
    font-weight: 500;
    font-size: 17px;
  }
  
  .event_content{
    font-weight: 300;
    font-size: 14px;
  }
  .background__imgcu{
    width: 152px;
    height: 56px;
    margin: 10px;
    }
    
    .background__imgsz{
      width: 176px;
      height: 88px;
    }
    .background__imgpl{
      width: 208px;
      height: 104px;
    }
    .skills__container {
      width:576px;
      padding-top: 20px;
      grid-template-columns: 0.7fr;
      justify-content: center;
      column-gap: 1.5rem;
      position: relative;
    }
    .skills__area{
      display: grid;
      /* justify-items: ;? */
      align-items: center;
      grid-template-columns: repeat(2, 180px);
      gap: 30px;
    }
    .skills__img {
      max-width: 171px;;
      max-height: 135px;
      /* height: 150px; */
    }
    
    .company__logo {
      width: 208px;
      height: 104px;
      object-fit: contain;
      margin: 10px 0;
      padding: 8px;
    }
    
    /* Project */
    .card{
      width: 260px;
      height: 400px;
    }
    .projs__container {
      display: grid;
      grid-template-columns: repeat(2, 270px);
      gap: 15px;
      /* justify-items: center; */
      justify-content: center;
      padding-left: 0%;
      max-width: 767px;
    }
    .form-body{
      height: 300px;
      width: 300px;
      justify-items: center;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
    }
    /* Contact */
    /*===== CONTACT =====*/
  .l-footer{
    height: 320px;
  }
  .message{
    display: grid;
  }
  .partner_logo{
    /* height: 10px; */
    display: none;
  }
  .form-body{
    height: 260px;
  } 
  label{
  font-size: 14px;
  }
  .left-contact{
    /* height: 100%; */
    width: 100%;
    justify-items: center;
    /* align-items: center; */
    display: grid;
    /* align-content: space-evenly; */
  }

  .partner_logo_foot{
    width: 100%;
    display: inherit;
    /* height: 100px; */
  }
  form{
    margin-top: 5px;
    margin-bottom:0;
    width: 270px;
  }
}

@media screen and (max-width: 575px){
  /* 320-575px */
  .home__container{
  width: 90%;
  max-width: 320px;
  height: auto;
  min-height: 400px;
  margin: 10px auto;
  padding: 20px;
  }
  .home__title {
    font-size: 18px;
    /* margin-bottom: var(--mb-4); */
  }
  .home__pos {
    font-size: 15px;
  }
  .home__social-icon {
    font-size: 18px;
    padding-left:3px;
  }
  .home__blob{
    margin-left: 10%;
    height:120%;
  }

  .home__blob-img {
    margin-left: 0;
    width: 350px;
  }

  .button{
    padding: .75rem .5rem;
    font-size: 12px;
    width: 100px;
  }
  /* About */
  .info-section{
    width: 300px;
    height: 550px;
  }
  .about_text{
    padding: 12px;
    font-size: 12.4px;
  }
  .about_img_container {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px;
  align-content: space-evenly;
  justify-content: center;
  }
  .background__imgabout1{
    width: 204px;
    height: 144px;
    margin-top:2px;
  }
  .background__imgabout2{
    width: 152px;
    height: 144px;
    margin-top:10px;
  }
  /* Backgroud */
  .info-sectionbackgroundcu{
  width: 90%;
  max-width: 350px;
  padding: 15px;
  margin: 10px auto;
  height: auto;
  min-height: 2050px;
  }
  .bg__title{
    padding-top: 20px;
    font-size: 20px;
    padding-left: 0px;
  }
  .timeline{
    margin: 2px auto 2px 10px;
  }
  .timeline .event:before {
    left: -8px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    width: 200px;
  }
  .timeline .event:after {
    left: -27.85px;
  }
  .timeline .event {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    padding-top:20px;
    padding-bottom: 25px;
    margin-bottom: 50px;
    position: relative;
    width: 200px;
    /* padding-left: -10px; */
    left: -30px;
  }
  .event_head{
    margin-top: 0px;
    font-size: 18px;
  }
  .event_subhead{
    font-weight: 500;
    font-size: 16px;
  }
  
  /* Section Headers Mobile */
  .section_header {
    font-size: 2rem;
    padding-left: 10px;
    
  }
  .about_head, .skills_head, .project_head, .publications_head, .certifications_head, .services_head, .achieve_head {
    width: auto;
    max-width: 90%;
    font-size: 1.8rem;
  }
  
  /* Skills */
  .skills__container {
    width:320px;
  }
  .skills__area{
    grid-template-columns: repeat(2, 150px);
    gap: 10px;
  }
  .skills__img {
    max-width: 149px;;
    max-height: 100px;
    /* height: 150px; */
  }
  .skills__data {
    height: 180px;
  }
  /* Projects */
  .projs__container{
    grid-template-columns: repeat(1, 300px);
  }
  /*===== CONTACT =====*/
  .l-footer{
    height: 320px;
  }
  .message{
    display: grid;
  }
  .partner_logo{
    /* height: 10px; */
    display: none;
  }
  .form-body{
    height: 260px;
  } 
  label{
  font-size: 14px;
  }
  .left-contact{
    /* height: 100%; */
    width: 100%;
    justify-items: center;
    /* align-items: center; */
    display: grid;
    /* align-content: space-evenly; */
  }
  form{
    width: 300px;
  }

}

/* Mobile-specific improvements */
@media (max-width: 768px) {
  /* Disable 3D background on mobile for performance */
  canvas.bg {
    display: none !important;
  }
  
  /* Add a simple gradient background for mobile */
  body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
  }
  
  /* Ensure touch targets are large enough */
  a, button, .nav__toggle {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Better mobile menu */
  .nav__menu {
    padding: 2rem;
    box-shadow: -10px 0 20px rgba(0,0,0,0.1);
  }
  
  /* Prevent text selection on menu toggle */
  .nav__toggle {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* Smooth transitions */
  * {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Back to top button styles */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  background-color: var(--first-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--second-color);
  transform: translateY(-5px);
  color: white;
}

/* Loading indicator for mobile */
@media (max-width: 768px) {
  .loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
  }
}

@media screen and (max-width: 992px) {
  .nav__item {
    margin-left: var(--mb-4);
    font-size: 16px;
  }
}

@media screen and (max-width: 767px) {
  .nav__item {
    margin-left: var(--mb-2);
    font-size: 15px;
  }
}

/* Critical Mobile Fixes */
@media screen and (max-width: 575px) {
  /* Prevent horizontal scroll */
  body, html {
    overflow-x: hidden;
    max-width: 100%;
  }
  
  /* Fix main sections */
  .bd-grid {
    padding: 0 10px;
    margin: 0 auto;
  }
  
  /* Fix info sections */
  .info-section, .info-sectionbackgroundcu {
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Fix cards on mobile */
  .card {
    width: 100%;
    max-width: 280px;
    margin: 15px auto;
  }
  
  /* Fix service cards */
  .service__card {
    width: 100%;
    max-width: 280px;
    margin: 10px auto;
  }
  
  /* Fix timeline dates */
  .timeline .event:before {
    position: relative;
    left: 0;
    top: 0;
    display: block;
    margin-bottom: 10px;
    text-align: left;
    font-weight: 700;
    color: var(--first-color);
  }
  
  /* Fix skills grid */
  .skills__area {
    justify-content: center;
  }
  
  /* Fix home blob */
  .home__blob {
    display: none; /* Hide on very small screens */
  }
  
  /* Fix social icons */
  .home__social {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .home__social-icon {
    margin: 5px;
  }
  
  /* Fix footer form */
  form {
    width: 95%;
    padding: 0 10px;
  }
  
  /* Company logo mobile */
  .company__logo {
    width: 150px;
    height: 75px;
  }
}

/* Extra small screens (below 400px) */
@media screen and (max-width: 400px) {
  .section_header {
    font-size: 1.5rem;
  }
  
  .home__title {
    font-size: 16px;
  }
  
  .home__pos {
    font-size: 14px;
  }
  
  .button {
    padding: 0.5rem 0.8rem;
    font-size: 11px;
  }
  
  .card__title {
    font-size: 0.95rem;
    line-height: 1.3;
  }
  
  .card__detail {
    font-size: 0.9rem;
  }
}


/* ============================================================
   MOBILE FIXES
   ============================================================ */

/* Canvas: was 120vw which caused horizontal overflow blocking touch scroll */
canvas {
  width: 100vw !important;
  height: 100vh !important;
}

/* Global horizontal scroll prevention — #1 cause of stuck scrolling on mobile */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

@media screen and (max-width: 767px) {

  /* Show the 3D background canvas on mobile too (with perf fixes in main.js) */
  canvas.bg {
    display: block !important;
  }

  /* Remove purple gradient override — canvas is back */
  body {
    background: unset;
  }

  *, *::before, *::after {
    box-sizing: border-box;
  }

  section, .section, .bd-grid, main {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* NAV */
  .nav__toggle {
    display: block !important;
  }
  .nav__list {
    flex-direction: column;
    padding-top: 10px;
  }
  .nav__item {
    margin-left: 0 !important;
    margin-bottom: 1rem;
  }

  /* HOME CARD */
  .home__container {
    width: 88% !important;
    max-width: 380px !important;
    height: auto !important;
    min-height: unset !important;
    margin: 10px auto !important;
    padding: 20px !important;
    overflow: hidden !important;
  }

  /* Profile photo */
  .home__blob {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 240px !important;
    margin: 12px auto 0 auto !important;
  }
  .home__blob-img {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* CV button */
  .button, .button.resume {
    width: auto !important;
    min-width: unset !important;
    min-height: unset !important;
    display: inline-block !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 13px !important;
  }

  /* Social icons */
  .home__social {
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
  }
  .home__social-icon {
    font-size: 22px !important;
    padding-left: 4px !important;
    min-height: unset !important;
    min-width: unset !important;
  }

  /* ABOUT CARD — was hardcoded 900px wide / 1800px tall */
  .info-sectionbackgroundcu {
    width: 88% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: unset !important;
    margin: 10px auto !important;
    padding: 15px !important;
  }

  .about_text {
    font-size: 14px !important;
    padding: 10px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .about_img_container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .background__imgabout1 {
    width: 100% !important;
    height: 120px !important;
    object-fit: cover !important;
  }

  /* TIMELINE */
  .timeline {
    max-width: 100% !important;
    padding: 20px 15px 20px 50px !important;
    margin: 10px auto !important;
  }
  .timeline .event {
    width: auto !important;
    max-width: 100% !important;
  }
  .timeline .event:before {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    display: block !important;
    text-align: left !important;
    margin-bottom: 6px !important;
    width: auto !important;
  }

  /* Touch targets */
  a, button, .nav__toggle {
    min-height: unset !important;
    min-width: unset !important;
  }
}

/* ============================================================
   SPLASH SCREEN — UPGRADED
   ============================================================ */

#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #03080f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease, visibility 1s ease;
  overflow: hidden;
}

#splash-screen.splash--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Deep space star field — two layers at different speeds */
#splash-screen::before,
#splash-screen::after {
  content: '';
  position: absolute;
  inset: -50%;
  background-image:
    radial-gradient(1px 1px at 8% 12%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 23% 45%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 37% 78%, rgba(200,220,255,0.8) 0%, transparent 100%),
    radial-gradient(2px 2px at 55% 22%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 68% 60%, rgba(200,220,255,0.9) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 81% 35%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 88%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 14% 92%, rgba(200,220,255,0.6) 0%, transparent 100%),
    radial-gradient(2px 2px at 47% 5%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 76% 95%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 3% 55%, rgba(200,220,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 33% 18%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 80%, rgba(200,220,255,0.7) 0%, transparent 100%),
    radial-gradient(2px 2px at 88% 15%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 19% 68%, rgba(255,255,255,0.9) 0%, transparent 100%);
  animation: stars-drift 80s linear infinite;
  pointer-events: none;
}

#splash-screen::after {
  background-image:
    radial-gradient(1px 1px at 42% 30%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 71% 50%, rgba(200,220,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 75%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(2px 2px at 87% 40%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 10%, rgba(200,220,255,0.9) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 96% 70%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 52% 95%, rgba(255,255,255,0.8) 0%, transparent 100%);
  animation: stars-drift 120s linear infinite reverse;
  opacity: 0.6;
}

@keyframes stars-drift {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-30px) rotate(1deg); }
}

/* Subtle nebula glow behind everything */
.splash__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 24px;
  text-align: center;
}

.splash__inner::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse at center,
    rgba(30, 60, 140, 0.18) 0%,
    rgba(10, 20, 80, 0.1) 40%,
    transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

/* ── Orbit ring ── */
.splash__orbit {
  width: 140px;
  height: 140px;
  position: relative;
  animation: orbit-spin 4s linear infinite;
}

/* Outer glowing ring */
.splash__orbit::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(100, 160, 255, 0.2);
  box-shadow:
    0 0 12px rgba(80, 140, 255, 0.08),
    inset 0 0 12px rgba(80, 140, 255, 0.05);
}

/* Dashed inner guide ring */
.splash__orbit::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px dashed rgba(80, 130, 255, 0.12);
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Satellite stays upright as orbit rotates ── */
.splash__satellite {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  animation: orbit-counter 4s linear infinite;
  filter: drop-shadow(0 0 6px rgba(100, 170, 255, 0.7));
}

@keyframes orbit-counter {
  from { transform: translateX(-50%) rotate(0deg); }
  to   { transform: translateX(-50%) rotate(-360deg); }
}

.sat-body {
  width: 18px;
  height: 11px;
  background: linear-gradient(135deg, #c8deff 0%, #5b8dee 50%, #2d4fa0 100%);
  border-radius: 3px;
  box-shadow:
    0 0 10px rgba(100, 170, 255, 0.8),
    0 0 20px rgba(80, 140, 255, 0.3);
  position: relative;
}

/* Antenna on top of sat body */
.sat-body::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 5px;
  background: rgba(180, 210, 255, 0.9);
  border-radius: 1px;
}

.sat-panel {
  width: 20px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0d2557 0%, #1a3f8f 40%, #2d5cc0 100%);
  border: 1px solid rgba(100, 160, 255, 0.5);
  box-shadow: 0 0 6px rgba(60, 120, 255, 0.4);
  position: relative;
  overflow: hidden;
}

/* Solar panel cell lines */
.sat-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 5px,
    rgba(100, 160, 255, 0.2) 5px,
    rgba(100, 160, 255, 0.2) 6px
  );
}

/* Earth in the centre of the orbit */
.splash__earth {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    #4a9eff 0%,
    #1a5db5 35%,
    #0d2b6b 70%,
    #050f2a 100%);
  box-shadow:
    0 0 20px rgba(42, 109, 217, 0.6),
    0 0 40px rgba(30, 80, 180, 0.3),
    inset -4px -4px 8px rgba(0, 0, 50, 0.5);
  animation: earth-glow 3s ease-in-out infinite alternate;
}

/* Cloud/continent hint */
.splash__earth::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 25%;
  width: 40%;
  height: 25%;
  background: rgba(100, 200, 120, 0.25);
  border-radius: 50%;
  filter: blur(2px);
}

.splash__earth::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    rgba(150, 200, 255, 0.15) 0%,
    transparent 60%);
  border: 1px solid rgba(100, 160, 255, 0.15);
}

@keyframes earth-glow {
  from { box-shadow: 0 0 20px rgba(42,109,217,0.5), 0 0 40px rgba(30,80,180,0.25); }
  to   { box-shadow: 0 0 30px rgba(42,109,217,0.8), 0 0 60px rgba(30,80,180,0.4); }
}

/* ── Name & subtitle ── */
.splash__text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.splash__name {
  font-family: 'Calibri', 'Segoe UI', sans-serif;
  font-size: clamp(2rem, 5.5vw, 2.8rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-shadow:
    0 0 30px rgba(100, 160, 255, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.5);
  animation: name-fadein 0.8s ease 0.3s both;
}

@keyframes name-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash__subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.62rem, 2vw, 0.8rem);
  color: rgba(160, 195, 255, 0.8);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: name-fadein 0.8s ease 0.6s both;
}

/* ── Loading bar ── */
.splash__bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: clamp(220px, 55vw, 300px);
  animation: name-fadein 0.8s ease 0.9s both;
}

.splash__bar-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

/* Glowing dot that races along the bar */
.splash__bar-track::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7eb3ff;
  box-shadow: 0 0 8px rgba(126, 179, 255, 0.9);
  animation: dot-race 1.8s ease-in-out infinite;
}

@keyframes dot-race {
  0%   { left: 0%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}

.splash__bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
    rgba(45, 92, 192, 0.8) 0%,
    rgba(100, 170, 255, 1) 50%,
    rgba(45, 92, 192, 0.8) 100%);
  background-size: 200% 100%;
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: bar-shimmer 2s linear infinite;
  box-shadow: 0 0 8px rgba(100, 170, 255, 0.5);
}

@keyframes bar-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.splash__bar-label {
  font-family: 'Nunito', sans-serif;
  font-size: 0.65rem;
  color: rgba(140, 180, 255, 0.6);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  /* Fix 1: justify about text on mobile */
  .about_text {
    text-align: justify !important;
  }

  /* Fix 2: cert card title — smaller so it fits on mobile */
  .card__title {
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
  }

  /* Fix 3: skills group — allow height to grow so text doesn't clip */
  .skills__group {
    max-height: none !important;
    height: auto !important;
    min-height: 90px !important;
  }

  .skills__name {
    font-size: 10px !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
  }

}

/* ============================================================
   GRADE BADGE — Masters only
   ============================================================ */
.grade__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #1a3fa0 0%, #2d6be4 60%, #4a8ff5 100%);
  padding: 5px 14px;
  border-radius: 30px;
  margin-left: 10px;
  vertical-align: middle;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(45, 107, 228, 0.5);
  animation: badge-pulse 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

/* Shimmer across badge */
.grade__badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.35),
    transparent
  );
  animation: badge-shine 3s ease-in-out infinite;
}

@keyframes badge-shine {
  0%       { left: -80%; }
  40%, 100% { left: 130%; }
}

@keyframes badge-pulse {
  0%, 100% {
    box-shadow: 0 3px 12px rgba(45, 107, 228, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 5px 22px rgba(45, 107, 228, 0.8);
    transform: scale(1.05);
  }
}

/* ============================================================
   TYPEWRITER SPECIALISM
   ============================================================ */
.home__typewriter {
  font-size: 13px;
  font-weight: 600;
  color: var(--first-color);
  margin-top: 4px;
  margin-bottom: 2px;
  min-height: 1.4em;
  letter-spacing: 0.03em;
}

.typewriter__cursor {
  display: inline-block;
  color: var(--first-color);
  animation: cursor-blink 0.75s step-end infinite;
  font-weight: 300;
  margin-left: 1px;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
