:root {
  --light-grey: #f6f2f0;
  --dark-grey: #424242;
  --max-width: 1400px;

  --gradient-dark: linear-gradient(135deg, rgb(171, 14, 243) 0%, rgb(223, 43, 178) 50%, rgb(0, 110, 255) 100%);
  --gradient-light: linear-gradient(135deg, rgb(250, 240, 96) 0%, rgb(115, 238, 121) 50%, rgb(117, 248, 248) 100%);

  --font-family: "Jetbrains mono", system-ui;
}

* {
  box-sizing: border-box;
}

html {
  background-color: #d8e0ea;
  color: #000000;
}
html[data-theme~="dark"] {
  background-color: #000000;
  color: #ffffff;
}

body {
  line-height: 1.5;
  font-family: var(--font-family);
  font-size: 18px;
}

a {
  color: inherit;
}

button,
button[type="submit"],
input[type="submit"] {
  font-size: 1rem;
  line-height: 1;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 {
  font-weight: 600;
  font-size: 3rem;
  max-width: 19ch;
  margin: 1rem 0 0;
  line-height: 1.15;
}

h2 {
  font-weight: 400;
  font-size: 2rem;
  max-width: 30ch;
  margin: 0.75rem 0;
}

h3 {
  font-weight: 700;
  font-size: 1.33rem;
  max-width: 60ch;
  margin: 0.75rem 0 0.25rem;
}

h4 {
  font-weight: 400;
  font-size: 1rem;
  max-width: 40ch;
  margin: 0.75rem 0 0.25rem;
}

/* Buttons */
.button {
  display: inline-block;
  width: auto;
  line-height: 1;
  padding: 0.75rem 1rem;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background-color: #000000;
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
}

/* Header & Nav */
body > header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
}

header div.navbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 4rem;
  position: relative;
  overflow-x: hidden;
  background-color: #ffffff;
  width: 100%;
}

@supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
  header div.navbar {
    background-color: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }
  html[data-theme~="dark"] header div.navbar {
    background-color: rgba(37, 37, 37, 0.75);
  }
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.025em;
}

button.menu-toggle-theme {
  padding: 0.37rem 0.5rem;
}

button.menu-toggle-theme > svg {
  display: block;
  width: auto;
  height: 29px;
  stroke: currentColor;
}

html[data-theme~="dark"] .menu-toggle .button {
  background-color: var(--dark-grey);
}

/* margin and footer */
body > main {
  padding: 6rem 4rem 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

body > footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body > footer > div {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 4rem;
}

body > footer p {
  max-width: 60ch;
  margin: 1rem 0;
}

section {
  padding: 3rem 0;
}

/* article */
body.home article {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 1rem;
}

body.home article > div {
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: var(--light-grey);
}

html[data-theme~="dark"] body.home article > div {
  background-color: var(--dark-grey);
  color: #ffffff;
}

body.home article > div.about {
  grid-column: 3 / 6;
}

body.home article > div.how {
  grid-column: 1 / 3;
}

body.home article > div.comp {
  grid-column: 1 / 4;
}

body.home article > div.grades {
  grid-column: 4 / 6;
}

/* Hero */
section.hero {
  width: 100%;
  padding: 2rem;
  border-radius: 1.33rem;
  color: #000000;
  background: var(--gradient-light);
}

html[data-theme~="dark"] section.hero {
  background: var(--gradient-dark);
}

body.home section.hero .buttons {
  margin-top: 4rem;
  margin-bottom: 1.5rem;
}

/* Tiles */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

a.tile {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
  padding: 2rem;
  background-color: var(--light-grey);
  border-radius: 0.75rem;
  color: #000000;
  position: relative;
  text-decoration: none;
  border: 3px solid transparent;
  transition: border-color 0.2s ease;
}

a.tile:hover {
  border-color: #a009e6;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

html[data-theme~="dark"] a.tile:hover {
  border-color: #43ee68;
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.08);
}

html[data-theme~="dark"] a.tile {
  background-color: var(--dark-grey);
  color: #ffffff;
}
