:root {
  --primary-color: #eae7e2;
  --secondary-color: #1a1a1a;
}

/* Base HTML */

html {
  scroll-padding-top: 80px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  margin: 0;
}

h1,
h2,
h3 {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
}

h4 {
  font-family: 'Roboto Flex', sans-serif;
  font-weight: 500;
}

li,
p {
  font-family: 'Roboto Flex', sans-serif;
  font-weight: 200;
}

a {
  text-decoration: none;
  color: black;
}

/* Components */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: rgba(234, 231, 226, 0.9);
  position: sticky;
  top: 0;
  z-index: 1;
}

.logo {
  font-size: 20px;
  font-weight: bold;
}

.logo h4 {
  margin: 0;
}

.menu {
  display: flex;
  list-style: none;
}

.menu li {
  margin: 0 15px;
}

.menu a {
  text-decoration: none;
  color: black;
}

.menu-button {
  display: none;
  cursor: pointer;
  font-size: 18px;
}

.menu-button p {
  margin: 0;
}

.card {
  border: 1px solid var(--secondary-color);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  text-align: center;
  transition: transform 0.3s ease;
}

.card__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card__image {
  margin-bottom: 1rem;
}

.card__image img {
  max-width: 65%;
  height: auto;
  filter: grayscale(60%) brightness(90%) opacity(0.8);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: scale(1.03);
  transition: transform 0.3s ease;
  cursor: pointer;
  z-index: 0;
}

.card:hover .card__image img {
  filter: none;
  transition: filter 0.3s ease;
}

