/* ==========================================================================
   Jens Langkammer – Personal Web Hub
   Design System & Styles
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Colors – Dark Mode (default) */
  --bg-primary: #07080d;
  --bg-secondary: #0d0f16;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(212, 168, 0, 0.3);

  --gold-primary: #d4a800;
  --gold-light: #ffcc00;
  --gold-muted: rgba(212, 168, 0, 0.15);
  --gold-glow: rgba(212, 168, 0, 0.25);

  --text-primary: #f0f0f2;
  --text-secondary: rgba(240, 240, 242, 0.7);
  --text-muted: rgba(240, 240, 242, 0.45);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-gap: 8rem;
  --card-padding: 2rem;
  --container-max: 1080px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(212, 168, 0, 0.08);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.7s;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 1rem;
  overflow-x: hidden;
}

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--gold-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Particle Canvas ---------- */
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 0 4rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(212, 168, 0, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(100, 100, 255, 0.03) 0%, transparent 50%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  max-width: 720px;
}

.hero-photo-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 0.5rem;
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-primary);
  box-shadow: 0 0 30px rgba(212, 168, 0, 0.2);
  position: relative;
  z-index: 1;
}

.hero-photo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 0, 0.15);
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.06); opacity: 0; }
}

/* Initialen-Fallback */
.hero-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), #c09400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--bg-primary);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 30px rgba(212, 168, 0, 0.2);
}

.hero-name {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--text-primary) 0%, rgba(240, 240, 242, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.15rem;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 520px;
}

.hero-title strong {
  color: var(--gold-primary);
  font-weight: 600;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.hero-tag {
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--gold-muted);
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid rgba(212, 168, 0, 0.12);
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all var(--duration-fast) var(--ease-out);
}

.hero-link--primary {
  background: var(--gold-primary);
  color: var(--bg-primary);
}

.hero-link--primary:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 168, 0, 0.3);
}

.hero-link--secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.hero-link--secondary:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.hero-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float-hint 2.5s ease-in-out infinite;
  z-index: 2;
}

.hero-scroll-hint .chevron {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--gold-primary);
  border-bottom: 2px solid var(--gold-primary);
  transform: rotate(45deg);
  opacity: 0.5;
}

@keyframes float-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Section Base ---------- */
.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-primary);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gold-primary);
  border-radius: 2px;
}

.section-heading {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

/* ---------- About Section ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-text p + p {
  margin-top: 1rem;
}

.competence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.competence-card {
  padding: 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
}

.competence-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.competence-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.competence-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.competence-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Publications Section ---------- */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.pub-card {
  position: relative;
  padding: var(--card-padding);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.pub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.pub-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  color: inherit;
}

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

.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  background: var(--gold-muted);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
  width: fit-content;
}

.pub-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.65rem;
}

.pub-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

.pub-source {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pub-source-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--gold-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.pub-arrow {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--gold-primary);
  transition: transform var(--duration-fast) var(--ease-out);
}

.pub-card:hover .pub-arrow {
  transform: translateX(4px);
}

/* ---------- Career Timeline ---------- */
.timeline {
  position: relative;
  margin-top: 3rem;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold-primary), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.35rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-primary);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--gold-primary);
  z-index: 1;
}

.timeline-item:first-child .timeline-dot {
  width: 16px;
  height: 16px;
  left: -2.55rem;
  box-shadow: 0 0 0 3px var(--gold-primary), 0 0 15px rgba(212, 168, 0, 0.3);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-primary);
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.6;
}

/* ---------- Footer ---------- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-glass);
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

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

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  padding: 0.3rem 0.7rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  margin-top: 0.5rem;
}

.footer-badge .dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* ---------- Fade-in Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ---------- Divider ---------- */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-primary), transparent);
  border: none;
  margin: 0 0 2rem;
  border-radius: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --section-gap: 5rem;
    --card-padding: 1.5rem;
  }

  .hero {
    min-height: auto;
    padding: 8rem 0 4rem;
  }

  .hero-photo-wrapper {
    width: 120px;
    height: 120px;
  }

  .hero-initials {
    font-size: 2.5rem;
  }

  .hero-links {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .hero-link {
    justify-content: center;
  }

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

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

  .hero-scroll-hint {
    display: none;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-dot {
    left: -1.85rem;
  }

  .timeline-item:first-child .timeline-dot {
    left: -2.05rem;
  }
}

@media (max-width: 480px) {
  .competence-grid {
    grid-template-columns: 1fr;
  }

  .hero-tags {
    gap: 0.4rem;
  }

  .hero-tag {
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
  }
}

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 15, 22, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.25rem 2rem;
  z-index: 10000;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(212, 168, 0, 0.2);
  display: none;
}

.cookie-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

.cookie-content p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

.cookie-content a {
  color: var(--gold-primary);
  text-decoration: underline;
}

.cookie-content a:hover {
  color: var(--gold-light);
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cookie-accept {
  padding: 0.6rem 1.75rem;
  background: var(--gold-primary);
  color: var(--bg-primary);
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-size: 0.85rem;
}

.cookie-accept:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 168, 0, 0.25);
}

.cookie-decline {
  padding: 0.6rem 1.75rem;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-size: 0.85rem;
}

.cookie-decline:hover {
  border-color: var(--border-glass-hover);
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .cookie-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .cookie-content p {
    flex: 1;
    max-width: 75%;
  }
}

/* ---------- Legal Pages Content Styles ---------- */
.legal-main {
  padding: 8rem 0 5rem;
  min-height: 70vh;
}

.legal-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--gold-primary);
  background: linear-gradient(135deg, var(--text-primary) 0%, rgba(240, 240, 242, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-body {
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  border-left: 3px solid var(--gold-primary);
  padding-left: 0.75rem;
}

.legal-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.75rem 0 0.75rem;
}

.legal-body p {
  margin-bottom: 1.25rem;
}

.legal-body ul, .legal-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.legal-body li {
  margin-bottom: 0.5rem;
}

.legal-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-primary);
  transition: all var(--duration-fast) var(--ease-out);
}

.legal-back-link:hover {
  color: var(--gold-light);
  transform: translateX(-4px);
}

