/***************************************************************************************************
 * THEMES
 */

[data-theme="light"] {
  --background: #f2f3f7;
  --shadow: #e2e3e7cc;
  --stripes: #eceef3;
  --surface: #ffffff;
  --primary: #02bf8a;
  --secondary: #df0237;
  --onBackground: #111212;
  --onSurface: #111212;

  --iconFilter: invert(0);
}

[data-theme="dark"] {
  --background: #0c0e13;
  --shadow: #000000cc;
  --stripes: #111317;
  --surface: #1c1e23;
  --primary: #12cf9a;
  --secondary: #cf1247;
  --onBackground: #ffffff;
  --onSurface: #ffffff;

  --iconFilter: invert(1);
}

/***************************************************************************************************
 * HTML, BODY
 */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background-color: var(--background);
  font-family: "Mozilla Headline", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
  margin: 0;
  padding: 0;
  position: relative;
}

/* STRIPES */
body::before {
  content: "";
  height: calc(100% - 64px);
  inset: 0;
  left: 0;
  pointer-events: none;
  position: fixed;
  top: 64px;
  width: 100%;
  z-index: -9;

  /* PROPERTIES */
  --stripe-color: var(--stripes);
  --stripe-width: 2px;                    /* thickness of a line */
  --stripe-gap: 12px;                      /* gap between lines */
  --stripe-angle: -45deg;                  /* angle of the lines */
  --fade-end: 150%;                        /* height where it fully fades */

  /* STRIPES BACKGROUND */
  background-image: repeating-linear-gradient(
    var(--stripe-angle),
    var(--stripe-color) 0,
    var(--stripe-color) var(--stripe-width),
    var(--background) var(--stripe-width),
    var(--background) calc(var(--stripe-width) + var(--stripe-gap))
  );
}

/* FADE STRIPES */
body::after {
  content: "";
  background: linear-gradient(0deg, var(--background), #ffffff00);
  height: calc(100% - 64px);
  inset: 0;
  left: 0;
  pointer-events: none;
  position: fixed;
  top: 64px;
  width: 100%;
  z-index: -8;
}

/***************************************************************************************************
 * HEADERS
 */

h2 {
  align-items: center;
  background: var(--onBackground);
  border: none;
  box-shadow: var(--secondary) 16px 16px 0 4px;
  color: var(--background);
  display: flex;
  font-size: 1.5em;
  font-weight: 800;
  height: 64px;
  justify-content: center;
  margin: 64px auto;
  padding: 0;
  scroll-margin-top: 80px;
  width: 384px;
}

/***************************************************************************************************
 * BUTTONS
 */

.button-default {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  display: inline-block;
  font-size: 1.25em;
  font-weight: 700;
  margin: 16px 0 0;
  padding: 16px 32px;
  position: relative;
  text-decoration: none;
  transition: color 0.25s ease-in-out;

  &::before {
    background: var(--primary);
    bottom: 0;
    content: '';
    height: 100%;
    left: 0;
    position: absolute;
    transition: width 0.25s ease-in-out;
    width: 8px;
    z-index: -1;
  }

  &:hover {
    color: var(--background);
    &::before { width: 100%; }
  }
}

/***************************************************************************************************
 * SECTION BANNER
 */

.section-banner {
  align-items: center;
  display: flex;
  height: 100vh;
  justify-content: center;
  position: relative;
  width: 100%;
  z-index: 6;
  background: var(--background);
}

.section-banner--canvas {
  display: block;
  height: 100%;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -2;
}

.section-banner--content {
  color: #ffffff;
  text-align: center;
}

.section-banner--content h1 {
  font-size: 3.5em;
  font-weight: 200;
  margin: 0;
  padding: 0;

  strong {
    color: var(--primary);
  }
}

.section-banner--content p {
  font-size: 2.5em;
  font-weight: 200;
  margin: 8px 0 32px 0;
  padding: 0;
}

.section-banner--content a {
  background: none;
  border: 2px solid var(--primary);
  border-radius: 24px;
  color: var(--primary);
  cursor: pointer;
  display: inline-block;
  font-size: 1.15em;
  padding: 8px 32px;
  position: relative;
  text-decoration: none;

  &::after {
    animation: border-pulse 1.5s infinite;
    border: 3px solid var(--primary);
    border-radius: 24px;
    content: '';
    height: 100%;
    left: -3px;
    opacity: 0;
    position: absolute;
    top: -3px;
    transform: scale(1);
    width: 100%;
    z-index: -1;
  }

  span {
    clip-path: inset(0 round 24px);
  }

  span::before {
    background: var(--primary);
    bottom: -1px;
    content: '';
    height: 0;
    left: -1px;
    position: absolute;
    transition: height 0.25s ease-in-out;
    width: calc(100% + 2px);
    z-index: -1;
  }

  &:hover span {
    color: #000000;
    &::before { height: calc(100% + 2px); }
  }
}

@keyframes border-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.3, 1.8);
    opacity: 0;
  }
  100% {
    transform: scale(1.5, 2.0);
    opacity: 0;
  }
}

