:root {
  --card-width: 340;
  --card-height: 538.259;
  color-scheme: light;

  /* WhiteTheme */
  --ink: #171717;
  --muted: #707070;
  --role: #6c6c6c;
  --card-surface: #ffffff;
  --card-border: rgb(0 0 0 / 0.22);
  --logo: #111111;
  --bg-dim: 0.3;
  --backdrop-tint: rgb(0 0 0 / 0.16);
  --backdrop-blur: 10px;
  --backdrop-saturation: 0.9;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    /* DarkTheme */
    --ink: #f2f2f2;
    --muted: #b5b5b5;
    --role: #a6a6a6;
    --card-surface: #111111;
    --card-border: rgb(255 255 255 / 0.18);
    --logo: #f7f7f7;
    --bg-dim: 0.46;
    --backdrop-tint: rgb(0 0 0 / 0.28);
    --backdrop-blur: 12px;
    --backdrop-saturation: 0.82;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  color: var(--ink);
  background: url("./assets/guitar-background.jpeg") center / cover no-repeat fixed;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.page {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgb(0 0 0 / var(--bg-dim));
  backdrop-filter: blur(var(--backdrop-blur)) saturate(var(--backdrop-saturation));
  -webkit-backdrop-filter: blur(var(--backdrop-blur)) saturate(var(--backdrop-saturation));
  transition:
    background-color 980ms ease,
    backdrop-filter 1180ms cubic-bezier(0.16, 1, 0.3, 1),
    -webkit-backdrop-filter 1180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.card {
  container-type: inline-size;
  position: relative;
  z-index: 1;
  width: min(340px, 100%, calc((100dvh - 80px) * var(--card-width) / var(--card-height)));
  aspect-ratio: var(--card-width) / var(--card-height);
  animation: card-rise 2600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  cursor: grab;
  touch-action: none;
  transition:
    transform 1180ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 520ms ease;
  will-change: transform, opacity;
}

.dock-hint {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 2;
  margin: 0;
  padding: 0;
  color: rgb(255 255 255 / 0.76);
  font-size: 13px;
  font-weight: 450;
  line-height: 1;
  text-shadow: 0 1px 14px rgb(0 0 0 / 0.28);
  transform: translate3d(-50%, 0, 0);
  transition:
    opacity 680ms ease 760ms,
    transform 680ms cubic-bezier(0.16, 1, 0.3, 1) 760ms;
  pointer-events: none;
  white-space: nowrap;
}

.page.is-ready:not(.is-card-docked):not(.is-card-dragging) .dock-hint {
  opacity: 1;
}

.page:not(.is-ready) .dock-hint,
.page.is-card-docked .dock-hint,
.page.is-card-dragging .dock-hint {
  opacity: 0;
  transform: translate3d(-50%, 8px, 0);
  transition:
    opacity 360ms ease,
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.page.is-ready .card {
  animation: none;
}

.page.is-card-dragging .card {
  animation: none;
  cursor: grabbing;
  opacity: 1;
  transform: translate3d(0, var(--card-drag-y, 0px), 0) scale(1);
  transition: none;
}

.page.is-card-docked .card {
  animation: none;
  opacity: 1;
  transform: translate3d(0, var(--card-dock-y, 0px), 0) scale(1);
}

.page.is-card-undocking .card {
  transition:
    transform 1450ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 520ms ease;
}

.page.is-card-docked.is-card-dragging .card {
  transform: translate3d(0, calc(var(--card-dock-y, 0px) + var(--card-drag-y, 0px)), 0)
    scale(1);
}

.page.is-card-docked::before {
  background-color: rgb(0 0 0 / 0);
  backdrop-filter: blur(0) saturate(1);
  -webkit-backdrop-filter: blur(0) saturate(1);
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 118px, 0) scale(0.982);
  }

  58% {
    opacity: 1;
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.card__shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.card__surface {
  fill: var(--card-surface);
}

.card__border {
  fill: none;
  stroke: var(--card-border);
}

.card__content {
  position: absolute;
  inset: 10.8% 10.2% 11.8%;
  display: flex;
  flex-direction: column;
}

.brand {
  margin-top: 0.6%;
}

.logo {
  display: block;
  width: 38cqw;
  max-width: 142px;
  height: auto;
}

.logo path {
  fill: var(--logo);
}

.logo path[stroke] {
  stroke: var(--logo);
}

.role {
  margin: 11px 0 0;
  color: var(--role);
  font-size: 15px;
  line-height: 1.2;
}

.profile {
  margin-top: auto;
  padding-bottom: 6.2%;
}

.profile h1 {
  margin: 0 0 26px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 560;
  line-height: 1;
}

.profile .contact + .contact {
  margin-top: 7px;
}

.contact {
  display: block;
  width: fit-content;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 15.5px;
  line-height: 1.23;
  text-align: left;
  text-decoration: none;
}

button.contact {
  cursor: pointer;
}

.contact:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

@media (max-width: 380px) {
  .page {
    padding-inline: 24px;
  }
}

@media (max-width: 480px) {
  body {
    background-attachment: scroll;
  }

  .page {
    padding:
      max(28px, env(safe-area-inset-top))
      clamp(28px, 8vw, 40px)
      max(28px, env(safe-area-inset-bottom));
  }

  .dock-hint {
    bottom: max(18px, env(safe-area-inset-bottom));
    font-size: 12.5px;
  }

  .card {
    width: min(340px, 100%, calc((100dvh - 56px) * var(--card-width) / var(--card-height)));
  }

  .page.is-card-docked .card {
    transform: translate3d(0, var(--card-dock-y, 0px), 0) scale(1);
  }

  .page.is-card-docked.is-card-dragging .card {
    transform: translate3d(0, calc(var(--card-dock-y, 0px) + var(--card-drag-y, 0px)), 0)
      scale(1);
  }
}

@media (max-width: 340px) {
  .page {
    padding-inline: 24px;
  }

  .role {
    font-size: 14px;
  }

  .profile h1 {
    margin-bottom: 22px;
    font-size: 21px;
  }

  .contact {
    font-size: 14.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
    transition: none;
    will-change: auto;
  }
}
