/* ================================
   EinfachDev's profile — style.css
   ================================ */

:root {
  --bg: #030712;
  --card-bg: rgba(10, 15, 35, 0.88);
  --border: rgba(99, 155, 255, 0.2);
  --accent: #3b82f6;
  --accent2: #818cf8;
  --text: #c7d2fe;
  --text-dim: #6b7280;
  --btn-bg: rgba(59, 130, 246, 0.15);
  --btn-hover: rgba(59, 130, 246, 0.3);
  --glow: rgba(59, 130, 246, 0.4);
}

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

/* Base body */
body {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  overflow: hidden;
  position: relative;
}

/* DOC PAGE OVERRIDE — must come after body */
body.doc-page {
  display: block !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 50px 20px 80px !important;
}

/* Animated Background */
.bg-gradient {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(30,58,138,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(67,56,202,0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(15,23,60,0.5) 0%, transparent 50%),
    #030712;
  animation: bgPulse 8s ease-in-out infinite alternate;
  will-change: filter;
}
@keyframes bgPulse {
  0%   { filter: hue-rotate(0deg) brightness(1); }
  100% { filter: hue-rotate(20deg) brightness(1.1); }
}

canvas { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.star { position: absolute; background: white; border-radius: 50%; animation: twinkle ease-in-out infinite;
  will-change: opacity, transform; }
@keyframes twinkle {
  0%,100% { opacity: 0.1; transform: scale(1); }
  50%     { opacity: 0.8; transform: scale(1.3); }
}
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.particle { position: absolute; border-radius: 50%; background: var(--accent); opacity: 0; animation: floatUp linear infinite;
  will-change: transform, opacity; }
@keyframes floatUp {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translateY(-20px) scale(1.5); opacity: 0; }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardGlow {
  from { box-shadow: 0 0 40px rgba(59,130,246,0.08), 0 20px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05); }
  to   { box-shadow: 0 0 80px rgba(99,155,255,0.18), 0 20px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.07); }
}

/* ── INDEX PAGE ── */
.card-wrapper { position: relative; z-index: 10; animation: cardIn 0.8s cubic-bezier(0.34,1.56,0.64,1) both; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; width: 320px; backdrop-filter: blur(20px);
  will-change: box-shadow;
  transform: translateZ(0); overflow: hidden; animation: cardGlow 4s ease-in-out infinite alternate; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); background: rgba(59,130,246,0.05); }
.card-header span { font-size: 11px; color: var(--text-dim); letter-spacing: 0.05em; font-style: italic; }
.header-icons { display: flex; gap: 8px; }
.header-icons div { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 10px; cursor: pointer; transition: all 0.2s; }
.header-icons div:hover { border-color: var(--accent); color: var(--accent); background: var(--btn-bg); }
.profile-area { display: flex; gap: 14px; padding: 14px; }
.avatar { width: 90px; height: 90px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); flex-shrink: 0; position: relative; box-shadow: 0 0 20px rgba(59,130,246,0.2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.avatar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(59,130,246,0.15) 0%, transparent 60%); pointer-events: none; }
.avatar-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg,#1e3a8a,#1e1b4b); display: flex; align-items: center; justify-content: center; font-size: 32px; }
.profile-info { flex: 1; }
.profile-title { font-family: 'Playfair Display', serif; font-size: 15px; color: var(--accent2); margin-bottom: 8px; text-shadow: 0 0 20px rgba(129,140,248,0.5); font-style: italic; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.info-list li { font-size: 11px; color: var(--text); display: flex; align-items: center; gap: 5px; }
.info-list li::before { content: '◈'; color: var(--accent); font-size: 8px; opacity: 0.7; }
.socials { display: flex; gap: 6px; margin-top: 10px; }
.social-icon { width: 24px; height: 24px; border-radius: 6px; background: var(--btn-bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; transition: all 0.2s; color: var(--text-dim); }
.social-icon:hover { background: var(--btn-hover); border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59,130,246,0.3); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 0 14px; }
.buttons { display: flex; flex-direction: column; gap: 7px; padding: 10px 14px 14px; }
.btn { padding: 9px 14px; border-radius: 8px; background: var(--btn-bg); border: 1px solid var(--border); color: var(--text); font-family: 'Nunito', sans-serif; font-size: 12px; cursor: pointer; transition: all 0.25s; text-align: center; letter-spacing: 0.04em; position: relative; overflow: hidden; }
.btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent); transition: left 0.4s; }
.btn:hover::before { left: 100%; }
.btn:hover { background: var(--btn-hover); border-color: var(--accent); color: #fff; box-shadow: 0 4px 20px rgba(59,130,246,0.25); transform: translateY(-1px); }
.card-footer { text-align: center; padding: 8px; border-top: 1px solid var(--border); font-size: 9px; color: rgba(107,114,128,0.5); letter-spacing: 0.1em; }

/* ── DOC PAGES ── */
.doc-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  animation: cardIn 0.8s cubic-bezier(0.34,1.56,0.64,1) both;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  padding: 6px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
}
.back-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--btn-hover);
  transform: translateX(-3px);
}