/***************************************************************************************************
 * NAV
 */

nav {
  align-items: center;
  background: var(--surface);
  box-sizing: border-box;
  box-shadow: var(--shadow) 0 6px 2px 4px;
  display: flex;
  height: 64px;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 8;
}

.nav-content--left,
.nav-content--right {
  display: flex;
  gap: 16px;

  img {
    cursor: pointer;
    filter: var(--iconFilter);
    height: 32px;
    width: 32px;
  }
}

nav a {
  color: var(--onSurface);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.15s ease-in-out;

  &.active {
    color: var(--primary);
  }
  &:hover {
    color: var(--secondary);
  }
}

/***************************************************************************************************
 * SECTION ABOUT
 */

.section-about {
  display: flex;
  flex-flow: row wrap;
  gap: 64px;
  justify-content: center;
  margin: 0 auto;
  padding: 32px;
  position: relative;
  overflow: hidden;
  max-width: 1280px;
}

.section-about--left {
  display: flex;
  flex-flow: column;
  align-items: center;
  max-width: 640px;
}

.section-about--image {
  width: 200px;
  height: 200px;

  background: linear-gradient(0deg, var(--secondary), var(--primary)); /* your tint */

  -webkit-mask-image: url("assets/images/about.png");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;

  mask-image: url("assets/images/about.png");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.section-about img {
  width: 256px;
}

.section-about p {
  background: var(--background);
  /*border: 2px solid #ffffff09;*/
  border: 2px solid rgb(from var(--onBackground) r g b / 05%);
  border-radius: 32px;
  color: var(--onBackground);
  font-size: 1.25em;
  letter-spacing: 1px;
  line-height: 1.5em;
  margin: 16px 0;
  padding: 32px;
  max-width: 640px;
}

.section-about button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 1.5em;
  font-weight: 700;
  margin: 16px 0 0;
  padding: 16px 32px;
  position: relative;
  transition: color 0.25s ease-in-out;

  &::before {
    background: var(--primary);
    bottom: 0;
    content: '';
    height: 100%;
    left: 0;
    position: absolute;
    transition: width 0.25s ease-in-out;
    width: 8px;
    z-index: -1;
  }

  &:hover {
    color: var(--background);
    &::before { width: 100%; }
  }
}

.section-about--right {
  display: flex;
  flex-flow: row;
  gap: 1rem; /* spacing between items */
  grid-template-columns: repeat(3, 1fr); /* 3 columns */

}
.section-about--right-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}
.section-about--skill {
  align-items: center;
  border: 4px solid transparent;
  border-image: linear-gradient(45deg, var(--primary), var(--secondary)) 1;
  border-image-slice: 1;
  color: var(--onBackground);
  display: flex;
  flex-flow: column;
  gap: 16px;
  justify-content: center;
  height: 200px;
  width: 160px;

  img {
    width: 120px;
  }

  span {
    font-size: 1.75em;
    font-weight: 500;
  }

  &.filter img {
    filter: var(--iconFilter);
  }
}

/***************************************************************************************************
 * SECTION PROJECTS
 */

.section-projects {
  display: flex;
  flex-flow: column;
  gap: 96px;
  margin: 32px auto;
  padding: 32px 0;
  max-width: 1280px;
}

.section-projects--item {
  align-items: center;
  border: 8px solid var(--secondary);
  border-radius: 32px;
  display: flex;
  flex-flow: row;
  gap: 72px;
  justify-content: center;
  padding: 16px;
  position: relative;
  min-height: 600px;
}

.section-projects--item img {
  border-radius: 12px;
  height: 384px;
  position: relative;
  transform: scale(1.3);
}

