@font-face {
  font-family: 'Inter';
  src: url('./assets/fonts/Inter-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('./assets/fonts/JetBrainsMono-Variable.ttf') format('truetype');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #04070F;
  --surface: #0F172A;
  --surface-hover: #16223D;
  --border: rgba(148, 163, 184, 0.22);
  --border-hover: rgba(148, 163, 184, 0.42);
  --gold: #E5B85B;
  --gold-hover: #EFC66F;
  --text: #F8FAFC;
  --muted: #94A3B8;
  --emerald: #10B981;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-image: radial-gradient(600px 360px at 50% -80px, rgba(229, 184, 91, 0.12), transparent 70%);
  background-repeat: no-repeat;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* Main centered Linktree column */
.tree {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 18px 48px;
}

.tree__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.share-btn:hover {
  transform: scale(1.06);
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

/* Profile */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.profile__logo {
  display: block;
  height: 36px;
  width: auto;
  margin-bottom: 14px;
}

.profile__bio {
  margin: 0 0 18px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

/* Social icon circles */
.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

.social-icon:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: var(--gold);
  color: var(--gold);
  background: var(--surface-hover);
}

/* Link Stack */
.links {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.link-group__title {
  margin: 0 0 2px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* Link Button (Linktree core item) */
.link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

a.link-item:hover {
  transform: scale(1.015);
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

a.link-item:active {
  transform: scale(0.995);
}

/* Featured Link (Gold CTA) */
.link-item--featured {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}

a.link-item--featured:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}

.link-item--featured .link-item__icon {
  background: rgba(4, 7, 15, 0.12);
  color: var(--bg);
}

.link-item--featured .link-item__title {
  color: var(--bg);
  font-weight: 800;
}

.link-item--featured .link-item__sub {
  color: rgba(4, 7, 15, 0.72);
}

.link-item--featured .link-item__right {
  color: var(--bg);
}

/* Soon / Disabled Link */
.link-item--soon {
  background: rgba(15, 23, 42, 0.45);
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.18);
  opacity: 0.78;
}

.link-item__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(248, 250, 252, 0.06);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.link-item__icon svg {
  width: 18px;
  height: 18px;
}

.link-item__body {
  flex: 1;
  min-width: 0;
}

.link-item__title {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.link-item__sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-item__right {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.soon-pill {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
  padding: 4px 8px;
  border-radius: 999px;
}

/* Minimal Footer */
.footer {
  margin-top: 38px;
  text-align: center;
}

.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.18s var(--ease);
}

.footer__copy:hover {
  color: var(--gold);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 14px);
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface-hover);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 480px) {
  .tree {
    padding: 16px 14px 40px;
  }

  .profile__logo {
    height: 32px;
  }

  .link-item {
    padding: 12px 14px;
    min-height: 60px;
  }
}

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