:root {
  --bg: #040907;
  --bg-strong: #020805;
  --panel: rgba(10, 19, 15, 0.8);
  --panel-alt: rgba(12, 22, 18, 0.9);
  --line: rgba(130, 255, 180, 0.22);
  --line-strong: rgba(130, 255, 180, 0.38);
  --text: #e7fff1;
  --muted: #a3cdb0;
  --primary: #7df9b1;
  --primary-strong: #00ff9d;
  --secondary: #76d8ff;
  --pink: #ff68cb;
  --shadow: rgba(0, 255, 153, 0.25);
  --danger: #ff6f66;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(10, 27, 24, 0.9), transparent 25%),
    radial-gradient(circle at bottom right, rgba(17, 56, 46, 0.4), transparent 20%),
    var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02), rgba(255,255,255,0.02));
  background-size: 100% 3px;
  pointer-events: none;
}

img {
  max-width: 100%;
}

.scanlines,
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: screen;
  opacity: 0.45;
}

.grid-overlay {
  background-image:
    linear-gradient(rgba(125, 249, 177, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 249, 177, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
}

.topbar,
.shell,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 18px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(4, 9, 7, 0.45);
  border-bottom: 1px solid rgba(125, 249, 177, 0.08);
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(125, 249, 177, 0.18), rgba(118, 216, 255, 0.08));
  box-shadow: inset 0 0 18px rgba(125, 249, 177, 0.12), 0 0 18px rgba(125, 249, 177, 0.12);
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  text-transform: lowercase;
  font-size: 1rem;
  letter-spacing: 0.18em;
  font-family: "Space Grotesk", sans-serif;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: lowercase;
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav a,
.link-tile,
.project-item a,
.primary,
.secondary,
.copy-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  text-transform: lowercase;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(125, 249, 177, 0.22);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(125, 249, 177, 0.04);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-strong);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.8);
  animation: pulse 1.8s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.8; }
}

.shell {
  padding: 32px 0 40px;
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(8, 18, 14, 0.96), rgba(9, 16, 12, 0.9));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(125, 249, 177, 0.04), 0 20px 60px rgba(2, 10, 6, 0.5);
  border-radius: 20px;
}

.glow-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  cursor: default;
  background: linear-gradient(120deg, rgba(125, 249, 177, 0.1), rgba(118, 216, 255, 0.04), rgba(255, 104, 203, 0.07));
  z-index: 0;
}

.hero,
.links-grid,
.panel,
.info-strip {
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  overflow: hidden;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.info-strip h2 {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  line-height: 0.95;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 5rem);
  letter-spacing: -0.06em;
  text-transform: lowercase;
}

.hero h1 span {
  color: var(--primary);
  text-shadow: 0 0 18px rgba(125, 249, 177, 0.28);
}

.lead {
  max-width: 60ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary,
.secondary,
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  text-transform: lowercase;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.08em;
}

.primary {
  background: linear-gradient(135deg, rgba(125, 249, 177, 0.22), rgba(118, 216, 255, 0.08));
  color: var(--text);
  box-shadow: 0 0 22px rgba(125, 249, 177, 0.12);
}

.secondary,
.copy-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.01);
}

.primary:hover,
.secondary:hover,
.copy-btn:hover,
.link-tile:hover,
.project-item a:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(9, 22, 16, 0.5);
}

.meta-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 0;
  margin: 30px 0 0;
}

.meta-stats li {
  display: flex;
  flex-direction: column;
  min-width: 92px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(90, 146, 118, 0.04);
}

.meta-stats strong {
  font-size: 1.4rem;
  color: var(--primary);
}

.meta-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 4px;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.avatar-frame {
  position: relative;
  width: min(280px, 84vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 30% 70% 52% 48% / 45% 32% 68% 55%;
  background: linear-gradient(135deg, rgba(125, 249, 177, 0.12), rgba(118, 216, 255, 0.06));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 24px rgba(125, 249, 177, 0.06), 0 0 40px rgba(8, 31, 20, 0.7);
}

.avatar-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--primary);
  background: radial-gradient(circle at center, rgba(125, 249, 177, 0.25), rgba(125, 249, 177, 0.04) 46%, rgba(125, 249, 177, 0));
  border: 1px solid rgba(125, 249, 177, 0.3);
  box-shadow: inset 0 0 28px rgba(125, 249, 177, 0.12), 0 0 24px rgba(125, 249, 177, 0.1);
}

