:root {
  --color-primary: #497d89;
  --color-primary-light: #2cbdde;
  --color-primary-complementary: #de802c;
  --color-primary-complementary-darker: #34302d;
  --color-secondary: #014040;
  --color-secondary-light: #49a69c;
  --color-light: #c5d9d2;
  --color-light-complementary: #d0d7d9;
  --color-accent: #d97168;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-grey: #444444;
  --color-bg: #f5f5f5;
}

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

/* Remove default margin */
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0 0 1.5rem;
}

/* 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 {
  line-height: 1.5;
  font-family: "Comfortaa", "Poppins", Roboto, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
}

html:focus-within {
  scroll-behavior: smooth;
}

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

/* A elements that don't have a class get default styles */
a {
  text-decoration-skip-ink: auto;
  color: var(--color-secondary-light);
  transition: color 0.2s;
}

a:hover,
a:focus {
  color: var(--color-accent);
}

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

svg {
  fill: currentColor;
}

svg:not(:root) {
  overflow: hidden;
}

/* 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;
  }
}

/* *************** responsive styling *************** */

.container {
  width: min(65em, 100%);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container--text {
  width: min(65em, 90%);
}

.container--grid {
  padding: 3rem 0.75rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(12, 1fr);
}

.container--grid > * {
  grid-column: span 12;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.xs-1 {
  grid-column: span 12;
}

/* screens adjustments */

/* ---------- min-width ---------- */

h1,
.heading-1 {
  font-size: 1.802rem;
  color: var(--color-secondary);
}

h2,
.heading-2 {
  font-size: 1.602rem;
}

h3,
.heading-3 {
  font-size: 1.424rem;
  /* text-transform: uppercase; */
  color: var(--color-primary-complementary-darker);
  margin-bottom: 0;
}

h4,
.heading-4 {
  font-size: 1.266rem;
  color: var(--color-primary);
  margin: 0;
}

h5,
.heading-5 {
  font-size: 1.125rem;
  font-weight: 400;
}

h6,
.heading-6 {
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

@media only screen and (min-width: 45em) {
  h1,
  .heading-1 {
    font-size: 2.488rem;
  }

  h2,
  .heading-2 {
    font-size: 2.074rem;
  }

  h3,
  .heading-3 {
    font-size: 1.728rem;
  }

  h4,
  .heading-4 {
    font-size: 1.44rem;
  }

  h5,
  .heading-5 {
    font-size: 1.2rem;
  }

  h6,
  .heading-6 {
    font-size: 1rem;
  }
}

@media only screen and (min-width: 60em) {
  h1,
  .heading-1 {
    font-size: 3.052rem;
  }

  h2,
  .heading-2 {
    font-size: 2.441rem;
  }

  h3,
  .heading-3 {
    font-size: 1.953rem;
  }

  h4,
  .heading-4 {
    font-size: 1.563rem;
  }

  h5,
  .heading-5 {
    font-size: 1.25rem;
  }

  h6,
  .heading-6 {
    font-size: 1rem;
  }
}

/* *************** styling for the skip content *************** */
/* TODO: Fix */

.skipcontent.hide {
  display: none;
}

.skipcontent.hide:hover,
.skipcontent.hide:focus {
  display: block;
}

/* *************** styling for the Navbar *************** */

.masthead {
  position: fixed;
  background-color: var(--color-white);
  color: var(--color-black);
  margin: 1rem;
  transition: all 0.3s;
}

.masthead:has(.open) {
  margin: 0;
  top: 0;
  height: 100vh;
  transition: all 0.3s;
}

.masthead .container {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0rem;
}

.masthead a {
  color: var(--color-black);
  text-decoration: none;
  border-bottom: 0.2em solid var(--color-white);
}

.masthead ul a:hover,
.masthead ul a:focus {
  border-bottom: 0.2em solid var(--color-primary-light);
  transition: color 0.2s, background-color 0.2s, border-color 0.2s,
    box-shadow 0.2s;
}

.masthead .logo {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.masthead .logo__img {
  fill: var(--color-black);
  width: 5em;
  height: auto;
}

.masthead .logo__text {
  font-size: 1.525rem;
  font-weight: bold;
  color: #fff;
  margin: 0.375rem 0.375rem 0.375rem 0.375rem;
}

.masthead a:hover svg,
.masthead a:focus-visible svg {
  fill: var(--color-primary);
  transition: color 0.2s, fill 0.2s;
}

.masthead nav ul {
  list-style: none;
  text-align: center;
  margin: 0;
  padding: 0rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.masthead h1 svg {
  display: block;
  padding: 0.375rem 0rem;
}

.menu {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  border: 0.375rem solid #00000000;
  transition: all 0.3s;
}

.masthead:has(.open) {
  border-right: 0.375rem solid #000000;
  transition: all 0.3s;
}

.menu:has(.menu__controls:not(.open)):hover {
  border: 0.375rem solid #000000;
  background-color: var(--color-primary-light);
  transition: all 0.3s;
}

.menu__controls {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 3.5em;
  width: 3.5em;
  transition: all 0.3s;
}

.masthead:has(.open) .menu__controls {
  align-items: flex-end;
  width: 75vw;
  transition: all 0.3s;
}

.menu__controls > span {
  content: " ";
  width: 1.75em;
  height: 0.25em;
  background-color: var(--color-black);
  box-shadow: 0rem 0rem 0.335rem #0000004e;
  border-radius: 0.25em;
  margin: 0.2rem 0;
  transition: all 0.3s;
}

.menu__controls.open > span:nth-child(1) {
  transform: rotate(45deg) translate(0.45em, 0.45em);
  transition: all 0.3s;
}

.menu__controls.open > span:nth-child(2) {
  opacity: 0;
  transition: all 0.3s;
}

.menu__controls.open > span:nth-child(3) {
  transform: rotate(-45deg) translate(0.45em, -0.47em);
  transition: all 0.3s;
}

.menu__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
}

.menu__content.hide {
  display: none;
}

.menu__content-text {
  font-size: 2rem;
}

@media only screen and (min-width: 45em) {
  .masthead {
    position: relative;
    padding: 0;
    margin: 0;
  }

  .masthead:has(.open) {
    height: auto;
  }

  .masthead .container {
    padding: 0rem;
    flex-direction: row;
    align-items: center;
  }

  .masthead nav {
    display: flex;
    flex: 1 0;
    align-content: center;
    justify-content: flex-end;
  }

  .masthead nav ul {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-content: center;
  }

  .masthead nav a {
    display: block;
  }

  .masthead .logo__img {
    fill: var(--color-black);
    width: 3em;
    height: auto;
  }

  .menu__controls.hide {
    display: none;
  }

  .menu__content {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    padding: 0;
  }

  .menu__content.hide {
    display: flex;
  }

  .menu__content-text {
    font-size: 1rem;
  }

  .menu:has(.menu__controls:not(.open)):hover {
    border: 0.375rem solid #fff;
    background-color: #fff;
    transition: none;
  }
}

/* ----------- Banner ----------- */

.banner {
  margin-top: 0.5rem;
  background-color: var(--color-bg);
  background-position: center;
  background-size: cover;
}

.banner .container {
  /* min-height: 20vh; */
  display: flex;
  flex-direction: column;
  /* grid-template-columns: repeat(12, 1fr); */
  /* flex-direction: column; */
  /* justify-content: center;
  align-items: flex-start; */
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.banner .banner__content,
.banner .banner__content-image {
  width: min(35em, 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.banner__title {
  margin-top: 3rem;
  font-size: 1.757rem;
  line-height: 1.3;
  color: var(--color-black);
}

.flex-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.banner__byline {
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--color-grey);
  margin: 0.5rem 0 0;
}

.banner__image {
  display: block;
  max-width: 60%;
  border-radius: 100%;
}

.links-icons {
  padding: 0;
  margin: 0 0 1rem 0;
  width: 100%;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex: 1 1;
}

.icons {
  height: 2em;
  width: 2em;
  margin: 0 0.075em;
}

@media only screen and (min-width: 45em) {
  .banner .container {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }

  .banner__title {
    margin-top: auto;
    font-size: 2.074rem;
  }

  .flex-row {
    align-items: flex-start;
  }

  .links-icons {
    margin: 0;
    justify-content: flex-start;
  }
}

@media only screen and (min-width: 60em) {
  .banner__title {
    font-size: 2.441rem;
  }
}

/* ---------- Card Grid ---------- */

.card-set {
  background-color: var(--color-light);
}

.post-list {
  background-color: var(--color-light-complementary);
  color: var(--color-secondary);
}

.grid-cards {
  gap: 1.5rem;
}

.card.card-group {
  display: flex;
  align-items: flex-start;
}

.grid-cards {
  list-style: none;
  padding: 0;
}

.grid-cards .card {
  display: block;
  background-color: #ffffff;
  box-shadow: 0rem 0.25rem 0.5rem #0002;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #000000;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card__img {
  background-color: var(--color-primary);
  display: block;
  width: 100%;
  border-radius: 0.5rem 0.5rem 0rem 0rem;
}

.card__title {
  padding: 1rem 1rem 0rem;
  text-align: center;
  flex: 1 1 12rem;
}

.card__text {
  padding: 0rem 1rem;
  text-align: center;
  flex: 1 1 12rem;
}

.post-list .card__text {
  display: flex;
  align-items: flex-end;
  flex: 0 0;
}

.post-list .card__text,
.post-list .card__title {
  text-align: left;
}

.grid-cards .card:hover,
.grid-cards .card:focus {
  /* base pattern for the button - mouse or tab action */
  box-shadow: 0rem 0.25rem 0.75rem #0002;
  transform: translateY(-0.74rem);
}

@media only screen and (min-width: 45em) {
  .m-1 {
    grid-column: span 12;
  }

  .m-1-2 {
    grid-column: span 6;
  }

  .m-1-3 {
    grid-column: span 4;
  }

  .m-2-3 {
    grid-column: span 8;
  }

  .card-set .card {
    display: flex;
    flex-wrap: wrap;
  }

  .post-list .card {
    display: flex;
    flex-direction: column;
  }

  .card-set .col,
  .post-list .col {
    display: flex;
    flex-wrap: wrap;
    transition: transform 0.5s ease;
  }
}

@media only screen and (min-width: 60em) {
  .l-1 {
    grid-column: span 12;
  }

  .l-1-2 {
    grid-column: span 6;
  }

  .l-1-3 {
    grid-column: span 4;
  }

  .l-1-4 {
    grid-column: span 3;
  }

  .grid-cards .card:hover,
  .grid-cards .card:focus {
    /* base pattern for the button - mouse or tab action */
    transform: translateY(-1.5rem);
  }

  .post-list .card:hover,
  .post-list .card:focus {
    /* base pattern for the button - mouse or tab action */
    transform: translateY(-1.5rem);
  }
}

/* *************** styling for the split image/content *************** */

.split {
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.split .container {
  /* padding-top: 3rem; */
  /* padding-bottom: 3rem; */
  display: grid;
  align-items: center;
  border: 0.1rem solid #00000022;
  border-radius: 1rem;
}

.split__title {
  font-size: 1.756rem;
  line-height: 1.3;
}

.split__text {
  margin: 1rem 0 0;
  line-height: 1.7;
  color: var(--color-grey);
}

.display-block__technologies {
  display: block;
  margin: 1rem 0 1.5rem 0;
}

.display-block__technologies span {
  color: var(--color-primary);
  font-weight: 900;
}

.split__image {
  aspect-ratio: 1 / 1;
  height: 100%;
  display: flex;
  gap: 1rem;
  padding: 1.5rem 0;
  overflow: scroll;
}

.split__image::-webkit-scrollbar {
  display: none;
}

.split__image.open {
  background-color: #00000060;
  width: 100%;
  height: 100%;
}

.close {
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  position: fixed;
  top: 0;
  z-index: 1000;
  margin: 1rem;
  background-color: var(--color-black);
  border-radius: 100%;
  padding: 1.25rem 0.75rem 1.25rem 0.5rem;
}

.close > span {
  content: " ";
  width: 1.75em;
  height: 0.25em;
  background-color: var(--color-white);
  box-shadow: 0rem 0rem 0.335rem #0000004e;
  border-radius: 0.25em;
  /* margin: 0.2rem 0; */
  transition: all 0.3s;
}

.close > span:nth-child(1) {
  transform: rotate(45deg) translate(0.2em, 0em);
  transition: all 0.3s;
}

.close > span:nth-child(2) {
  transform: rotate(-45deg) translate(0.2em, 0em);
  transition: all 0.3s;
}

.split__content {
  height: 100%;
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split__image img {
  /* object-fit: cover; */
  object-fit: contain;
  width: 50%;
  height: 100%;
}

@media only screen and (min-width: 45em) {
  .split .container {
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
  }

  .split title {
    font-size: 2.069rem;
  }
}

@media only screen and (min-width: 60em) {
  .split .container {
    grid-template-columns: 1fr 1fr;
  }

  .split title {
    font-size: 2.444rem;
  }
}
