/* Public page. Palette and type follow navlacil.cz: signal orange, deep navy, warm paper, Switzer.
   One narrow column: profile, link bars, social icons. */
:root {
  color-scheme: light;
  --bg: #f2ede9;
  --surface: #ffffff;
  --ink: #08131d;
  --muted: #5f666b;
  --line: #ddd5ce;
  --accent: #f97c00;
  --accent-ink: #08131d;
  --focus: #b85a00;
  --font: "Switzer", Roboto, "Segoe UI", Arial, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #08131d; --surface: #112130; --ink: #f2ede9; --muted: #9ba7af;
    --line: #223648; --focus: #f97c00;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08131d; --surface: #112130; --ink: #f2ede9; --muted: #9ba7af;
  --line: #223648; --focus: #f97c00;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  border-top: 6px solid var(--accent);
  padding-block: 48px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.page { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }

.theme-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: max(12px, env(safe-area-inset-right, 0px));
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink);
  cursor: pointer; padding: 0;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.profile { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.avatar {
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent); color: var(--accent-ink);
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  font-weight: 700; font-size: 2.3rem; letter-spacing: -0.02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
h1 {
  margin: 6px 0 0;
  font-weight: 700;
  font-size: clamp(2.2rem, 9vw, 3rem); line-height: 1; letter-spacing: -0.035em;
  text-wrap: balance; overflow-wrap: anywhere;
}
.handle { margin: -6px 0 0; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.bio { margin: 0; max-width: 36ch; color: var(--muted); text-wrap: balance; overflow-wrap: anywhere; }

.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.link {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  padding: 14px 16px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.link:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateY(-2px); }
.link .ico {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg); color: var(--ink);
}
.link:hover .ico { background: var(--accent); color: var(--accent-ink); }
.link .ico svg { width: 20px; height: 20px; }
.link .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link .title { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.link .host { font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.link:hover .host { color: inherit; opacity: .75; }
.link .arrow { flex: none; width: 18px; height: 18px; color: var(--muted); }
.link:hover .arrow { color: var(--accent); }

.link.featured { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); padding: 18px; }
.link.featured .ico { background: var(--accent-ink); color: var(--accent); }
.link.featured .host, .link.featured .arrow { color: var(--accent-ink); opacity: .8; }
.link.featured .title { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.015em; }
.link.featured:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.link.featured:hover .ico { background: var(--accent); color: var(--accent-ink); }
.link.featured:hover .host, .link.featured:hover .arrow { color: inherit; }

.group-label {
  margin: 12px 2px -2px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.socials a {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.socials a:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; }

footer { text-align: center; color: var(--muted); font-size: 0.8rem; }

@media (prefers-reduced-motion: reduce) {
  .link, .socials a { transition: none; }
  .link:hover, .socials a:hover { transform: none; }
}
