/*
 * linkprofile "editorial" theme: a big Lexend headline on an accent gradient, white link cards.
 * Inter is (c) The Inter Project Authors and Lexend (c) The Lexend Project Authors, both
 * SIL OFL 1.1 (assets/fonts/OFL-inter.txt, assets/fonts/OFL-lexend.txt).
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/lexend-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/lexend-latin-800-normal.woff2") format("woff2");
}

/*
 * Colours. Light (a pale accent tint) is the base; dark (a deep accent gradient) applies when
 * the theme option "mode" is "dark" (the default), or "auto" and the system prefers dark.
 * Everything is mixed from the accent, so the palette sits on body, where the accent is set.
 * In dark mode the gradient is capped at 65% accent (the rest black) and the header and links
 * heading sit on a dark scrim, so white text keeps 4.5:1 or more for any accent. The light
 * mode's accent text is 42% accent, for the same reason. The link cards are white in both modes.
 */
body {
  --bg: linear-gradient(115deg, color-mix(in srgb, var(--accent) 3%, #ffffff) 0%, color-mix(in srgb, var(--accent) 8%, #ffffff) 40%, color-mix(in srgb, var(--accent) 16%, #ffffff) 100%);
  --bg-solid: color-mix(in srgb, var(--accent) 8%, #ffffff);
  --ink: #0f172a;
  --muted: #64748b;
  --accent-ink: color-mix(in srgb, var(--accent) 42%, #000000);
  --scrim: color-mix(in srgb, color-mix(in srgb, var(--accent) 25%, #000000) 65%, transparent);
  --pattern: color-mix(in srgb, var(--accent) 5%, transparent);
  --pattern-faint: color-mix(in srgb, var(--accent) 2%, transparent);
  --hero-bg: rgb(255 255 255 / 0.9);
  --hero-border: color-mix(in srgb, var(--accent) 15%, transparent);
  --hero-shadow: color-mix(in srgb, var(--accent) 10%, transparent);
  --title: #0f172a;
  --social-bg: #f1f5f9;
  --social-hover: #e2e8f0;
  --social-border: rgb(15 23 42 / 0.08);
  --pill-bg: color-mix(in srgb, var(--accent) 8%, transparent);
  --pill-border: color-mix(in srgb, var(--accent) 15%, transparent);
  --pill-ink: var(--accent-ink);
  --rule: rgb(15 23 42 / 0.1);
}

:root {
  color-scheme: light;
}

:root[data-mode="dark"] {
  color-scheme: dark;
}

:root[data-mode="auto"] {
  color-scheme: light dark;
}

/* The dark palette: keep in sync with the prefers-color-scheme block below. */
:root[data-mode="dark"] body {
  --bg: linear-gradient(115deg, color-mix(in srgb, var(--accent) 28%, #000000) 0%, color-mix(in srgb, var(--accent) 42%, #000000) 35%, color-mix(in srgb, var(--accent) 55%, #000000) 70%, color-mix(in srgb, var(--accent) 65%, #000000) 100%);
  --bg-solid: color-mix(in srgb, var(--accent) 42%, #000000);
  --ink: #ffffff;
  --muted: rgb(255 255 255 / 0.92);
  --pattern: rgb(255 255 255 / 0.05);
  --pattern-faint: rgb(255 255 255 / 0.03);
  --hero-bg: var(--scrim);
  --hero-border: rgb(255 255 255 / 0.16);
  --hero-shadow: rgb(0 0 0 / 0.3);
  --title: #ffffff;
  --social-bg: rgb(255 255 255 / 0.1);
  --social-hover: rgb(255 255 255 / 0.22);
  --social-border: rgb(255 255 255 / 0.15);
  --pill-bg: var(--scrim);
  --pill-border: rgb(255 255 255 / 0.2);
  --pill-ink: #ffffff;
  --rule: rgb(255 255 255 / 0.15);
}

@media (prefers-color-scheme: dark) {
  :root[data-mode="auto"] body {
    --bg: linear-gradient(115deg, color-mix(in srgb, var(--accent) 28%, #000000) 0%, color-mix(in srgb, var(--accent) 42%, #000000) 35%, color-mix(in srgb, var(--accent) 55%, #000000) 70%, color-mix(in srgb, var(--accent) 65%, #000000) 100%);
    --bg-solid: color-mix(in srgb, var(--accent) 42%, #000000);
    --ink: #ffffff;
    --muted: rgb(255 255 255 / 0.92);
    --pattern: rgb(255 255 255 / 0.05);
    --pattern-faint: rgb(255 255 255 / 0.03);
    --hero-bg: var(--scrim);
    --hero-border: rgb(255 255 255 / 0.16);
    --hero-shadow: rgb(0 0 0 / 0.3);
    --title: #ffffff;
    --social-bg: rgb(255 255 255 / 0.1);
    --social-hover: rgb(255 255 255 / 0.22);
    --social-border: rgb(255 255 255 / 0.15);
    --pill-bg: var(--scrim);
    --pill-border: rgb(255 255 255 / 0.2);
    --pill-ink: #ffffff;
    --rule: rgb(255 255 255 / 0.15);
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-solid);
  background-image: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Decoration: a 46px grid over the page and concentric rings behind the header. */
body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: 0;
  background-size: 46px 46px;
  background-image:
    linear-gradient(to right, var(--pattern) 1px, transparent 1px),
    linear-gradient(to bottom, var(--pattern) 1px, transparent 1px);
}

body::after {
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 580px;
  height: 580px;
  border-radius: 50%;
  border: 1.5px solid var(--pattern);
  box-shadow: 0 0 0 70px var(--pattern), 0 0 0 140px var(--pattern-faint);
}

.ed-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header card */
.ed-hero {
  padding: 36px 32px;
  border-radius: 28px;
  background: var(--hero-bg);
  border: 1px solid var(--hero-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px -10px var(--hero-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ed-avatar {
  display: block;
  width: 86px;
  height: 86px;
  margin-bottom: 14px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  background: #ffffff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}

.ed-title {
  margin: 0;
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--title);
  overflow-wrap: anywhere;
}

.ed-bio {
  margin: 10px auto 0;
  max-width: 400px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Socials */
.ed-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  width: 100%;
}

.ed-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--social-bg);
  color: var(--ink);
  border: 1px solid var(--social-border);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.ed-social-btn:hover {
  transform: translateY(-2px);
  background: var(--social-hover);
}

.ed-social-btn svg {
  width: 17px;
  height: 17px;
}

/* Links heading: a pill on a rule */
.ed-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.ed-section-pill {
  margin: 0;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pill-ink);
}

.ed-section-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* Link cards: white in both modes */
.ed-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ed-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 18px;
  background: #ffffff;
  color: #1b1d22;
  text-decoration: none;
  box-shadow: 0 8px 24px -4px rgb(0 0 0 / 0.18);
  border: 1px solid rgb(255 255 255 / 0.3);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.ed-link-card:hover {
  transform: translateY(-2.5px);
  box-shadow: 0 14px 32px -4px rgb(0 0 0 / 0.28);
  border-color: var(--accent);
}

.ed-link-card:active {
  transform: translateY(0);
}

.ed-icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.ed-icon-tile svg {
  width: 24px;
  height: 24px;
}

/* A link's own colour fills the tile; on a dark colour (the build works it out) the glyph turns white. */
.is-colored {
  background: var(--link-color);
  border-color: transparent;
}

.ink-light {
  color: #ffffff;
}

.is-image {
  overflow: hidden;
}

.is-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ed-initial {
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-ink);
}

.is-colored .ed-initial {
  color: inherit;
}

.ed-link-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ed-link-title {
  font-family: "Lexend", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-link-url {
  margin-top: 1px;
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-arrow-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ed-link-card:hover .ed-arrow-box {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #ffffff;
  transform: translateX(3px);
}

.ed-arrow {
  width: 16px;
  height: 16px;
}

/* Focus */
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .ed-social-btn,
  .ed-link-card,
  .ed-arrow-box {
    transition: none;
  }

  .ed-social-btn:hover,
  .ed-link-card:hover,
  .ed-link-card:active,
  .ed-link-card:hover .ed-arrow-box {
    transform: none;
  }
}
