@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lobster';
  src: url('fonts/lobster-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --t: 0.25s ease;
}

[data-theme="dark"] {
  --bg: #111110;
  --surface: #1C1C1A;
  --text: #F0EFE9;
  --muted: #8A8883;
  --border: #2C2C28;
  --shadow: 0 2px 12px rgba(0,0,0,0.45);
  --shadow-h: 0 8px 32px rgba(0,0,0,0.55);
  --nav-bg: rgba(17,17,16,0.88);
  --accent: #10B981;
  --accent-glow: rgba(16, 185, 129, 0.3);
  --card-bg: rgba(28, 28, 26, 0.7);
  --card-border: rgba(255,255,255,0.06);
  --card-hover-border: rgba(16, 185, 129, 0.4);
  --aurora-1: rgba(16, 185, 129, 0.15);
  --aurora-2: rgba(139, 92, 246, 0.12);
  --aurora-3: rgba(251, 191, 36, 0.08);
  --grain-opacity: 0.03;
}

[data-theme="light"] {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --text: #181818;
  --muted: #787672;
  --border: #E8E4DC;
  --shadow: 0 2px 16px rgba(0,0,0,0.05);
  --shadow-h: 0 8px 32px rgba(0,0,0,0.1);
  --nav-bg: rgba(246,245,241,0.92);
  --accent: #10B981;
  --accent-glow: rgba(16, 185, 129, 0.2);
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(0,0,0,0.06);
  --card-hover-border: rgba(16, 185, 129, 0.5);
  --aurora-1: rgba(167, 243, 208, 0.3);
  --aurora-2: rgba(196, 181, 253, 0.2);
  --aurora-3: rgba(253, 230, 138, 0.25);
  --grain-opacity: 0.02;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  transition: background var(--t), color var(--t);
}

/* ── AURORA BACKGROUND ── */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.aurora-1 {
  width: 600px;
  height: 600px;
  background: var(--aurora-1);
  top: -200px;
  right: -150px;
  animation: auroraMove1 25s ease-in-out infinite;
}

.aurora-2 {
  width: 500px;
  height: 500px;
  background: var(--aurora-2);
  bottom: -150px;
  left: -100px;
  animation: auroraMove2 30s ease-in-out infinite;
}

.aurora-3 {
  width: 400px;
  height: 400px;
  background: var(--aurora-3);
  top: 40%;
  left: 40%;
  animation: auroraMove3 20s ease-in-out infinite;
}

@keyframes auroraMove1 {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(-80px, 60px) scale(1.15) rotate(15deg); }
  66% { transform: translate(40px, -30px) scale(0.9) rotate(-10deg); }
}

@keyframes auroraMove2 {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(60px, -80px) scale(1.1) rotate(-20deg); }
  66% { transform: translate(-50px, 40px) scale(0.95) rotate(15deg); }
}

@keyframes auroraMove3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-30%, -60%) scale(1.2); }
}

/* Film grain overlay */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ── NAVBAR ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background var(--t), border-color var(--t);
}

.nav-logo {
  font-family: 'Lobster', cursive;
  font-size: 1.5rem;
  color: var(--accent);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  transition: transform 0.2s, box-shadow 0.2s, background var(--t), border-color var(--t);
}

.theme-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-h);
}

.icon-sun, .icon-moon {
  position: absolute;
  width: 17px;
  height: 17px;
  transition: opacity 0.25s, transform 0.35s;
  color: var(--text);
}

[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(45deg) scale(0.6); }
[data-theme="dark"] .icon-moon { opacity: 1; transform: none; }
[data-theme="light"] .icon-sun { opacity: 1; transform: none; }
[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(-45deg) scale(0.6); }

.lang-btn {
  height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  touch-action: manipulation;
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s, background var(--t), border-color var(--t);
}

.lang-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-h);
  color: var(--text);
}

