/*** The new CSS Reset  ***/

*:where(:not(iframe, canvas, img, svg, video):not(svg *)) {
    all: unset;
    display: revert;
  }
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  ol, ul {
    list-style: none;
  }
  
  img {
    max-width: 100%;
  }
  
  table {
    border-collapse: collapse;
  }
  
  textarea {
    white-space: revert;
  }

/*** Variables ***/

:root{
  --FontColor: whitesmoke;
  --BGcolor1: darkblue;
  --BGcolor2: slateblue;
  --Circle: #877ad7;
  --Shadow1: black;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../css/Ubuntu-Regular.ttf");
}

@font-face {
  font-family: "Sacramento";
  src: url("../css/Sacramento.ttf");
}

/*** Main CSS Styles  ***/

html {
  scroll-behavior: smooth;
  font: 1rem "Ubuntu", san-serif;
  color: var(--FontColor);
}

body {
  min-height: 100vh; 
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background: linear-gradient(45deg, var(--BGcolor1), var(--BGcolor2));
  overflow-x: hidden;
}

h1{
  font-size: clamp(2rem, 3vh, 3rem);
  margin-bottom: 2rem;
  white-space: nowrap;
}

h2{
  font-size: clamp(1.5rem, 2vh, 2.5rem);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p{
  font-size: clamp (16px, 1.5vw, 18px);
  line-height: 2rem;
  margin-bottom: 1rem;
}

em{
  font-weight: bold;
  font-size: 17px;
}

/*** Background Animation ***/

.circle {
  position: absolute;
  top: 0;
  width: 20px;
  aspect-ratio: 1/1;
  background: var(--Circle);
  box-shadow: 0 0 10px var(--Circle),
    0 0 20px var(--Circle),
    0 0 30px var(--Circle),
    0 0 50px var(--Circle);
  border-radius: 50%;
  animation: animate 5s linear forwards;
  z-index: -1;
}

@keyframes animate {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

.circle:before {
  content: '';
  position: absolute;
  left: 25%;
  bottom: 100%;
  width: 50%;
  height: 100vh;
  opacity: 0.5;
  background: linear-gradient( var(--Circle), transparent);
}

/*** Utilities Classes ***/

.glass {
  background: rgba(109, 103, 228, 0.5);
  border: 1px solid rgba(109, 103, 228);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
}

.flexy {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}

.border{
  border: 1px solid rgba(109, 103, 228);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/*** Header Section ***/

.header {
  position: sticky;
  top:10px;
  width: 95vw;
  height: 10vh;
  z-index: 5;
}

.header-tittle {
  padding: .25rem 0.5rem;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
}

/* Hamburger Button */

.hamburger{
  align-items: center;
  cursor: pointer;
  padding-right: 5px;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  background-color: var(--FontColor);
}

/* Bar Animation */

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Navigation Bar */

.navbar {
  transform: scaleY(0);
  transform-origin: top;
  transition: all 0.5s ease;
  margin-top: 10px;
}

.active{
  transform: scaleY(1);
}

.nav-logo {
  padding-left: 5px;
  cursor: pointer;
  font-family: "Ubuntu", cursive;
  font-size: 2rem;
}

.nav-logo:hover, .nav-logo:focus {
  transform: scale(1.1);
  transition: all 0.3s;
}

.navbar li {
  text-align: center;
  padding: 0.5rem;
  cursor: pointer;
}

.navbar li:hover, nav li:focus {
  transform: scale(1.2);
  text-decoration: underline;
  transition: all 0.3s;
}

/*** Hero Section ***/

.hero {
  height: 100vh;
  max-width: 400px;
}

.lottie {
  margin: 2rem auto;
  width: 90%;
  height: auto;
}

/* Text Animation */

.hero-content {
  margin: 2rem auto;
  color: var(--FontColor);
  font-size: 2rem;
  white-space: nowrap;
}

.cursor {
  margin-left: 0.25em;
}

.blinkAnim {
  animation: blinkMe 1.2s linear infinite;
}

@keyframes blinkMe {
  0% {
    opacity: 0;
  }
  49% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

/* Scroll Down Arrow */

.arrows {
  cursor: pointer;
  margin: 2rem auto;
  max-height: 20vh;
}

.arrows svg{
  display:block;
  width: 60px;
  height: 72px;
}

.arrows path {
  stroke: var(--FontColor);
  fill: transparent;
  stroke-width: 1px;
  animation: arrow 2s infinite;
}

@keyframes arrow {
  0% {
    opacity: 0
  }

  40% {
    opacity: 1
  }

  80% {
    opacity: 0
  }

  100% {
    opacity: 0
  }
}

.arrows path.a1 {
  animation-delay: -1s;
}

.arrows path.a2 {
  animation-delay: -0.5s;
}

.arrows path.a3 {
  animation-delay: 0s;
}

/* Main Content */

.main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/*** About Section ***/

#about {
  scroll-margin-top: 10vh;
  display: grid;
  grid-template-areas: "owner-pic" "description" "linkedin";
  max-width: 1500px;
  margin-top: 2rem;
}

.owner-pic {
  border-radius: 5%;
  max-width: 200px;
  margin: 0 auto;
  grid-area: owner-pic;
}

.description {
  margin-top: 2rem;
  padding: 0 5%;
  grid-area: description;
  align-self:start;
}

.description h1{
  margin-top: 0.5rem;
}

.description p:last-child{
  margin-bottom: 0;
}


.linkedin{
  cursor: pointer;
  padding: 10px;
  max-width: 200px;
  border-radius: 10px;
  margin: 1rem auto;
  grid-area: linkedin;
}

/*** Services ***/

#services {
  scroll-margin-top: 10vh;
  width: 100vw;
  max-width: 1500px;
  position: relative;
}

.services-content{
  padding: 0 5%;
}

.slides-container {
  display: flex;
  overflow: hidden;
  scroll-behavior: smooth;
  margin: 0;
}

.slide-arrow {
  position: absolute;
  display: flex;
  bottom: 100px;
  margin: auto;
  height: 4rem;
  width: 2rem;
  background-color: var(--BGcolor1);
  font-size: 3rem;
  padding: 0;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 100ms;
  z-index: 1;
}

.slide-arrow:hover,
.slide-arrow:focus {
  opacity: 0.6;
}

.arrow-prev {
  left: 50%;
  top: 30%;
  padding-left: 0.25rem;
  border-radius: 0 2rem 2rem 0;
}

.arrow-next {
  right: 50%;
  top: 30%;
  padding-left: 0.75rem;
  border-radius: 2rem 0 0 2rem;
}

.slide {
  display: flex;
  flex-flow: column nowrap;
  flex: 1 0 100%;
}

.slide h2{
  padding: 1rem 2rem;
}

.slide p{
  padding: 1rem 2rem;
}

/*** Portfolio ***/

#portfolio{
  scroll-margin-top: 10vh;
  position: relative;
  width: 100vw;
  max-width: 1500px;
  text-align: center;
  margin: 2rem 0;
}

.cardContainer{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  grid-gap: 2rem;
  margin: 2rem;
}

.appCard{
  height: 215px;
  position: relative;
  overflow: hidden;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid whitesmoke;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-rows: 2fr 1fr;
  transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: right / contain no-repeat url(../img/toDo.webp);
  cursor: pointer;
}

.appCard:hover {
   transform: scale(1.035, 1.035);
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.appCard a{
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

#portfolio img{
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
  transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#portfolio h3{
  color: whitesmoke;
  font-size: 24px;
  text-align: left;
  margin: 10px 0 10px 10px;
}

#portfolio p{
  color: whitesmoke;
  font-size: 16px;
  text-align: left;
  letter-spacing: 0.5px;
  padding-top: 10px;
  margin: 0 100px 0 10px;
}

/*** Article Grid ***/

#articles {
  scroll-margin-top: 10vh;
  position: relative;
  width: 100vw;
  max-width: 1500px;
}

