:root {
  --main-bg-clr: hsl(60, 100%, 87%);
  --primary-bg-clr: hsl(312, 98%, 79%);
  --secondary-bg-clr: hsl(173, 65%, 38%);
  --form-bg-clr: hsl(173, 65%, 38%);
  --footer-bg-clr: hsl(312, 98%, 79%);

  --dark-purple-clr: #472982;
  --neon-green-clr: #c0ff12;
  --neon-green-dim-clr: #b1eb11;

  --primary-btn-clr: var(--neon-green-clr);
  --primary-btn-dim-clr: var(--neon-green-dim-clr);
  --secondary-btn-clr: hsl(52, 100%, 50%);
  --secondary-btn-dim-clr: hsl(52, 100%, 72%);

  --primary-txt-clr: hsl(0, 0%, 0%);
  --secondary-txt-clr: hsl(60, 100%, 87%);

  --badge-clr: hsl(52, 100%, 50%);
  --link-hover-clr: hsl(52, 100%, 50%);

  --ff-primary: "Work Sans", serif;
  --ff-secondary: "Lexend Mega", serif;

  --ff-heading: var(--ff-primary);
  --ff-body: var(--ff-secondary);

  --fw-bold: 700;
  --fw-regular: 400;
  --fw-light: 300;

  /*48 40 36 32 28 24 20 16 14*/
  --fs-900: 4.5rem;
  --fs-850: 3rem;
  --fs-800: 2.5rem;
  --fs-700: 2.25rem;
  --fs-600: 2rem;
  --fs-500: 1.75rem;
  --fs-400: 1.5rem;
  --fs-350: 1.25rem;
  --fs-300: 1rem;
  --fs-200: 0.875rem;

  --fs-title: var(--fs-900);
  --fs-primary-heading: var(--fs-800);
  --fs-secondary-heading: var(--fs-700);
  --fs-badge: var(--fs-400);
  --fs-body: var(--fs-300);
  --fs-form-label: var(--fs-600);
  --fs-btn: var(--fs-400);
  --fs-nav: var(--fs-350);

  /* Spacing Variables */
  --size-900: 5rem;
  --size-800: 4rem;
  --size-700: 3rem;
  --size-600: 2rem;
  --size-500: 1.5rem;
  --size-400: 1rem;
  --size-300: 0.75rem;
  --size-200: 0.5rem;
  --size-100: 0.25rem;
}

@media (max-width: 50em) {
  :root {
    --fs-title: var(--fs-850);
    --fs-btn: var(--fs-350);
  }
}

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

/* Remove default margin */
* {
  margin: 0;
  padding: 0;
  font: inherit;
}

/* 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 */
html,
body {
  height: 100%;
}
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,
svg {
  max-width: 100%;
  display: block;
}

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

/*=================================Reset===================================================*/

/*utility classes*/

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Font Families */
.ff-primary {
  font-family: var(--ff-primary);
}

.ff-secondary {
  font-family: var(--ff-secondary);
}

.ff-heading {
  font-family: var(--ff-primary);
}

.ff-body {
  font-family: var(--ff-secondary);
}

/* Font Weights */
.fw-bold {
  font-weight: var(--fw-bold);
}

.fw-regular {
  font-weight: var(--fw-regular);
}

.fw-light {
  font-weight: var(--fw-light);
}

/* Font Sizes */
/*TODO: named classes will change with media queries*/
.fs-title {
  font-size: var(--fs-title);
  line-height: 1.1;
}

.fs-primary-heading {
  font-size: var(--fs-primary-heading);
  text-align: center;
  margin-bottom: var(--size-700);
}

.fs-secondary-heading {
  font-size: var(--fs-secondary-heading);
  margin-bottom: var(--size-500);
}

.fs-900 {
  font-size: var(--fs-900);
}

.fs-600 {
  font-size: var(--fs-600);
}

.fs-400 {
  font-size: var(--fs-400);
}

.fs-350 {
  font-size: var(--fs-350);
}

.fs-300 {
  font-size: var(--fs-300);
}

.padding-block-700 {
  padding-block: var(--size-700);
}

