  :root {
    --text: #1d1d1f;
    --text-secondary: rgba(60, 60, 67, 0.72);
    --glass-tint: rgba(255, 255, 255, 0.22);
    --glass-tint-strong: rgba(255, 255, 255, 0.38);
    --shine-hi: rgba(255, 255, 255, 0.85);
    --shine-lo: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    --accent: #0071e3;
    --radius-card: 32px;
  }

  [data-theme="dark"] {
    --text: #f5f5f7;
    --text-secondary: rgba(235, 235, 245, 0.64);
    --glass-tint: rgba(30, 30, 40, 0.28);
    --glass-tint-strong: rgba(40, 40, 55, 0.45);
    --shine-hi: rgba(255, 255, 255, 0.35);
    --shine-lo: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
    --accent: #0a84ff;
  }

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

  html { scroll-behavior: smooth; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text);
    background: #e8e4f0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background 0.6s ease;
  }
  [data-theme="dark"] body { background: #0a0a14; }

  /* ---------- Animated background the glass can refract ---------- */
  .bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
  }
  .bg .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.85;
    will-change: transform;
  }
  .blob-1 {
    width: 60vmax; height: 60vmax; top: -20vmax; left: -15vmax;
    background: radial-gradient(circle at 30% 30%, #7dd6ff, #4a9fff 60%, transparent 75%);
    animation: drift1 26s ease-in-out infinite alternate;
  }
  .blob-2 {
    width: 55vmax; height: 55vmax; top: 20vh; right: -20vmax;
    background: radial-gradient(circle at 60% 40%, #ffb6e1, #ff5fa2 60%, transparent 75%);
    animation: drift2 32s ease-in-out infinite alternate;
  }
  .blob-3 {
    width: 50vmax; height: 50vmax; bottom: -20vmax; left: 15vw;
    background: radial-gradient(circle at 50% 50%, #ffd98a, #ff9f5a 60%, transparent 75%);
    animation: drift3 29s ease-in-out infinite alternate;
  }
  .blob-4 {
    width: 45vmax; height: 45vmax; top: 55vh; left: -12vmax;
    background: radial-gradient(circle at 40% 60%, #b7a4ff, #7c5cff 60%, transparent 75%);
    animation: drift2 36s ease-in-out infinite alternate-reverse;
  }
  [data-theme="dark"] .bg .blob { opacity: 0.5; }

  @keyframes drift1 { to { transform: translate(12vw, 10vh) scale(1.15) rotate(20deg); } }
  @keyframes drift2 { to { transform: translate(-10vw, -8vh) scale(0.9) rotate(-15deg); } }
  @keyframes drift3 { to { transform: translate(8vw, -12vh) scale(1.1) rotate(10deg); } }

  @media (prefers-reduced-motion: reduce) {
    .bg .blob { animation: none; }
    html { scroll-behavior: auto; }
  }

  /* ---------- Liquid Glass core ---------- */
  .glass {
    position: relative;
    border-radius: var(--radius-card);
    box-shadow: var(--glass-shadow);
    isolation: isolate;
  }
  /* Refraction layer: blur + saturate the backdrop, then bend it with an SVG displacement map */
  .glass::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    border-radius: inherit;
    backdrop-filter: blur(6px) saturate(180%);
    -webkit-backdrop-filter: blur(6px) saturate(180%);
    filter: url(#glass-distortion);
  }
  /* Tint + specular rim: bright top-left edge, softer bottom-right, like light hitting real glass */
  .glass::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--glass-tint);
    box-shadow:
      inset 2px 2px 1px -1px var(--shine-hi),
      inset -1.5px -1.5px 1px -1px var(--shine-lo),
      inset 0 0 24px 2px rgba(255, 255, 255, 0.06);
    pointer-events: none;
  }

  .glass.interactive {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.6), box-shadow 0.5s ease;
    cursor: pointer;
  }
  .glass.interactive:hover {
    transform: scale(1.025);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .glass.interactive:active { transform: scale(0.98); transition-duration: 0.15s; }

  /* Pointer-following specular highlight */
  .glass.spec::after {
    background:
      radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22), transparent 65%),
      var(--glass-tint);
  }

  /* ---------- Navigation ---------- */
  nav.glass {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 999px;
    max-width: calc(100vw - 24px);
  }
  /* Strong iOS-26 tab-bar lens: the script sets --lens-filter with the
     nav's data-lens-scale; low blur keeps the magnified backdrop visible */
  nav.glass::before {
    backdrop-filter: blur(3px) saturate(180%);
    -webkit-backdrop-filter: blur(3px) saturate(180%);
    filter: var(--lens-filter, url(#glass-distortion));
  }
  nav .logo {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.02em;
    padding: 8px 14px;
    white-space: nowrap;
  }
  nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 16px;
    border-radius: 999px;
    transition: background 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.6);
    white-space: nowrap;
  }
  nav a:hover { background: rgba(255, 255, 255, 0.28); transform: scale(1.06); }
  [data-theme="dark"] nav a:hover { background: rgba(255, 255, 255, 0.12); }

  .nav-btn {
    border: none;
    background: rgba(255, 255, 255, 0.28);
    color: var(--text);
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 15px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.6);
  }
  [data-theme="dark"] .nav-btn { background: rgba(255, 255, 255, 0.12); }
  .nav-btn:hover { transform: scale(1.12); }
  #themeToggle:hover { transform: scale(1.12) rotate(15deg); }

  /* ---------- Layout ---------- */
  main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

  section { padding: 90px 0 40px; }

  .section-title {
    font-size: clamp(30px, 4.5vw, 44px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 28px;
  }

  /* ---------- Hero ---------- */
  .hero {
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 140px 0 40px;
  }
  .avatar {
    width: 148px; height: 148px;
    border-radius: 50%;
    padding: 5px;
    margin-bottom: 28px;
  }
  .avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
  }
  .hero h1 {
    font-size: clamp(38px, 6.5vw, 68px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
  }
  .hero p.tagline {
    margin-top: 14px;
    font-size: clamp(18px, 2.4vw, 24px);
    font-weight: 500;
    color: var(--text-secondary);
  }
  .cta-row {
    display: flex;
    gap: 16px;
    margin-top: 36px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
  }
  /* Lens buttons: the script in index.html builds a per-button displacement
     map (--lens-filter) that magnifies the backdrop like thick convex glass.
     Less blur than the default glass so the magnified content stays visible. */
  .cta-row .btn::before {
    backdrop-filter: blur(2px) saturate(180%);
    -webkit-backdrop-filter: blur(2px) saturate(180%);
    filter: var(--lens-filter, url(#glass-distortion));
  }
  .btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
  .btn.primary { color: #fff; }
  .btn.primary::after {
    background: linear-gradient(180deg, rgba(255,255,255,0.25), rgba(255,255,255,0) 40%), var(--accent);
    box-shadow:
      inset 1.5px 1.5px 1px -0.5px rgba(255, 255, 255, 0.7),
      inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.3);
  }

  .scroll-hint {
    margin-top: 60px;
    font-size: 13px;
    color: var(--text-secondary);
    animation: bob 2.6s ease-in-out infinite;
  }
  @keyframes bob { 50% { transform: translateY(7px); } }

  /* ---------- Über mich ---------- */
  .about-panel { padding: 40px 44px; }
  .about-panel p { font-size: 17px; line-height: 1.65; color: var(--text-secondary); }
  .info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 26px;
  }
  .info-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.28);
    box-shadow:
      inset 1.5px 1.5px 1px -0.5px var(--shine-hi),
      inset -1px -1px 1px -0.5px var(--shine-lo);
  }
  [data-theme="dark"] .info-card { background: rgba(255, 255, 255, 0.08); }
  .info-card-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
  }
  .info-card-value {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    font-weight: 500;
  }

  /* ---------- Apps ---------- */
  .app-list { display: flex; flex-direction: column; gap: 30px; }
  .app-card { padding: 30px; }
  .app-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
  }
  .app-icon {
    width: 76px; height: 76px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
  }
  .app-meta { flex: 1; min-width: 140px; }
  .app-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .app-badge {
    display: inline-block;
    margin-top: 7px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    box-shadow: inset 1px 1px 0.5px -0.5px var(--shine-hi);
  }
  [data-theme="dark"] .app-badge { background: rgba(255, 255, 255, 0.1); }
  .store-btn { flex-shrink: 0; }
  .store-btn img { height: 44px; display: block; border-radius: 10px; }
  .store-btn { transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.6); }
  .store-btn:hover { transform: scale(1.06); }

  .app-desc {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-height: 96px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .app-desc::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 44px;
    background: linear-gradient(rgba(255,255,255,0), var(--fade, rgba(255,255,255,0.001)));
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
    mask-image: linear-gradient(transparent, black);
    -webkit-mask-image: linear-gradient(transparent, black);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  .app-desc.expanded { max-height: 1200px; }
  .app-desc.expanded::after { opacity: 0; }
  .desc-toggle {
    margin-top: 10px;
    border: none;
    background: none;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    font-family: inherit;
  }

  .shots {
    display: flex;
    gap: 14px;
    margin-top: 20px;
    overflow-x: auto;
    padding: 6px 2px 12px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .shots img {
    height: 300px;
    border-radius: 18px;
    cursor: zoom-in;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.6);
    flex-shrink: 0;
  }
  .shots img:hover { transform: scale(1.03); }

  /* ---------- Contact ---------- */
  .contact-panel {
    padding: 56px 44px;
    text-align: center;
  }
  .contact-panel h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
  }
  .contact-panel p { color: var(--text-secondary); font-size: 17px; margin-bottom: 30px; }

  footer {
    text-align: center;
    padding: 40px 24px 50px;
    font-size: 13px;
    color: var(--text-secondary);
  }
  footer button {
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
  }

  /* ---------- Lightbox ---------- */
  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 20, 0.55);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
  }
  .lightbox.open { display: flex; }
  .lightbox img {
    max-width: min(88vw, 480px);
    max-height: 82vh;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  }
  .lb-btn {
    position: absolute;
    border: none;
    color: #fff;
    font-size: 20px;
    width: 52px; height: 52px;
    border-radius: 999px;
    cursor: pointer;
    display: grid;
    place-items: center;
    background: transparent;
  }
  .lb-close { top: 24px; right: 24px; }
  .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
  .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

  /* ---------- Imprint modal ---------- */
  .modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 20, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
  }
  .modal-backdrop.open { display: flex; }
  .modal {
    max-width: 460px;
    width: 100%;
    padding: 36px;
  }
  .modal h2 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: 20px; }
  .modal h3 { font-size: 17px; margin: 18px 0 6px; }
  .modal p { font-size: 15px; line-height: 1.7; color: var(--text-secondary); }
  .modal .close-row { margin-top: 26px; text-align: right; }

  /* ---------- Scroll reveal ---------- */
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.visible { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
  }

  @media (max-width: 720px) {
    nav .nav-links { display: none; }
    section { padding: 60px 0 20px; }
    .about-panel, .app-card { padding: 24px; }
    .shots img { height: 230px; }
  }
