/* Defaults */

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

body {
  font-family: 'Ubuntu', sans-serif;
  font-size: 1.2rem;
  background-color: #FFF6F0;
}

h1, 
h2 {
  font-family: 'Mukta', sans-serif;
}

h1 {
  font-size: 2.5rem;
}

img {
  /* Ensure images fill their container */
  max-width: 100%;
  height: auto; /* keep at auto for safari */
}

a {
  text-decoration: none; /* Remove underline */
  color: inherit; /* Inherit text color from parent */
}

a:hover {
  text-decoration: underline; /* Add underline on hover */
}


/* Main Styling */

:root {
  --violet: #C98BB9;
  --pink: #FAE3E3;
}

header,
footer,
.projects,
.skills {
  padding-top: 3em;
  padding-bottom: 3em;
}

.container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
}

.vertical-spacing > * {
  margin-top: 1rem;
}

.icon {
  font-size: 2rem;
  width: 2.1rem;
}

.icon:hover {
  opacity: .7;
}

.btn {
  display: inline-block;
  padding: .5em 2em;
  border: 1px solid #fff;
  border-radius: 100px;
}

/* Page */

.banner {
  position: absolute;
  z-index: -1;
  top: 0;
  height: 500px;
  width: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 100%);
  background-color: var(--violet);
}

/* Header */

.photo-container {
  position: relative;
  width: 90%;
  max-width: 80%;
  margin: 0 auto;
}

.photo {
  box-shadow: #000 3px 3px 15px 2px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.name {
  color: #fff;
  font-size: 4rem;
  position: absolute;
  bottom: .1em;
  left: .2em;
  line-height: 100%;
  text-shadow: 2px 2px black; 
}

.about-me-title {
  text-align: center;
}

.about-me-text {
  opacity: .6;
  line-height: 150%;
}

.about-me-icons {
  display: flex;
  justify-content: center;
  gap: 1em;
}

.about-me-icons .icon:hover {
  opacity: .7;
  color: var(--violet);
}

/* Skills */

.skills-title {
  text-align: center;
}

.skill-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 2em;
}

.skill-icon {
  font-size: 3rem;
}

/* Projects */

.projects-container {
  padding: 1em 0;
}

.projects-title {
  text-align: center;
}

.project-card {
  display: flex;
  flex-direction: column;
  box-shadow: darkgray 3px 3px 10px;
  margin-bottom: 4em;
  background-color: #fff;
  border-radius: 1em;
}

.project-card-picture {
  background-color: var(--pink);
  height: 15em;
  border-radius: 1em 1em 0 0;
}

.project-image {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 1em 1em 0 0;
}

.project-card-info {
  opacity: .7;
  text-align: center;
  padding: 1em 1em 1em 1em;
  box-shadow: 0px -5px 8px rgba(0, 0, 0, 0.24);
}

.project-card-title {
  font-size: 1.7rem;
}

.project-title-and-icons {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.project-card-icons {
  display: flex;
  justify-content: end;
  align-items: start;
  gap: 1em;
}

.project-card-icons .icon:hover {
  color: inherit;
}

.project-card-text {
  margin-top: 1em;
}

.project-card-footer {
  display: flex;
  justify-content: center;
  margin-top: auto;
  gap: .5em;
  padding: 0 1em 1em 1em;
}

.all-projects-btn-container {
  display: flex;
  justify-content: center;
  margin-bottom: 3em;
}

.all-projects-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  border: 1px solid #000;
}

.all-projects-btn:hover {
  color: #fff;
  background-color: var(--violet);
  border: 1px solid #fff;
  text-decoration: none;
}

.all-projects-btn .icon:hover {
  opacity: 1;
}

/* Footer */

footer {
  background-color: var(--violet);
  text-align: center;
}

.footer-title {
  text-align: center;
  margin-bottom: 1em;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-top: 5em;
  opacity: .7;
}

.mail-me {
  color: #fff;
}

.mail-me.btn:hover {
  color: black;
  background-color: #fff;
  text-decoration: none;
}

.made-by {
  font-size: .9rem;
  opacity: .5;
}

/* Media Queries */

/* Tablet */

@media (min-width: 700px) {
  .container {
    width: 80%;
  }

  /* Header */
  .header-container {
    position: relative;
    margin-top: 2em;
    margin: 0 auto;
    padding: 1em 0;
  }

  .photo-container {
    position: relative;
    float: left;
    max-width: 40%;
    transform: translate(-1.5em, 0em);
  }

  .name {
    top: 10%;
    left: 80%;
    white-space: nowrap;
  }

  .about-me-container {
    margin-top: 10em;
    padding: 3em;
    background-color: #fff;
    box-shadow: #161616 3px 3px 15px 2px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.23);
  }

  .about-me-title {
    margin-bottom: 1em;
  }

  /* Skills */

  .skills-title {
    margin-bottom: 1em;
  }

  /* Projects */

  .projects {
    clear: both;
  }

  .projects-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3em;
  }

  .projects-title {
    text-align: left;
  }

  .all-projects-btn-container {
    grid-column: 1 / span 2;
  }

}

/* Desktop */

@media(min-width: 1024px) {
  /* Header */

  a:hover {
    text-decoration: none;
  }

  .header-container {
    display: flex;
  }
  
  .name {
    bottom: .1em;
    left: .2em;
    top: auto;
    white-space: wrap;
  }
  
  .photo-container {
    transform: none;
    float: none;
    flex: 1;
    transform: scale(1.1);
  }

  .photo {
    object-fit: cover;
  }

  .about-me-container {
    margin: 0;
    flex: 2;
  }

  .about-me-title {
    text-align: left;
  }

  .about-me-icons {
    text-align: right;
  }

  /* Skills */

  .skill-icon[data-tool-tip] {
    position: relative;
    cursor: help;
  }

  .skill-icon[data-tool-tip]::after {
    content: attr(data-tool-tip);
    position: absolute;
    display: inline-block;
    color: #323232;
    font-size: 1rem;
    white-space: nowrap;
    padding: .2em .5em .3em .5em;
    border-radius: 5px;
    bottom: 50%;
    left: 50%;
    background-color: #C98BB9;
    transform: scale(0);
    transition: 
      transform ease-in 100ms, 
      bottom ease-in 100ms;
  }

  .skill-icon[data-tool-tip]:hover::after {
    transform: scale(1);
    bottom: 110%;
  }

  /* Projects */

  .projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3em;
  }

  .all-projects-btn-container {
    grid-column: 1 / span 3;
  }
}