/* ── CONTAINER ── */
.container {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 auto;
  padding: 96px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── HERO ── */
.hero {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeUp 0.8s cubic-bezier(.22, .68, 0, 1) both;
}

.avatar-glow {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 28px;
}


.avatar {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-image: url('/avatar.jpg');
  background-size: 140%;
  background-position: center 38%;
  border: 3px solid var(--border);
  z-index: 1;
  transition: border-color var(--t);
}

.name {
  font-size: clamp(32px, 7vw, 44px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 8px;
}

.tagline {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color var(--t);
}

.hero-line {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #8B5CF6);
  margin: 24px auto 0;
  opacity: 0.7;
}

/* ── LINKS SECTION ── */
.links-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

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

.group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-left: 4px;
  margin-bottom: 2px;
  transition: color var(--t);
}

/* ── LINK CARDS ── */
.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition:
    transform 0.4s cubic-bezier(.22, .68, 0, 1),
    box-shadow 0.4s cubic-bezier(.22, .68, 0, 1),
    border-color 0.3s ease,
    background var(--t);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(16, 185, 129, 0.08) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.link-card:hover::before {
  opacity: 1;
}

.link-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-h);
  border-color: var(--card-hover-border);
}

.link-card:active {
  transform: translateY(-2px) scale(1.005);
}

.link-card.featured {
  border-color: rgba(16, 185, 129, 0.15);
}

.link-card.featured .link-icon {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
}

/* ── PRODUCT CARDS (featured with preview) ── */
.link-card--preview {
  padding: 0;
  overflow: hidden;
  flex-direction: column;
  align-items: stretch;
  border-color: rgba(16, 185, 129, 0.2);
  min-height: 200px;
  transition:
    transform 0.15s ease,
    box-shadow 0.4s cubic-bezier(.22, .68, 0, 1),
    border-color 0.3s ease;
}

.link-card--preview:hover {
  border-color: rgba(16, 185, 129, 0.5);
}

.link-preview {
  flex-shrink: 0;
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.link-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--card-bg) 100%);
}

