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

:root {
  /* Colors */
  --neutral-100: #ffffff;
  --neutral-500: #202032;
  --link-color: #0009ff;

  /* Fonts */
  --font-heading: 'Google Sans Flex', system-ui, -apple-system, sans-serif;
  --font-body: 'Google Sans Code', 'Courier New', monospace;

  /* Font sizes */
  --size-heading: 32px;
  --size-body: 12px;
  --size-separator: 13px;

  /* Line heights */
  --lh-heading: 1.6;
  --lh-body: 2;
  --lh-separator: 1.8;

  /* Spacing */
  --gap-section: 32px;
  --gap-links: 12px;
  --gap-link-line: 6px;
  --gap-link-icon: 4px;

  /* Layout */
  --content-width: 448px;
  --padding-bottom: 48px;

}

html,
body {
  height: 100%;
}

body {
  background-color: var(--neutral-100);
  color: var(--neutral-500);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Page layout ──────────────────────────────── */

.page {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 100vh;
}

.wrap {
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
  align-items: flex-start;
  justify-content: center;
  padding-bottom: var(--padding-bottom);
  width: var(--content-width);
  max-width: calc(100% - 48px);
}

/* ─── Name ─────────────────────────────────────── */

.name {
  font-family: var(--font-heading);
  font-size: var(--size-heading);
  font-weight: 500;
  font-style: normal;
  line-height: var(--lh-heading);
  color: var(--neutral-500);
}

/* ─── Bio & role ────────────────────────────────── */

.bio,
.role {
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: 400;
  font-style: normal;
  line-height: var(--lh-body);
  color: var(--neutral-500);
  width: 100%;
}

.role strong {
  font-weight: 700;
}

/* ─── Typing effect ─────────────────────────────── */

.typing-effect {
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  height: calc(var(--size-body) * var(--lh-body)); /* lock to one line = 24px */
}

.typing-prefix,
.typing-skill {
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: 400;
  font-style: normal;
  line-height: var(--lh-body);
  color: var(--neutral-500);
}

.cursor {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

.cursor.blinking {
  animation: blink 1.2s step-end infinite;
}

.cursor.typing {
  animation: none;
  opacity: 1;
}

.cursor.glitching {
  animation: glitch 0.4s step-end infinite;
}

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

@keyframes glitch {
  0%   { opacity: 1;   transform: translateX(0); }
  10%  { opacity: 0;   transform: translateX(2px); }
  20%  { opacity: 1;   transform: translateX(-1px); }
  30%  { opacity: 0;   transform: translateX(1px); }
  40%  { opacity: 1;   transform: translateX(-2px); }
  50%  { opacity: 0;   transform: translateX(0); }
  60%  { opacity: 1;   transform: translateX(2px); }
  70%  { opacity: 0;   transform: translateX(-1px); }
  80%  { opacity: 1;   transform: translateX(1px); }
  90%  { opacity: 0;   transform: translateX(0); }
  100% { opacity: 1;   transform: translateX(0); }
}

/* ─── Separator ─────────────────────────────────── */

.separator {
  font-family: var(--font-body);
  font-size: var(--size-separator);
  font-weight: 400;
  font-style: normal;
  line-height: var(--lh-separator);
  color: var(--neutral-500);
}

/* ─── Links ─────────────────────────────────────── */

.links {
  display: flex;
  flex-direction: column;
  gap: var(--gap-links);
  align-items: flex-start;
}

.link-line {
  display: flex;
  align-items: center;
  gap: var(--gap-link-line);
}

.link-label {
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: 400;
  font-style: normal;
  line-height: var(--lh-body);
  color: var(--neutral-500);
  white-space: nowrap;
}

.link-item {
  display: flex;
  align-items: center;
  gap: var(--gap-link-icon);
  text-decoration: none;
  color: var(--neutral-500);
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.link-text {
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: 400;
  font-style: normal;
  line-height: var(--lh-body);
  color: var(--link-color);
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: text-underline-offset 0.2s ease;
}

.link-item:hover .link-text {
  text-underline-offset: 5px;
}

.link-dot {
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--neutral-500);
}

/* ─── Entrance animation ─────────────────────────── */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.name                          { animation: fade-up 0.6s ease-out 0s   both; }
.bio, .role, .typing-effect    { animation: fade-up 0.6s ease-out 0.2s both; }
.separator                     { animation: fade-up 0.6s ease-out 0.4s both; }
.links                         { animation: fade-up 0.6s ease-out 0.6s both; }
