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

:root {
  --text-dark: #000;
  --text-light: #fbf2f2;
  --text-muted: #595959;

  --background-color: #fff;
  --background-color-blue: #5a9df0;
  --accent-colour: #6571f5;
  --accent-colour-2: #3bb54a;
  --tag-colour: #e5e5e5;
  --border: 3px solid grey;
  --border: 3px solid #000;
  --border--grey: 3px solid grey;
  --colour-blue: blue;
}

:root.dark-mode {
  --text-dark: #fbf2f2;
  --text-light: #000;
  --text-muted: #595959;

  --background-color: #1c2023;
  --accent-colour: #f56565;
  --accent-colour-2: #3bb54a;
  --tag-colour: var(--accent-colour-2);

  --border: 3px solid #fff;
}

.main {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.button--add {
  position: absolute;
  bottom: 4rem;
  right: 2rem;
  display: flex;
  height: 5rem;
  width: 5rem;
  border: var(--border);
  border-radius: 50%;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.75rem;
  align-items: center;
  justify-content: center;
}

.header {
  padding: 0 2rem;
  border-bottom: var(--border);
}

.header__logo {
  display: flex;
  align-items: center;
  height: 4rem;
  color: inherit;
  text-decoration: none;
}

.header__logo:hover {
  color: var(--accent-colour);
}

.logo__icon {
  width: 2.5rem;
  height: 2.5rem;
}

.logo__name {
  margin-left: 0.5rem;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 20px;
}

.nav-container {
  display: flex;
  justify-content: space-between;

  /* limits the width of the navigation area to 1200px and centres it within the header */
  max-width: 75rem;
  margin: 0 auto;
}

.nav {
  display: flex;
}

.nav__link {
  /* Setting display: flex and align-items: center places the links inside the list items
       vertically in the center of the list item */
  display: flex;
  align-items: center;
  padding: 0 0.5rem;

  /* Removes standard underlines from these links. Explicitly inherits text colour from the body */
  text-decoration: none;
  color: inherit;
}

/* Sets the background colour and text colour of our navigation items when the item has 
   the .nav__link--active class, indicating the current page */
.nav__link--active {
  background: var(--accent-colour);
  color: var(--text-light);
}

/* Adds 1 relative unit of padding (determined by font size) to the right margin of all .nav__item
   elements as long as they are not the last element in their parent */
.nav__link:not(:last-child) {
  margin-right: 1rem;
}

/* Adds a bottom border and applies a negative margin to the element, to nudge it over the
   existing header bar border */
.nav__link:hover {
  margin-bottom: -3px;
  border-bottom: var(--border);
}

.nav__item {
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Sets the size of the icon (light/dark theme toggle) to be the same as the font size
    So that it takes up more or less the same amount of space as the links */
.nav__icon {
  width: 1em;
  height: 1em;
}

.nav__user {
  margin-right: 1rem;
  color: var(--text-color);
  opacity: 0.8;
}

.main {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 3rem 1.5rem 2rem 1.5rem;
}

/* The following media query increase the distance of the main content from the header
   as the window size increases. */
@media screen and (min-width: 30em) {
  .main {
    padding-top: 1rem;
  }
}

.footer {
  padding: 1rem 0;
  color: var(--text-muted);
  text-align: center;
}

.projects {
  display: grid;
  grid-template-columns: 1fr;
  grid-column-gap: 1.25rem;
  justify-content: center;
  justify-items: center;
  max-width: 21.875rem;
  margin: 0 auto;
  object-fit: contain;
}

@media (min-width: 48.75em) {
  .projects {
    grid-template-columns: repeat(2, 1fr);
    max-width: 45rem;
  }
}

@media (min-width: 70em) {
  .projects {
    grid-template-columns: repeat(3, 1fr);
    max-width: 68rem;
  }
}

.project-card {
  padding: 0.75rem 0;
}

.project-card__image {
  width: 200px;
  height: 200px;
  margin-bottom: 1rem;
  transition: transform 0.2s ease-in-out;
  object-fit: fill;
}

.project-card__meta {
  padding: 0 1.25rem;
}

.project-card__name {
  margin: 0;
  font-size: 1.5rem;
  line-height: 2.25rem;
  color: #1c2023;
}

.project-card:hover .project-card__image {
  transform: translateY(-0.5rem);
}

.project-card:hover .project-card__name {
  text-decoration: underline;
}

.categories {
  display: flex;
  padding: 0;
  margin: 0 0 0.75rem;
  color: #3d84a3;
  list-style: none;
  line-height: 1.45;
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 0.075rem;
}

/* Adds an ::after pseudo-element to each category tag, except the last one.
   This psuedo-element contains a pipe character (|), which acts as a seperator
   between the tags. */

.categories__tag:not(:last-of-type)::after {
  content: "|";
  margin: 0 0.25rem;
}

.hero {
  width: 100%;
  margin-bottom: 1.5rem;
}

.project {
  display: flex;
  flex-direction: column;
  font-size: 1.2rem;
  max-width: 50rem;
  padding: 0 1rem;
}

.project__content {
  margin-bottom: 1rem;
  line-height: 150%;
}

@media (min-width: 48.75em) {
  .project {
    flex-direction: row;
    padding: 0;
  }

  .project__content {
    flex: 7;
    margin-right: 3rem;
    padding: 0;
  }
}

.project__heading {
  margin: 0;
  font-size: 2rem;
  line-height: 150%;
}

.project__heading--meta {
  font-size: inherit;
  margin-bottom: 1rem;
}

.project__meta-group {
  margin-bottom: 1rem;
}

.project__meta-group,
.cta {
  padding: 1rem;
  background-color: #d4eafa;
  border-radius: 6px;
}

.cta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  color: #1c2023;
  text-decoration: none;
}

.cta:hover {
  text-decoration: underline;
}

.cta__icon {
  margin-right: 0.5rem;
  transform: translateY(1px);
}

.technology-list {
  list-style: none;
  padding-left: 0.75rem;
  margin: 0;
  line-height: 1.75;
}

.technology-list__item:before {
  content: "";
  display: inline-block;
  height: 1rem;
  width: 1rem;
  background-image: url("/static/img/list-check.svg");
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 0.5rem;

  /* necessary for vertical centering */
  transform: translateY(2px);
}

/* Utility class to remove link styles */
.u-bare-link {
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.ptt__main {

  background-color: #32373c;
  width: 100%;
  color: white;
  justify-content: center;
  margin: 0 auto;
}

.ptt__card {
  width: 200px;
  height: 200px;
  transition: transform 0.2s ease-in-out;
  object-fit: fill;
  padding: 0.75rem 0;
}

.ptt__card:hover .ptt__card__image {
  transform: translateY(-0.5rem);
}

.ptt__card__image {
  width: 200px;
  height: 200px;
  margin-bottom: 1rem;
  transition: transform 0.2s ease-in-out;
  object-fit: fill;
}

.ptt__header {
  justify-content: center;
  width: 70%;
}

.ptt__description,
.ptt__title {
  justify-content: center;
  width: 100%;
  padding-right: 0.5rem;
  margin-bottom: 1.5rem;
  color: white;
}