:root {
  --background: #111119;
  --foreground: #fff7eb;
  --line: rgba(255, 247, 235, 0.2);
  --pink: #f23899;
  --name-accent: #e65cff;

  color-scheme: light dark;
  font-family: "DM Sans", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="light"] {
  --background: #fff3df;
  --foreground: #231a2b;
  --line: rgba(35, 26, 43, 0.17);
  --name-accent: #b12bc7;
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
}

button {
  font: inherit;
}

.page {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  background: var(--background);
  color: var(--foreground);
  transition:
    background-color 300ms ease,
    color 300ms ease;
}

:root[data-theme="light"] #gradient-four {
  stop-color: #1e62ff;
}

:root[data-theme="light"] #flower-artwork [stroke="#65d7ae"] {
  stroke: #135f56;
}

:root[data-theme="light"] #flower-artwork [fill="#65d7ae"] {
  fill: #135f56;
}

:root[data-theme="light"] #flower-artwork [fill="#6290ff"] {
  fill: #1e62ff;
}

.scene,
.scene__fallback,
.scene__shader,
.scene__ribs,
.scene__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene {
  z-index: 0;
  overflow: hidden;
}

.scene__garden {
  filter: url(#fallback-fluted-glass);
}

.scene__shader {
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

.scene__shader.is-ready {
  opacity: 1;
}

.scene__ribs {
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.16) 0,
    rgba(255, 255, 255, 0.04) 1px,
    transparent 4px,
    rgba(0, 0, 0, 0.07) 10px,
    transparent 16px
  );
  mix-blend-mode: soft-light;
  box-shadow: inset 0 0 5rem rgba(0, 0, 0, 0.2);
}

.scene__shader.is-ready + .scene__ribs {
  opacity: 0;
}

.scene__scrim {
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      var(--background) 0%,
      color-mix(in srgb, var(--background) 92%, transparent) 33%,
      color-mix(in srgb, var(--background) 34%, transparent) 61%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--background) 70%, transparent),
      transparent 27%,
      transparent 72%,
      color-mix(in srgb, var(--background) 42%, transparent)
    );
}

.header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.15rem;
  min-height: 4.75rem;
  padding: 1rem clamp(1.15rem, 3vw, 2.5rem);
}

.header__link {
  position: relative;
  color: inherit;
  text-decoration: none;
}

.header__link::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: -0.25rem;
  left: 0;
  height: 2px;
  background: var(--pink);
  transition: right 220ms ease;
}

.header__link:hover::after,
.header__link:focus-visible::after {
  right: 0;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--background) 66%, transparent);
  color: var(--foreground);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.theme-toggle__symbol {
  position: relative;
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-toggle__icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: rotate(-45deg) scale(0.7);
  transition:
    opacity 180ms ease,
    transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-toggle[data-mode="light"] .theme-toggle__icon--light,
.theme-toggle[data-mode="dark"] .theme-toggle__icon--dark {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.theme-toggle:hover .theme-toggle__symbol,
.theme-toggle:focus-visible .theme-toggle__symbol {
  transform: rotate(18deg);
}

.content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(58%, 42rem);
  min-height: calc(100svh - 4.75rem);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.15rem, 3vw, 2.5rem)
    clamp(2rem, 5vw, 4rem);
}

.role {
  margin: clamp(0.8rem, 1.5vw, 1rem) 0 0;
}

h1 {
  max-width: 8ch;
  margin: 0;
  font-family: "Young Serif", Georgia, serif;
  font-size: clamp(3.9rem, 9vw, 7.8rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

h1 span {
  display: block;
  color: var(--name-accent);
}

.intro {
  max-width: 36rem;
  margin: clamp(1.15rem, 2.5vw, 1.65rem) 0 0;
  line-height: 1.55;
}

.current {
  max-width: 34rem;
  margin: 0.8rem 0 0;
  line-height: 1.5;
}

.role,
.intro,
.current {
  margin-inline-start: clamp(0.2rem, 0.35vw, 0.35rem);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
}

.intro,
.current {
  text-wrap: pretty;
}

.current a {
  color: inherit;
  text-underline-offset: 0.18em;
}

.contact-dialog {
  width: min(calc(100% - 2rem), 27rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  color: var(--foreground);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px);
}

.contact-dialog[open] {
  animation: dialog-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.contact-dialog::backdrop {
  background: rgba(10, 7, 14, 0.58);
  backdrop-filter: blur(6px);
  animation: backdrop-in 220ms ease-out;
}

.contact-dialog__content {
  position: relative;
  padding: clamp(1.5rem, 5vw, 2rem);
}

.contact-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.contact-dialog__close svg {
  width: 0.9rem;
  height: 0.9rem;
}

.contact-dialog h2 {
  margin: 0;
  padding-right: 3rem;
  font-size: 1.35rem;
  font-weight: 500;
}

.contact-dialog__address {
  margin: 1.25rem 0 0;
  font-size: clamp(1.05rem, 4.8vw, 1.3rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.contact-dialog__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  margin-top: 1.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--foreground);
  border-radius: 999px;
  background: var(--foreground);
  color: var(--background);
  font-weight: 500;
  cursor: pointer;
  transition: transform 180ms ease;
}

.contact-dialog__action:hover,
.contact-dialog__action:focus-visible,
.contact-dialog__close:hover,
.contact-dialog__close:focus-visible {
  transform: translateY(-1px);
}

.contact-dialog__close:hover,
.contact-dialog__close:focus-visible {
  background: color-mix(in srgb, var(--foreground) 8%, transparent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.97);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .scene__fallback {
    transform: translateY(14%) scale(1.17);
    transform-origin: bottom center;
  }

  .scene__scrim {
    background: linear-gradient(
      180deg,
      var(--background) 0%,
      color-mix(in srgb, var(--background) 94%, transparent) 39%,
      color-mix(in srgb, var(--background) 54%, transparent) 67%,
      transparent 100%
    );
  }

  .header {
    min-height: 4.25rem;
    padding: 0.8rem 1rem;
  }

  .content {
    justify-content: flex-start;
    width: 100%;
    min-height: calc(100svh - 4.25rem);
    padding: clamp(2rem, 9vh, 4.5rem) 1.1rem 13rem;
  }

  h1 {
    font-size: clamp(3.7rem, 19.5vw, 5.9rem);
  }

  .intro,
  .current {
    max-width: 30rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
