/* ===== FONTS ===== */
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/roboto-v48-latin-regular.woff2') format('woff2'),
       url('../fonts/roboto-v48-latin-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/roboto-v48-latin-500.woff2') format('woff2'),
       url('../fonts/roboto-v48-latin-500.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-v30-latin-700.woff2') format('woff2'),
       url('../fonts/montserrat-v30-latin-700.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== TEXT SELECTION ===== */
::selection {
  background: #2563eb;
  color: #ffffff;
}
::-moz-selection {
  background: #2563eb;
  color: #ffffff;
}

/* ===== CSS VARIABLES ===== */
:root {
  --primary-color: #2563eb;
  --primary-light: #60a5fa;
  --primary-dark: #1e40af;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --light-bg: #f8fafc;
  --light-secondary: #e0e7ff;
  --border-radius: 1.5rem;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --border-color: #404040;
  --card-bg: #2d2d2d;
  --navbar-bg: #1a1a1a;
}

[data-theme="dark"] body {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: var(--text-primary);
}

[data-theme="dark"] .skill-card,
[data-theme="dark"] .project-card {
  background: var(--card-bg);
  border-color: #404040;
  color: var(--text-primary);
}

[data-theme="dark"] .project-content h4 {
  color: var(--text-primary);
}

[data-theme="dark"] .project-content div {
  color: var(--text-secondary);
}

[data-theme="dark"] .section-title {
  color: var(--text-primary);
}

[data-theme="dark"] .navbar.scrolled {
  background: var(--navbar-bg) !important;
}

/* ===== DARK MODE TOGGLE ===== */
#darkModeToggle {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

#darkModeToggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

#darkModeToggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  outline: none;
}

[data-theme="dark"] #darkModeToggle {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] #darkModeToggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

#darkModeIcon {
  transition: var(--transition);
  font-size: 1.1rem;
}

#darkModeToggle:hover #darkModeIcon {
  transform: rotate(15deg);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.scroll-to-top:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .scroll-to-top {
  background: var(--primary-light);
  color: var(--bg-primary);
}

[data-theme="dark"] .scroll-to-top:hover {
  background: var(--primary-color);
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  /* Verbesserte mobile Navbar */
  .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: var(--transition);
  }
  
  .navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
  }
  
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    outline: none;
  }
  
  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    transition: var(--transition);
  }
  
  /* Hamburger Animation */
  .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M6 6L24 24M6 24L24 6'/%3e%3c/svg%3e");
    transform: rotate(180deg);
  }
  
  /* Pulse Animation für Aufmerksamkeit */
  @keyframes pulse {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.1);
    }
    100% {
      transform: scale(1);
    }
  }
  
  .navbar-toggler.pulse {
    animation: pulse 2s infinite;
  }
}

[data-theme="dark"] .bg-light {
  background: var(--bg-secondary) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .modal-content {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .modal-header {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-title {
  color: var(--text-primary);
}

[data-theme="dark"] .modal-body {
  color: var(--text-primary);
}

[data-theme="dark"] .modal-body a {
  color: #60a5fa;
}

[data-theme="dark"] .modal-body a:hover {
  color: #93c5fd;
}

[data-theme="dark"] .text-primary {
  color: var(--primary-light) !important;
}

[data-theme="dark"] .text-secondary {
  color: #a0a0a0 !important;
}

[data-theme="dark"] .form-control:focus {
  background: var(--bg-secondary);
  border-color: var(--primary-light);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25);
}

[data-theme="dark"] .form-control {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
  background: var(--bg-secondary);
  border-color: #60a5fa;
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25);
}

[data-theme="dark"] .form-control::placeholder {
  color: var(--text-secondary);
}

[data-theme="dark"] .card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

/* ===== BASE STYLES ===== */
body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  min-height: 100vh;
  overflow-x: hidden;
  scroll-padding-top: 70px;
  scroll-behavior: smooth;
}

/* ===== NAVBAR ===== */
.navbar {
  transition: background 0.3s, box-shadow 0.3s;
  padding: 0.75rem 0;
}

/* Mobile Navbar Verbesserungen */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(37, 99, 235, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 0 0 1rem 1rem;
    margin: 0;
    padding: 2rem 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
  }
  
  .navbar-nav {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .navbar-nav .nav-item {
    margin: 0.5rem 0;
    width: 100%;
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: var(--transition);
  }
  
  .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  
  .navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff !important;
  }
  
  /* Dark Mode Toggle in mobile Navbar */
  #darkModeToggle {
    margin: 1rem auto 0 auto !important;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* Dark Mode Anpassungen für mobile Navbar */
.navbar .navbar-brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 1px;
}
.navbar .nav-link {
  color: #fff !important;
  font-weight: 500;
  margin-left: 1rem;
  transition: color 0.2s;
}

/* Mobile Navbar Link Override */
@media (max-width: 991.98px) {
  .navbar .nav-link {
    margin-left: 0;
    text-align: center;
    width: 100%;
  }
}
.navbar .nav-link:hover, .navbar .nav-link.active {
  color: #a5b4fc !important;
}
.navbar.scrolled {
  background: #2563eb !important;
  box-shadow: 0 2px 16px rgba(37,99,235,0.12);
  backdrop-filter: none;
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background: linear-gradient(120deg, #2563eb 0%, #60a5fa 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Dark Mode Hero Styles */
[data-theme="dark"] .hero {
  background: linear-gradient(120deg, #1e3a8a 0%, #1e40af 50%, #3730a3 100%);
}
.hero-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}
.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  animation: fadeInDown 1s;
}
.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1.2s;
}
.hero > *:not(.bubble) {
  position: relative;
  z-index: 1;
}

