/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600&family=Poppins:wght@400;500&display=swap');


/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --title-color: hsl(0, 0%, 95%);
  --text-color: hsl(0, 0%, 70%);
  --text-color-light: hsl(0, 0%, 60%);
  --body-color: hsl(0, 0%, 0%);
  --container-color: hsl(0, 0%, 8%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: 'Poppins', sans-serif;
  --second-font: 'Montserrat', sans-serif;
  --biggest-font-size: 3.5rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}


/*========== Responsive typography ==========*/
@media screen and (min-width: 1152px) {
  :root {
    --biggest-font-size: 5.5rem;
    --h1-font-size: 2.5rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }  
}


/*=============== BASE ===============*/
*{
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html{
  scroll-behavior: smooth;
}

body,
button,
input{
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--text-color);
}

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

button,
input{
  border: none;
}

button{
  background: transparent;
}

h1,h2,h3,h4{
  color: var(--title-color);
  font-family: var(--second-font);
  font-weight: var(--font-semi-bold);
}

ul{
  list-style: none;
}

a{
  text-decoration: none;
}

a:focus-visible,
button:focus-visible{
  outline: 2px solid var(--title-color);
  outline-offset: 4px;
}

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


/*=============== REUSABLE CSS CLASSES ===============*/
.container{
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid{
  display: grid;
  gap: 1.5rem;
}

.section{
  padding-block: 5rem 1rem;
}

.section-anchor{
  display: block;
  position: relative;
  height: 0;
  width: 100%;
  pointer-events: none;
}

.contact-visual-anchor{
  transform: translateY(-90px);
}

.section[id]{
  scroll-margin-top: max(calc(var(--header-height) - 3.5rem), 0px);
}

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

.main{
  overflow-x: clip; /* Keep reveal animations from causing sideways scroll. */
}


/*=============== HEADER & NAV ===============*/
.header{
  position: fixed;
  width: 100%;
  background-color: transparent;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
}

.nav{
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo{
  color: var(--title-color);
  font-family: var(--second-font);
  font-weight: var(--font-semi-bold);
}

.nav__logo-pfp{
  width: 2em;
  height: 2em;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  overflow: hidden;
}

.nav__toggle,
.nav__close{
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1023px){
  .nav__menu{
    position: fixed;
    top: -100%;
    left: 0;
    background-color: hsla(0, 0%, 0%, .3);
    width: 100%;
    padding-block: 4rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px); /* For safari */
    transition: top .4s;
  }
}

.nav__list{
  text-align: center;
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
}

.nav__link{
  position: relative;
  color: var(--title-color);
  font-family: var(--second-font);
  font-weight: var(--font-medium);
}

.nav__link::after{
  content: '';
  width: 0;
  height: 2px;
  background-color: var(--title-color);
  position: absolute;
  left: 0;
  bottom: -.5rem;
  transition: width .3s;
}

.nav__link:hover::after{
  width: 70%;
}

.nav__close{
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Show menu */
.show-menu{
  top: 0;
}

/* Add blur to header */
.blur-header::after{
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: hsla(0, 0%, 0%, .3);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  top: 0;
  left: 0;
  z-index: -1;
}

/* Active link */
.active-link::after{
  width: 70%;
}


/*=============== HOME ===============*/
.home{
  position: relative;
}

/* make hero image height responsive so text isn’t fighting it */
.home__bg {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: min(70vh, 750px);
  object-fit: cover;
  object-position: center;
}

.home__shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: min(80vh, 800px);
  background: linear-gradient(
    180deg,
  hsla(0, 0%, 0%, 0) 58%,
  hsl(0, 0%, 0%) 78%
  );
}

.home__container {
  position: relative;
  padding-top: 4rem;
  padding-inline: max(1rem, env(safe-area-inset-left))
                  max(1rem, env(safe-area-inset-right));
  row-gap: 3rem;
}

.home__data{
  text-align: center;
}

.home__subtitle{
  font-size: var(--h3-font-size);
  margin-bottom: .5rem;
}

.home__title{
  font-size: clamp(1.75rem, 6vw, var(--biggest-font-size));
  line-height: 1.05;
  word-break: normal;
  overflow-wrap: anywhere;   /* long words won’t push off-screen */
  text-wrap: balance;        /* nicer multi-line wrap where supported */
  margin-bottom: 1rem;
}

.home__description{
  margin-top: 2rem;
  margin-bottom: 2rem;
  color: var(--title-color);

}

.home__card{
  position: relative;
  overflow: hidden;
}

.home__badge{
  position:absolute;
  bottom:.4rem; left:.4rem;
  padding:.28rem .6rem;
  border-radius: 999px;
  font: 600 .72rem/1 var(--second-font);
  color:#fff;
  background: #000;
  backdrop-filter: blur(6px);
  letter-spacing:.02em;
  z-index:3;
  pointer-events:none;
}

.home__card-img{
  transition: transform .4s;
}

.home__card-shadow{
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(180deg,
             hsla(0, 0%, 0%, 0) 50%,
             hsl(0, 0%, 0%) 125%);
}

.home__card-title{
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-size: var(--h3-font-size);
  z-index: 1;
}

.home__card:hover .home__card-img{
  transform: scale(1.2);
}


/*=============== ABOUT ===============*/
.about__container{
  row-gap: 3rem;
  margin-top: 2rem;
}

.about__data{
  text-align: center;  
}

.about__description{
  margin-bottom: 2rem;
}

.about__description .about__description-link,
.about__description .about__description-link:visited,
.about__description .about__description-link:hover,
.about__description .about__description-link:active,
.about__description .about__description-link:focus{
  color: inherit;
  text-decoration: none;
}

.about__image{
  position: relative;
  justify-self: center;
  overflow: hidden;
}

.about__img{
  width: 300px;
  transition: transform .4s;
}

.about__shadow{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
              hsla(0, 0%, 0%, 0) 50%,
              hsl(0, 0%, 0%) 125%);
}


