:root {
  --main-text-color-light: #222222;
  --main-text-color-dark: #efefef;
  --gutter: 8px;
  --min-width: 320px;
  --max-width: 1500px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --main-bg-color: ;
    --main-text-color: var(--main-text-color-dark);
    --accent-color: #688648;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --main-bg-color: ;
    --main-text-color: var(--main-text-color-light);
    /* --accent-color: #6f8e56; */
    --accent-color: #5a6d4b;
  }
}

/* Width breakpoints:
 * >=1200px wide
 * >=800px default
 * >=480px narrow
 * min-width: 320
 */

html {
  font-family: Verdana, Arial, sans-serif;
}

body {
  max-width: var(--max-width);
  min-width: var(--min-width);
  margin: 0 auto;
  line-height: 1.6;
  font-size: 18px;
  color: var(--main-text-color);
}

h2,
h3,
h4 {
  color: var(--accent-color);
}

a:link {
  color: var(--accent-color);
}

a:visited {
  color: hsl(from var(--accent-color) h s calc(l - 5));
}

a:hover {
  color: hsl(from var(--accent-color) h s calc(l + 5));
}

nav {
  background: var(--accent-color);
  display: flex;
  height: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
}

nav a:link,
nav a:visited {
  color: var(--main-text-color-dark);
}

.nav-right {
  display: flex;
  gap: var(--gutter);
}

header {
  position: relative;
}

.hero-img img {
  max-width: 100%;
  height: auto;
  /* fix bug, where the picture tag overflows the img due to being rendered as inline-text */
  display: block;
}

@media (width<480px) {
  .hero-img img {
    aspect-ratio: 1/1;
  }
}

@media (width>=480px) {
  .hero-img img {
    aspect-ratio: 1.33/1;
  }
}

@media (width>=800px) {
  .hero-img img {
    aspect-ratio: 1.75/1;
  }
}

@media (width>=1200px) {
  .hero-img img {
    aspect-ratio: 3/1;
  }
}

.hero-shadow {
  position: absolute;
  height: 100%;
  width: 100%;
  display: block;
  bottom: 7px;
  bottom: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.5) 30%,
    rgba(0, 0, 0, 0) 40%
  );
}

.hero-text {
  color: var(--main-text-color-dark);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: absolute;
  bottom: 0;
  top: 0;
  left: 0;
  right: 0;
  padding-left: 40px;
  padding-right: 40px;
  padding-bottom: 40px;
  box-sizing: border-box;
}

.hero-text h1 {
  font-size: 3.2rem;
  margin: 0;
}

main {
  margin-top: var(--gutter);
  padding: 0 var(--gutter);
  display: grid;
  column-gap: calc(5 * var(--gutter));
  grid-template-areas: "sidebar";
}

@media (width >=800px) {
  main {
    grid-template-columns: 2fr 1fr;
    grid-template-areas:
      ". sidebar"
      ". sidebar"
      ". sidebar";
  }
}

#profile {
  grid-area: sidebar;
  align-self: start;
}

@media (width >= 800px) {
  #profile {
    border-left: 3px solid var(--accent-color);
    border-radius: var(--gutter);
    padding: 0 var(--gutter);
  }
}

@media (width < 800px) {
  #profile h2 {
    display: none;
  }
}

footer {
  color: var(--main-text-color-dark);
  background: var(--accent-color);
  padding: 0 var(--gutter);
  margin-top: var(--gutter);
}
