/* 
SPACING SYSTEM (px)
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128

FONT SIZE SYSTEM (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98

HEADING DEFAULTS (px)
h1 - 32
h2 - 24
h3 - 18.72
h4 - 16
h5 - 13.28
h6 - 10.72

*/

/* ------------------------ */
/* VARIABLES                */
/* ------------------------ */
:root {
  /*  01  TYPOGRAPHY SYSTEM */
  --fs-10: 0.625rem;
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-30: 1.875rem;
  --fs-36: 2.25rem;
  --fs-44: 2.75rem;
  --fs-52: 3.25rem;
  --fs-62: 3.875rem;
  --fs-74: 4.625rem;
  --fs-86: 5.375rem;
  --fs-98: 6.125rem;

  /* Typography */
  --normal-font-size: 1rem;
  --small-font-size: 0.78rem;

  /* Font Weights:  */
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;

  /* Line Heights: */
  --lh-1: 1;
  --lh-1_1: 1.1;
  --lh-1_05: 1.05;
  --lh-1_2: 1.2;
  --lh-1_6: 1.6;
  --lh-1_8: 1.8;

  /*  02  COLORS */
  /* Primary: */
  --main-color: #00aaff;
  --main-gradient-dark: #2b77ff;
  --main-gradient-light: #09b9ff;
  --main-gradient-hover: #29c2ff;

  /* BORDER RADIUS */
  --border-radius: 8px;

  /* Tints and Shades: (Backgrounds)*/
  --white-background: #fff;
  --white-background-lighter: #fff;
  --dark-background: #0d1013;

  /* Greys: */
  --white-text: #fff;
  --black-text: #131313;
  --gray-text: #a1a0a0;
  --selection-color-darker: hsla(204, 100%, 21%, 0.2);

  /* Scroll bar */
  --lighter-color-scollbar: #a9a9a9;
  --darker-color-scrollbar: #717171;
  --background-scrollbar: #fff;

  /* Button color */
  --btn-color: hsl(200, 100%, 50%);
  --btn-color-darkest: hsla(200, 100%, 50%, 0.75);
  --btn-white-text: #fff;

  /*  03  SHADOWS */
  /*  04  BORDER RADIUS */
  --border-radius-3px: 3px;

  /* 05 Font-family */
  --play2start-font-family: 'Press Start 2P', sans-serif;
  --inter-font-family: 'Inter', sans-serif;

  /*  06  WHITE SPACE */
  --spacing-2px: 0.125rem;
  --spacing-4px: 0.25rem;
  --spacing-8px: 0.5rem;
  --spacing-8-5px: 0.53125rem;
  --spacing-10px: 0.625rem;
  --spacing-12px: 0.75rem;
  --spacing-16px: 1rem;
  --spacing-24px: 1.5rem;
  --spacing-32px: 2rem;
  --spacing-48px: 3rem;
  --spacing-64px: 4rem;
  --spacing-80px: 5rem;
  --spacing-96px: 6rem;
  --spacing-128px: 8rem;
  --spacing-144px: 9rem;

  /* 07 Letter and word spacing */
  --word-spacing: -1.28125rem;
  --letter-spacing-negative-1px: -0.0625rem;
  --letter-spacing-1px: 0.0625rem;
}

/* css variables: 
https://www.w3schools.com/css/css3_variables.asp */

/* ------------------------ */
/* SCROLLBAR STYLES         */
/* ------------------------ */

::-webkit-scrollbar {
  width: 15.5px;
  transition: all 0.2s;
}

::-webkit-scrollbar-thumb {
  border: 4px solid rgba(0, 0, 0, 0); /* illusion of margin: added a border with 0 opacity */
  background-clip: padding-box;
  border-radius: 9999px;
  background-color: var(--lighter-color-scollbar);
}

::-webkit-scrollbar-thumb:active {
  background-color: var(--darker-color-scrollbar);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--darker-color-scrollbar);
}

/* scrollbar: https://stackoverflow.com/questions/21684101/css-vertical-scrollbar-padding-left-right-in-ul-possible */

/* ------------------------ */
/* CUSTOM TEXT SELECTION    */
/* ------------------------ */
::selection {
  background-color: var(--selection-color-darker) !important;
  color: var(--black-text) !important;
}

/* custom text selection: 
https://www.w3schools.com/howto/howto_css_text_selection.asp */