/* ===== SECTIONS ===== */
.section {
  padding: 4rem 0 3rem 0;
  position: relative;
}
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #2563eb;
  text-align: center;
  position: relative;
  z-index: 1;
}
.section-title.text-white {
  color: #2563eb;
}

/* ===== SKILLS ===== */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.skill-badge {
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
  color: #fff;
  font-size: 1.1rem;
  padding: 0.7rem 1.5rem;
  border-radius: 2rem;
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
  font-weight: 500;
  transition: transform 0.2s;
  cursor: pointer;
  animation: popIn 0.7s;
}
.skill-badge:hover {
  transform: scale(1.1) rotate(-3deg);
  box-shadow: 0 4px 16px rgba(96,165,250,0.15);
}

/* ===== CARDS (SKILLS & PROJECTS) ===== */
.skill-card, .project-card {
  background: #f8fafc;
  border-radius: 16px;
  border: 1.5px solid #2563eb22;
  color: #1e293b;
  transition: box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 2px 12px rgba(37,99,235,0.06);
}
.skill-card:hover, .project-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 24px rgba(37,99,235,0.12);
  transform: none !important;
}
.skill-icon {
  font-size: 2.5rem;
  color: #2563eb;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* ===== PROJECT CARDS ===== */
.project-card {
  border: 1.5px solid #2563eb22;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(37,99,235,0.06);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  background: #fff;
  animation: fadeInUp 1s;
}
.project-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 32px rgba(37,99,235,0.15);
  border-color: #2563eb;
}
.project-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}
.project-card:hover .project-bg {
  opacity: 0.4;
}
.project-content {
  position: relative;
  z-index: 2;
  color: #1e293b;
}
.project-content .skill-icon {
  color: #2563eb;
}
.project-content h4 {
  color: #1e293b;
}
.project-content .btn {
  background: rgba(255,255,255,0.9);
  border-color: #2563eb;
  color: #2563eb;
}
.project-content .btn:hover {
  background: #2563eb;
  color: #fff;
}

/* ===== TIMELINE ===== */
.timeline-cards {
  position: relative;
  padding: 2rem 0;
}
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  height: 100%;
  background: #2563eb;
  transform: translateX(-50%);
  z-index: 0;
  border-radius: 2px;
}
.timeline-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 3rem auto;
}
.timeline-dot {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 1.5rem;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}
.timeline-card .skill-card {
  padding-left: 88px;
  width: 100%;
  z-index: 1;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border: none;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transition: var(--transition);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline-primary:disabled:hover {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: none;
  box-shadow: none;
}

/* ===== GLOBAL BUTTON STYLES ===== */
.btn {
  border-radius: var(--border-radius) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 1px;
  margin-top: 3rem;
}

/* Dark Mode Footer Styles */
[data-theme="dark"] .footer {
  background: #1e40af;
}
.footer-social {
  color: #fff !important;
  transition: color 0.2s;
}
.footer-social:hover {
  color: #a5b4fc !important;
}

/* Dark Mode Footer Social Icons */
[data-theme="dark"] .footer-social {
  color: #e0e7ff !important;
  transition: color 0.2s;
}
[data-theme="dark"] .footer-social:hover {
  color: #c7d2fe !important;
  transform: scale(1.1);
}

.footer-link {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #fbbf24;
  text-decoration: underline;
}
.footer-link {
  color: #fff;
  text-decoration: underline;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  font-size: 1rem;
  transition: color 0.2s;
}
.footer-link:hover {
  color: #a5b4fc;
}

/* Dark Mode Footer Links */
[data-theme="dark"] .footer-link {
  color: #e0e7ff;
  transition: color 0.2s;
}
[data-theme="dark"] .footer-link:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

/* Footer Copyright Section */
.footer-copyright {
  background-color: rgba(0, 0, 0, 0.1);
  color: #fff;
}

/* Dark Mode Footer Copyright Section */
[data-theme="dark"] .footer-copyright {
  background-color: rgba(0, 0, 0, 0.2);
  color: #e0e7ff;
}

/* ===== CONTACT ===== */
.contact-mail-link {
  color: var(--primary-color);
  text-decoration: underline;
  font-size: 1.1rem;
  transition: var(--transition);
}

.contact-mail-link:hover {
  color: var(--primary-light);
}

/* ===== BACKGROUNDS ===== */
.bg-dark {
  background: #e0e7ff !important;
}

/* ===== BUBBLES ===== */
.bubble {
  position: absolute;
  border-radius: 50%;
  opacity: 0.18;
  z-index: 0;
  animation: bubbleMove 12s infinite linear;
  pointer-events: none;
}

/* Dark Mode Bubble Styles */
[data-theme="dark"] .bubble {
  opacity: 0.15;
}

/* ===== ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
* {
  box-sizing: border-box;
}

img, svg {
  max-width: 100%;
  height: auto;
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes bubbleMove {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.1); }
  100% { transform: translateY(0) scale(1); }
}