/*
 * styles.css — Structure, layout & typography for links.thns.dev
 * All color values are pulled from themes/thns.css via CSS custom properties.
 */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 3rem) 1.25rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;

  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(60rem 60rem at 15% -10%, var(--glow-a), transparent 60%),
    radial-gradient(50rem 50rem at 110% 10%, var(--glow-b), transparent 55%);
  background-attachment: fixed;
}

.page {
  width: 100%;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ---------- Header / profile ---------- */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
}

.profile__avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 0 0 6px var(--bg-elev), 0 18px 40px -18px var(--shadow);
}

.profile__name {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile__tagline {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- Social row ---------- */

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease,
    background 0.18s ease;
}

.social:hover,
.social:focus-visible {
  color: var(--accent-strong);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.social svg {
  width: 20px;
  height: 20px;
}

/* ---------- Links ---------- */

.links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1.15rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px -22px var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.link__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.link__title {
  font-weight: 600;
  font-size: 1.1rem;
}

.link__subtitle {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link__chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease;
}

.link:hover .link__chevron,
.link:focus-visible .link__chevron {
  color: var(--accent);
  transform: translateX(3px);
}

/* Featured link — amber gradient accent */
.link--featured {
  background: linear-gradient(120deg, var(--highlight-from), var(--highlight-to));
  border-color: transparent;
  color: var(--highlight-ink);
}

.link--featured .link__subtitle,
.link--featured .link__chevron {
  color: var(--highlight-ink);
  opacity: 0.85;
}

.link--featured:hover,
.link--featured:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-2px);
}

.link--featured:hover .link__chevron,
.link--featured:focus-visible .link__chevron {
  color: var(--highlight-ink);
}

/* ---------- Footer ---------- */

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

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

/* ---------- Focus & motion ---------- */

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

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