@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-family: "Open Sans", Arial, monospace;
}

/* color modes */
:root {
  --fg: rgb(16, 17, 19);
  --bg: #ffffff;
  --link-color: #444;
  --hovered-link-color: #000;
  --shadow-color: rgba(0, 0, 0, 0.15);

  --hero-bg: #f4f6ff;
  --hero-fg: #2a3335;
  --hero-accent: hsla(11, 100%, 61%, 1);
}

body.dark-mode {
  --link-color: #aaa;
  --hovered-link-color: #fff;
  --shadow-color: rgba(255, 255, 255, 0.15);
  --fg: #efece3;
  --bg: rgb(16, 17, 19);

  --hero-fg: #f4f6ff;
  --hero-bg: #2a3335;
  --hero-accent: hsla(11, 100%, 61%, 1);

  transition: color 0 ease, background-color 0 ease; /*Set to .4s in js*/
}

/* body styles */
body {
  background-color: var(--bg);
  color: var(--fg);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 400;
  transition: color var(--color-transition-speed) ease,
    background-color var(--color-transition-speed) ease;
}

/* container styles */
.container {
  /* border: 5px solid var(--fg); */

  height: fit-content;
  width: 70%;
  margin: 10px auto;
  padding: 10px 20px;
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* link styles */
a {
  display: inline-block;
  text-decoration: none;
  color: var(--link-color);
  transition: all 0.2s ease;
}
a:hover {
  transform: scale(1.025);
  transform-origin: bottom center;
  color: var(--hovered-link-color);
  text-shadow: 0px 1px 2px var(--shadow-color);
  text-decoration: underline;
}

.line {
  background-color: var(--fg);
  width: 100%;
  height: 5px;
  margin: 10px auto;
  border-radius: 10px;
}

/* Paragraph styles*/
p {
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(20px, 1.3em, 2.2em);
  margin-bottom: 5px;
}

main ul li {
  margin-bottom: 10px;
  margin-left: 20px;
}

/* nav styles */
nav {
  font-size: clamp(16px, 1.2em, 2em);
  display: block;
  gap: 10px;
  margin: 0 auto;
  width: fit-content;
}

nav > ul {
  list-style-type: none;
  display: flex;
  gap: clamp(10px, 3vmin, 40px);
}

/* title container styles */

header {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

header > .title-container {
  position: relative;
}
#header-title {
  font-size: clamp(20px, 3em, 3em);
  margin: 0 auto;
  width: fit-content;
}

/* color mode elements styles */
#theme-button {
  background-color: transparent;
  box-shadow: none;
  border: none;
  pointer-events: none;
  height: fit-content;
  position: absolute;
  right: 0px;
  top: 0px;
}

#theme-button:hover {
  cursor: pointer;
}

#switch-theme-icon {
  width: clamp(50px, 3vw, 60px);
  filter: grayscale(100%);
  pointer-events: auto;
  user-select: none;
}

.hero {
  width: 100%;
  margin: 0 auto;
  /* border: 5px solid var(--hero-fg); */
  border: 5px solid transparent;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  gap: 40px;
  background-color: var(--hero-bg);
  color: var(--hero-fg);
  transition: border 0.2s ease;
}

.hero:hover {
  border: 5px solid var(--hero-accent);
}
.hero a:hover {
  color: var(--hero-accent);
}

.hero p {
  font-weight: 500;
  margin: 0;
  /* margin-top: 10px; */
}

.hero h2 {
  font-size: clamp(16px, 1.2em, 2em);
}

@media (max-width: 700px) {
  .container {
    width: 100%;
    border: none;
  }

  #header-title {
    font-size: clamp(40px, 7.5vw, 60px);
    margin: 0;
  }

  nav {
    margin: 0;
    font-size: clamp(16px, 3.5vw, 25px);
  }

  #switch-theme-icon {
    width: 40px;
  }

  .hero {
    margin: 0;
    width: 100%;
    border: none;
    gap: 10px;
    flex-direction: column;
  }
  .hero p {
    font-size: clamp(16px, 1.4vw, 22px);
  }
}