/*=============== PROJECTS ===============*/
.projects__container{
  padding-top: 1.5rem;
  grid-template-columns: 240px;
  justify-content: center;
  row-gap: 2.5rem;
}

.project__image{
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.project__img{
  transition: transform .4s;
}

.project__image video.project__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project__shadow{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
              hsla(0, 0%, 0%, 0) 50%,
              hsl(0, 0%, 0%) 125%);
}

.project__title{
  font-size: var(--h3-font-size);
  margin-bottom: .5rem;
  padding-left: 1rem;
}

.project__due-date{
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
  font-size: var(--small-font-size);
  font-family: var(--second-font);
  font-weight: 500;
  padding-left: 0.85rem;
}

.project__due-date i{
  font-size: 1.25rem;
}

.project__image:hover .project__img{
  transform: scale(1.2);
}

/*=============== FINAL PROJECT ===============*/
.final-project__container{
  row-gap: 1rem;
  padding-bottom: 2.5rem;
}

.final-project__data{
  text-align: left;
  padding-left: 1.50rem;
}

.final-project__data .section__title{
  padding-left: 1rem;
}

.final-project__data .project__due-date{
  padding-left: 0.75rem;
}

.final-project__title {
  font-size: var(--h1-font-size); /* same visual weight as section__title */
  margin-bottom: 1.5rem;
  padding-left: 0.75rem;
}

.final-project__description{
  margin-bottom: 2rem;
}

.final-project__image{
  position: relative;
  justify-self: center;
  overflow: hidden;
  border-radius: 14px;
}

.final-project__img{
  transition: transform .4s;
}

.final-project__image video.project__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.final-project__shadow{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
              hsla(0, 0%, 0%, 0) 50%,
              hsl(0, 0%, 0%) 125%);
}

.final-project__image:hover .final-project__img{
  transform: scale(1.2);
}


/*=============== TIMELINE ===============*/
.timeline-section{
  position: relative;
  margin-top: -1rem;
  padding-top: 6rem;
  overflow: hidden;
}

.timeline-section::before{
  content: "";
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 6rem;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    hsla(0, 0%, 0%, 0) 0%,
    var(--body-color) 85%
  );
}

.timeline-section > *{
  position: relative;
  z-index: 1;
}

.timeline__track .section__title{
  margin-bottom: 4rem;
}

