:root {
  color-scheme: light;
  --bg: #f5f5f3;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #141414;
  --muted: #7a7a7a;
  --line: rgba(20, 20, 20, 0.10);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
  --radius-xl: 26px;
  --radius-lg: 16px;
  --accent: #2f6f74;
  --accent-soft: rgba(47, 111, 116, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 111, 116, 0.30), transparent 48%),
    radial-gradient(circle at 100% 100%, rgba(47, 111, 116, 0.18), transparent 44%),
    radial-gradient(circle at top left, rgba(0, 0, 0, 0.035), transparent 34%),
    radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.03), transparent 30%),
    var(--bg);
  color: var(--text);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 22px 18px 36px;
}

.profile-card {
  position: relative;
  background:
    radial-gradient(circle at 15% 0%, rgba(47, 111, 116, 0.22), transparent 52%),
    var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 26px 20px 20px;
}

.top-actions {
  position: absolute;
  top: 16px;
  right: 16px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  background: #fff;
}

.avatar-wrap {
  width: 88px;
  height: 88px;
  margin: 4px auto 14px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.profile-copy {
  text-align: center;
  margin-bottom: 22px;
}

.profile-copy h1 {
  margin: 0;
  font-size: clamp(22px, 5vw, 27px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.profile-copy p {
  margin: 6px 0 0;
  color: #666666;
  font-size: 14px;
  font-weight: 500;
}

.link-groups {
  display: grid;
  gap: 20px;
}

.link-group h2 {
  margin: 0 0 8px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.links-grid {
  display: grid;
  gap: 8px;
}

.link-card {
  display: grid;
  grid-template-columns: 36px 1fr 22px;
  align-items: center;
  min-height: 52px;
  padding: 8px 12px 8px 8px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(20, 20, 20, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 6px 16px rgba(0, 0, 0, 0.045);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.link-card:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 20, 20, 0.22);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 10px 22px rgba(0, 0, 0, 0.07);
}

.link-card:active {
  transform: translateY(0) scale(0.985);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition-duration: 60ms;
}

.link-card:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border-radius: 0;
}

.brand-mark img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.link-label {
  padding: 0 10px;
  font-size: 14.5px;
  font-weight: 600;
}

.arrow {
  justify-self: end;
  color: #a3a3a3;
  font-size: 16px;
}

.link-group--personal {
  padding-top: 4px;
}

.link-card--accent {
  border-color: rgba(47, 111, 116, 0.28);
  background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), rgba(255, 255, 255, 0.62);
}

footer {
  padding-top: 22px;
  text-align: center;
  color: rgba(122, 122, 122, 0.7);
  font-size: 11px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 680px) {
  .page-shell {
    padding-top: 44px;
  }

  .profile-card {
    padding: 34px 30px 24px;
  }

  .links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-group[aria-labelledby="contact-title"] .links-grid,
  .link-group[aria-labelledby="professional-title"] .links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-card {
    grid-template-columns: 36px 1fr 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
