/* ===== Tokens ===== */
:root {
  --bg-top: #1e4d4a;
  --bg-bottom: #08221f;
  --card: #0c2826;
  --line: rgba(255, 255, 255, .09);
  --row: rgba(255, 255, 255, .035);
  --row-hover: rgba(255, 255, 255, .07);
  --text: #f3eee6;
  --muted: #9db3ae;
  --peach: #f6c7a0;
  --peach-2: #f0b387;
  --on-peach: #2b180c;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  --avatar: 225px;
  --name: clamp(28px, 8.5vw, 34px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg-bottom);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Page gradient on its own fixed layer: background-attachment: fixed is broken on iOS */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 70%);
}

img, svg { display: block; }

/* ===== Layout ===== */
.page {
  display: flex;
  justify-content: center;
  padding: 24px 16px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 40px var(--gutter) 18px;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: -24px;
  z-index: -2;
  background: url("images/budapest-bg.webp") center / cover no-repeat;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.05) translateZ(0);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(12, 40, 38, .15) 0%,
    rgba(12, 40, 38, .35) 40%,
    rgba(12, 40, 38, .85) 72%,
    var(--card) 100%);
}

.avatar {
  width: var(--avatar);
  height: var(--avatar);
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--card);
  outline: 1px solid rgba(246, 199, 160, .6);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6);
  margin-bottom: 16px;
}

.name {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--name);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0;
}

/* ===== Body ===== */
.content { padding: 6px var(--gutter) 22px; }

.role {
  margin: 0 0 20px;
  text-align: center;
  font-size: 18px;
  line-height: 1.45;
  color: var(--muted);
}
.role strong { display: block; color: var(--text); font-weight: 600; }

.links { display: flex; flex-direction: column; gap: 8px; }

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--row);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.row:active { background: var(--row-hover); }

.row .ic { width: 20px; height: 20px; flex: none; color: var(--peach); }
.row .txt { flex: 1; min-width: 0; }
.row .t { display: block; font-weight: 600; font-size: 16px; line-height: 1.3; }
.row .s {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row .arr { width: 14px; height: 14px; flex: none; color: var(--muted); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--peach);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.cta {
  margin-top: 20px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--peach) 0%, var(--peach-2) 100%);
  color: var(--on-peach);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 10px 24px -10px rgba(240, 179, 135, .6), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cta:active { transform: scale(.985); }
.cta svg { width: 18px; height: 18px; }

.foot { margin: 18px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }

/* Focus */
.row:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--peach);
  outline-offset: 2px;
}

/* Hover only on real pointers (no sticky hover on touch) */
@media (hover: hover) and (pointer: fine) {
  .row:hover { background: var(--row-hover); border-color: rgba(255, 255, 255, .16); }
  .cta:hover { filter: brightness(1.04); }
}

/* ===== Phones: card goes edge to edge ===== */
@media (max-width: 480px) {
  .page { padding: 0; }
  .card {
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .hero { padding-top: calc(40px + env(safe-area-inset-top)); }
  .content {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
}

/* Very small phones (iPhone SE 1st gen, 320px) */
@media (max-width: 350px) {
  :root { --gutter: 16px; }
  .hero { min-height: 290px; }
  .row { gap: 12px; padding: 10px 12px; }
}

/* Landscape phones: shorter hero */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 0; padding-top: 32px; }
  :root { --avatar: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