.timeline__list{
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline__list::before{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background-color: var(--text-color);
}

.timeline__list > li{
  width: 50%;
  margin-top: 4rem;
  margin-bottom: 50px;
  position: relative;
  min-height: 120px;
}

.timeline__list > li:nth-child(odd){
  float: left;
  clear: right;
  transform: translateX(-30px);
  border-radius: 20px 0px 20px 20px;
}

.timeline__list > li:nth-child(even){
  float: right;
  clear: left;
  transform: translateX(30px);
  border-radius: 0px 20px 20px 20px;
}

.timeline__list > li::after{
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  background-color: var(--text-color);
  border-radius: 50%;
  top: 0;
}

.timeline__list > li:nth-child(odd)::after{
  transform: translate(50%, -50%);
  right: -30px;
}

.timeline__list > li:nth-child(even)::after{
  transform: translate(-50%, -50%);
  left: -30px;
}

.timeline__list::after{
  content: "";
  display: block;
  clear: both;
}

.timeline-content .timeline-date{
  position: static;
  margin-bottom: 0.5rem;
  display: block;
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
}

/* Completed timeline item = green dot + green text */
.timeline__list > li.timeline-item--complete::after{
  background-color: #66FF00;
}

.timeline-item--complete .timeline-date{
  color: #66FF00;
}

.timeline-item--complete .timeline-title{
  color: #66FF00;
}

.timeline-title{
  color: #66FF00;
}


/*=============== EXPLORE ===============*/
.explore{
  position: relative;
}

.explore__image{
  position: absolute;
  overflow: hidden;
}

.explore__img{
  width: 100%;
  height: 333px;
  object-fit: cover;
  object-position: center;
}

.explore__shadow{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
              hsl(0, 0%, 0%) 5%,
              hsla(0, 0%, 0%, 0) 40%,
              hsla(0, 0%, 0%, 0) 60%,
              hsl(0, 0%, 0%) 92%);
}

.explore__content{
  position: relative;
  padding-top: 20rem;
  text-align: center;
  row-gap: 1rem;
}

.explore__user{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  column-gap: .5rem;
  padding-bottom: 1rem;
}

.explore__perfil{
  width: 30px;
  border-radius: 50%;
}

.ri-mail-line{
  font-size: 2rem;
}

.explore__name{
  font-size: var(--small-font-size);
  color: var(--title-color);
}


/*=============== FOOTER ===============*/
.footer{
  padding-block: 2.5rem;
  background-color: #14141C;
}

.footer__content{
  display: grid;
  justify-content: center;
  text-align: left;
  row-gap: 2rem;
}

.footer__logo{
  display: inline-block;
  color: var(--title-color);
  font-size: var(--h2-font-size);
  font-family: var(--second-font);
  font-weight: var(--font-semi-bold);
  margin-bottom: 0.25rem;
}

.footer__data{
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 2.5rem 2.5rem;
  justify-content: center;
  margin-inline: auto;
}

.footer__title{
  font-size: var(--h3-font-size);
  margin-bottom: 1rem;
}

.footer__links{
  display: grid;
  row-gap: .75rem;
}

.footer__link{
  color: var(--text-color);
  transition: color .4s;
}

.footer__link:hover{
  color: var(--title-color);
}

.footer__group,
.footer__social{
  display: flex;
}

.footer__group{
  margin-top: 1rem;
  margin-bottom: 0.33rem;
  flex-direction: column;
  align-items: center;
  row-gap: 1rem;
}

.footer__social{
  column-gap: 1.5rem;
}

.footer__social-link{
  color: var(--text-color);
  font-size: 1.25rem;
  transition: color .4s, transform .4s;
}

.footer__social-link:hover{
  color: var(--title-color);
  transform: translateY(-.25rem);
}

.footer__copy{
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  text-align: center;
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar{
  width: .6rem;
  border-radius: .5rem;
  background-color: hsl(0, 0%, 10%);
}

::-webkit-scrollbar-thumb{
  width: .6rem;
  border-radius: .5rem;
  background-color: hsl(0, 0%, 20%);
}

::-webkit-scrollbar-thumb:hover{
  width: .6rem;
  border-radius: .5rem;
  background-color: hsl(0, 0%, 30%);
}

/*=============== SCROLL UP ===============*/
.scrollup{
  position: fixed;
  right: 1rem;
  bottom: -50%;
  background-color: hsla(0, 0%, 100%, .1);
  padding: 2px;
  display: inline-flex;
  color: var(--title-color);
  font-size: 1rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px); /* For safari */
  z-index: var(--z-tooltip);
  transition: bottom .4s, transform .4s;
}

.scrollup:hover{
  transform: translateY(-.25rem);
}

/* Show scroll-up */
.show-scroll{
  bottom: 3rem;
}

/*=============== 404 ===============*/
.not-found{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-inline: 1.5rem;
  text-align: center;
}

.not-found__content{
  max-width: 620px;
}

