:root {
  color-scheme: light;
  --canvas: #f9fafb;
  --ink: #0f1521;
  --muted: #a6aebe;
  --button-ink: #586068;
  --button-border: #a6aebe;
  --button-border-hover: #3276ff;
  --button-stroke-hover-top: #3276ff;
  --button-stroke-hover-bottom: #e0eaff;
  --button-ink-hover: #0049b6;
  --button-top: #f8faff;
  --button-bottom: #a6aebe;
  --button-hover-top: #e0eaff;
  --button-hover-bottom: #4986ff;
  --selection: #0066ff;
  --selection-ink: #f9fafb;
  font-family: "InterDisplay", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
}

body {
  color: var(--ink);
}

a {
  color: inherit;
}

::selection {
  color: var(--selection-ink);
  background: var(--selection);
}

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

.introduction {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  padding: 3.5rem;
}

.portrait {
  position: relative;
  width: 3.5rem;
  height: 3.5rem;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  box-shadow:
    0 15px 15px rgb(93 171 255 / 5%),
    0 7px 7px rgb(93 171 255 / 8%),
    0 4px 4px rgb(93 171 255 / 8%),
    0 2px 2px rgb(87 87 87 / 10%),
    0 1px 1px rgb(93 171 255 / 10%),
    0 0 3px 2.447px rgb(92 92 92 / 5%);
}

.portrait::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 10%),
    inset 4px 4px 8px rgb(255 255 255 / 50%),
    inset 0 4px 4px rgb(255 255 255 / 25%);
  content: "";
  pointer-events: none;
}

.portrait img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.introduction__copy {
  display: flex;
  width: min(31.25rem, 100%);
  flex-direction: column;
  gap: 1.5rem;
}

h1,
p {
  margin: 0;
}

.identity {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

h1,
.role,
.bio,
.linkedin-link {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1,
.role,
.bio,
.linkedin-link span {
  text-box-edge: cap alphabetic;
  text-box-trim: trim-both;
}

.role {
  color: var(--muted);
}

.linkedin-link {
  position: relative;
  display: inline-flex;
  width: fit-content;
  min-width: 5.75rem;
  height: 2.875rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 1rem;
  border: 1px solid var(--button-border);
  border-radius: 100px;
  background: linear-gradient(
    180deg,
    var(--button-top) 0%,
    var(--button-bottom) 100%
  );
  box-shadow:
    0 15px 15px rgb(93 171 255 / 5%),
    0 7px 7px rgb(93 171 255 / 8%),
    0 4px 4px rgb(93 171 255 / 8%),
    0 2px 2px rgb(87 87 87 / 10%),
    0 1px 1px rgb(93 171 255 / 10%),
    0 0 3px rgb(92 92 92 / 5%),
    inset 2px 2px 2px rgb(255 255 255 / 50%),
    inset 0 4px 4px rgb(255 255 255 / 25%);
  color: var(--button-ink);
  text-decoration: none;
  transform: scale(1);
  transform-origin: center;
  transition:
    border-color 500ms cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 500ms cubic-bezier(0.25, 1, 0.5, 1),
    color 500ms cubic-bezier(0.25, 1, 0.5, 1),
    opacity 140ms ease-out,
    transform 140ms ease-out;
}

.linkedin-link::before {
  position: absolute;
  inset: -0.5rem;
  border-radius: inherit;
  background:
    linear-gradient(
      180deg,
      var(--button-hover-top) 0%,
      var(--button-hover-bottom) 100%
    ),
    linear-gradient(
      180deg,
      var(--button-top) 0%,
      var(--button-bottom) 100%
    );
  content: "";
  filter: blur(0.625rem);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88);
  transition:
    filter 500ms cubic-bezier(0.25, 1, 0.5, 1),
    opacity 500ms cubic-bezier(0.25, 1, 0.5, 1),
    transform 500ms cubic-bezier(0.25, 1, 0.5, 1);
}

.linkedin-link::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    var(--button-stroke-hover-top) 0%,
    var(--button-stroke-hover-bottom) 100%
  );
  content: "";
  filter: blur(0.25rem);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.94);
  transition:
    filter 500ms cubic-bezier(0.25, 1, 0.5, 1),
    opacity 500ms cubic-bezier(0.25, 1, 0.5, 1),
    transform 500ms cubic-bezier(0.25, 1, 0.5, 1);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
}

.linkedin-link span {
  position: relative;
  z-index: 1;
}

.linkedin-link:focus-visible {
  outline: 3px solid var(--selection);
  outline-offset: 3px;
}

.linkedin-link:active {
  border-color: var(--button-border-hover);
  color: var(--button-ink-hover);
  opacity: 0.7;
  transform: scale(0.92);
  transition-duration: 80ms;
}

.linkedin-link:active::before {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
  transition-duration: 80ms;
}

.linkedin-link:active::after {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
  transition-duration: 80ms;
}

@media (hover: hover) and (pointer: fine) {
  .linkedin-link:hover {
    border-color: var(--button-border-hover);
    color: var(--button-ink-hover);
    box-shadow:
      0 15px 15px rgb(93 171 255 / 5%),
      0 7px 7px rgb(93 171 255 / 8%),
      0 4px 4px rgb(93 171 255 / 8%),
      0 2px 2px rgb(93 171 255 / 10%),
      0 1px 1px rgb(93 171 255 / 10%),
      0 0 3px rgb(93 171 255 / 5%),
      inset 2px 2px 2px rgb(255 255 255 / 50%),
      inset 0 4px 4px rgb(255 255 255 / 25%);
  }

  .linkedin-link:hover::before {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
  }

  .linkedin-link:hover::after {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 767px) {
  .introduction {
    gap: 2rem;
    padding: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .linkedin-link,
  .linkedin-link::before,
  .linkedin-link::after {
    transition-duration: 0.01ms;
  }
}

@media (forced-colors: active) {
  .role {
    color: CanvasText;
  }

  .linkedin-link {
    border-color: ButtonText;
  }
}