.section-projects--item section {
  color: var(--onBackground);
  flex: 1 1 auto;
  padding: 16px;
}

.section-projects--item h3 {
  font-size: 2.5em;
  font-weight: 200;
  margin: 8px 0;
}
.section-projects--item p {
  font-size: 1.25em;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.5em;
  margin: 16px 0;
}
.section-projects--item button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 1.5em;
  font-weight: 700;
  margin: 16px 0 0;
  padding: 16px 32px;
  position: relative;
  transition: color 0.25s ease-in-out;

  &::before {
    background: var(--primary);
    bottom: 0;
    content: '';
    height: 100%;
    left: 0;
    position: absolute;
    transition: width 0.25s ease-in-out;
    width: 8px;
    z-index: -1;
  }

  &:hover {
    color: var(--background);
    &::before { width: 100%; }
  }
}

@media screen and (max-width: 1024px) {
  .section-projects--item {
    flex-flow: column;

    img {
      order: 0;
    }
    section {
      order: 1;
    }
  }
}

/***************************************************************************************************
 * SECTION CONTACT
 */

.section-contact {
  align-items: center;
  color: var(--onBackground);
  display: flex;
  flex-flow: column;
  font-size: 1.25em;
  gap: 16px;
  letter-spacing: 1px;
  line-height: 1.5em;
  height: 512px;
  margin: -64px auto 0;
  position: relative;
  padding: 32px;
  max-width: 512px;
  z-index: 5;
}

.section-contact--input {
  background: var(--onBackground);
  box-shadow: var(--secondary) 16px 16px 0 4px;
  color: var(--background);
  height: 64px;
  position: relative;
  width: 512px;

  &.textarea {
    height: 256px;
  }

  label {
    box-sizing: border-box;
    height: 100%;
    left: 0;
    padding: 16px;
    pointer-events: none;
    position: absolute;
    top: 0;
    transition: all 0.25s ease;
    width: 100%;
    z-index: 1;
  }

  input,
  textarea {
    background: none;
    border: none;
    box-sizing: border-box;
    color: var(--background);
    font-size: 1.15em;
    height: 100%;
    left: 0;
    outline: none;
    margin: 0;
    padding: 32px 16px 16px;
    position: absolute;
    resize: none;
    top: 0;
    width: 100%;
  }
  input:focus + label,
  input:not(:placeholder-shown) + label,
  textarea:focus + label,
  textarea:not(:placeholder-shown) + label {
    font-size: 0.75em;
    transform: translate(0, -16px);
  }
}

.section-contact button {
  align-self: flex-end;
}

/* SOCIAL */

.section-social {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 16px;

  img {
    filter: var(--iconFilter);
    height: 54px;
    transition: transform 0.5s cubic-bezier(.34, 1.56, .64, 1);
    width: 54px;
  }

  a:hover img {
    transform: scale(1.2);
  }
}

/***************************************************************************************************
 * SECTION FOOTER
 */

.section-footer {
  background: var(--primary);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-sizing: border-box;
  font-size: 1.25em;
  font-weight: 700;
  margin: 0 auto;
  padding: 16px;
  text-align: center;
  text-transform: uppercase;
  max-width: 768px;
  z-index: 0;
}

/***************************************************************************************************
 * UI
 */

.ui-top {
  background: var(--primary);
  border: none;
  bottom: 16px;
  cursor: pointer;
  display: block;
  height: 64px;
  opacity: 0;
  overflow: hidden;
  position: fixed;
  right: 16px;
  transform: translateY(200%);
  transition: all 0.5s cubic-bezier(.34, 1.56, .64, 1);
  width: 64px;
  z-index: 9;

  img {
    height: 32px;
    position: absolute;
    left: 16px;
    top: 16px;
    transition: all 0.35s cubic-bezier(.34, 1.56, .64, 1);
    width: 32px;
  }

  img:first-child {
    opacity: 1.0;
    transform: translate(0, 0);
  }

  img:last-child {
    filter: invert(1);
    opacity: 0.0;
    transform: translate(0, 100%);
  }

  &:hover {
    background: var(--secondary);
    img:first-child {
      opacity: 0.0;
      transform: translate(0, -100%);
    }
    img:last-child {
      opacity: 1.0;
      transform: translate(0, 0);
    }
  }

  &.is-visible {
    transform: translateY(0);
    opacity: 1.0;
  }
}

