:root {
  --speed: 300ms;
  --background: #181f29;
  --surface: #594e4eb0;
  --primary: #dcc59e;
  --accent: #d9975c;
  --light: #FFFEF2;
}

/* Light mode */
/* @media (prefers-color-scheme: light) {
  :root {
    --background: #FFFEF2;
    --surface: #dcc59e;
    --primary: #181f29;
    --accent: #594e4e;
    --light: #181f29;
  }
} */

/* Dark mode */
/* @media (prefers-color-scheme: dark) {
  :root {
    --background: #181f29;
    --surface: #594e4eb0;
    --primary: #dcc59e;
    --accent: #d9975c;
    --light: #FFFEF2;
  }
} */

/* width */
::-webkit-scrollbar {
  width: 4px;
}

/* Track */
::-webkit-scrollbar-track {
  background: var(--background);
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

::-moz-selection {
  color: var(--light);
  background: var(--surface);
}

::selection {
  color: var(--light);
  background: var(--surface);
}

* {
  scroll-behavior: smooth;
}

body {
  box-sizing: unset;
  margin: 0;
  font-family: 'Mukta', sans-serif;
}

h1, h2 {
  line-height: 1em;
  margin: 0;
}

section {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}

a {
  text-decoration: none;
  color: var(--primary);
}

img {
  height: 100%;
  aspect-ratio: 3 / 2;
  object-position: center;
  object-fit: cover;
}

.scrollable {
  height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
}

.bg-dark {
  background-color: var(--background);
}

.bg-surface {
  background-color: var(--surface);
}

.primary-text {
  color: var(--primary);
}

.dark-text {
  color: var(--background);
}

.light-text {
  color: var(--light);
}

.accent-text {
  color: var(--accent);
}

.bold {
  font-weight: bold;
}

.mb {
  margin-bottom: 3em;
}

.mt {
  margin-top: 3em;
}

.blur-loading {
  position: relative;
  background-repeat: no-repeat;
  background-size: 100%;
  background-position: center;
  transition: background-size var(--speed) ease-in-out;
}

.blur-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--light);
  animation: pulse calc(var(--speed) * 3.5) infinite alternate-reverse;
}

@keyframes pulse {
  0% { opacity: 0; }
  100% { opacity: 0.2; }
}

.blur-loading > img {
  opacity: 0;
}

.blur-loading.loaded::before {
  content: none;
}

.blur-loading.loaded > img {
  opacity: 1;
  background-color: var(--accent);
  transition:
    opacity var(--speed) ease-in,
    background-color var(--speed) ease-in-out;
}

.avatar {
  width: 7em;
  aspect-ratio: 1;
  background-color: var(--accent);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background-color var(--speed) ease-in-out;
}

.avatar > img {
  height: 100%;
  aspect-ratio: 1 / 1;
}

.avatar:hover {
  background-color: var(--primary);
}

.avatar:hover > img {
  background-color: var(--primary);
}

.serif {
  font-family: "Playfair Display", serif;
}

.title {
  font-size: 5rem;
  font-weight: bold;
  line-height: 1.2em;
}

.subtitle {
  font-size: 2.2rem;
  line-height: 1.2em;
}

.icon {
  font-size: 3rem;
}

.clickable {
  color: var(--primary);
  position: relative;
  transition: color var(--speed) ease-in-out;
}

.clickable:hover {
  color: var(--accent);
  cursor: pointer;
}

.clickable:hover .tooltip {
  visibility: visible;
  opacity: 1;
  transition: opacity var(--speed) ease-in-out;
}

.tooltip {
  display: block;
  font-size: 1rem;
  white-space: nowrap;
  text-align: center;
  margin-top: -0.5em;
  visibility: hidden;
  opacity: 0;
}

.nav {
  display: flex;
  gap: 2.5em;
}

.list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grid {
  display: grid;
  gap: 1em;
  grid-template-columns: min-content min-content min-content;
  justify-items: center;
}

.link {
  font-size: 1.5rem;
  width: 100%;
}

.link span {
  margin: auto;
  float: right;
  margin-left: 1rem;
}

.fab {
  width: 2em;
  aspect-ratio: 1;
  border-radius: 50%;
  position: fixed;
  bottom: 1em;
  right: 1em;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  background-color: var(--accent);
  box-shadow: 0 0 15px 0 #1b1b1b;
  transition:
    background-color var(--speed) ease-in-out,
    box-shadow var(--speed) ease-in-out,
    scale var(--speed) ease-in-out,
    opacity var(--speed) ease-in-out;
}

.fab:hover {
  background-color: var(--primary);
  box-shadow: 0 0 20px 0 #1b1b1b;
}

.details {
  cursor: pointer;
  position: relative;
  outline: 4px solid var(--light);
  display: inline;
}

.details div {
  position: absolute;
  inset: 0;
  background-color: color-mix(in srgb, var(--surface) 69%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--speed) ease-in-out;
}

.details:hover div {
  opacity: 1;
}

.details div > * {
  color: var(--light);
  font-weight: bold;
  line-height: 1.1rem;
}

.image {
  height: 10em;
  aspect-ratio: 3 / 2;
}

.modal {
  position: absolute;
  inset: 3em;
  border-radius: 1em;
  overflow: hidden;
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  scale: 0;
  opacity: 0;
  box-shadow: 0 0 22px 0 #1b1b1b;
  transition:
    scale var(--speed) ease-in-out,
    opacity var(--speed) ease-in-out;
}

.hide {
  scale: 0;
  opacity: 0;
}

.show {
  scale: 1;
  opacity: 1;
}

.modal .modal-bg {
  position: absolute;
  inset: 0;
  background-color: var(--surface);
  opacity: 0.85;
}

.modal .modal-content {
  position: absolute;
  inset: 0em;
  display: flex;
  flex-direction: column;
}

.modal-content .modal-close {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1em;
  font-size: 1.5em;
  padding-top: 0.4em;
  padding-right: 0.7em;
  padding-left: 0.7em;
}

.modal-content .modal-close .close-btn:hover {
  color: var(--accent);
  cursor: pointer;
}

.modal-content .modal-image {
  flex-grow: 1;
  margin: 2em;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

*[reveal] {
  position: relative;
  cursor: pointer;
}

*[reveal]::after {
  --size: 0.85rem;

  content: attr(reveal);
  position: absolute;
  left: -0.5rem;
  right: -0.5rem;
  top: 55%;
  background-color: var(--background);
  color: var(--accent);
  font-size: var(--size);
  line-height: var(--size);
  padding: calc(var(--size) / 4.2);
  display: inline;
  text-align: center;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity var(--speed) ease-in-out;
}

*[reveal]:hover::after {
  opacity: 1;
}

@media (orientation: portrait) {
  img {
    height: 100%;
    aspect-ratio: 1 / 1;
    object-position: center;
    object-fit: cover;
  }

  .grid {
    display: grid;
    gap: 1em;
    grid-template-columns: min-content min-content;
    justify-items: center;
  }

  .image {
    height: 11em;
    aspect-ratio: 1 / 1;
  }

  .no-portrait {
    display: none;
  }

  .modal {
    inset: 1.5em;
  }
}