.link-card--preview .link-content {
  padding: 14px 18px 16px;
  flex-direction: row;
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-card--preview .link-content-text {
  flex: 1;
}

.link-card--preview .link-arrow {
  flex-shrink: 0;
  align-self: center;
  margin-right: 2px;
}

/* ── LINK ICON ── */
.link-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(128, 128, 128, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.link-card:hover .link-icon {
  transform: scale(1.08);
}

.link-icon.linkedin { color: #0A66C2; background: rgba(10, 102, 194, 0.1); }
.link-icon.youtube { color: #FF0000; background: rgba(255, 0, 0, 0.08); }
.link-icon.instagram { color: #E4405F; background: rgba(228, 64, 95, 0.08); }
.link-icon.tiktok { color: var(--text); background: rgba(128, 128, 128, 0.08); }

/* ── LINK CONTENT ── */
.link-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.link-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  transition: color var(--t);
}

/* ── LINK ARROW ── */
.link-arrow {
  flex-shrink: 0;
  color: var(--muted);
  opacity: 0.4;
  transition: transform 0.3s cubic-bezier(.22, .68, 0, 1), color 0.3s ease, opacity 0.3s ease;
}

.link-card:hover .link-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
  color: var(--accent);
}

/* ── FOOTER ── */
.footer {
  margin-top: auto;
  padding-top: 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.4;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  opacity: 0.6;
  transition: color var(--t);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.link-group:nth-child(1) .group-label { animation: fadeUp 0.6s cubic-bezier(.22,.68,0,1) 0.15s both; }
.link-group:nth-child(1) .link-card:nth-child(2) { animation: fadeUp 0.6s cubic-bezier(.22,.68,0,1) 0.25s both; }
.link-group:nth-child(1) .link-card:nth-child(3) { animation: fadeUp 0.6s cubic-bezier(.22,.68,0,1) 0.35s both; }
.link-group:nth-child(2) .group-label { animation: fadeUp 0.6s cubic-bezier(.22,.68,0,1) 0.45s both; }
.link-group:nth-child(2) .link-card:nth-child(2) { animation: fadeUp 0.6s cubic-bezier(.22,.68,0,1) 0.55s both; }
.link-group:nth-child(2) .link-card:nth-child(3) { animation: fadeUp 0.6s cubic-bezier(.22,.68,0,1) 0.65s both; }
.link-group:nth-child(2) .link-card:nth-child(4) { animation: fadeUp 0.6s cubic-bezier(.22,.68,0,1) 0.75s both; }
.link-group:nth-child(2) .link-card:nth-child(5) { animation: fadeUp 0.6s cubic-bezier(.22,.68,0,1) 0.85s both; }
.footer { animation: fadeUp 0.6s cubic-bezier(.22,.68,0,1) 0.95s both; }

/* ── RESPONSIVE ── */

/* Tablets & grosse Phones */
@media (max-width: 600px) {
  .container {
    max-width: 100%;
    padding: 80px 20px max(48px, env(safe-area-inset-bottom, 24px));
  }

  .links-section {
    gap: 28px;
  }

  /* Preview-Kacheln: Bild etwas kleiner */
  .link-preview {
    height: 110px;
  }

  .link-card--preview {
    min-height: 160px;
  }
}

/* Kleine Phones (≤ 480px) */
@media (max-width: 480px) {
  nav {
    padding: 0 16px;
    /* Safe Area links/rechts bei Notch-Geraeten */
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .container {
    padding: 76px 16px max(40px, env(safe-area-inset-bottom, 20px));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .link-card {
    padding: 15px 16px;
    gap: 13px;
    border-radius: 18px;
  }

  .link-card--preview {
    border-radius: 18px;
  }

  .link-preview {
    height: 100px;
  }

  .link-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .link-title {
    font-size: 15px;
  }

  .link-desc {
    font-size: 12px;
  }

  .avatar-glow {
    width: 92px;
    height: 92px;
    margin-bottom: 22px;
  }

  .avatar {
    width: 92px;
    height: 92px;
  }

  .name {
    font-size: clamp(28px, 8vw, 38px);
  }

  /* Aurora auf Mobile kleiner + weniger Blur fuer Performance */
  .aurora {
    filter: blur(60px);
  }
  .aurora-1 { width: 320px; height: 320px; }
  .aurora-2 { width: 260px; height: 260px; }
  .aurora-3 { width: 200px; height: 200px; }
}

/* Sehr kleine Phones (≤ 360px, z.B. Galaxy S8) */
@media (max-width: 360px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .link-card {
    padding: 13px 14px;
    gap: 11px;
  }

  .link-icon {
    width: 38px;
    height: 38px;
  }

  .avatar {
    width: 82px;
    height: 82px;
  }

  .avatar-glow {
    width: 82px;
    height: 82px;
  }
}

/* ── TOUCH DEVICE: Hover-Effekte deaktivieren ── */
@media (hover: none) {
  .link-card:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: var(--card-border);
  }

  .link-card.featured:hover {
    border-color: rgba(16, 185, 129, 0.15);
  }

  .link-card--preview:hover {
    border-color: rgba(16, 185, 129, 0.2);
  }

  .link-card:hover::before {
    opacity: 0;
  }

  .link-card:hover .link-icon {
    transform: none;
  }

  .link-card:hover .link-arrow {
    opacity: 0.4;
    transform: none;
    color: var(--muted);
  }

  /* Aktiv-Feedback beim Tippen */
  .link-card:active {
    transform: scale(0.98);
    opacity: 0.85;
    transition: transform 0.1s ease, opacity 0.1s ease;
  }

  .theme-btn:hover,
  .lang-btn:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  .theme-btn:active,
  .lang-btn:active {
    transform: scale(0.94);
    opacity: 0.8;
    transition: transform 0.1s ease, opacity 0.1s ease;
  }
}

/* ── ACCESSIBILITY ── */
.link-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-btn:focus-visible,
.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: rgba(16, 185, 129, 0.25);
  color: var(--text);
}
