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

    :root {
      --bg: #0a0a0c;
      --surface: #111114;
      --border: rgba(255, 255, 255, 0.07);
      --text: #e8e8f0;
      --muted: #6b6b80;
      --accent: #7c6af7;
      --accent2: #3de8c8;
      --red: #f75a5a;
      --green: #3de87a;
    }

    html {
      scroll-behavior: smooth;
    }


    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'JetBrains Mono', monospace;
      min-height: 100vh;
      overflow-x: hidden;
      cursor: none;
    }

    /* === 1. KUNDANPASSAD MUSPEKARE === */
    .cursor {
      position: fixed;
      width: 10px;
      height: 10px;
      background: var(--accent);
      border-radius: 50%;
      pointer-events: none;
      z-index: 9999;
      transform: translate(-50%, -50%);
      transition: width 0.2s, height 0.2s, background 0.2s;
      mix-blend-mode: screen;
    }

    .cursor-ring {
      position: fixed;
      width: 36px;
      height: 36px;
      border: 1px solid rgba(124, 106, 247, 0.4);
      border-radius: 50%;
      pointer-events: none;
      z-index: 9998;
      transform: translate(-50%, -50%);
      transition: all 0.1s ease;
    }

    body:has(a:hover) .cursor {
      width: 16px;
      height: 16px;
      background: var(--accent2);
    }

    body:has(a:hover) .cursor-ring {
      width: 48px;
      height: 48px;
      border-color: var(--accent2);
    }

    /* === 2. BAKGRUNDSEFFEKTER (Brus, Grid, Blobs) === */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 1000;
      opacity: 0.5;
    }

    /* Grid background */
    body::after {
      content: '';
      position: fixed;
      inset: 0;
      background-image:
        linear-gradient(rgba(124, 106, 247, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 106, 247, 0.03) 1px, transparent 1px);
      background-size: 60px 60px;
      pointer-events: none;
      z-index: 0;
    }

    /* Glow blobs */
    .blob {
      position: fixed;
      border-radius: 50%;
      filter: blur(120px);
      pointer-events: none;
      z-index: 0;
      opacity: 0.12;
    }

    .blob-1 {
      width: 600px;
      height: 600px;
      background: var(--accent);
      top: -10%;
      right: -10%;
      animation: drift-1 45s ease-in-out infinite;
    }

    .blob-2 {
      width: 400px;
      height: 400px;
      background: var(--accent2);
      bottom: -10%;
      left: -10%;
      animation: drift-2 55s ease-in-out infinite;
    }

    .blob-3 {
      width: 500px;
      height: 500px;
      background: #ff477e;
      top: -10%;
      left: -10%;
      animation: drift-3 60s ease-in-out infinite;
      opacity: 0.08;
    }

    .blob-4 {
      width: 350px;
      height: 350px;
      background: #ffaa00;
      bottom: -10%;
      right: -10%;
      animation: drift-4 50s ease-in-out infinite;
      opacity: 0.08;
    }

    @keyframes drift-1 {

      0%,
      100% {
        transform: translate(0, 0) scale(1);
      }

      25% {
        transform: translate(-15vw, 15vh) scale(1.05);
      }

      50% {
        transform: translate(-30vw, 5vh) scale(0.95);
      }

      75% {
        transform: translate(-10vw, -10vh) scale(1.1);
      }
    }

    @keyframes drift-2 {

      0%,
      100% {
        transform: translate(0, 0) scale(1);
      }

      33% {
        transform: translate(25vw, -15vh) scale(0.95);
      }

      66% {
        transform: translate(15vw, -35vh) scale(1.05);
      }
    }

    @keyframes drift-3 {

      0%,
      100% {
        transform: translate(0, 0) scale(1);
      }

      33% {
        transform: translate(30vw, 20vh) scale(1.1);
      }

      66% {
        transform: translate(15vw, 35vh) scale(0.9);
      }
    }

    @keyframes drift-4 {

      0%,
      100% {
        transform: translate(0, 0) scale(1);
      }

      25% {
        transform: translate(-25vw, -15vh) scale(0.95);
      }

      50% {
        transform: translate(-15vw, -30vh) scale(1.05);
      }

      75% {
        transform: translate(-35vw, -5vh) scale(0.95);
      }
    }

    /* === 3. LAYOUT & CONTAINERS === */
    .container {
      position: relative;
      z-index: 10;
      max-width: 780px;
      margin: 0 auto;
      padding: 0 2rem;
    }

    /* === 4. NAVBAR === */
    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border);
      background: rgba(10, 10, 12, 0.7);
    }

    .nav-inner {
      max-width: 780px;
      margin: 0 auto;
      padding: 1rem 2rem;
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: wrap;
    }

    .nav-spacer {
      flex: 1;
      min-width: 0;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 0.1rem;
      flex-wrap: wrap;
    }

    .nav-icon-link {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2rem;
      height: 2rem;
      border-radius: 6px;
      color: var(--muted);
      text-decoration: none;
      transition: color 0.2s ease, background 0.2s ease;
    }

    .nav-icon-link:hover {
      color: var(--accent2);
      background: rgba(255, 255, 255, 0.06);
    }

    .nav-icon-link svg {
      display: block;
      width: 18px;
      height: 18px;
    }

    .nav-logo {
      font-family: 'Syne', sans-serif;
      font-weight: 800;
      font-size: 1.1rem;
      letter-spacing: -0.02em;
      color: var(--text);
      text-decoration: none;
    }

    .nav-logo span {
      color: var(--accent);
    }

    .nav-tag {
      font-size: 0.7rem;
      color: var(--muted);
      letter-spacing: 0.1em;
      text-transform: uppercase;
      flex-shrink: 0;
    }

    /* === 5. HERO-SEKTION (Profil) === */
    .hero {
      min-height: 100vh;
      display: flex;
      align-items: center;
      padding-top: 4rem;
    }

    .hero-content {
      width: 100%;
    }

    .hero-eyebrow {
      font-size: 0.72rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 1.5rem;
      opacity: 0;
      animation: fadeUp 0.8s 0.2s forwards;
    }

    .hero-eyebrow::before {
      content: '// ';
      color: var(--muted);
    }

    .hero-name {
      font-family: 'Syne', sans-serif;
      font-weight: 800;
      font-size: clamp(3.5rem, 10vw, 7rem);
      line-height: 0.95;
      letter-spacing: -0.03em;
      margin-bottom: 1.5rem;
      opacity: 0;
      animation: fadeUp 0.8s 0.35s forwards;
    }

    .hero-name .domain {
      display: block;
      color: var(--muted);
      font-size: 0.45em;
      letter-spacing: 0.02em;
      margin-top: 0.2em;
    }

    .hero-desc {
      font-size: 0.95rem;
      line-height: 1.8;
      color: var(--muted);
      max-width: 480px;
      margin-bottom: 3rem;
      opacity: 0;
      animation: fadeUp 0.8s 0.5s forwards;
    }

    .hero-actions {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      opacity: 0;
      animation: fadeUp 0.8s 0.65s forwards;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.7rem 1.4rem;
      border-radius: 6px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.82rem;
      font-weight: 500;
      text-decoration: none;
      transition: all 0.2s ease;
      cursor: none;
      border: 1px solid transparent;
    }

    .btn-primary {
      background: var(--accent);
      color: #fff;
    }

    .btn-primary:hover {
      background: #9280ff;
      transform: translateY(-2px);
      box-shadow: 0 8px 30px rgba(124, 106, 247, 0.3);
    }

    .btn-outline {
      border-color: var(--border);
      color: var(--muted);
      background: rgba(255, 255, 255, 0.03);
    }

    .btn-outline:hover {
      border-color: rgba(255, 255, 255, 0.2);
      color: var(--text);
      transform: translateY(-2px);
    }

    .btn-zima {
      border-color: var(--border);
      color: var(--text);
      background: rgba(255, 255, 255, 0.03);
      position: relative;
      overflow: hidden;
    }

    .btn-zima::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(61, 232, 200, 0.08), transparent);
      opacity: 0;
      transition: opacity 0.2s;
    }

    .btn-zima:hover::before {
      opacity: 1;
    }

    .btn-zima:hover {
      border-color: rgba(61, 232, 200, 0.3);
      transform: translateY(-2px);
      box-shadow: 0 8px 30px rgba(61, 232, 200, 0.1);
    }

    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--muted);
      flex-shrink: 0;
      transition: background 0.5s ease;
      box-shadow: none;
    }

    .status-dot.online {
      background: var(--green);
      box-shadow: 0 0 8px var(--green);
      animation: pulse-green 2s infinite;
    }

    .status-dot.offline {
      background: var(--red);
      box-shadow: 0 0 8px rgba(247, 90, 90, 0.5);
    }

    @keyframes pulse-green {

      0%,
      100% {
        box-shadow: 0 0 6px var(--green);
      }

      50% {
        box-shadow: 0 0 14px var(--green), 0 0 24px rgba(61, 232, 122, 0.3);
      }
    }

    .status-label {
      font-size: 0.68rem;
      color: var(--muted);
    }

    /* Divider */
    .divider {
      height: 1px;
      background: var(--border);
      margin: 4rem 0;
      opacity: 0;
      animation: fadeIn 1s 1s forwards;
    }

    /* === 6. LÄNK-RUTNÄT === */
    .links-section {
      padding-bottom: 6rem;
      opacity: 0;
      animation: fadeUp 0.8s 0.9s forwards;
    }

    .section-label {
      font-size: 0.7rem;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 1.5rem;
    }

    .section-label::before {
      content: '— ';
    }

    .link-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 1rem;
    }

    .link-card {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 1.1rem 1.2rem;
      background: rgba(17, 17, 20, 0.05);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid var(--border);
      border-radius: 8px;
      text-decoration: none;
      color: var(--text);
      transition: all 0.2s ease;
      cursor: none;
    }

    .link-card:hover {
      border-color: rgba(255, 255, 255, 0.15);
      transform: translateY(-3px);
      background: rgba(255, 255, 255, 0.03);
    }

    .link-card:hover .link-icon {
      color: var(--accent);
    }

    .link-icon {
      font-size: 1.2rem;
      transition: color 0.2s;
      flex-shrink: 0;
      color: var(--accent2);
    }

    .link-icon svg {
      display: block;
      width: 20px;
      height: 20px;
    }

    .link-info {
      min-width: 0;
    }

    .link-name {
      font-family: 'Syne', sans-serif;
      font-weight: 600;
      font-size: 0.9rem;
      display: block;
    }

    .link-handle {
      font-size: 0.72rem;
      color: var(--muted);
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Footer */
    footer {
      border-top: 1px solid var(--border);
      padding: 2rem 0;
      position: relative;
      z-index: 10;
    }

    .footer-inner {
      max-width: 780px;
      margin: 0 auto;
      padding: 0 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .footer-text {
      font-size: 0.72rem;
      color: var(--muted);
    }

    .footer-text span {
      color: var(--accent);
    }

    /* === 7. ADMIN-GRÄNSSNITT & MODALER === */
    .admin-controls {
      display: none;
      position: absolute;
      top: 0.5rem;
      right: 0.5rem;
      gap: 0.5rem;
    }

    .is-admin .admin-controls {
      display: flex;
    }

    .is-admin #btn-edit-profile,
    .is-admin #btn-edit-password {
      display: inline-flex !important;
    }

    .is-admin .link-card {
      position: relative;
    }

    .btn-icon {
      background: rgba(0, 0, 0, 0.5);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 4px;
      padding: 0.3rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 20;
    }

    .btn-icon:hover {
      background: var(--surface);
    }

    #admin-panel,
    #admin-profile-panel,
    #admin-hero-panel,
    #admin-login-panel,
    #admin-password-panel {
      display: none;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--bg);
      border: 1px solid var(--border);
      padding: 2rem;
      border-radius: 8px;
      z-index: 1000;
      width: 90%;
      max-width: 400px;
      flex-direction: column;
      gap: 1rem;
    }

    #admin-panel.active,
    #admin-profile-panel.active,
    #admin-hero-panel.active,
    #admin-login-panel.active,
    #admin-password-panel.active {
      display: flex;
    }

    #admin-panel input,
    #admin-panel textarea,
    #admin-profile-panel input,
    #admin-profile-panel textarea,
    #admin-hero-panel input,
    #admin-hero-panel textarea,
    #admin-hero-panel select,
    #admin-login-panel input,
    #admin-password-panel input {
      width: 100%;
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 0.5rem;
      border-radius: 4px;
      font-family: inherit;
    }

    .admin-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.8);
      z-index: 999;
    }

    #admin-panel.active~.admin-overlay,
    #admin-profile-panel.active~.admin-overlay,
    #admin-hero-panel.active~.admin-overlay,
    #admin-login-panel.active~.admin-overlay,
    #admin-password-panel.active~.admin-overlay {
      display: block;
    }

    #btn-add-link {
      display: none;
      margin-top: 1rem;
      width: 100%;
      justify-content: center;
    }

    .admin-toggle {
      background: transparent;
      border: none;
      color: var(--muted);
      cursor: pointer;
      font-family: inherit;
      font-size: 0.72rem;
    }

    .admin-toggle:hover {
      color: var(--accent);
    }

    /* Animations */
    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    /* Responsive */
    @media (max-width: 600px) {
      .hero-actions {
        flex-direction: column;
        align-items: flex-start;
      }

      .link-grid {
        grid-template-columns: 1fr;
      }
    }
