/* Pavel Puzin — pixel-art business card
   Palette: dark navy background, warm amber accent (Endesga-style, 6 colors) */

@font-face {
  font-family: "Silkscreen";
  src: url("/fonts/silkscreen-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Silkscreen";
  src: url("/fonts/silkscreen-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #14141c;
  --surface: #20202f;
  --text: #f4f1ea;
  --muted: #9497ab;
  --accent: #ffb400;
  --shadow: #000000;

  --pixel-font: "Silkscreen", monospace;
  --body-font: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --unit: 8px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* faint scanlines, kept well under 4% alpha */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
  z-index: 1;
}

.card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border: 4px solid var(--accent);
  box-shadow: 8px 8px 0 var(--shadow);
  padding: 24px;
}

.card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.sprite {
  flex: none;
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.identity h1 {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--pixel-font);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.3;
  margin: 0;
  letter-spacing: 1px;
}

.cursor {
  display: inline-block;
  width: 12px;
  height: 24px;
  margin-bottom: 4px;
  background: var(--accent);
  animation: blink 1s steps(2, start) infinite;
}

.role {
  font-family: var(--pixel-font);
  font-size: 13px;
  line-height: 1.6;
  color: var(--accent);
  margin: 8px 0 0;
  letter-spacing: 1px;
}

.tagline {
  font-size: 16px;
  color: var(--text);
  margin: 0 0 24px;
}

.section-label {
  font-family: var(--pixel-font);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 2px;
  margin: 0 0 8px;
}

.stack-groups {
  display: grid;
  gap: 16px;
  margin: 0 0 24px;
}

.stack-group__label {
  font-family: var(--body-font);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px;
}

.stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.stack li {
  border: 2px solid var(--muted);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  padding: 4px 8px;
}

.contact {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 8px;
}

.contact li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.contact .label {
  font-family: var(--pixel-font);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  min-width: 96px;
}

.contact a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-size: 16px;
  word-break: break-all;
}

.contact a:hover {
  border-bottom-color: var(--accent);
}

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

.meta {
  border-top: 2px solid var(--muted);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.sprite .cursor-pixel {
  animation: blink 1s steps(2, start) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .sprite .cursor-pixel {
    animation: none;
  }
}

@media (min-width: 768px) {
  .card {
    padding: 32px;
  }

  .identity h1 {
    font-size: 36px;
  }

  .role {
    font-size: 16px;
  }

  .cursor {
    width: 16px;
    height: 32px;
  }

  .sprite {
    width: 80px;
    height: 80px;
  }

  .tagline {
    font-size: 18px;
  }
}

@media (min-width: 1440px) {
  .card {
    max-width: 800px;
    padding: 40px;
  }

  .identity h1 {
    font-size: 40px;
  }
}

@media (max-width: 400px) {
  .card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .identity h1 {
    font-size: 22px;
  }

  .cursor {
    height: 16px;
    width: 8px;
  }

  .contact .label {
    min-width: 100%;
  }
}
