:root {
  --bg: #e7f4ef;
  --bg-deep: #c8e4db;
  --fg: #12302d;
  --muted: #45645f;
  --accent-strong: #0c5b4d;
  --coral: #c76748;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-strong: rgba(255, 255, 255, 0.84);
  --glass-border: rgba(255, 255, 255, 0.86);
  --glass-shadow: 0 18px 45px rgba(18, 48, 45, 0.14);
  --hover-bg: rgba(255, 255, 255, 0.94);
  --focus: #bd5a3c;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
  --display: Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not(.scheme-light) {
    --bg: #102522;
    --bg-deep: #183b34;
    --fg: #f0f7f3;
    --muted: #c2d4ce;
    --accent-strong: #8be0c5;
    --coral: #ffae8d;
    --glass-bg: rgba(16, 37, 34, 0.76);
    --glass-bg-strong: rgba(18, 45, 41, 0.88);
    --glass-border: rgba(221, 247, 237, 0.24);
    --glass-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    --hover-bg: rgba(36, 75, 66, 0.9);
    --focus: #ffd2bd;
  }
}

:root.scheme-dark {
  --bg: #102522;
  --bg-deep: #183b34;
  --fg: #f0f7f3;
  --muted: #c2d4ce;
  --accent-strong: #8be0c5;
  --coral: #ffae8d;
  --glass-bg: rgba(16, 37, 34, 0.76);
  --glass-bg-strong: rgba(18, 45, 41, 0.88);
  --glass-border: rgba(221, 247, 237, 0.24);
  --glass-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --hover-bg: rgba(36, 75, 66, 0.9);
  --focus: #ffd2bd;
}

@media (prefers-color-scheme: dark) {
  :root:not(.scheme-light) body::before {
    background: linear-gradient(180deg, rgba(10, 35, 31, 0.76), rgba(8, 24, 22, 0.88)), url("./images/ilhabela.jpg") center / cover;
  }
}

:root.scheme-dark body::before {
  background: linear-gradient(180deg, rgba(10, 35, 31, 0.76), rgba(8, 24, 22, 0.88)), url("./images/ilhabela.jpg") center / cover;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { min-width: 320px; }

body {
  min-height: 100vh;
  padding: calc(24px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  background: linear-gradient(145deg, var(--bg), var(--bg-deep));
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, rgba(230, 249, 243, 0.72), rgba(226, 240, 234, 0.9)), url("./images/ilhabela.jpg") center / cover;
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(125deg, rgba(16, 105, 91, 0.14), transparent 48%, rgba(199, 103, 72, 0.12));
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
.bg-shape { display: none; }

.container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--glass-shadow);
}

.profile-card { padding: 30px 24px 28px; margin-bottom: 16px; text-align: center; }

.profile-pic {
  width: clamp(86px, 24vw, 112px);
  height: clamp(86px, 24vw, 112px);
  display: block;
  margin: 0 auto 17px;
  object-fit: cover;
  border: 0px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  box-shadow: 0 7px 18px rgba(12, 91, 77, 0.22);
}

.name {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 6vw, 2.25rem);
  line-height: 1.1;
  font-weight: 700;
}

.description { max-width: 34ch; margin: 0 auto; color: var(--muted); text-wrap: pretty; }

.links { display: flex; flex-direction: column; gap: 11px; margin-bottom: 20px; }

.link-button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px 15px;
  color: var(--fg);
  font-weight: 600;
  overflow-wrap: anywhere;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.link-button:hover { background: var(--hover-bg); transform: translateY(-2px); }
.link-button:focus-visible,
.icon-button:focus-visible,
.language-switcher a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.link-wifi {
  animation: wifi-attention 4.8s ease-in-out infinite;
  border-color: rgba(25, 119, 101, 0.38);
}

.link-wifi .link-icon { animation: wifi-icon-pulse 4.8s ease-in-out infinite; }

@keyframes wifi-attention {
  0%, 72%, 100% { box-shadow: var(--glass-shadow); }
  78% { box-shadow: 0 0 0 4px rgba(25, 119, 101, 0.14), 0 18px 45px rgba(18, 48, 45, 0.18); }
  84% { box-shadow: 0 0 0 8px rgba(25, 119, 101, 0), 0 18px 45px rgba(18, 48, 45, 0.14); }
}

@keyframes wifi-icon-pulse {
  0%, 72%, 100% { transform: scale(1); }
  78% { transform: scale(1.12); }
  84% { transform: scale(1); }
}

.link-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(25, 119, 101, 0.12);
  color: var(--accent-strong);
}

.link-icon i { font-size: 15px; }
.link-text { min-width: 0; flex: 1; }
.link-button-text { margin-left: 5px; color: var(--muted); font-size: 0.85em; font-weight: 500; }

.button-container { padding: 11px 15px; }
.button-group { display: flex; justify-content: space-around; align-items: center; gap: 8px; flex-wrap: wrap; }

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--accent-strong);
  transition: transform 180ms ease, background 180ms ease;
}

.icon-button:hover { background: rgba(25, 119, 101, 0.12); transform: translateY(-2px); }
.icon-button i { font-size: 18px; }

.footer {
  margin-top: 22px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
}

.footer a { color: var(--accent-strong); border-bottom: 1px solid currentColor; }
.copyright { margin-top: 8px; font-size: 0.9em; }

.link-button.link-latest { align-items: flex-start; border-color: rgba(199, 103, 72, 0.42); box-shadow: 0 12px 28px rgba(199, 103, 72, 0.13); }

.link-latest-badge {
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 1px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.link-latest .link-text { min-width: 0; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.35; }

@media (prefers-color-scheme: dark) {
  :root:not(.scheme-light) .link-latest-badge { background: var(--coral); color: #2b1710; }
}

:root.scheme-dark .link-latest-badge { background: var(--coral); color: #2b1710; }

@media (min-width: 560px) {
  body { padding-top: 48px; }
  .profile-card { padding: 36px 32px 32px; }
}

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

@supports not (backdrop-filter: blur(18px)) {
  .card { background: var(--glass-bg-strong); }
}