.not-found__title{
  font-size: clamp(2.5rem, 12vw, 6rem);
  line-height: 1;
  margin-bottom: 1rem;
}

.not-found__description{
  margin-bottom: 2rem;
}

.not-found__link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--text-color-light);
  color: var(--title-color);
  font-family: var(--second-font);
  font-weight: var(--font-medium);
  transition: border-color .3s, background-color .3s;
}

.not-found__link:hover{
  border-color: var(--title-color);
  background-color: hsla(0, 0%, 100%, .08);
}

/*=============== REVEAL ANIMATION ===============*/
.reveal-init,
.reveal-on-scroll{
  opacity: 0;
  transition: opacity .8s ease, transform .8s ease;
  will-change: opacity, transform;
}

.reveal-from-top{
  transform: translateY(-2.5rem);
}

.reveal-from-bottom{
  transform: translateY(2.5rem);
}

.reveal-from-left{
  transform: translateX(-2.5rem);
}

.reveal-from-right{
  transform: translateX(2.5rem);
}

.reveal-visible{
  opacity: 1;
  transform: none;
}

.home__card:nth-child(2),
.project__card:nth-child(2),
.timeline-content:nth-child(2n){
  transition-delay: .08s;
}

.home__card:nth-child(3),
.project__card:nth-child(3){
  transition-delay: .16s;
}

.home__card:nth-child(4){
  transition-delay: .24s;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px){
  .container{
    margin-inline: 1rem;
  }

  .footer__data{
    grid-template-columns: max-content;
  }
}

/* For medium devices */
@media screen and (min-width: 576px){
  .home__container,
  .about__container,
  .explore__content,
  .final-project__container{
    grid-template-columns: 380px;
    justify-content: center;
  }

  .footer__data{
    grid-template-columns: repeat(3, max-content);
  }
}

@media screen and (min-width: 768px){
  .home__cards{
    grid-template-columns: repeat(2, 240px);
  }

  .about__container,
  .final-project__container{
    grid-template-columns: repeat(2, 350px);
    align-items: center;
  }

  .about__data,
  .about__data .section__title,
  .final-project__data,
  .final-project__data .section__title{
    text-align: initial;
  }

  .projects__container{
    grid-template-columns: repeat(2, 240px);
  }

  .explore__img{
    width: 100vw;
  }

  .final-project__image{
    order: -1;
  }

  .footer__content{
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }
  .footer__group{
    flex-direction: row;
    justify-content: space-between;
  }
  .footer__copy{
    order: -1;
  }
}

/* For large devices */
@media screen and (min-width: 1023px){
  .nav__close,
  .nav__toggle{
    display: none;
  }
  .nav__list{
    flex-direction: row;
    column-gap: 4rem;
  }

  .projects__container{
    grid-template-columns: repeat(3, 240px);
  }

  .footer__data{
    grid-template-columns: repeat(4, max-content);
    column-gap: 4.5rem;
  }
}

@media screen and (min-width: 1152px){
  .container{
    margin-inline: auto;
  }

  .section{
    padding-block: 7rem 2rem;
  }

  .section[id]{
    scroll-margin-top: calc(var(--header-height) - 2rem);
  }

  .nav{
    height: calc(var(--header-height) + 1.5rem);
  }
  .blur-header::after{
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px); /* For safari */
  }

  .home__container{
    grid-template-columns: initial;
    justify-content: initial;
    row-gap: 4rem;
    padding-top: 6.5rem;
  }
  .home__shadow{
    height: min(75vh, 980px);
  }
  .home__data{
    text-align: initial;
    width: 480px;
  }
  .home__subtitle{
    font-size: var(--h2-font-size);
  }
  .home__description{
    margin-bottom: 2.5rem;
  }

  .home__cards{
    grid-template-columns: repeat(4, 260px);
  }
  
  .home__card-title{
    left: 1.5rem;
    bottom: 1.5rem;
  }

  .about__container{
    grid-template-columns: 400px 460px;
    column-gap: 8.5rem;
    padding-block: 1rem;
  }
  .about__description{
    margin-bottom: 3rem;
  }
  .about__img{
    width: 460px;
  }

  .projects__container{
    grid-template-columns: repeat(3, 300px);
    column-gap: 3rem;
    padding-top: 4rem;
  }
  .project__title{
    font-size: var(--h2-font-size);
  }
  .project__due-date{
    font-size: var(--normal-font-size);
  }

  .explore__img{
    height: 600px;
  }
  .explore__content{
    padding-top: 28rem;
    grid-template-columns: 670px 1fr;
  }
  .explore__data,
  .explore__data .section__title{
    text-align: initial;
  }
  .explore__user{
    justify-content: flex-end;
    align-self: flex-end;
    margin-bottom: 1.25rem;
  }

  .final-project__container{
    grid-template-columns: 460px 340px;
    column-gap: 8.5rem;
    padding-block: 1rem 5rem;
  }
  .final-project__img{
    width: 460px;
  }
  .final-project__description{
    margin-bottom: 3rem;
  }

  .footer{
    padding-block: 5rem 3rem;
  }
  .footer__title{
    margin-bottom: 1.5rem;
  }
  .footer__group{
    margin-top: 7rem;
  }
  .footer__social{
    column-gap: 2rem;
  }
  .footer__social-link{
    font-size: 1.5rem;
  }

  .scrollup{
    right: 3rem;
  }
}

