 :root {
      --blue-bright:   #5edfff;
      --blue-mid:      #2cb8e8;
      --blue-dark:     #1478a6;
      --bg-deep:       #04090f;
      --bg-card:       rgba(6, 18, 30, 0.85);
      --border-subtle: rgba(94, 223, 255, 0.15);
      --border-hover:  rgba(94, 223, 255, 0.55);
      --text-primary:  #ddf1fa;
      --text-muted:    #5a8fa8;
      --font-mono:     'Space Mono', monospace;
      --font-body:     'DM Sans', sans-serif;
    }

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

    html, body {
      height: 100%; background: var(--bg-deep); color: var(--text-primary);
      font-family: var(--font-body); overflow-x: hidden;
    }

    #particles-js { position: fixed; inset: 0; z-index: 0; }

    body::after {
      content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
      background: repeating-linear-gradient(to bottom, transparent 0px, transparent 3px, rgba(0,0,0,0.07) 3px, rgba(0,0,0,0.07) 4px);
    }

    .page-wrapper {
      position: relative; z-index: 2; min-height: 100vh;
      display: flex; align-items: center; justify-content: center; padding: 3rem 1rem;
    }

    /* ── Card ── */
    .card-shell {
      width: 100%; max-width: 600px; background: var(--bg-card);
      border: 1px solid var(--border-subtle); border-radius: 4px;
      backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      padding: 3.5rem 3.2rem 3rem;
      box-shadow: 0 0 0 1px rgba(94,223,255,0.06), 0 8px 60px rgba(0,0,0,0.75), 0 0 100px rgba(44,184,232,0.04) inset;
      animation: cardIn 0.9s cubic-bezier(0.22,1,0.36,1) both; position: relative;
    }

    @keyframes cardIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

    .card-shell::before, .card-shell::after {
      content: ''; position: absolute; width: 20px; height: 20px;
      border-color: var(--blue-mid); border-style: solid;
    }
    .card-shell::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
    .card-shell::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

    /* ── Avatar ── */
    .avatar-ring {
      width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--blue-mid);
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 1.6rem; position: relative;
      box-shadow: 0 0 28px rgba(44,184,232,0.3), 0 0 0 6px rgba(44,184,232,0.06);
      animation: pulse-ring 3s ease-in-out infinite; overflow: hidden;
    }

    @keyframes pulse-ring {
      0%, 100% { box-shadow: 0 0 28px rgba(44,184,232,0.3), 0 0 0 6px rgba(44,184,232,0.06); }
      50%       { box-shadow: 0 0 42px rgba(94,223,255,0.45), 0 0 0 9px rgba(44,184,232,0.12); }
    }

    .avatar-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

    .status-dot {
      position: absolute; bottom: 5px; right: 5px; width: 14px; height: 14px;
      background: var(--blue-bright); border-radius: 50%; border: 2px solid var(--bg-deep);
      animation: blink 2.4s ease-in-out infinite;
    }

    @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

    /* ── Name, title, tagline ── */
    .profile-name {
      font-family: var(--font-mono); font-size: 1.9rem; font-weight: 700;
      letter-spacing: -0.5px; color: var(--text-primary); text-align: center; margin-bottom: 0.25rem;
    }
    .profile-name span { color: var(--blue-bright); }

    .profile-title {
      font-family: var(--font-mono); font-size: 0.72rem; color: var(--blue-mid);
      text-align: center; letter-spacing: 3.5px; text-transform: uppercase; margin-bottom: 0.55rem;
    }

    /* Typing cursor on title */
    .profile-title .cursor {
      display: inline-block; width: 2px; height: 0.85em;
      background: var(--blue-mid); margin-left: 2px; vertical-align: middle;
      animation: blink-cursor 0.8s step-end infinite;
    }
    @keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

    /* Rotating tagline */
    .profile-tagline-wrap {
      text-align: center; margin-bottom: 1.8rem; min-height: 1.4rem;
    }
    .profile-tagline {
      font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-muted);
      letter-spacing: 2px; text-transform: uppercase;
      display: inline-block;
      transition: opacity 0.4s ease, transform 0.4s ease;
    }
    .profile-tagline.fade-out { opacity: 0; transform: translateY(-4px); }
    .profile-tagline.fade-in  { opacity: 1; transform: translateY(0); }

    .divider {
      border: none; height: 1px; margin-bottom: 1.8rem; opacity: 0.5;
      background: linear-gradient(to right, transparent, var(--blue-dark), transparent);
    }

    /* ── Link buttons ── */
    .link-btn {
      display: flex; align-items: center; gap: 0.95rem; width: 100%;
      padding: 1rem 1.3rem; margin-bottom: 0.75rem;
      background: rgba(44,184,232,0.04); border: 1px solid var(--border-subtle);
      border-radius: 3px; color: var(--text-primary); text-decoration: none;
      font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.5px;
      transition: all 0.22s ease; position: relative; overflow: hidden; cursor: pointer;
    }
    .link-btn::before {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(90deg, rgba(94,223,255,0.08) 0%, transparent 100%);
      opacity: 0; transition: opacity 0.22s ease;
    }
    .link-btn:hover {
      border-color: var(--border-hover); color: var(--blue-bright);
      transform: translateX(4px); box-shadow: 0 0 22px rgba(94,223,255,0.12), -3px 0 0 var(--blue-mid);
      text-decoration: none;
    }
    .link-btn:hover::before { opacity: 1; }
    .link-btn i { font-size: 1.2rem; color: var(--blue-mid); min-width: 22px; transition: color 0.22s ease; }
    .link-btn:hover i { color: var(--blue-bright); }
    .link-btn .btn-label { flex: 1; }
    .link-btn .btn-arrow { font-size: 0.7rem; color: var(--text-muted); transition: all 0.22s ease; opacity: 0; }
    .link-btn:hover .btn-arrow { opacity: 1; color: var(--blue-bright); }

    .link-btn:nth-child(1) { animation: slideIn 0.5s 0.3s both; }
    .link-btn:nth-child(2) { animation: slideIn 0.5s 0.4s both; }
    .link-btn:nth-child(3) { animation: slideIn 0.5s 0.5s both; }
    .link-btn:nth-child(4) { animation: slideIn 0.5s 0.6s both; }

    @keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }

    /* ── Social ── */
    .social-row { display: flex; justify-content: center; gap: 1rem; margin-top: 1.8rem; }

    .social-icon {
      display: flex; align-items: center; justify-content: center;
      width: 50px; height: 50px; border: 1px solid var(--border-subtle);
      border-radius: 3px; background: rgba(44,184,232,0.04);
      color: var(--text-muted); font-size: 1.3rem; text-decoration: none; transition: all 0.22s ease;
    }
    .social-icon:hover {
      border-color: var(--border-hover); color: var(--blue-bright);
      background: rgba(94,223,255,0.08); box-shadow: 0 0 16px rgba(94,223,255,0.18);
      transform: translateY(-2px); text-decoration: none;
    }

    /* ── Footer ── */
    .card-footer-text {
      text-align: center; margin-top: 2rem; font-family: var(--font-mono);
      font-size: 0.72rem; letter-spacing: 1px; opacity: 0.6;
    }
    .card-footer-text span { color: var(--blue-dark); }
    .footer-copy {
      color: var(--text-muted); cursor: pointer; transition: color 0.2s ease;
      text-decoration: none; position: relative;
    }
    .footer-copy:hover { color: var(--blue-bright); }
    .footer-copy .copy-confirm {
      position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%);
      background: rgba(6,18,30,0.95); border: 1px solid var(--border-subtle);
      color: var(--blue-bright); font-size: 0.6rem; padding: 0.2rem 0.5rem;
      border-radius: 2px; white-space: nowrap; opacity: 0;
      transition: opacity 0.2s ease; pointer-events: none;
    }
    .footer-copy.copied .copy-confirm { opacity: 1; }

    /* ══════════════════════════════════════════════════════════
       Shared Modal Styles
    ══════════════════════════════════════════════════════════ */
    .modal-overlay {
      display: none; position: fixed; inset: 0; z-index: 100;
      background: rgba(2, 8, 16, 0.88);
      backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
      align-items: center; justify-content: center; padding: 1rem;
    }
    .modal-overlay.active { display: flex; animation: fadeIn 0.18s ease both; }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

    .modal-box {
      background: rgba(6, 18, 30, 0.97); border: 1px solid var(--border-subtle);
      border-radius: 4px; padding: 2.4rem 2.6rem; width: 100%; max-width: 440px;
      position: relative; box-shadow: 0 0 0 1px rgba(94,223,255,0.07), 0 20px 60px rgba(0,0,0,0.8);
      animation: modalSlide 0.22s cubic-bezier(0.22,1,0.36,1) both;
      max-height: 90vh; overflow-y: auto;
    }
    .modal-box.modal-box--wide { max-width: 560px; }

    .modal-box::before, .modal-box::after {
      content: ''; position: absolute; width: 16px; height: 16px;
      border-color: var(--blue-mid); border-style: solid;
    }
    .modal-box::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
    .modal-box::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

    @keyframes modalSlide {
      from { opacity: 0; transform: translateY(16px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    .modal-lock-icon { font-size: 1.8rem; color: var(--blue-mid); margin-bottom: 1rem; display: block; text-align: center; }
    .modal-title { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--blue-mid); margin-bottom: 0.3rem; text-align: center; }
    .modal-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.8rem; font-weight: 300; text-align: center; }

    /* Request access link */
    .modal-request-link {
      display: block; text-align: center; font-family: var(--font-mono);
      font-size: 0.65rem; letter-spacing: 1px; color: var(--text-muted);
      text-decoration: none; margin-bottom: 1.4rem;
      transition: color 0.2s ease;
    }
    .modal-request-link:hover { color: var(--blue-bright); text-decoration: none; }
    .modal-request-link i { margin-right: 4px; }

    .modal-input {
      width: 100%; background: rgba(94,223,255,0.04); border: 1px solid var(--border-subtle);
      border-radius: 3px; padding: 0.8rem 1rem; font-family: var(--font-body); font-size: 0.88rem;
      color: var(--text-primary); outline: none;
      transition: border-color 0.2s ease, box-shadow 0.2s ease; margin-bottom: 0.75rem;
    }
    .modal-input:focus { border-color: var(--blue-mid); box-shadow: 0 0 12px rgba(94,223,255,0.1); }
    .modal-input.error { border-color: #ff4d6d; box-shadow: 0 0 12px rgba(255,77,109,0.15); }
    .modal-input.success { border-color: var(--blue-bright); box-shadow: 0 0 16px rgba(94,223,255,0.25); }
    .modal-input::placeholder { color: var(--text-muted); opacity: 0.6; }

    textarea.modal-input { resize: vertical; min-height: 100px; font-family: var(--font-body); }

    .modal-input-wrap { position: relative; margin-bottom: 0; }
    .modal-input-wrap .modal-input { padding-right: 3rem; margin-bottom: 0.75rem; }

    .modal-input--passcode {
      font-family: var(--font-mono) !important; font-size: 1.15rem !important;
      letter-spacing: 8px !important; text-align: center !important;
    }

    .toggle-visibility {
      position: absolute; right: 0.85rem; top: 38%; transform: translateY(-50%);
      background: none; border: none; color: var(--text-muted); cursor: pointer;
      font-size: 1rem; padding: 0; transition: color 0.2s ease;
    }
    .toggle-visibility:hover { color: var(--blue-bright); }

    .modal-error-msg {
      font-family: var(--font-mono); font-size: 0.68rem; color: #ff4d6d;
      letter-spacing: 1px; margin-bottom: 0.6rem; text-align: center;
      min-height: 1rem; opacity: 0; transition: opacity 0.2s ease;
    }
    .modal-error-msg.visible { opacity: 1; }

    .modal-success-msg {
      font-family: var(--font-mono); font-size: 0.68rem; color: var(--blue-bright);
      letter-spacing: 1px; margin-bottom: 0.6rem; text-align: center;
      min-height: 1rem; opacity: 0; transition: opacity 0.2s ease;
    }
    .modal-success-msg.visible { opacity: 1; }

    .modal-attempts { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); text-align: center; margin-bottom: 1rem; letter-spacing: 1px; min-height: 1rem; }
    .turnstile-wrap { display: flex; justify-content: center; margin-bottom: 1rem; }
    .modal-status { font-family: var(--font-mono); font-size: 0.7rem; text-align: center; letter-spacing: 1px; margin-bottom: 1rem; min-height: 1rem; color: var(--blue-mid); }

    .modal-btn-row { display: flex; gap: 0.75rem; }
    .modal-btn {
      flex: 1; padding: 0.8rem; border-radius: 3px; font-family: var(--font-mono);
      font-size: 0.75rem; letter-spacing: 1.5px; text-transform: uppercase;
      cursor: pointer; transition: all 0.2s ease; border: 1px solid;
    }
    .modal-btn-cancel { background: transparent; border-color: var(--border-subtle); color: var(--text-muted); }
    .modal-btn-cancel:hover { border-color: rgba(94,223,255,0.3); color: var(--text-primary); }
    .modal-btn-submit { background: rgba(44,184,232,0.1); border-color: var(--blue-mid); color: var(--blue-bright); }
    .modal-btn-submit:hover:not(:disabled) { background: rgba(44,184,232,0.2); box-shadow: 0 0 16px rgba(94,223,255,0.15); }
    .modal-btn-submit:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

    .modal-field-label {
      font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted);
      letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 0.3rem; display: block;
    }

    /* ── Demo cards ── */
    .demo-cards { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.5rem; }

    .demo-card {
      display: flex; align-items: center; gap: 1rem;
      background: rgba(44,184,232,0.04); border: 1px solid var(--border-subtle);
      border-radius: 3px; padding: 1rem 1.2rem; text-decoration: none;
      color: var(--text-primary); transition: all 0.22s ease; position: relative; overflow: hidden;
    }
    .demo-card::before {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(90deg, rgba(94,223,255,0.06) 0%, transparent 100%);
      opacity: 0; transition: opacity 0.22s ease;
    }
    .demo-card:hover {
      border-color: var(--border-hover); color: var(--text-primary);
      transform: translateX(3px); box-shadow: 0 0 20px rgba(94,223,255,0.1), -3px 0 0 var(--blue-mid);
      text-decoration: none;
    }
    .demo-card:hover::before { opacity: 1; }

    .demo-card-icon {
      width: 42px; height: 42px; border-radius: 3px; flex-shrink: 0;
      background: rgba(44,184,232,0.1); border: 1px solid var(--border-subtle);
      display: flex; align-items: center; justify-content: center;
      font-size: 1.3rem; color: var(--blue-mid); transition: color 0.22s ease;
    }
    .demo-card:hover .demo-card-icon { color: var(--blue-bright); border-color: var(--border-hover); }

    .demo-card-body { flex: 1; min-width: 0; }
    .demo-card-title { font-family: var(--font-mono); font-size: 0.82rem; color: var(--blue-bright); margin-bottom: 0.25rem; letter-spacing: 0.5px; }
    .demo-card-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; font-weight: 300; }
    .demo-card-arrow { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; transition: color 0.22s ease; }
    .demo-card:hover .demo-card-arrow { color: var(--blue-bright); }