.card__text {
  font-size: 1rem;
  color: var(--text-color, #333); /* fallback color */
}

.carousel-cell {
  width: 100%; /* full width */
  margin-right: 10px;
}

.flickity-button {
  background: transparent;
}

.flickity-button:disabled {
  display: none;
}

.flickity-button:hover {
  border-radius: 0%;
  background: transparent;

  & .flickity-button-icon {
    fill: lightgray;
  }
}

.flickity-page-dots {
  display: none;
}

.testimonial {
  padding: 1rem;
}

.testimonial__content {
  max-width: 850px;
  margin: 0 auto;
  padding: 0.5rem;
  position: relative;
  overflow: hidden;
}

.testimonial__svg--left {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  opacity: 0.2;
  z-index: 0;
}

.testimonial__svg--right {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  opacity: 0.2;
  z-index: 0;
  transform: scaleX(-1);
}

.testimonial__text {
  font-size: 1rem;
  line-height: 1.5;
  /* padding: 0.5rem; */
}

.testimonial__author {
  text-align: end;
  font-weight: 500;
}

.testimonial__text,
.testimonial__author {
  position: relative;
  z-index: 1;
}

.all-skills {
  margin: 0 auto;
  max-width: 50.75rem;
}

.skills-group {
  flex-basis: 35%;
}

.skills-group__heading {
  display: flex;
  text-transform: uppercase;
  margin: 0 0 0.625rem 0;
  align-items: center;
}

.skills-group__category {
  text-transform: uppercase;
  margin: 0.6rem 0 0 0;
  text-align: left;
}

.skills-group__list {
  list-style-type: none;
  margin: 0;
  padding-left: 0;
  text-align: left;
}

.skills-group__list li {
  margin-bottom: 0.625rem;
  text-align: left;
}

.skills__svg {
  width: 50px;
  height: auto;
  margin-right: 10px;
}

.projects__list {
  max-width: 28rem;
  width: 100%;
  margin-left: 0;
  padding-left: 0;
}

.projects__list li {
  list-style-type: none;
}

.projects__list a {
  text-decoration: none;
  color: inherit;
}

.projects__card {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.projects__card:hover .projects__card--arrow {
  transform: scale(1.2);
}

.projects__card--icon {
  width: 1.7rem;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.projects__card--arrow {
  width: 1.2rem;
  margin-left: auto;
  transition: transform 0.3s ease;
}

.projects__card--title {
  font-weight: 500;
  max-width: 21rem;
}

.projects__card--content p,
h4 {
  margin: 3px 0;
}

.list__card {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.list__card:hover .list__card--arrow {
  transform: scale(1.2);
}

.list__card--icon {
  width: 1.7rem;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.list__card--arrow {
  width: 1.2rem;
  margin-left: auto;
  transition: transform 0.3s ease;
}

.list__card--title {
  font-weight: 500;
  max-width: 21rem;
}

.list__card--content p,
h4 {
  margin: 3px 0;
}

.work-detail {
  padding: 2rem;
  border: solid black 1px;
  position: relative;
}

.work-detail__body {
  display: flex;
  gap: 2rem;
}

.work-detail__body--heading {
  text-transform: capitalize;
  margin-bottom: 0.625rem;
}

.work-detail__body--list {
  list-style-type: none;
  margin: 0;
  padding-left: 0;
  text-align: left;
}

.work-detail__body--list li {
  margin-bottom: 0.625rem;
  text-align: left;
}

.work-detail__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.work-detail__meta li {
  list-style-type: none;
  color: #333;
}

.work-detail__meta ul {
  padding: 0;
}

.work-detail__meta a {
  text-decoration: none;
  color: inherit;
}

.work-detail__content {
  flex: 2;
}

.work-detail__image img {
  max-width: 80%;
  text-align: center;
}

.work-detail__close {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  border-bottom: solid black 1px;
  border-left: solid black 1px;
  border-top: none;
  border-right: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  color: black;
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
}

.work-detail__close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.contact {
  margin-top: 3rem;
  padding: 2rem 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
}

.contact-form label {
  font-family: 'Roboto Flex', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--secondary-color);
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid var(--secondary-color);
  background-color: transparent;
  font-family: 'Roboto Flex', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  color: var(--secondary-color);
  border-radius: 0;
  outline: none;
}

.submit-button {
  align-self: flex-start;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-button:hover {
  background-color: #333;
}

/* Layouts */
.container {
  margin: 0 auto;
  max-width: 1200px;
  padding: 1rem 3rem;
}

.row {
  display: flex;
  flex-direction: row;
  padding: 1rem;
  gap: 8px;
}

.column {
  display: flex;
  flex: 1;
  padding: 1rem;
  flex-direction: column;
  gap: 10px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Sections */
.hero__title {
  font-size: 2.5rem;
}

.work {
  width: 90%;
}

.work-detail {
  display: flex;
}

/* Utilities */

.hidden {
  display: none;
}

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

.flex {
  display: flex;
}

.underline {
  text-decoration: underline;
}

.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-space-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: end;
}

.no-uppercase {
  text-transform: none;
}

@media (max-width: 768px) {
  /* Base HTML  */

  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 18px;
  }
  h3 {
    font-size: 16px;
  }
  p,
  li {
    font-size: 0.95rem;
  }

  /* Components  */
  .navbar {
    background: none;
    padding: 0;
  }

  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 50px;
    right: 0;
    min-width: 9.06rem;
    align-items: end;
    margin-top: 6px;
  }

  .menu li {
    margin: 6px 0;
    background-color: rgba(234, 231, 226, 0.9);
    width: 100%;
    display: flex;
    justify-content: end;
    border-left: 1px solid var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
    border-top: 1px solid var(--secondary-color);
  }

  .menu a {
    padding: 0.875rem 1rem;
  }

  .menu.active {
    display: flex;
  }

  .menu-button {
    display: block;
    background: rgba(234, 231, 226, 0.9);
    padding: 0.875rem 1rem;
    border-left: 1px solid var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
    border-top: 1px solid var(--secondary-color);
  }

  .logo {
    display: block;
    background: rgba(234, 231, 226, 0.9);
    padding: 0.875rem 1rem;
    font-size: 18px;
    margin-top: 4px;
    border-right: 1px solid var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
    border-top: 1px solid var(--secondary-color);
  }

  .card {
    min-height: 150px;
  }

  .card__image {
    max-width: 90%;
  }

  .testimonial {
    padding: 2.5rem;
  }

  .testimonial__svg--left,
  .testimonial__svg--right {
    width: 40px;
  }

  .all-skills {
    display: block;
    padding-top: 0;
  }

  .skills-group li {
    display: inline-block;
    margin: 0.5rem 0.5rem;
    text-align: center;
  }

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

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

  .skills-group__heading {
    justify-content: center;
    flex-direction: column;
  }

  .skills-group__heading img {
    margin: 5px 0;
  }

  .projects__list {
    max-width: 25rem;
  }

  .projects__list ul {
    padding: 0.5rem;
  }

  /* Layout  */
  .container {
    padding: 1rem 1rem;
  }
}

@media (max-width: 1100px) {
  .projects__section {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 850px) {
  .work-detail__body {
    flex-direction: column;
    gap: 0;
    /* padding: 1.5rem; */
  }

  .work-detail__image img {
    max-width: 60%;
  }

  .testimonial {
    padding: 1rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .card__image img {
    filter: none;
  }
}
