:root {
  --bg: #f7f7f8;
  --text: #1d2330;
  --muted: #626b7c;
  --line: #d8dde7;
  --accent-1: #ff4f7b;
  --accent-2: #00a8a1;
  --accent-3: #ff9800;
  --accent-4: #3b82f6;
  --accent-5: #8b5cf6;
  --highlight-ink: #0f131b;
}

html[data-theme="dark"] {
  --bg: #11141b;
  --text: #e8edf8;
  --muted: #aeb9cf;
  --line: #333a4a;
  --accent-1: #ff7ca8;
  --accent-2: #2dd6cd;
  --accent-3: #ffb454;
  --accent-4: #7ab4ff;
  --accent-5: #b59aff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.7;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.card {
  width: min(760px, 100%);
  margin: 0;
  max-height: 100dvh;
  padding: clamp(0.9rem, 2.4vh, 1.8rem) 1.25rem clamp(1.4rem, 3.4vh, 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 1.35rem;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-4);
  outline-offset: 2px;
}

.toggle-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sun {
  display: none;
}

html[data-theme="dark"] .icon-sun {
  display: block;
}

html[data-theme="dark"] .icon-moon {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2 {
  font-family: inherit;
  margin: 0;
  font-weight: 600;
}

h1 {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(2.55rem, 6vw, 3.8rem);
  line-height: 1.1;
  color: var(--accent-1);
  letter-spacing: -0.02em;
}

.intro {
  margin-bottom: 0.4rem;
}

.lead {
  margin: 0.65rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.subtitle {
  margin: 0.7rem 0 0;
  color: var(--text);
  font-size: 1.03rem;
  min-height: 1.8rem;
}

.subtitle-role {
  color: var(--accent-5);
  font-weight: 600;
}

.typed {
  color: var(--text);
  font-weight: 500;
}

.caret {
  display: inline-block;
  width: 0.09em;
  height: 1em;
  margin-left: 0.14em;
  background: var(--text);
  transform: translateY(0.1em);
  animation: blink 0.9s steps(1, end) infinite;
}

.bio {
  margin-top: 2.45rem;
}

h2 {
  font-size: 1.45rem;
  margin-bottom: 1rem;
  color: var(--accent-2);
}

.bio p {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

a {
  color: var(--accent-5);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

a:hover {
  color: var(--accent-2);
}

a:focus-visible {
  outline: 2px solid var(--accent-4);
  outline-offset: 2px;
}

.strike {
  position: relative;
  display: inline-block;
}

.strike::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 52%;
  border-top: 1.5px solid currentColor;
  pointer-events: none;
}

.highlight {
  --highlight-color: currentColor;
  font-weight: 500;
  color: var(--highlight-color);
  padding: 0 0.08em;
  border-radius: 0.18em;
  background-image: linear-gradient(var(--highlight-color), var(--highlight-color));
  background-repeat: no-repeat;
  background-size: 100% 0.12em;
  background-position: 0 100%;
  box-decoration-break: clone;
  transition: background-size 0.24s ease, color 0.24s ease;
}

.highlight:hover {
  background-size: 100% 100%;
  color: var(--highlight-ink);
}

.h1 {
  --highlight-color: var(--accent-1);
}

.h2 {
  --highlight-color: var(--accent-2);
}

.h3 {
  --highlight-color: var(--accent-3);
}

@keyframes blink {
  0%,
  48% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
  }
}

@media (max-width: 640px) {
  .card {
    padding-top: 1rem;
  }

  .header {
    margin-bottom: 1.1rem;
  }
}
