:root {
  --background-blur: 22px;
  --text: #f7fbff;
  --muted: rgba(247, 251, 255, 0.74);
  --footer-h: calc(46px + env(safe-area-inset-bottom, 0px));
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  background: #000;
}

button,
input,
textarea {
  font: inherit;
}

.background {
  position: fixed;
  inset: -48px;
  z-index: -2;
  background: url("assets/bckgrnd.gif") center / cover no-repeat;
  filter: blur(var(--background-blur));
  transform: scale(1.04);
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at center, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.54) 78%),
    rgba(0, 0, 0, 0.2);
}

.ambient-terminal {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.terminal-ghost {
  position: absolute;
  margin: 0;
  color: rgba(235, 250, 255, 0.46);
  font: 400 clamp(0.66rem, 0.9vw, 0.82rem)/1.7 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.01em;
  white-space: pre;
  filter: blur(1px);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.terminal-ghost--left {
  top: 18%;
  left: 7%;
}

.terminal-ghost--right {
  right: 7%;
  bottom: 19%;
}

.hero {
  position: relative;
  height: calc(100vh - var(--footer-h));
  height: calc(100dvh - var(--footer-h));
  display: grid;
  place-items: center;
  align-content: center;
  padding: 36px 22px 42px;
  text-align: center;
}

h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.72rem);
  line-height: 1.2;
  font-weight: 350;
  letter-spacing: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.72);
}

.first-name {
  position: relative;
  display: inline-block;
  transition: margin-right 220ms ease;
}

.first-name::after {
  content: attr(data-alternate-name);
  position: absolute;
  top: 50%;
  left: 0;
  opacity: 0;
  font-family: "Segoe Script", "Snell Roundhand", "Brush Script MT", cursive;
  font-size: 1.08em;
  font-weight: 400;
  transform: translateY(-44%) scale(0.96);
  transform-origin: left center;
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
  white-space: nowrap;
}

.first-name-current {
  transition: opacity 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .first-name:hover {
    margin-right: 34px;
  }

  .first-name:hover .first-name-current {
    opacity: 0;
  }

  .first-name:hover::after {
    opacity: 1;
    transform: translateY(-44%) scale(1);
  }
}

.links {
  display: grid;
  grid-template-columns: auto 18px auto 18px auto;
  column-gap: 22px;
  align-items: baseline;
  justify-content: center;
  margin-top: 17px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 300;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.76);
}

.links > .nav-separator {
  display: inline-block;
  width: 18px;
  justify-self: center;
  align-self: baseline;
  margin-inline: 0;
  opacity: 0.5;
  font-family: inherit;
  font-size: 1em;
  line-height: inherit;
  text-align: center;
}

.projects-easter-egg {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  min-width: 18px;
  align-self: baseline;
  line-height: inherit;
  border-bottom: 0 !important;
}

.project-slashes,
.projects-label {
  grid-area: 1 / 1;
  transition: opacity 180ms ease, transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-slashes {
  color: var(--muted);
  opacity: 0.5;
  font-family: inherit;
  font-size: 1em;
  line-height: inherit;
  white-space: nowrap;
}

.projects-label {
  position: absolute;
  left: 50%;
  color: #fff;
  opacity: 0;
  transform: translate(-50%, 4px) scale(0.94);
  white-space: nowrap;
}

.projects-easter-egg:hover,
.projects-easter-egg:focus-visible {
  outline: none;
}

.projects-easter-egg:hover .project-slashes,
.projects-easter-egg:focus-visible .project-slashes {
  opacity: 0;
  transform: scaleX(2.4);
}

.projects-easter-egg:hover .projects-label,
.projects-easter-egg:focus-visible .projects-label {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.links a,
.links button,
footer a {
  color: inherit;
  text-decoration: none;
}

.links button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.links a,
.links button {
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.links a:hover,
.links button:hover,
.links a:focus-visible,
.links button:focus-visible,
footer a:hover,
footer a:focus-visible {
  color: #fff;
  border-color: currentColor;
  outline: none;
}

.contact-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(2, 4, 7, 0.58);
  backdrop-filter: blur(28px) saturate(0.75);
  -webkit-backdrop-filter: blur(28px) saturate(0.75);
  z-index: 20;
}

.contact-overlay.is-open {
  display: flex;
}

.contact-panel {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: var(--text);
  background: rgba(10, 12, 16, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(30px) saturate(0.9);
  -webkit-backdrop-filter: blur(30px) saturate(0.9);
}

.close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.close:hover,
.close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: 1px solid rgba(255, 255, 255, 0.2);
}

form {
  display: grid;
  gap: 10px;
  padding: 32px;
}

h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0;
}

.contact-copy {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.84rem;
  line-height: 1.5;
}

.contact-copy a,
.consent a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
}

label:not(.consent) {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.76rem;
  font-weight: 350;
}

input,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background: transparent;
  color: #fff;
  padding: 8px 0 11px;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input:focus,
textarea:focus {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: none;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.75rem;
  line-height: 1.45;
}

.consent input {
  width: auto;
  margin-top: 3px;
  accent-color: #fff;
}

.send {
  margin-top: 10px;
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  color: #0b0d10;
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  font-weight: 500;
}

.send:disabled {
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.09);
  cursor: not-allowed;
}

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px env(safe-area-inset-bottom, 0px);
  color: rgba(255, 255, 255, 0.62);
}

footer small {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 300;
}

footer a {
  border-bottom: 1px solid transparent;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1024px), (pointer: coarse) {
  body {
    position: fixed;
    inset: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-inline: 20px;
  }

  .terminal-ghost {
    color: rgba(235, 250, 255, 0.34);
    font-size: 0.62rem;
  }

  .terminal-ghost--left {
    top: 11%;
    left: 7%;
  }

  .terminal-ghost--right {
    right: 7%;
    bottom: 13%;
  }

  .links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
  }

  .links > a:not(.projects-easter-egg),
  .links > button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 18px;
  }

  .links > .nav-separator,
  .links > .projects-easter-egg {
    display: none;
  }

  footer small > span {
    display: none;
  }

  form {
    padding: 30px 22px 24px;
  }
}

.not-found-page {
  overflow: hidden;
}

.not-found {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
}

.not-found-code {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.42);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.74rem;
}

.not-found h1 {
  font-size: 1.5rem;
  font-weight: 350;
}

.not-found-copy {
  margin: 12px 0 22px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
  line-height: 1.5;
}

.home-link {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: color 160ms ease, border-color 160ms ease;
}

.home-link:hover,
.home-link:focus-visible {
  color: #fff;
  border-color: #fff;
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .background {
    background-image: url("assets/bckgrnd-still.png");
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