/* ------------------------ */
/* HELPER CLASSES */
/* ------------------------ */

/* LAYOUT */
.container {
  /* width: 960px; */
  max-width: 60rem;
  margin: 0 auto;
}

.margin-right-sm {
  margin-right: var(--spacing-4px) !important;
}

.section-end-margin-lg {
  margin-bottom: var(--spacing-144px) !important;
}

.section-end-margin-md {
  margin-bottom: var(--spacing-24px) !important;
}

.subheading {
  margin-bottom: var(--spacing-12px);
}

.heading-margin-btm-md {
  margin-bottom: var(--spacing-16px);
}
.heading-margin-btm-lg {
  margin-bottom: var(--spacing-24px);
}

.grid-2-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--spacing-80px);
}

.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-10px);
}

.grid-6-cols {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--spacing-10px);
}

.hide {
  opacity: 0;
}

/* ------------------------ */
/* GENERAL STYLES */
/* ------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* zoom out to 85% (doesnt work on firefox) */
  zoom: 0.85;
  scroll-behavior: smooth;
}

body {
  color: var(--black-text);
  line-height: var(--lh-1_6);
  font-size: var(--fs-18);
  /* padding-top: var(--spacing-80px); */
}

body,
button {
  font-family: var(--inter-font-family);
}

h1,
h2,
.logo-name {
  font-family: var(--play2start-font-family);
  text-decoration: none !important;
}

h1,
h2,
p {
  margin-bottom: var(--spacing-24px);
}

header {
  margin-bottom: var(--spacing-96px);
  margin-top: var(--spacing-80px);
}

h1 {
  font-size: var(--fs-30);
  line-height: 1.1;
  letter-spacing: -2px;
}

h2 {
  font-size: var(--fs-24);
  letter-spacing: -0.5px;
}

h3 {
  font-size: var(--fs-20);
  letter-spacing: -0.5px;
  margin-bottom: var(--spacing-16px);
}

img {
  width: 100%;
  border-radius: var(--border-radius);
  /* height: 100%; */
  place-self: center;
  object-fit: contain;
}

.grayscale {
  width: 440px;
  height: 440px;
  object-fit: cover;
  object-position: top; /* Ensures the upper part of the image is visible */
}

/* lvha */
a:link,
a:visited {
  color: var(--black-text);
  text-decoration: none;
}

a:hover,
a:active {
  text-decoration: underline;
}

.special-link:hover,
.special-link:active {
  text-decoration: underline;
}

.special-link:link,
.special-link:visited {
  color: var(--main-color);
  text-decoration: none;
  /* font-weight: bold; */
}

.special-link:hover,
.special-link:active {
  text-decoration: underline;
}

/* ------------------------ */
/* COMPONENT STYLES */
/* ------------------------ */
/* BUTONS*/
.btn {
  text-decoration: none !important;
  text-transform: uppercase;
  font-weight: var(--fw-500);
  display: inline-block;
  border-radius: var(--border-radius) !important;
  font-family: var(--rubik-font-family) !important;
}

/* https://markodenic.com/tools/buttons-generator/ */
.btn-gradient {
  color: white !important;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  outline: none;
  border: none;
  background-size: 120% auto;
  border-radius: var(--border-radius) !important;
  background-image: linear-gradient(
    315deg,
    var(--main-gradient-dark) 0%,
    var(--main-gradient-hover) 90%
  );
}

.btn-gradient:hover {
  background-position: right center;
}
.btn-gradient:active {
  top: 2px;
}

.btn-outline {
  background-color: var(--white-background-lighter);
  color: var(--black-text);
  padding-bottom: 20px;
}

.btn-outline:hover,
.btn-outline:active {
  box-shadow: inset 0 0 0 3.25px var(--gray-text);
}

.btn--big {
  padding: 14px 32px;
  font-size: 18px;
}

.btn--small {
  padding: 8px 16px;
  font-size: 14px;
}

/* ------------------------ */
/* CLASSES */
/* ------------------------ */
/* NAVBAR */
header .navbar-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--spacing-80px);
  padding-top: var(--spacing-12px);
  padding-bottom: 0;
  background-color: rgba(255, 255, 255, 0.97);
  z-index: 99999;
  /* centering a position fixed div */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 960px;
  margin: 0 auto;
}

header .navlinks ul {
  display: flex;
  gap: var(--spacing-24px);
  list-style: none;
}

header .logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-4px);
}

