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

@font-face {
  font-family: Inter;
  src: url("fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #121212;
  --text: #ffffff;
  --muted: #a3a3a3;
  --line: #3a3a3a;
  --card-line: #4a4a4a;
  --select: #0c3a78;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--select);
  color: #ffffff;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 72px clamp(20px, 12.5vw, 240px);
  color-scheme: dark;
}

main {
  position: relative;
  top: 36px;
  width: min(700px, 100%);
}

button,
a {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid #1d4e9c;
  outline-offset: 3px;
}

.social {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 26px;
  width: max-content;
  max-width: 100%;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.icon-link img {
  width: 26px;
  height: 26px;
  display: block;
}

.icon-link:hover img,
.icon-link:focus-visible img {
  opacity: 0.72;
}

.popwrap {
  display: flex;
}

.card {
  position: absolute;
  bottom: calc(100% + 14px);
  z-index: 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 1px;
  align-items: center;
  min-width: 280px;
  padding: 10px 12px 10px 10px;
  background: var(--bg);
  border: 1px solid var(--card-line);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.discord-card {
  left: 0;
}

.email-card {
  left: 118px;
  right: auto;
}

.card::before {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: var(--bg);
  border-right: 1px solid var(--card-line);
  border-bottom: 1px solid var(--card-line);
  transform: rotate(45deg);
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -16px;
  height: 16px;
}

.discord-card::before {
  left: 90px;
}

.github-card {
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 40px);
}

.github-card::before {
  left: 7px;
}

.github-card a {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  text-decoration: none;
}

.github-card a:hover,
.github-card a:focus-visible {
  opacity: 0.72;
}

.github-card .card-name,
.github-card .card-sub {
  white-space: normal;
  overflow-wrap: anywhere;
}

.email-card::before {
  left: 14px;
}

.popwrap:hover:not(.is-dismissed) .card,
.popwrap:focus-within:not(.is-dismissed) .card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.avatar,
.mail-bubble {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.avatar {
  object-fit: cover;
  display: block;
}

.mail-bubble {
  display: grid;
  place-items: center;
  background: #2a2a2a;
}

.mail-bubble img {
  width: 18px;
  height: 18px;
}

.card-name,
.card-sub {
  margin: 0;
  white-space: nowrap;
}

.card-name {
  grid-column: 2;
  grid-row: 1;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
}

.card-sub {
  grid-column: 2;
  grid-row: 2;
  font-size: 14px;
  line-height: 1.2;
}

.copy {
  grid-column: 3;
  grid-row: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.copy-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.copy-value {
  padding: 3px 8px;
  border-radius: 6px;
  background: #3a3a3a;
  font-size: 13px;
  line-height: 1.3;
  color: #ffffff;
}

h1 {
  margin: 0 0 4px;
  font-size: 96px;
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0;
}

.bio {
  margin: 0;
  max-width: 624px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.35;
}

.bio + .bio {
  margin-top: 18px;
}

.panel {
  width: max-content;
  max-width: 100%;
  margin-top: 28px;
  padding: 8px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.panel h2 {
  margin: 6px 2px 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
}

.panel h2:first-child {
  margin-top: 2px;
}

.tools {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools + h2 {
  margin-top: 10px;
}

.tool {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.tool > img,
.mark {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
}

.mark {
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.mark.figma {
  background: #2c2c2c;
}

.mark.figma img {
  width: 24px;
  height: 34px;
  display: block;
}

.tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: 210px;
  padding: 10px 12px 11px;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  background: #161616;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  text-align: left;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tool:hover .tip,
.tool:focus .tip,
.tool:focus-visible .tip {
  opacity: 1;
  visibility: visible;
}

.tip-name,
.tip-skill,
.tip-about {
  display: block;
}

.tip-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.tip-skill {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.tip-about {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #ffffff;
  text-transform: none;
}

@media (max-width: 760px) {
  body {
    align-items: flex-start;
    padding: 56px 20px 40px;
  }

  h1 {
    font-size: clamp(40px, 12vw, 72px);
  }

  .bio {
    font-size: 16px;
  }

  .card,
  .discord-card,
  .email-card {
    left: 0;
    right: auto;
    min-width: 0;
    max-width: calc(100vw - 40px);
  }

  .github-card {
    bottom: auto;
    top: calc(100% + 14px);
  }

  .github-card::before {
    bottom: auto;
    top: -6px;
    border-right: 0;
    border-bottom: 0;
    border-top: 1px solid var(--card-line);
    border-left: 1px solid var(--card-line);
  }

  .github-card::after {
    bottom: auto;
    top: -16px;
  }

  .card-sub,
  .copy-value {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .tools {
    gap: 8px;
  }

  .tool,
  .tool > img,
  .mark {
    width: 34px;
    height: 34px;
  }

  .mark.figma img {
    width: 18px;
    height: 26px;
  }
}