.padding-block-900 {
  padding-block: var(--size-900);
}

.container {
  --max-width: 1320px;
  --horizontal-padding: 1rem;

  /*background-color: aqua; testing purposes will remove later*/
  width: min(var(--max-width), calc(100% - (var(--horizontal-padding) * 2)));
  margin-inline: auto;
}

.flow > * + * {
  margin-top: var(--flow-spacer, 1rem);
}

/* div{
    --flow-spacer: 3em;
} */

.even-columns {
  display: grid;
  gap: 3rem;
}

@media (min-width: 50em) {
  .even-columns {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }
  #home-section {
    height: 100vh;
  }
}

/* general styling*/
body {
  font-size: var(--fs-300);
  font-family: var(--ff-primary);
  color: var(--primary-txt-clr);
  background-color: var(--main-bg-clr);
}

section:not(#home-section) {
  text-align: center;
}

h3,
form,
p {
  text-align: initial;
}

a:link {
  color: inherit; 
}

a:visited {
  color: inherit; 
}
/* button*/

.button {
  cursor: pointer;
  text-decoration: none;
  box-shadow: 4px 4px 0px 0px black;
  border-radius: 100vmax;
  border: 1px solid black;
  padding: 0.5em;
  font-weight: var(--fw-bold);
  font-size: var(--fs-btn);
  color: var(--primary-txt-clr);
  line-height: 1;
  /* font-size: 24px; */
  transition: all 0.3s ease;
}

.button[data-theme="primary-btn"] {
  background-color: var(--primary-btn-clr);
  /* transform: rotate(-10deg); */
}

.button[data-theme="primary-btn"]:hover,
.button[data-theme="primary-btn"]:focus-visible {
  background-color: var(--primary-btn-dim-clr);
}

.button:active {
  transform: scale(0.95);
  box-shadow: none;
}

/* navigation */

.primary-header {
  padding-top: var(--size-100);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-list {
  font-size: var(--fs-nav);
  color: var(--primary-txt-clr);
  font-weight: var(--fw-bold);
  display: flex;
  gap: clamp(var(--size-400), 5vw, var(--size-700));
}

.nav-list a {
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus {
  background-color: var(--primary-btn-clr);
  border-radius: 100vmax;
  padding: var(--size-100) var(--size-300);
  color: var(--primary-txt-clr);
  border: 1px solid black;
  box-shadow: 4px 4px 0px 0px black;
}

a:visited,
a:active {
  color: var(--primary-txt-clr);
}

#home-img {
  justify-self: flex-end;
  align-self: center;
}

#home-text {
  align-self: center;
}

@media (max-width: 50em) {
  .primary-nav {
    display: none;

    position: absolute;
    padding: var(--size-400);
    inset: var(--size-900) var(--size-400) auto;
    background-color: var(--primary-btn-clr);
    border: 2px solid black;
    border-radius: 10px;
    /* max-width: 30rem;
    margin-left: auto; */
  }

  .nav-list {
    padding: var(--size-300) 0;
    display: grid;
    gap: var(--size-400);
    text-align: center;
  }

  /* .nav-list li:not(:last-child) {
    border-bottom: 2px solid black; 
    padding-bottom: 0.5rem; 
} */

  .nav-list a:hover,
  .nav-list a:focus {
    background-color: var(--link-hover-clr);
  }

  .primary-nav[data-visible] {
    display: block;
  }

  .mobile-nav-toggle {
    display: block;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.25em;
  }

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

  #home-img {
    margin-top: var(--size-300);
    justify-self: center;
  }
}

#home-section {
  background-image: url("assets/Blue_Grid_Pattern_Background.png");
  border-bottom: 2px SOLID BLACK;
}

/* about me section */

#about-section {
  background-color: var(--primary-bg-clr);
  border: 6px solid black;
  box-shadow: 10px 10px 0px black;
}

h2 {
  position: relative;
  text-align: center;
  display: inline-block;
  margin: 0 auto;
  z-index: 1;
}

