/* CSS RESET */

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

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* END CSS RESET */

/* FONTS */
@font-face {
  font-family: Playfair Display;
  src: url("./fonts/PlayfairDisplay-VariableFont_wght.woff") format("woff");
}

@font-face {
  font-family: Roboto;
  src: url("./fonts/Roboto-Regular.woff") format("woff");
}

body {
  font-family: Roboto;
}

h1, h2, h3 {
  font-family: Playfair Display, 'Times New Roman', Times, serif;
  font-weight: 300;
}

h1 {
  font-size: var(--h1);
  text-shadow: 2px 2px 12px rgb(44, 44, 44);
}

/* END FONTS */

/* GENERAL */

.sr-only {
  position:absolute;
  left:-10000px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}

:root {
  --padding: 2rem;
  --gap: 2rem;
  --margin: 2rem;
  --h1: 3rem;
}

body {
  overflow-x: hidden;
}


h2 {
  text-align: center;
  margin: var(--margin);
}

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

.tab {
  margin-left: 2rem;
}

/* make scrolling account for header */
section {
  scroll-margin-top: calc(var(--padding)*2 + var(--h1) + var(--margin));
}

/* END GENERAL */

/* HEADER */

header {
  display: flex;
  gap: var(--gap, 1rem);
  align-items: center;
  justify-content: space-between;

  padding: var(--padding);
}

@media (min-width: 40em) {
  header {
    box-shadow: 0 4px 8px rgb(199, 199, 199);
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
  }
}

.mobile-nav-toggle {
  display: none;
}

.primary-navigation {
  display: flex;
  gap: var(--gap, 1rem);

  list-style: none;
  margin: 0;

  background: hsl(0 0% 100% / 0.1);
  backdrop-filter: blur(1rem);
}

.primary-navigation a {
  font-family: Playfair Display, 'Times New Roman';
}

@media (max-width: 40em) {
  .primary-navigation {
    position: fixed;
    z-index: 1000;
    inset: 0 0 0 30%;

    flex-direction: column;
    padding: max(30vh, 10rem) 2em;

    transform: translateX(100%);
    transition: transform 350ms ease-out;
  }

  .primary-navigation[data-visible="true"] {
    transform: translateX(0%);
  }

  header {
    position: relative;
  }

  .mobile-nav-toggle {
    display: block;
    position: fixed;
    z-index: 9999;
    background: url("assets/menu.svg");
    background-repeat: no-repeat;
    border: 0;
    width: 2.5rem;
    aspect-ratio: 1;
    top: 2rem;
    right: 2rem;
  }
}

/* END HEADER */

/* MAIN */

main {
  padding: var(--padding);
}

section:not(:first-child) {
  margin-bottom: 4rem;
}

section {
  position: relative;
}

section:not(:first-child)::before {
  content: '';
  width: 100%;
  height: 2px;
  background: black;
  position: absolute;
  top: -2rem;
  left: 0;
  z-index: 1;
}

@media (min-width: 40em) {
  section:not(:first-child)::before {
    left: 50%;
    margin-left: -37.5%;
    width: 75%;
  }
}

/* PROJECTS */


/* SWIPERJS SLIDER */

.swiper {
  width: 100%;
  height: 40rem;
  margin-bottom: 4rem;
}


/* END SWIPERJS SLIDER */

.project-card {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  padding: 1rem 3rem;
  height: 30rem;
}

@media (min-width: 768px) {
  .project-card {
    box-shadow: 0 4px 8px rgb(199, 199, 199);
  }
}

.project-card .flex-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-card .link-container {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-container img {
  width: 1.5rem;
}

.project-card .flex-container,
.project-card p {
  padding: 1rem;
}

.project-img {
  font-family: "Playfair Display";
  text-align: center;
  font-size: 2rem;
  height: 12rem;
  color: var(--white);
  border: 2px solid black;
}

.project-img-container {
  display: flex;
  justify-content: center;
}

/* END PROJECTS */

/* ABOUT */

.about {
  display: flex;
  justify-content: center;
}

.about h2 {
  margin-top: 0;
}

.about-p {
  max-width: 70ch;
}

/* END ABOUT */

/* SKILLS */

.skills {
  text-align: center;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  place-items: center;
  margin: 1rem 0;
}

.skills-container img {
  width: 50px;
}

@media (min-width: 41em) {
  .skills-container img {
    width: 75px;
  }

  .skill-category-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
  }
}

/* END SKILLS */


/* CONTACT */

.contact-container {
  background: grey;
  padding: 1rem;
}

.contact-container a {
  color: white;
}

.single-contact {
  display: flex;
  gap: 1rem;
  padding: 0.25rem 0;
}

/* END CONTACT */

/* END MAIN */