/* contact card in the occaecat.tech style: paper, hairlines, lime accent */

:root {
  --bg: #f4f2ec;
  --card: #fbfaf6;
  --ink: #141413;
  --ink2: #6d6b64;
  --chip: #ebe8e0;
  --line: rgba(20, 20, 19, .1);
  --line-strong: rgba(20, 20, 19, .28);
  --accent: #c7ff37;
  --accent-ink: #141413;
  --r: 16px;
  --sans: "Google Sans Flex", "Golos Text", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d0d0c;
  --card: #141413;
  --ink: #f1efe8;
  --ink2: #9b988f;
  --chip: #1f1f1d;
  --line: rgba(241, 239, 232, .09);
  --line-strong: rgba(241, 239, 232, .26);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0c;
    --card: #141413;
    --ink: #f1efe8;
    --ink2: #9b988f;
    --chip: #1f1f1d;
    --line: rgba(241, 239, 232, .09);
    --line-strong: rgba(241, 239, 232, .26);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100svh;
  display: grid;
  align-items: center;
  font: 15px/1.5 var(--sans);
  transition: background-color .3s, color .3s;
  -webkit-font-smoothing: antialiased;
}

@property --gx {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 35%;
}

@property --gy {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 65%;
}

/* two soft lime blobs drifting past each other at the top of the page */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 420px;
  background:
    radial-gradient(360px 220px at var(--gx) -30px, color-mix(in srgb, var(--accent) 17%, transparent), transparent 70%),
    radial-gradient(300px 180px at var(--gy) -20px, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%);
  pointer-events: none;
  animation: glow 14s ease-in-out infinite alternate;
}

@keyframes glow {
  from { --gx: 20%; --gy: 85%; }
  to   { --gx: 80%; --gy: 15%; }
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; text-decoration: none; }
h1, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

.wrap { position: relative; width: 100%; max-width: 480px; margin: 0 auto; padding: 56px 16px 40px; }

.bar { position: absolute; top: 12px; left: 16px; right: 16px; display: flex; justify-content: flex-end; gap: 8px; height: 44px; align-items: center; z-index: 2; }

.lang-btn, .icon-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: 12px var(--mono);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-btn { padding: 0; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-btn .fill { fill: currentColor; }
.lang-btn:hover, .icon-btn:hover { border-color: var(--line-strong); }

.profile { position: relative; text-align: center; padding: 0 0 20px; }

.portraits {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: -16px;
}
.avatar {
  display: block;
  height: auto;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}
.avatar { width: 240px; max-width: 100%; }
h1 { position: relative; font-size: clamp(40px, 12.5vw, 56px); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.sub { margin-top: 10px; color: var(--ink2); font: 13px var(--mono); }

.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  font: 12px var(--mono);
  transition: border-color .2s, background-color .2s, color .2s;
}
.action svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.action-site { position: relative; clip-path: inset(0 round var(--r)); }
.action-site::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  /* two lobes of different strength so the glow is lumpy, not a clean ring */
  background: conic-gradient(from var(--spin),
    transparent 0, transparent 12%,
    color-mix(in srgb, var(--accent) 32%, transparent) 30%,
    transparent 44%,
    color-mix(in srgb, var(--accent) 62%, transparent) 70%,
    color-mix(in srgb, var(--accent) 18%, transparent) 88%,
    transparent 100%);
  pointer-events: none;
  opacity: 0;
  animation: spin-once 2.4s .6s cubic-bezier(.45, 0, .25, 1) 1 both;
}

/* soft patch in the button's own colour: only the edges keep the glow, no visible rim */
.action-site::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 0 14px 10px var(--card);
  pointer-events: none;
}
.action-site > * { position: relative; z-index: 1; }
.action-site:active::after { display: none; }

@keyframes spin-once {
  0%   { --spin: 0deg;   opacity: 0; }
  15%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { --spin: 360deg; opacity: 0; }
}

.action:active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

.group a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 10px 16px; position: relative; }
.group a::after {
  content: "↗";
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--ink2);
  font: 15px var(--mono);
  transition: transform .2s, color .2s;
}
.group li:active a::after { color: var(--accent-ink); }
.group li + li a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 0;
  border-top: .5px solid var(--line);
}
.group li:active a { background: var(--accent); color: var(--accent-ink); }
.group li:active small, .group li:active span { color: var(--accent-ink); }
.group small { display: block; color: var(--ink2); font: 11px/1.4 var(--mono); }
.group span { color: var(--ink); font-weight: 500; }

.save {
  display: block;
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--r);
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
  font: 600 13px var(--mono);
  transition: transform .15s, filter .2s;
}
.save:active { transform: scale(.98); }

@media (hover: hover) {
  .save:hover { filter: brightness(1.06); }
  .action:hover { border-color: var(--line-strong); }
  .group a:hover { background: var(--chip); }
  .group a:hover::after { transform: translate(2px, -2px); color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  body::before { animation: none; }
  .action-site::before { animation: none; display: none; }
}

.surname { display: inline-block; transform: translateY(.22em); }