.doc-card {
  background: rgba(8, 12, 30, 0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(30px);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(59,130,246,0.1), 0 30px 80px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: cardGlow 4s ease-in-out infinite alternate;
}

.doc-header {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(59,130,246,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.doc-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--accent2);
  font-style: italic;
  text-shadow: 0 0 24px rgba(129,140,248,0.5);
}

.doc-badge {
  font-size: 10px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  letter-spacing: 0.08em;
  background: rgba(59,130,246,0.06);
}

.doc-body {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.doc-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-section-title::before {
  content: '◈';
  font-size: 9px;
  opacity: 0.8;
}

.doc-section p {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.9;
  opacity: 0.95;
}

.doc-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 4px;
}

.doc-section ul li {
  font-size: 13px;
  color: var(--text);
  opacity: 0.9;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.7;
}

.doc-section ul li::before {
  content: '⊹';
  color: var(--accent2);
  font-size: 11px;
  margin-top: 2px;
  flex-shrink: 0;
  opacity: 0.8;
}

.doc-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.doc-contact {
  background: rgba(59,130,246,0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
}
.doc-contact a { color: var(--accent2); text-decoration: none; transition: color 0.2s; }
.doc-contact a:hover { color: var(--accent); }

.doc-footer {
  text-align: center;
  padding: 12px;
  border-top: 1px solid var(--border);
  font-size: 9px;
  color: rgba(107,114,128,0.5);
  letter-spacing: 0.1em;
}


/* ════════════════════════════════
   CROSS-BROWSER PERFORMANCE FIX
   Chrome / Opera GX / Firefox
   ════════════════════════════════ */

/* Webkit-Prefix für Safari/Chrome/Opera */
.card,
.doc-card,
.back-btn {
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

/* GPU-Compositing für alle animierten Elemente erzwingen */
.bg-gradient,
.stars,
.particles,
canvas {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Canvas Rendering optimieren */
canvas {
  image-rendering: optimizeSpeed;
}

/* Chromium-Browsers (Chrome, Opera GX, Edge): blur reduzieren für Performance */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm) {
  .card { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .doc-card { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
}

/* Firefox: backdrop-filter ist teuer, stärkerer Hintergrund als Ersatz */
@-moz-document url-prefix() {
  .card,
  .doc-card,
  .back-btn {
    backdrop-filter: none !important;
    background: rgba(5, 8, 22, 0.97) !important;
    border-color: rgba(99, 155, 255, 0.3) !important;
  }
}

/* Fallback wenn backdrop-filter komplett fehlt */
@supports not (backdrop-filter: blur(1px)) {
  .card,
  .doc-card,
  .back-btn {
    background: rgba(5, 8, 22, 0.97) !important;
  }
}

/* Animationen für Nutzer die reduzierte Bewegung bevorzugen */
@media (prefers-reduced-motion: reduce) {
  .star, .particle { animation: none !important; opacity: 0.3; }
  .bg-gradient { animation: none !important; }
  .card, .doc-card { animation: none !important; }
}