#articles h1{
  margin-top: 2rem;
  /* padding: 0 1rem; */
}

#articles p{
  margin-bottom: 1rem;
  max-width: 1500px;
}

.article-grid{
  display: grid;
  max-width: 1500px;
  margin: 2rem auto;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 1rem;
  justify-items: center;
}

.article-item{
  width: 90%;
  background-color: var(--BGcolor2);
  text-align: center;
  padding: 10px;
  cursor: pointer;
  border-radius: 20px;
  transition: transform 0.5s ease-in-out;
  backface-visibility: hidden;
}

.article-item:hover, article-item:focus{
  transform: scale(110%);  
}

.article-item:nth-child(even){
  background-color: var(--FontColor);
  color: var(--BGcolor1);
}

/*** Contact Form ***/

#contact{
  scroll-margin-top: 10vh;
}

.contact-section {
  width: 90%;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 1rem;
}

.contact-intro > * + * {
  margin-top: 1rem;
}

.contact-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
}

.contact-description {
  color: var(--FontColor);
}

.form-group-container {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.form-input::placeholder,
.form-textarea:focus-visible {
  color: #6b7280;
}

.form-input:focus-visible,
.form-textarea:focus-visible {
  outline: 2px solid var(--FontColor);
  outline-offset: 2px;
}

.form-textarea {
  min-height: 120px;
}

.form-submit {
  margin-top: 1.2rem;
  width: 100%;
  background-color: var(--BGcolor2);
  padding: 20px 20px;
  border-radius: 0.375rem;
  text-align:center;
  border-radius: 50px;
}

/*** Footer Section ***/

footer{
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

footer img{
  border-radius: 50%;
  border: 1px solid var(--FontColor);
  width: 20vw;
  max-width: 100px;
  height: auto;
}

.decoLine{
  padding-bottom: 10px;
  border-bottom: 2px solid var(--FontColor);
  opacity: 0.6;
  position: absolute;
  margin: 0 auto;
  width: 100%;
  top: 40%;
  z-index: -1;
}

/*** Media Queries ***/


@media (min-width: 700px) {

  .hero{
  grid-auto-columns: auto;  
  grid-template-areas: "lottie hero-content" "lottie arrow" ;
  }
  
  #about{
    grid-template-areas: "owner-pic description" "linkedin description";
  }

  .description{
    margin-top: 0;
  }

  .services-content{
    padding: 0;
    margin-top: 2rem;
  }

  .slide-arrow {
  bottom: -500px;
  }

  .arrow-next{
    right: 5%;
  }

  .arrow-prev{
    left: 95%;
  }

  .slide {
    flex-flow: row nowrap;
  }

  .slide img{
    width: 300px;
    height: auto;
  }
  
  .slides-container{
    overflow:hidden;
    margin: 0 auto;
  }
  
}