h2::before:not(.form-header) {
  content: "";
  position: absolute;
  left: -5px;
  top: 45%;
  width: 105%;
  height: 45%;
  background: yellow;
  z-index: -1; /* Places highlight behind text */
  transform: rotate(-2deg);
  opacity: 0.8; /* Slight transparency for a marker effect */
  border-radius: 10px;
}

#about-section p {
  /* max-width: clamp(60ch, 60vw, 40ch); */
  font-size: var(--fs-400);
  text-align: justify;
}

.skills-list ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.skills-list li {
  margin: var(--size-200);
}

.skill-badge {
  display: inline-block;
  text-decoration: none;
  border: 1px solid black;
  border-radius: 100vmax;
  box-shadow: 4px 4px 0px 0px black;
  font-size: var(--fs-350);
  font-family: var(--ff-secondary);
  font-weight: var(--fw-light);
  color: var(--primary-txt-clr);
  text-transform: uppercase;
  line-height: 1;
  background-color: var(--link-hover-clr);
  padding: var(--size-300);
}

/* projects section */

#projects-section {
  background-color: #90ee90;
  border-bottom: 2px SOLID BLACK;
}

#projects-section img {
  border-radius: 10px;
  box-shadow: 6px 6px 0px 0px black;
}

#projects-section p {
  text-align: initial;
}

/* .projects-container{
  background-color: #C0FF12;
  border-radius: 10px;
  border: 2px solid black;
} */

.proj-description {
  font-size: var(--fs-400);
}

.mg-btm {
  margin-bottom: 5rem;
}

@media (max-width: 75em) {
  #about-section p {
    /* max-width: clamp(60ch, 60vw, 40ch); */
    font-size: var(--fs-300);
    text-align: start;
  }

  .skill-badge {
    font-size: var(--fs-300);
    padding: var(--size-300);
  }

  .proj-description {
    font-size: var(--fs-300);
  }
}

/* form */

#contact-section {
  background-color: var(--dark-purple-clr);
  border-bottom: 2px solid black;
}

#contact-section h2 {
  color: white;
}

.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.form-container {
  --max-width: 600px;
  --horizontal-padding: 1rem;

  width: min(var(--max-width), calc(100% - (var(--horizontal-padding) * 2)));
  margin-inline: auto;
  background-color: var(--form-bg-clr);
  padding: 2rem;
  border-radius: 10px;
  border: 2px solid black;
  box-shadow: 8px 8px 0px black;
  font-size: var(--fs-400);
}

.button-container {
  display: flex;
  justify-content: flex-end;
}

.button[type="submit"] {
  margin-top: 1rem;
  padding-block: 0.7rem;
  background-color: var(--secondary-btn-clr);
}

label {
  font-weight: bold;
  display: block;
  margin-top: 15px;
  font-family: var(--ff-secondary);
}

input,
textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 2px solid black;
  border-radius: 100vmax;
  background-color: var(--main-bg-clr);
  box-shadow: 4px 4px 0px black;
  font-family: var(--ff-secondary);
}

textarea {
  border-radius: 40px;
  height: 150px;
}

@media (max-width: 50em) {
  textarea {
    border-radius: 40px;
    height: 100px;
  }
}

/* footer */

footer {
  background-image: url("assets/cartographer.png");
  background-color: var(--footer-bg-clr);
  text-align: center;
  display: flex;
  flex-direction: column; /* Stack the text and social links vertically */
  align-items: center; /* Center items horizontally */
  justify-content: center; /* Vertically center content if there's extra space */
  /* padding: 2rem 0; Add padding to create space around content */
}

footer p {
  color: var(--main-bg-clr);
  margin: 1rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--size-600);
  border: 2px solid black;
  box-shadow: 4px 4px 0px black;
  background-color: var(--main-bg-clr);
  width: fit-content;
  height: auto;
  padding-inline: 1rem;
  padding-block: 0.5rem;
}

.social-links a {
  display: inline-block;
  width: 65px;
  /* height: 40px; */
}

.social-links img {
  width: 100%;
  height: 100%;
  transition: transform 0.2s ease-in-out;
}

.social-links a:hover img {
  transform: scale(1.2);
}
