:root {
  --text: #f4f7f8;
  --text-muted: rgba(244, 247, 248, 0.72);
  --glass: rgba(18, 30, 46, 0.45);
  --glass-border: rgba(255, 255, 255, 0.16);
  --chip: rgba(255, 255, 255, 0.08);
  --chip-hover: rgba(255, 255, 255, 0.18);
  --accent: #9fd3e0;
  --radius: 28px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #1c2b3d;
  -webkit-font-smoothing: antialiased;
}

/* Fixed layer instead of background-attachment: fixed (unsupported on iOS Safari) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(14, 24, 38, 0.05), rgba(14, 24, 38, 0.6)),
    url("../img/bg.webp") center 40% / cover no-repeat;
}

.card {
  width: min(100%, 400px);
  padding: 0;
  overflow: hidden;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 30%;
  /* fade the photo into the glass below */
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.body {
  margin-top: -44px;
  padding: 0 clamp(16px, 5vw, 28px) 32px;
  position: relative;
}

h1 {
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.role {
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 500;
}

.employer {
  margin-top: 2px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.employer span {
  color: var(--accent);
}

.focus {
  margin: 12px auto 0;
  max-width: 36ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.meta {
  list-style: none;
  padding: 20px 0 0;
  margin-top: 24px;
  border-top: 1px solid var(--glass-border);
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meta li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--chip);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.links a:hover {
  background: var(--chip-hover);
  transform: translateY(-2px);
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
  }

  .links a {
    transition: none;
  }
}
