@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@500&display=swap');

[data-theme="light"] {
  --color-bg: rgb(250, 244, 237);
  --color-fg: #575279;
  --color-subtle: #e4d9cf;
  --color-primary: #e97092;
  --color-primary-less: #d4a2af;
  --color-secondary: #286983;
  --color-fg1: #907AA9;
  --color-fg2: #494c4d;
  --color-white: rgb(255, 252, 251);
}

[data-theme="dark"] {
  --color-bg: #26233A;
  --color-fg: #c2c0d5;
  --color-subtle: #433e61;
  --color-primary: #EB6F92;
  --color-primary-less: #846a86;
  --color-secondary: #9CCFD8;
  --color-fg1: #907AA9;
  --color-fg2: #494c4d;
  --color-fg3: #9893A5;
  --color-white: rgb(255, 252, 251);
}

html {
  font-family: 'Lato', sans-serif;
  background-color: var(--color-bg);
  font-size: 1.35em;
  line-height: 1.5em;
}

body {
  margin: 0;
}

h1 {
  color: var(--color-primary);
  font-weight: bold;
  width: fit-content;
  text-align: center;
  padding: 0.25em;
  border-radius: 4px;
  font-family: 'Rubik';
}

h2 {
  color: var(--color-fg);
  text-align: center;
}

p {
  color: var(--color-fg);
  line-height: 1.75em;
}

img {
  max-width: 100%;
}

.nav-container {
  display: flex;
  flex-flow: row-wrap;
  max-width: 900px;
  margin: 0 auto;
  padding: 0.25em 0.5em;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-subtle);
}

.nav-container div {
  display: flex;
  list-style: none;
  margin: 0;
  gap: 0.5em;
  justify-content: center;
  flex-flow: row wrap;
  align-items: center;
}

#nav-logo a img {
  display: inline-block;
  width: 2em;
  vertical-align: center;
}

#nav-logo a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-container a {
  text-decoration: none;
  color: var(--color-primary-less);
  font-weight: bold;
  /* font-size: 1.1em; */
  font-family: 'Rubik';
  padding: 0.25em;
}

.nav-container .selected {
  color: var(--color-primary);
}

#nav-items {
  display: none;
}

#hamburger-menu {
  width: 1.5em;
  font-size: 1.5em;
  background-color: transparent;
  border: none;
  color: var(--color-primary-less);
  cursor: pointer;
  margin-right: 0.25em;
}

#dropdown-menu {
  position: absolute;
  display: none;
  flex-direction: column;
  right: 1em;
  border: 2px solid var(--color-subtle);
  width: 6em;
  box-sizing: border-box;
  gap: 0;
  border-radius: 4px;
  background-color: var(--color-bg);
  filter: drop-shadow(2px 2px 4px rgb(0 0 0 / 0.5));
  z-index: 10000;
}

#dropdown-menu a {
  align-self: stretch;
  border-bottom: 1px solid var(--color-subtle);
  padding: 0.5em 1em;
  margin: 0;
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1em auto 2em auto;
  max-width: 1500px;
}

main p {
  padding: 0 0.5em;
}

.intro {
  margin-top: 3em;
  display: block;
}

.intro .profile {
  display: block;
  max-width: min(90%, 350px);
  margin: auto;
}

.theme-toggle {
  background-color: transparent;
  border: none;
  font-size: 1.2em;
  width: 1.5em;
  padding: 0.1em 0.25em;
  color: var(--color-primary-less);
}

.links {
  display: block;
  width: 100%;
}

.links div {
  margin: 0.5em 0;
  gap: 0.5em;
  display: flex;
  justify-content: center;
}

.links a, .links a:visited {
  /* font-size: 1.1em; */
  text-decoration: none;
  padding: 0.25em 0.5em;
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
  border-radius: 4px;
}

.links .selected {
  color: var(--color-white) !important;
  background-color: var(--color-secondary);
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25em;
  justify-content: center;
  padding: 0 0.5em;
  width: 100%;
  box-sizing: border-box;
}

.gallery div {
  position: relative;
  padding-top: 100%;
}

.gallery img {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  object-position: 50% 25%;
  cursor: zoom-in;
  border-radius: 4px;
}

#overlay {
  display: none;
  position: fixed;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
  z-index: 9998;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 0.9);
}

#overlay button {
  position: absolute;
  width: 1.5em;
  height: 1.5em;
  text-align: center;
  font-size: 1.5em;
  top: 0em;
  right: 0em;
  z-index: 10000;
  color: #2f2e2e;
  padding: 0.1em;
  border-radius: 50%;
  border: 2px #2f2e2e solid;
  background-color: rgb(255 255 255 / 0.6);
}

#overlay div {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

#overlay p {
  color: var(--color-white);
  margin: 1em 0.5em;
}

#overlay-image {
  display: none;
  max-width: 100%;
  max-height: 80vh;
  z-index: 9999;
  object-fit: contain;
}

#overlay-desc {
  border: 1px rgb(255 255 255 / 0.3) solid;
  background-color: rgb(0 0 0 / 0.9);
  border-radius: 4px;
}

.text-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  margin: 0 1em;
}

.text-container p {
  display: block;
  width: 100%;
}

@media (hover: hover) {
  .links a:hover {
      color: var(--color-white);
      background-color: var(--color-secondary);
  }

  .theme-toggle:hover {
    background-color: var(--color-subtle);
    border-radius: 4px;
    cursor: pointer;
  }

  .nav-container div a:hover {
    /* color: var(--color-primary); */
    background-color: var(--color-subtle);
    border-radius: 4px;
  }

  #overlay button:hover {
    background-color: rgb(255 255 255 / 0.9)
  }

  #hamburger-menu:hover {
    background-color: var(--color-subtle);
    border-radius: 4px;
  }
}

@media only screen and (min-width: 640px) {
  .nav-container div {
    gap: 1em;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  #overlay p {
    margin: 1em 2em;
  }
  
  #nav-items {
    display: flex;
  }

  #hamburger {
    display: none;
  }

  #overlay button {
    top: -0.75em;
    right: -0.75em;
  }
}