.avatar-core span {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.08em;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.orb-a {
  width: 120px;
  height: 120px;
  background: rgba(125, 249, 177, 0.12);
  top: 12%;
  right: 12%;
}

.orb-b {
  width: 88px;
  height: 88px;
  background: rgba(118, 216, 255, 0.12);
  bottom: 12%;
  left: 12%;
}

.orb-c {
  width: 70px;
  height: 70px;
  background: rgba(255, 104, 203, 0.12);
  bottom: 24%;
  right: 18%;
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.mini-badge {
  padding: 8px 10px;
  border: 1px solid rgba(125, 249, 177, 0.18);
  border-radius: 999px;
  background: rgba(125, 249, 177, 0.04);
  color: var(--muted);
  text-transform: lowercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.links-grid,
.panel {
  margin-top: 28px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2,
.info-strip h2 {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  text-transform: lowercase;
  letter-spacing: -0.04em;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.builder-shell {
  margin-top: 28px;
  padding: 28px;
}

.section-head.small {
  margin-bottom: 12px;
}

.builder-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.profile-form,
.profile-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-form {
  padding: 12px 0 0;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 16, 0.72);
}

.field-group h3 {
  margin: 0;
  color: var(--primary);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.field-row {
  display: grid;
  gap: 14px;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

input,
textarea {
  width: 100%;
  background: rgba(5, 11, 8, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
}

input[type="color"] {
  min-height: 54px;
  padding: 8px;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

input:focus,
textarea:focus {
  outline: 1px solid rgba(125, 249, 177, 0.5);
  border-color: var(--primary);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.preview-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(125, 249, 177, 0.05);
  color: var(--primary);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-preview {
  min-height: 520px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(5, 12, 9, 0.9);
  overflow: hidden;
}

.linktree-card {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background-size: cover;
  background-position: center;
  color: var(--text);
}

.linktree-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 9, 7, 0.22), rgba(4, 9, 7, 0.92));
}

.linktree-card > * {
  position: relative;
  z-index: 1;
}

.linktree-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.linktree-status {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(4, 9, 7, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.linktree-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.linktree-avatar {
  width: 72px;
  height: 72px;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.22);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.18);
}

.linktree-name {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 2vw, 2.3rem);
  letter-spacing: -0.05em;
}

.linktree-handle {
  margin: 4px 0 0;
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.linktree-bio {
  margin: 0 0 18px;
  max-width: 42ch;
  color: rgba(255,255,255,0.84);
}

.linktree-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.linktree-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.linktree-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.linktree-account {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.linktree-links {
  display: grid;
  gap: 10px;
}

.linktree-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
}

.saved-section {
  margin-top: 22px;
}

.saved-profiles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
}

.saved-profiles li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 18, 15, 0.75);
}

.saved-profiles button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  text-transform: lowercase;
}

.saved-profiles strong {
  display: block;
  color: var(--primary);
  font-size: 0.82rem;
}

.saved-profiles span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.link-tile {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  padding: 18px 18px 16px;
  min-height: 110px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 26, 19, 0.8), rgba(9, 14, 12, 0.8));
}

.tile-label,
.tile-value {
  display: block;
}

.tile-label {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.tile-value {
  color: var(--text);
  text-align: right;
  font-size: 0.8rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  margin-top: 28px;
}

.project-list {
  display: grid;
  gap: 18px;
}

.project-item {
  padding: 20px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(14, 21, 17, 0.8);
}

.project-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.project-tag {
  color: var(--primary);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.project-year {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-item h3 {
  margin: 0;
  font-size: 1.4rem;
  font-family: "Space Grotesk", sans-serif;
}

.project-item p {
  margin: 12px 0 18px;
  color: var(--muted);
}

.project-item a {
  display: inline-block;
  color: var(--secondary);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.terminal-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.terminal-window {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(2, 8, 6, 0.9);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(125, 249, 177, 0.12);
  background: rgba(125, 249, 177, 0.04);
}

.terminal-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-header span:nth-child(1) { background: var(--danger); }
.terminal-header span:nth-child(2) { background: #ffbd4a; }
.terminal-header span:nth-child(3) { background: var(--primary-strong); }

#terminal-output {
  margin: 0;
  padding: 18px 16px 20px;
  color: var(--primary);
  font-size: 0.86rem;
  line-height: 1.8;
  white-space: pre-wrap;
  min-height: 210px;
}

.copy-btn {
  align-self: flex-start;
}

.info-strip {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 24px 0 50px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.legal-links {
  display: flex;
  gap: 14px;
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--primary);
}

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: rgba(7, 22, 15, 0.96);
  color: var(--primary);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 16px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-bottom: 20px;
  }

  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    display: none;
  }

  .topbar {
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .topbar,
  .shell,
  .footer {
    width: min(100% - 20px, 1180px);
  }

  .brand-sub,
  .status-pill {
    letter-spacing: 0.1em;
  }

  .link-grid,
  .meta-stats {
    grid-template-columns: 1fr;
  }

  .link-grid {
    display: grid;
  }

  .info-strip,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .primary,
  .secondary,
  .copy-btn {
    width: 100%;
  }
}
