/* Creating base styles with CSS custom properties and reset */
/* Modern CSS Custom Properties with semantic design tokens */
:root {
  /* Semantic Design Tokens - Rot-Weiß Farbschema */
  --background: #ffffff;
  --foreground: #1f2937;
  --card: #fff5f5;
  --card-foreground: #1f2937;
  --popover: #ffffff;
  --popover-foreground: #1f2937;
  --primary: #dc2626;
  --primary-foreground: #ffffff;
  --secondary: #fef2f2;
  --secondary-foreground: #1f2937;
  --muted: #fee2e2;
  --muted-foreground: #1f2937;
  --accent: #ef4444;
  --accent-foreground: #ffffff;
  --destructive: #991b1b;
  --destructive-foreground: #ffffff;
  --border: #fecaca;
  --input: #fff5f5;
  --ring: #dc2626;
  --chart-1: #dc2626;
  --chart-2: #ef4444;
  --chart-3: #b91c1c;
  --chart-4: #991b1b;
  --chart-5: #7f1d1d;
  --radius: 0.5rem;

  /* Additional modern tokens */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
  --background: #0a192f;
  --foreground: #e6f1ff;
  --card: #112240;
  --card-foreground: #e6f1ff;
  --popover: #112240;
  --popover-foreground: #e6f1ff;
  --primary: #64ffda;
  --primary-foreground: #0a192f;
  --secondary: #172a45;
  --secondary-foreground: #e6f1ff;
  --muted: #1d2d4f;
  --muted-foreground: #8892b0;
  --accent: #64ffda;
  --accent-foreground: #0a192f;
  --border: #233554;
  --input: #112240;
  --ring: #64ffda;
  --chart-1: #64ffda;
  --chart-2: #00bcd4;
  --chart-3: #4a9eff;
  --chart-4: #7668f8;
  --chart-5: #c792ea;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
}

/* Modern reset and base styles with improved typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography hierarchy with Space Grotesk for headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--foreground);
}

html {
  scroll-behavior: smooth;
}

/* Performance optimizations */
.portrait-photo,
.project-image img {
  will-change: transform;
}

.btn,
.skill-item,
.project-card,
.contact-item {
  will-change: transform;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.btn:focus-visible,
.theme-toggle:focus-visible,
.nav-menu a:focus-visible,
.focus-ring:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius);
}