/*=============== PAGES ===============*/
/*
  --title-color: hsl(0, 0%, 95%);
  --text-color: hsl(0, 0%, 70%);
  --text-color-light: hsl(0, 0%, 60%);
  --body-color: hsl(0, 0%, 0%);
  --container-color: hsl(0, 0%, 8%);
*/
.container-timeline{
  width: min(100% - 3rem, 1120px);
  margin-inline: auto;
  margin-top: 0;
  margin-bottom: 5rem;
  padding-block: 2rem 4rem;
  background-color: var(--body-color);
}

.timeline__track{
  height: auto;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.timeline__list > li{
  padding: 20px;
  background-color: #14141C;
  border-radius: 10px;
  margin-bottom: 50px;
}

.timeline__list > li:last-child{
  margin-bottom: 0;
}

.timeline-content .timeline-date{
  font-size: var(--smaller-font-size);
}

/* === Small, tidy video cards === */
.home__cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* smaller, responsive */
  justify-content: center;
}

.home__card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
  transition: transform .25s ease;
  will-change: transform;
}

.home__card:hover { transform: translateY(-4px); }

/* Unify IMG/VIDEO behavior */
.home__card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;          /* consistent tiles */
  height: auto;                   /* let aspect-ratio set height */
  object-fit: cover;              /* neat crop */
  transition: transform .35s ease;
  backface-visibility: hidden;
  transform: translateZ(0);       /* standard */
  /* -webkit-transform: translateZ(0);  optional; keep only if you want */
}


/* If you keep some IMGs with the old class, inherit the rules */
.home__card-img { 
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .35s ease;
}

.home__card:hover .home__card-media,
.home__card:hover .home__card-img { 
  transform: scale(1.06);
}

.home__card-title {
  position: absolute;
  left: .8rem;
  bottom: .7rem;
  z-index: 2;
  font-size: 0.95rem;      /* scaled for smaller cards */
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 2px 6px rgba(0,0,0,.65);
  margin: 0;
}

.home__card-shadow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 60%);
  transition: opacity .25s ease;
}

.home__card:hover .home__card-shadow { opacity: .9; }

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html{
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .home__card, .home__card-media, .home__card-img, .home__card-shadow { transition: none !important; }
  .home__card:hover { transform: none; }
  .reveal-init,
  .reveal-on-scroll{
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 360px) {
  .home__container { padding-top: 5rem; }
  .footer {padding-bottom: .25rem;}
}

@media (max-width: 480px){
  .home__container { padding-top: 5.5rem; }
  .home__bg { height: min(65vh, 700px); }
  .home__shadow { height: min(70vh, 740px); }

  .contact-visual-anchor{
    transform: translateY(-40px);
  }

  #contact.explore{
    padding-bottom: 7rem;
  }

  #contact .explore__content{
    padding-top: 19rem;
    row-gap: .5rem;
  }

  #contact .section__title{
    margin-bottom: .5rem;
  }
}

/*========== HIDE TIMELINE LINE & ON SMALL SCREENS ==========*/
@media screen and (max-width: 768px){

  .timeline__list::before{
    display: none;
  }

  .timeline__list > li,
  .timeline__list > li:nth-child(odd),
  .timeline__list > li:nth-child(even){
    width: 100%;
    float: none;
    clear: both;
    transform: none;
    border-radius: 10px;
    margin-bottom: 2rem;
  }

  .timeline__list > li::after{
    display: none;
  }
}