header .logo-name {
  font-size: var(--fs-18);
}

/* CURSOR ANIMATION */
header .logo-cursor {
  display: inline-block;
  width: 10px;
  height: 1.25em;
  background: var(--main-color);
  margin-left: 5px;
  border-radius: 1px;
  animation: cursor 1.2s infinite;
}

@keyframes cursor {
  50% {
    background-color: transparent;
  }
}

/* HERO */

main .hero-text-container {
  /* vertically center */
  align-self: center;
}

main .hero-text {
  margin-bottom: var(--spacing-24px);
  font-size: var(--fs-18);
}

/* ABOUT */
main .about-section .skills-container img {
  width: var(--spacing-48px);
  height: var(--spacing-48px);
  margin-right: var(--spacing-8px);
  /* border: 1px solid red; */
}

main .about-section .card {
  display: flex;
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  padding-top: var(--spacing-16px);
  padding-bottom: 0;
  /* border: 1px solid red; */
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius);
}

main .skills p {
  align-self: center;
  font-weight: 400;
  /* border: 1px solid red; */
}

/* PORTFOLIO */
main .project {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  border-radius: var(--border-radius);
}

main .project img {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

main .project-box {
  padding: var(--spacing-24px);
  /* height: 100%; */
  /* border: 2px solid red; */
}

main .project-details img {
  width: var(--spacing-32px);
  height: var(--spacing-32px);
  color: var(--main-color);
}

main .project-details {
  list-style: none;
  margin-bottom: var(--spacing-24px);
}

main .project-details li {
  display: flex;
  align-items: center;
  gap: var(--spacing-12px);
  margin-bottom: var(--spacing-16px);
}

main .project-details li:last-child {
  margin-bottom: var(--spacing-48px);
}

main .preview {
  height: fit-content;
  height: 225px;
  width: 100%;
  object-fit: cover;
  border-radius: 8px; /* optional */
  background-color: #000;
  /* border: 2px solid red; */
}

main .project-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
}

/* CONTACT ME */
main .contact-info {
  display: flex;
  gap: var(--spacing-24px);
}

.contact-info-container,
.social-links-container {
  align-self: center;
}

/* ------------------------ */
/* CONTACT FORM */
/* ------------------------ */
main form {
  margin: 0;
  box-sizing: border-box;
  width: 100%;
}

main .contact fieldset {
  border: 0;
}

main .form_div {
  position: relative;
  margin-bottom: 1.1rem;
  width: 100%;
  box-sizing: border-box;
}

main .form_label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  background-color: var(--white-text);
  color: var(--black-text);
  font-size: var(--fs-16);
  padding: 0 0.25rem;
  transition: 0.08s;
}

main .contact .form_button {
  padding: 0.65rem 2rem;
  color: var(--white-text);
  border-radius: var(--border-radius);
  cursor: pointer;
  width: 120px;
  margin: 0;
  font-family: var(--rubik-font-family);
  font-size: 1rem;
  font-weight: 500;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  outline: none;
  background-size: 120% auto;
  background-image: linear-gradient(
    315deg,
    var(--main-gradient-dark) 0%,
    var(--main-gradient-hover) 90%
  );
}

main .form_button:hover {
  background-position: right center;
}
main .form_button:active {
  top: 2px;
}

main .form_input {
  position: relative;
  box-sizing: border-box;
  font-size: var(--fs-16);
  color: var(--black-text);
  background: none;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 1rem;
  padding-left: 20.5px;
  border: 1.5px solid var(--black-text);
  border-radius: var(--border-radius);
  outline: none;
  z-index: 1;
  font-weight: bold;
  transition: 0.15s;
}

/* moves the label on the upper left */
.form_input:focus + .form_label {
  top: -6.5px;
  left: 18px;
  color: var(--btn-color);
  font-size: var(--fs-12);
  z-index: 10;
  /* font-weight: bold; */
}

/* Input focus sticky top label */
.form_input:not(:placeholder-shown).form_input:not(:focus) + .form_label {
  top: -6.5px;
  left: 18px;
  font-size: var(--small-font-size);
  color: var(--black-text);
  z-index: 10;
  border-radius: var(--border-radius);
}

/*Input focus*/
.form_input:focus {
  border: 1.5px solid var(--btn-color);
  color: var(--black-text);
  font-weight: 600;
}

