:root {
  color-scheme: light;
  --page-bg: #eee5ea;
  /* Main card opacity: lower 34% to reveal more background; raise it for a more solid card. */
  --card-bg: rgb(255 250 252 / 34%);
  --card-border: rgb(255 255 255 / 58%);
  --primary: #c8759a;
  --primary-deep: #a85e81;
  --primary-soft: rgb(200 117 154 / 16%);
  --ink: #443a43;
  --muted: #71666f;
  --button-bg: rgb(255 252 253 / 42%);
  --button-border: rgb(255 255 255 / 52%);
  --shadow: 0 28px 80px rgb(79 57 70 / 20%);
  --font-sans: Inter, ui-rounded, "SF Pro Rounded", "Hiragino Sans GB", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;
}

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

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: 1.5rem;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--page-bg);
  background-image:
    linear-gradient(rgb(244 237 241 / 10%), rgb(235 225 231 / 18%)),
    url("./assets/background.jpeg");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  font-family: var(--font-sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 14% 12%, rgb(255 232 241 / 28%), transparent 34%),
    radial-gradient(circle at 88% 86%, rgb(217 211 239 / 24%), transparent 38%);
  pointer-events: none;
}

.portal-card {
  width: min(64rem, 100%);
  padding: clamp(1.5rem, 4vw, 3.25rem);
  display: grid;
  grid-template-columns: minmax(15rem, 0.82fr) minmax(21rem, 1.35fr);
  gap: clamp(2.25rem, 6vw, 5.5rem);
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: clamp(1.6rem, 4vw, 2.5rem);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px) saturate(0.92);
  backdrop-filter: blur(1.5px) saturate(0.92);
}

.portrait-panel {
  display: grid;
  place-items: center;
  min-width: 0;
}

.portrait-ring {
  position: relative;
  width: min(100%, 20rem);
  aspect-ratio: 1;
  padding: 0.35rem;
  border-radius: 50%;
  background: linear-gradient(145deg, rgb(214 126 166 / 94%), rgb(158 135 194 / 82%));
  box-shadow:
    0 0 0 0.55rem rgb(255 255 255 / 18%),
    0 18px 48px rgb(106 70 92 / 24%);
}

.portrait-ring::after {
  content: "";
  position: absolute;
  inset: -0.65rem;
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: inherit;
  pointer-events: none;
}

.portrait-ring img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0.28rem solid rgb(255 255 255 / 62%);
  border-radius: 50%;
  object-fit: cover;
}

.profile-copy {
  min-width: 0;
}

.terminal {
  font-family: var(--font-mono);
}

.terminal-command {
  margin: 0 0 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.18rem;
  color: rgb(68 58 67 / 66%);
  font-size: clamp(0.78rem, 1.8vw, 1rem);
  font-weight: 650;
}

.terminal-user {
  color: var(--primary-deep);
}

.terminal-path {
  color: #85719a;
}

.terminal-input {
  margin-left: 0.75rem;
  color: var(--ink);
  font-weight: 780;
}

h1 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #3e3540;
  font-family: var(--font-mono);
  font-size: clamp(2.75rem, 7.2vw, 5.5rem);
  font-weight: 820;
  letter-spacing: -0.075em;
  line-height: 0.98;
  text-shadow: 0 2px 22px rgb(255 255 255 / 50%);
}

h1 .terminal-prompt {
  margin-right: 0.12em;
  color: var(--primary);
  font-weight: 650;
}

.typing-text {
  color: inherit;
}

.typing-text.is-typing {
  animation: character-pulse 180ms ease-out;
}

.typing-cursor {
  display: inline-block;
  margin-left: 0.04em;
  color: var(--primary);
  font-weight: 540;
  animation: cursor-blink 900ms steps(1, end) infinite;
}

