@font-face {
  font-family: Rubik;
  src: url("./assets/fonts/rubik-cyrillic.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Rubik;
  src: url("./assets/fonts/rubik-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --orange: #ff792b;
  --paper: #fff7e7;
  --ink: #24211e;
  --card-pad: 28px;
  --mascot-width: clamp(110px, 17vw, 200px);
  font-family: Rubik, system-ui, sans-serif;
  color: var(--ink);
  background: var(--orange);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; }

.scene {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(32px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
           max(42px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

.card {
  position: relative;
  width: min(460px, calc(100% - var(--mascot-width) * .82));
  margin-inline-start: calc(var(--mascot-width) * .82);
  padding: 26px var(--card-pad) var(--card-pad);
  border: 2px solid var(--ink);
  border-radius: 25px;
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--ink);
}

.profile {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  padding-bottom: 23px;
}

.mascot {
  position: absolute;
  z-index: 1;
  top: 90px;
  left: calc(0px - var(--card-pad) - 1px);
  width: var(--mascot-width);
  height: auto;
  transform: translateX(-81.5%);
  pointer-events: none;
}

.portrait {
  position: relative;
  margin-bottom: 12px;
}

.portrait img {
  width: 88px;
  height: 88px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 2px 3px 0 var(--ink);
}

/* The two glints are part of the portrait decoration. */
.portrait::before, .portrait::after {
  content: "";
  position: absolute;
  background: var(--ink);
  clip-path: polygon(50% 0, 62% 37%, 100% 50%, 63% 62%, 50% 100%, 37% 63%, 0 50%, 38% 37%);
}

.portrait::before { width: 19px; height: 26px; top: 12px; right: -29px; rotate: 13deg; }
.portrait::after { width: 10px; height: 14px; top: 5px; right: -40px; rotate: 16deg; }

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.65rem);
  font-weight: 890;
  line-height: 1;
  letter-spacing: -.05em;
  word-spacing: .1em;
  text-transform: uppercase;
}

.handle {
  margin: 6px 0 0;
  color: #65574c;
  font-size: .9375rem;
  font-weight: 500;
}

.links { position: relative; }
.socials { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.social, .sticker-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  min-height: 55px;
  padding: 7px 18px 7px 9px;
  border: 2px solid var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.social {
  border-radius: 12px;
  color: var(--paper);
  background: var(--ink);
  font-size: 1.05rem;
  font-weight: 720;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.telegram { background: #a6e1ff; }
.vk { background: #b6caff; }
.tiktok { background: #a3e7dc; }
.instagram { background: #f4b9d8; }
.youtube { background: #ffaaa0; }

.arrow { position: relative; width: 14px; height: 14px; }
.arrow::before, .arrow::after { content: ""; position: absolute; }
.arrow::before {
  top: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-top: 2px solid;
  border-right: 2px solid;
}
.arrow::after {
  top: 6px;
  left: -1px;
  width: 17px;
  border-top: 2px solid;
  rotate: -45deg;
}

.sticker-row { border-top: 1px dashed #b4a18c; margin-top: 17px; padding-top: 17px; }
.sticker-link {
  min-height: 64px;
  color: var(--ink);
  background: #ffcf78;
  border-radius: 12px;
  padding-inline-start: 12px;
}
.sticker-label { display: grid; gap: 2px; }
.sticker-label strong { font-size: 1.08rem; font-weight: 730; line-height: 1.15; letter-spacing: -.025em; }
.sticker-label small { font-size: .78rem; line-height: 1.25; }

.sticker-face {
  position: relative;
  width: 33px;
  height: 33px;
  background: var(--paper);
  border: 2px solid;
  border-radius: 50% 45% 25% 50%;
  box-shadow: 1px 2px 0 var(--ink);
  rotate: -12deg;
}
.sticker-face::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 8px;
  width: 3px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 9px 0 var(--ink);
}
.sticker-face i {
  position: absolute;
  top: 12px;
  left: 7px;
  width: 15px;
  height: 9px;
  border-bottom: 2px solid;
  border-radius: 50%;
}
.sticker-face::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid;
  border-left: 1.5px solid;
  border-radius: 6px 0 4px 0;
  background: #ffc764;
}

a:focus-visible { outline: 3px solid #1859a1; outline-offset: 3px; }
@media (hover: hover) {
  .social:hover { background: #37312b; }
  .sticker-link:hover { background: #ffbe54; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .arrow { transition: transform .15s ease; }
  a:hover .arrow { transform: translate(2px, -2px); }
}

/* On phones he holds the profile tab, leaving the full width for the links. */
@media (max-width: 540px) {
  :root { --mascot-width: clamp(68px, 21vw, 88px); }
  .scene {
    padding: max(25px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
             max(32px, env(safe-area-inset-bottom)) max(15px, env(safe-area-inset-left));
  }
  .card {
    width: min(100%, 410px);
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .profile {
    margin-inline-start: calc(var(--mascot-width) * .82 + 2px);
    padding: 16px 8px 17px;
    border: 2px solid var(--ink);
    border-bottom: 0;
    border-radius: 21px 21px 0 0;
    background: var(--paper);
    box-shadow: 5px 3px 0 var(--ink);
  }
  .mascot { top: auto; bottom: 0; left: -1px; }
  .portrait { margin-bottom: 9px; }
  .portrait img { width: 67px; height: 67px; }
  .portrait::before { width: 13px; height: 19px; right: -21px; }
  .portrait::after { width: 7px; height: 11px; right: -29px; }
  h1 { font-size: clamp(2.05rem, 8.6vw, 2.8rem); }
  .handle { font-size: .85rem; margin-top: 4px; }
  .links {
    padding: 16px;
    border: 2px solid var(--ink);
    border-radius: 18px 0 18px 18px;
    background: var(--paper);
    box-shadow: 5px 5px 0 var(--ink);
  }
  .socials { gap: 8px; }
  .social, .sticker-link { column-gap: 11px; padding-inline-end: 14px; }
  .social { min-height: 52px; font-size: .97rem; }
  .sticker-row { margin-top: 14px; padding-top: 14px; }
  .sticker-label strong { font-size: 1rem; }
}