textarea {
  position: relative;
  min-height: 170px;
  width: 100%;
  padding: 0.625rem;
  resize: vertical;
  box-sizing: border-box;
  font-size: var(--fs-16);
  outline: none;
  font-family: var(--inter-font-family);
}

.position-right-btn {
  display: flex;
  justify-content: end;
  align-items: center;
  height: 100%;
}

/* changes the background of input box to --dark-background when user clicks an autofill option */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-background-clip: text;
  -webkit-text-fill-color: black !important;
  transition: background-color 5000s ease-in-out 0s;
  box-shadow: inset 0 0 20px 20px white !important;
  caret-color: black !important;
}

/* Contact --> END */

/* FOOTER */
footer {
  margin-bottom: 48px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-text);
  text-align: center;
}

/* LVHA */
footer a:link,
footer a:visited {
  text-decoration: none;
  color: var(--gray-text);
  transition: all 0.2s;
}

footer a:hover,
footer a:active {
  text-decoration: underline;
}

/* /* ------------------------ */
/* BELOW 1042px */
/* --------------------------- */
@media only screen and (max-width: 1042px) {
  body {
    padding: 0 30px;
  }

  .dl-button {
    margin-top: var(--spacing-10px);
  }

  .navbar-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 25px;
  }

  .navlinks {
    background-color: rgba(0, 0, 0, 0.06);
    padding: 2.5px;
    border-radius: 5px;
  }

  a.anchor {
    display: block;
    position: relative;
    top: 1205px;
    visibility: hidden;
  }

  /* fix for the "about" navigation anchoring at the wrong location (during mobile view), 
  source: https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header*/

  .hero-section img {
    order: 1;
    width: 75%;
    height: 100%;
    padding: 30px;
  }

  .hero-text-container {
    text-align: center;
    padding: 0 20px;
  }

  .hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .hero-text-container {
    order: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .portfolio .preview {
    width: 100%;
    object-fit: fill;
  }

  .grid-6-cols {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-3-cols {
    grid-template-columns: repeat(2, 1fr);
    margin: auto 5%;
    margin-top: 20px;
  }

  .project {
    margin-top: 20px;
  }
}

/* /* ------------------------ */
/* BELOW 900px */
/* --------------------------- */

@media only screen and (max-width: 980px) {
  a.anchor {
    top: 1105px;
  }
}

/* /* ------------------------ */
/* BELOW 800px */
/* --------------------------- */

@media only screen and (max-width: 800px) {
  a.anchor {
    top: 1000px;
  }
}

/* /* ------------------------ */
/* BELOW 702px */
/* --------------------------- */

@media only screen and (max-width: 702px) {
  .grid-3-cols {
    grid-template-columns: 1fr;
    /* margin: auto 10%; */
    margin-top: 20px;
  }

  .project-box {
    text-align: center;
  }

  a.anchor {
    top: 895px;
  }

  /* .project-details li {
    display: table;
    margin: 0px auto 0px auto;
  } */

  .grid-6-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  main .contact-info {
    flex-direction: column;
    gap: 0;
  }
}

/* /* ------------------------ */
/* BELOW 600px */
/* --------------------------- */

@media only screen and (max-width: 600px) {
  a.anchor {
    top: 785px;
  }
}

/* /* ------------------------ */
/* BELOW 500px */
/* --------------------------- */

@media only screen and (max-width: 500px) {
  a.anchor {
    top: 775px;
  }
}

/* /* ------------------------ */
/* BELOW 470px */
/* --------------------------- */

@media only screen and (max-width: 470px) {
  .grid-3-cols {
    grid-template-columns: repeat(1, 1fr);
    margin: auto 0;
  }

  a.anchor {
    top: 755px;
  }
}

/* /* ------------------------ */
/* BELOW 400px */
/* --------------------------- */

@media only screen and (max-width: 400px) {
  .hero-section img {
    width: 100%;
    padding-bottom: var(--spacing-32px);
  }

  h1 {
    font-size: var(--fs-24);
  }

  a.anchor {
    top: 765px;
  }
}

/* /* ------------------------ */
/* BELOW 370px */
/* --------------------------- */

@media only screen and (max-width: 370px) {
  .grid-6-cols {
    grid-template-columns: 1fr;
  }
}

/* /* ------------------------ */
/* BELOW 330px */
/* --------------------------- */

@media only screen and (max-width: 330px) {
  .contact-info {
    font-size: var(--fs-16);
  }
}
