/* Nonefiles Studio — link-in-bio
   Palette: Midnight #122C4F · Pearl #FBF9E4 · Ocean #5B88B2 · Noir #000000 */

:root {
  --midnight: #122c4f;
  --pearl: #fbf9e4;
  --ocean: #5b88b2;
  --ocean-strong: #4a76a0;

  --bg: #fbf9e4;
  --grid: rgba(18, 44, 79, 0.06);
  --surface: #ffffff;
  --surface-hover: #f4f6f9;
  --border: rgba(18, 44, 79, 0.12);
  --border-hover: rgba(91, 136, 178, 0.7);
  --text: #122c4f;
  --muted: rgba(18, 44, 79, 0.62);
  --icon-bg: #122c4f;
  --icon-fg: #fbf9e4;
  --cta-bg: #122c4f;
  --cta-fg: #fbf9e4;
  --cta-hover: #5b88b2;
  --shadow: 0 1px 2px rgba(18, 44, 79, 0.06), 0 8px 24px -12px rgba(18, 44, 79, 0.18);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a1626;
  --grid: rgba(251, 249, 228, 0.045);
  --surface: #11233b;
  --surface-hover: #163050;
  --border: rgba(251, 249, 228, 0.1);
  --border-hover: rgba(91, 136, 178, 0.8);
  --text: #fbf9e4;
  --muted: rgba(251, 249, 228, 0.62);
  --icon-bg: #5b88b2;
  --icon-fg: #ffffff;
  --cta-bg: #5b88b2;
  --cta-fg: #ffffff;
  --cta-hover: #4a76a0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Subtle grid + ocean glow, like the main site's hero */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 100%);
}
.backdrop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -140px;
  width: 520px;
  height: 520px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--ocean);
  opacity: 0.16;
  filter: blur(90px);
}

.page {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text);
  font: 600 12px/1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.icon-btn:hover {
  border-color: var(--border-hover);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn .moon {
  fill: currentColor;
  stroke: none;
}
:root[data-theme="light"] .icon-btn .sun,
:root[data-theme="dark"] .icon-btn .moon {
  display: none;
}

/* Profile */
.profile {
  text-align: center;
  margin: 12px 0 32px;
}
.avatar {
  width: 104px;
  height: 104px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--pearl);
  border: 1px solid rgba(18, 44, 79, 0.12);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ocean) 18%, transparent), var(--shadow);
}
.avatar img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.name {
  margin: 18px 0 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.name span {
  color: var(--ocean);
}
.tagline {
  margin: 8px auto 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.975rem;
}
.meta {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
.meta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ocean);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sections */
section + section {
  margin-top: 28px;
}
.section-title {
  margin: 0 0 12px;
  font: 600 11px/1 "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ocean);
  text-align: center;
}

/* Link cards */
.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.link:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}
.link:active {
  transform: translateY(0);
}
.link:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid var(--ocean);
  outline-offset: 3px;
}
.link-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--icon-bg);
  color: var(--icon-fg);
}
.link-icon svg {
  width: 20px;
  height: 20px;
}
.link-text {
  flex: 1;
  min-width: 0;
}
.link-label {
  display: block;
  font-weight: 600;
  font-size: 0.975rem;
}
.link-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease, stroke 0.18s ease;
}
.link:hover .link-arrow {
  transform: translate(2px, -2px);
  stroke: var(--ocean);
}

/* Featured link (quote request) */
.link.featured {
  background: var(--cta-bg);
  border-color: transparent;
  color: var(--cta-fg);
}
.link.featured:hover {
  background: var(--cta-hover);
}
.link.featured .link-icon {
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}
.link.featured .link-sub {
  color: inherit;
  opacity: 0.75;
}
.link.featured .link-arrow,
.link.featured:hover .link-arrow {
  stroke: currentColor;
}

/* Footer */
.footer {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
:root[data-theme="dark"] .footer img {
  /* The crow is black; give it a pearl backing so it stays visible. */
  background: var(--pearl);
  border-radius: 50%;
  padding: 2px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--midnight);
  color: var(--pearl);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
:root[data-theme="dark"] .toast {
  background: var(--pearl);
  color: var(--midnight);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Entrance */
.profile,
section,
.footer {
  animation: rise 0.5s ease both;
}
section:nth-of-type(1) {
  animation-delay: 0.06s;
}
section:nth-of-type(2) {
  animation-delay: 0.12s;
}
.footer {
  animation-delay: 0.18s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

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