:root {
  --clr-text: #374151;
  --clr-text-about: #9ca3af;
  --clr-heading: #111827;
  --clr-dark-pink: #639;
  --clr-link-dark: #d1d5db;
  --clr-link-light: #374151;

  --clr-white: #ffffff;
  --clr-bg-dark: #000000;
  --clr-bg-light: #ffffff;

  --font-opensans: "Open Sans", serif;
  --font-firasans: "Fira Sans", serif;

  --fs-sm: 14px;
  --fs-normal: 16px;
  --fs-lg: 30px;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --fw-extrabold: 900;
}

/*
  Josh's Custom CSS Reset + My Skip Link Styles at the bottom to enhance accessibility
  https://www.joshwcomeau.com/css/custom-css-reset/
*/

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

* {
  margin: 0;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  font-style: italic;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}
/*
  Screen reader
*/
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
/*
 Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/* 
 Skip link
*/
.skip-link {
  position: absolute;
  top: -3em;
  background: #fff;
}
.skip-link:focus {
  top: 0;
}
/* 
  Skip link - 2
*/
#skip a {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#skip a:focus {
  position: static;
  width: auto;
  height: auto;
}

a:focus-visible {
  outline: 0.1875rem solid var(--focus-outline);
  outline-offset: 0.25em;
}

/* CSS reset ends here */

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

body {
  background-color: var(--clr-bg-light);
  background-image: radial-gradient(#ddd 1px, transparent 0),
    radial-gradient(#ddd 1px, transparent 0);
  background-position: 0 0, 25px 25px;
  background-size: 50px 50px;
  color: black;

  font-family: var(--font-firasans);
  font-size: 1.1rem;
  /* font-family: var(--font-opensans); */
}

@media (min-width: 970px) {
  body {
    font-size: 1.3rem;
  }
}

body.dark {
  background-image: radial-gradient(#333 1px, transparent 0),
    radial-gradient(#333 1px, transparent 0);
  background-color: var(--clr-bg-dark);
  color: white;
}

body .about-text p,
body .about-text a {
  color: black;
}

body.dark .about-text p {
  color: #d4d4d4;
}

/* header {
  display: flex;
  flex-direction: column;
  align-items: center;
} */

.primary-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  backdrop-filter: blur(5px) saturate(180%) brightness(150%) blur(10px);
  background-color: rgba(0, 0, 0, 0.8);
  box-shadow: rgba(0, 0, 0, 0.25) 0px 25px 50px 0px,
    rgba(0, 0, 0, 0.5) 0px 5px 25px 0px;
  display: flex;
  align-items: center;
}

.primary-nav > .wrapper:first-of-type {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.primary-nav ul {
  /* margin-top: 2.5rem; */
  list-style: none;
  padding: 0;
  display: flex;
  /* flex-wrap: wrap; */
  column-gap: 2.4rem;
  justify-content: space-between;
}

.primary-nav .main-title a {
  color: #fff;
  text-decoration: none;
}

.primary-nav li a {
  color: #c9c9c9;
  text-decoration: none;
  /* text-decoration-thickness: 3px;
  text-decoration-color: var(--clr-dark-pink); */
  text-transform: uppercase;
}

.primary-nav a:hover {
  color: white;
  text-decoration: underline 3px solid var(--clr-dark-pink);
}

.primary-nav a:active {
  color: white;
  opacity: 0.8;
}

.menu {
  width: 30px;
  height: 30px;
  cursor: pointer;

  &:hover {
    opacity: 0.8;
  }
}

.menu-open {
  margin-right: 3.5rem;
}

.menu-close,
.menu-open {
  display: none;
}

.mode {
  position: fixed;
  right: 25px;
  cursor: pointer;
}

.dark-toggle {
  display: none;
}

.dark-toggle:hover {
  opacity: 0.8;
}

@media (max-width: 830px) {
  .primary-nav ul {
    flex-direction: column;
    height: 100%;
    align-items: center;
    justify-content: start;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 40%;
    z-index: 10;
    font-size: 1.3rem;
    backdrop-filter: blur(5px) saturate(180%) brightness(150%) blur(10px);
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: rgba(0, 0, 0, 0.25) 0px 25px 50px 0px,
      rgba(0, 0, 0, 0.5) 0px 5px 25px 0px;
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.3, -0.28, 0.735, 0.045);

    li {
      margin: 0.4rem 0;
    }
  }

  .primary-nav ul.open {
    transform: translateX(0%);

    li {
      padding-left: 2rem;
    }
  }
  .menu-close,
  .menu-open {
    display: block;
  }
}

.about-grid img {
  max-width: 250px;
  width: 100%;
  border-radius: 0 30px 30px 30px;
  /* height: 320px; */
}

body svg {
  color: black;
}

body.dark svg {
  /* width: 24px;
  height: 24px; */
  fill: var(--clr-link-dark);
  color: var(--clr-link-dark);
}

.wrapper {
  width: 80%;
  max-width: 1240px;
  margin: 0 auto;
}

section#About {
  margin: 8rem 0 5rem 0;
}

body section#About a {
  color: black;

  &:hover {
    opacity: 0.8;
  }
}

body.dark section#About a {
  text-decoration-color: var(--clr-link-light);
  text-decoration-style: dotted;
  color: white;
}

.about-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  grid-template-columns: 1fr;
}

.about-grid ul,
footer ul {
  padding: 0;
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.about-text {
  display: grid;
  gap: 1rem;
}

.about-text {
  font-size: 1.3rem;
  max-width: 600px;
  margin: 0 auto;
}

.about-heading {
  font-size: 2rem;
  font-weight: 700;
}

.about-img {
  justify-self: center;
}

@media (min-width: 970px) {
  .about-grid {
    display: grid;
    gap: 2rem;
    align-items: flex-start;
    grid-template-columns: 2fr 4fr;
  }

  .about-grid .about-text {
    order: 2;
    /* max-width: 400px; */
  }

  .about-img {
    order: 1;
  }

  .about-heading {
    margin: 0;
  }

  .about-text p {
    margin: 0;
  }
}

.tools-icons {
  margin-top: 2rem;
  display: grid;
  max-width: 600px;
  /* margin: 0 auto; */
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  row-gap: 2rem;
  column-gap: 1rem;
  border: 5px solid #c9c9c9;
  border-radius: 25px;
  padding: 0.8rem 0.6rem;
}

section.skills {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 5rem;
}

.education-container,
.experience-container,
.projects-cards article {
  display: flex;
  gap: 0.8rem;
  flex-direction: column;
  max-width: 700px;
}

.education-container {
  margin-top: 1.4rem;
}

.experience-container {
  margin-top: 2rem;
}

h2 {
  text-decoration: underline;
}

h3,
h4 {
  color: var(--clr-text-about);
  text-decoration: underline 3px double;
}

.details-container {
  /* max-width: 700px;
  margin-inline: auto; */
  /* display: grid; */
  /* grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); */
  /* gap: 1rem; */
}

.background a,
.projects a {
  color: var(--clr-dark-pink);
  font-weight: 900;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }

  &:active {
    opacity: 0.9;
  }
}

.details-img {
  width: 300px;
}

.projects {
  margin: 5rem 0;
}

.projects-cards {
  margin-top: 1rem;
  display: grid;
  gap: 2rem;
}

.projects-links {
  margin-top: 1rem;
  display: flex;
  gap: 6rem;
}

footer {
  margin: 8rem 0 2rem;
}

footer a:hover {
  opacity: 0.8;
}
