:root {
  --bg: #0d1117;
  --card: #161b22;
  --card-hover: #1c2330;
  --line: #30363d;
  --text: #e6edf3;
  --muted: #9da7b3;
  --accent: #58a6ff;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--sans);
  background: var(--bg);
}

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding:
    max(52px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(40px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 90% 42% at 50% -8%, rgba(88, 166, 255, 0.16), transparent 58%);
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 72%);
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px rgba(88, 166, 255, 0.12);
}

h1 {
  margin: 18px 0 0;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.bio {
  margin: 12px 0 0;
  max-width: 100%;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

html[lang="el"] .when-en,
html[lang="en"] .when-el {
  display: none;
}

.lang {
  margin: 22px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lang-code {
  padding: 0 8px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.lang-dot {
  color: #4a5568;
}

html[lang="el"] .lang-code[data-code="en"],
html[lang="en"] .lang-code[data-code="el"] {
  color: var(--muted);
}

html[lang="el"] .lang-code[data-code="el"],
html[lang="en"] .lang-code[data-code="en"] {
  color: var(--text);
  padding: 7px 10px;
  border-radius: 999px;
  background: #21262d;
}

.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0 0;
}

.link {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  column-gap: 8px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.link img,
.mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.link img {
  object-fit: cover;
  grid-column: 1;
}

.mark {
  grid-column: 1;
  display: grid;
  place-items: center;
  color: var(--text);
  background: #21262d;
}

.mark svg {
  width: 22px;
  height: 22px;
}

.mark-phone svg {
  width: 18px;
  height: 18px;
}

.link > span:not(.mark) {
  grid-column: 2;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 500;
}

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

@media (hover: hover) {
  .lang:hover,
  .link:hover {
    border-color: var(--accent);
    background: var(--card-hover);
  }
}

.link:active,
.lang:active {
  background: #12161d;
}

.qr {
  display: none;
}

@media (min-width: 720px) {
  .page {
    padding-top: 88px;
  }

  h1 {
    font-size: 1.9rem;
  }
}

@media (min-width: 840px) {
  .qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: fixed;
    z-index: 2;
    right: 28px;
    bottom: 28px;
    width: 160px;
    margin: 0;
  }

  .qr figcaption {
    margin: 0;
    text-align: center;
    font-family: var(--mono);
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--muted);
  }

  .qr img {
    width: 132px;
    height: 132px;
    border-radius: 12px;
    border: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lang,
  .link {
    transition: none;
  }
}

::selection {
  background: #1f6feb;
  color: #fff;
}
