@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Phosphor";
  src: url("/fonts/phosphor.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: light dark;
  --bg: #fbfbfb;
  --fg: #111113;
  --muted: #6b6b73;
  --line: rgb(17 17 19 / 0.11);
  --hover: rgb(17 17 19 / 0.04);
  --accent: #2b5cff;
  --radius: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --fg: #ededef;
    --muted: #86868e;
    --line: rgb(255 255 255 / 0.12);
    --hover: rgb(255 255 255 / 0.05);
    --accent: #86a5ff;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 3rem;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.stage {
  width: 100%;
  max-width: 25rem;
}

.identity { margin: 0 0 2.5rem; }

.name {
  margin: 0;
  font-size: clamp(2.5rem, 11vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.role {
  margin: 0.375rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.stack li {
  padding: 0.1875rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}

.links {
  display: grid;
  gap: 0.5rem;
}

.link {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.link--simple { grid-template-columns: 1fr auto; }

.link-name {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.link-handle {
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.8125rem;
}

.i {
  font-family: "Phosphor";
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  speak: never;
}

.i-github::before { content: "\e576"; }
.i-linkedin::before { content: "\e2ee"; }
.i-telegram::before { content: "\e5bc"; }
.i-arrow::before { content: "\e092"; }

.link .i-github,
.link .i-linkedin,
.link .i-telegram {
  font-size: 1.25rem;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.link .i-arrow {
  font-size: 0.875rem;
  color: var(--muted);
  opacity: 0.45;
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease),
    color 0.25s var(--ease);
}

@media (hover: hover) {
  .link:hover {
    background: var(--hover);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  }

  .link:hover .i-github,
  .link:hover .i-linkedin,
  .link:hover .i-telegram,
  .link:hover .i-arrow {
    color: var(--accent);
  }

  .link:hover .i-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
  }
}

.link:active { transform: scale(0.985); }

.link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .identity,
  .link {
    animation: rise 0.6s var(--ease) backwards;
  }

  .link:nth-child(1) { animation-delay: 0.08s; }
  .link:nth-child(2) { animation-delay: 0.14s; }
  .link:nth-child(3) { animation-delay: 0.2s; }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}