@keyframes character-pulse {
  from {
    opacity: 0.45;
    transform: translateY(0.06em);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cursor-blink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

.tags {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tags span {
  padding: 0.38rem 0.65rem;
  border: 1px solid rgb(83 68 79 / 18%);
  border-radius: 0.55rem;
  color: rgb(68 58 67 / 72%);
  background: rgb(255 255 255 / 14%);
  font-family: var(--font-mono);
  font-size: clamp(0.67rem, 1.5vw, 0.8rem);
  font-weight: 650;
}

.bio {
  max-width: 35rem;
  margin: 1.25rem 0 0;
  padding-left: 1rem;
  border-left: 0.25rem solid var(--primary);
  color: var(--muted);
  font-size: clamp(0.98rem, 2.2vw, 1.18rem);
  font-weight: 540;
  line-height: 1.65;
}

.enter-button,
.social-links a,
.social-links button {
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.enter-button {
  min-height: 4.75rem;
  margin-top: clamp(1.6rem, 3vw, 2.1rem);
  padding: 0.8rem 1rem 0.8rem 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid rgb(169 95 129 / 18%);
  border-radius: 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, rgb(207 123 161 / 94%), rgb(178 100 143 / 94%));
  box-shadow: 0 12px 26px rgb(159 84 124 / 25%);
}

.enter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgb(159 84 124 / 31%);
}

.enter-button:active,
.social-links a:active,
.social-links button:active {
  transform: translateY(0);
}

.enter-button:focus-visible,
.social-links a:focus-visible,
.social-links button:focus-visible {
  outline: 0.2rem solid rgb(255 255 255 / 88%);
  outline-offset: 0.18rem;
}

.enter-icon {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 0.85rem;
  background: rgb(255 255 255 / 18%);
}

.enter-icon svg,
.social-links svg,
.arrow {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.enter-icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.enter-copy {
  display: grid;
  gap: 0.08rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 780;
  letter-spacing: 0.01em;
}

.enter-copy small {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  opacity: 0.74;
  text-transform: uppercase;
}

.arrow {
  width: 1.6rem;
  height: 1.6rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.social-links {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.social-links a,
.social-links button {
  min-height: 3.15rem;
  padding: 0.7rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid var(--button-border);
  border-radius: 1rem;
  color: rgb(68 58 67 / 78%);
  background: var(--button-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.5vw, 0.82rem);
  font-weight: 690;
}

.social-links button {
  margin: 0;
  appearance: none;
  cursor: pointer;
}

.social-links a:hover,
.social-links button:hover {
  transform: translateY(-2px);
  border-color: rgb(200 117 154 / 36%);
  background: rgb(255 250 252 / 58%);
  box-shadow: 0 8px 20px rgb(97 66 83 / 12%);
}

.social-links svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
}

.social-links > :nth-child(2) svg,
.social-links > :nth-child(3) svg {
  fill: currentColor;
  stroke: none;
}

.social-links .copy-email.is-copied {
  border-color: rgb(111 160 132 / 42%);
  color: #4f8165;
  background: rgb(235 249 240 / 62%);
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 4vw, 2rem);
  z-index: 20;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1rem;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 999px;
  color: #3f5848;
  background: rgb(239 250 243 / 86%);
  box-shadow: 0 12px 32px rgb(65 50 60 / 20%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 2vw, 0.84rem);
  font-weight: 650;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 1rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.copy-toast[data-state="error"] {
  color: #8a4d60;
  background: rgb(255 239 244 / 90%);
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

footer {
  color: rgb(63 53 61 / 68%);
  font-size: 0.76rem;
  letter-spacing: 0.045em;
  text-align: center;
  text-shadow: 0 1px 12px rgb(255 255 255 / 85%);
}

.portal-card--compact {
  max-width: 35rem;
  grid-template-columns: 1fr;
  padding: clamp(2rem, 7vw, 4rem);
  text-align: center;
}

.portal-card--compact .name-accent {
  width: 2.5rem;
  height: 0.32rem;
  margin: 1.15rem auto 1.35rem;
  border-radius: 999px;
  background: var(--primary);
}

.portal-card--compact .bio {
  margin-inline: auto;
  padding-left: 0;
  border-left: 0;
}

.portal-card--compact .enter-button {
  max-width: 22rem;
  margin-inline: auto;
  text-align: left;
}

@media (max-width: 760px) {
  body {
    padding: 1rem;
    /* Replace assets/mobile-background.jpeg to customize the mobile wallpaper. */
    background-image:
      linear-gradient(rgb(244 237 241 / 10%), rgb(235 225 231 / 18%)),
      url("./assets/mobile-background.jpeg");
    background-position: center;
    background-size: cover;
    background-attachment: scroll;
  }

  .portal-card {
    width: min(34rem, 100%);
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 1.35rem;
  }

  .portrait-ring {
    width: min(66vw, 15rem);
  }

  .profile-copy {
    text-align: left;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

  .social-links a,
  .social-links button {
    justify-content: flex-start;
    padding-inline: 1.1rem;
  }

  footer {
    max-width: 24rem;
  }
}

@media (max-width: 390px) {
  body {
    padding: 0.7rem;
  }

  .portal-card {
    padding: 1.05rem;
    border-radius: 1.4rem;
  }

  .terminal-command {
    font-size: 0.7rem;
  }

  .terminal-input {
    margin-left: 0.35rem;
  }

  h1 {
    font-size: clamp(2.3rem, 14vw, 3.2rem);
  }

  .tags {
    gap: 0.4rem;
  }

  .enter-button {
    gap: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .typing-cursor {
    animation: none;
    opacity: 0;
  }
}
