:root {
  --bg: #f4f1ea;
  --text: #2b2824;
  --muted: #6b665c;
  --rust: #c1502e;
  --teal: #2f7d75;
  --mustard: #b07a12;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.card {
  width: 100%;
  max-width: 30rem;
  text-align: center;
}

.mark {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.mark span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}

.mark span:nth-child(1) { background: var(--rust); }
.mark span:nth-child(2) { background: var(--teal); animation-delay: 0.4s; }
.mark span:nth-child(3) { background: var(--mustard); animation-delay: 0.8s; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: 0.5; }
}

.name {
  position: relative;
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  padding-bottom: 0.9rem;
  letter-spacing: 0.02em;
  background-image: linear-gradient(90deg, var(--rust), var(--mustard));
  background-size: 2.75rem 3px;
  background-repeat: no-repeat;
  background-position: bottom center;
}

/* Glitch: two colour-split copies revealed on hover */
.name::before,
.name::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  padding-bottom: 0.9rem;
  background: none;
  opacity: 0;
  pointer-events: none;
}

.name:hover::before {
  opacity: 0.9;
  color: var(--rust);
  animation: glitch-a 0.42s steps(2, end) infinite;
}

.name:hover::after {
  opacity: 0.9;
  color: var(--teal);
  animation: glitch-b 0.42s steps(2, end) infinite;
}

@keyframes glitch-a {
  0%   { transform: translate(0, 0); clip-path: inset(0 0 62% 0); }
  50%  { transform: translate(-2px, -1px); clip-path: inset(38% 0 20% 0); }
  100% { transform: translate(2px, 1px); clip-path: inset(8% 0 54% 0); }
}

@keyframes glitch-b {
  0%   { transform: translate(0, 0); clip-path: inset(60% 0 4% 0); }
  50%  { transform: translate(2px, 1px); clip-path: inset(22% 0 42% 0); }
  100% { transform: translate(-2px, -1px); clip-path: inset(48% 0 14% 0); }
}

.role {
  color: var(--muted);
  margin: 0 0 2.25rem;
  font-size: 0.9rem;
}

.contact {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 0.4rem 1.25rem;
  text-align: left;
  margin: 0 auto 2.5rem;
}

.contact .label {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.contact .label:nth-of-type(1) { color: var(--rust); }
.contact .label:nth-of-type(2) { color: var(--teal); }
.contact .label:nth-of-type(3) { color: var(--mustard); }

.contact a {
  color: var(--text);
  text-decoration: none;
}

.contact a:nth-of-type(1):hover { color: var(--rust); }
.contact a:nth-of-type(2):hover { color: var(--teal); }
.contact a:nth-of-type(3):hover { color: var(--mustard); }

.archive {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.archive:hover { color: var(--text); }

.archive .arrow { color: var(--teal); }

@media (max-width: 480px) {
  .contact { grid-template-columns: auto; gap: 0.15rem 0; }
  .contact .label { margin-top: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mark span,
  .name:hover::before,
  .name:hover::after { animation: none; }
}
