/* ===== CSS RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ===== CSS VARIABLES FOR THEMING ===== */
:root {
  /* Dark Mode Colors (Default) */
  --bg-primary: #0a0a0a;
  --bg-secondary: rgba(20, 20, 20, 0.8);
  --bg-tertiary: rgba(10, 10, 10, 0.95);
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-heading: #ffffff;
  --accent-primary: #00ff64;
  --accent-secondary: #00cc50;
  --border-color: rgba(0, 255, 100, 0.2);
  --shadow-color: rgba(0, 255, 100, 0.1);
  --matrix-trail: rgba(10, 10, 10, 0.05);
  --selection-bg: rgba(0, 255, 100, 0.3);
  --selection-text: #ffffff;
  --scrollbar-track: #1a1a1a;
  --navbar-bg: rgba(10, 10, 10, 0.95);
  --project-card-bg: rgba(20, 20, 20, 0.8);
}

[data-theme="light"] {
  /* Light Mode Colors */
  --bg-primary: #f5f5f5;
  --bg-secondary: rgba(255, 255, 255, 0.8);
  --bg-tertiary: rgba(255, 255, 255, 0.95);
  --text-primary: #2a2a2a;
  --text-secondary: #4a4a4a;
  --text-heading: #1a1a1a;
  --accent-primary: #00aa55;
  --accent-secondary: #008844;
  --border-color: rgba(0, 170, 85, 0.3);
  --shadow-color: rgba(0, 170, 85, 0.1);
  --matrix-trail: rgba(255, 255, 255, 0.03);
  --selection-bg: rgba(0, 170, 85, 0.2);
  --selection-text: #1a1a1a;
  --scrollbar-track: #e0e0e0;
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --project-card-bg: rgba(255, 255, 255, 0.9);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== MATRIX BACKGROUND ===== */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
}

[data-theme="light"] #matrix-canvas {
  opacity: 0.15;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-heading);
  transition: color 0.3s ease;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2rem;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--navbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 70px;
}

.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-left {
  flex: 1 1 0;
  min-width: 0;
  justify-content: flex-start;
}

.nav-center {
  flex: 0 0 auto;
  justify-content: center;
  margin: 0 2rem;
  z-index: 10;
}

.nav-right {
  flex: 1 1 0;
  min-width: 0;
  justify-content: flex-end;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-logo .logo-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.nav-logo .logo-text:hover {
  color: var(--accent-secondary);
  text-shadow: 0 0 10px var(--accent-primary);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 999px;
  transition: transform 0.2s ease, background-color 0.2s ease;
  color: var(--accent-primary);
}

.theme-toggle:hover {
  transform: scale(1.15);
  background-color: rgba(0, 255, 100, 0.12);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
}

.theme-toggle:hover svg {
  transform: rotate(180deg);
}

/* Mobile Navigation */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--accent-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  position: relative;
  background: linear-gradient(135deg, rgba(0, 255, 100, 0.05) 0%, rgba(0, 0, 0, 0.8) 100%);
  transition: background 0.3s ease;
}

[data-theme="light"] .hero {
  background: linear-gradient(135deg, rgba(0, 170, 85, 0.08) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.hero-content {
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.greeting {
  display: block;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--accent-primary);
  font-weight: 400;
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.3s ease;
}

.name {
  color: inherit;
  font-family: inherit;
  text-shadow: none;
  font-weight: inherit;
  font-size: inherit;
}

.hero-title .name {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
}

.title-highlight {
  display: block;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-secondary);
  font-weight: 400;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.3s ease;
}

.hero-description {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  transition: color 0.3s ease;
}

.matrix-glow {
  color: #00ff64;
  text-shadow: 
    0 0 5px #00ff64,
    0 0 10px #00ff64,
    0 0 15px #00ff64,
    0 0 20px #00ff64;
  font-weight: 600;
  transition: all 0.3s ease;
}

[data-theme="light"] .matrix-glow {
  color: #00aa55;
  text-shadow: 
    0 0 5px #00aa55,
    0 0 10px #00aa55,
    0 0 15px #00aa55,
    0 0 20px #00aa55;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--accent-primary);
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
}

.btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.btn-secondary:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--shadow-color);
}

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 0;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
}

/* ===== ABOUT SECTION ===== */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-description {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  text-align: center;
}

.skills {
  margin-top: 3rem;
  text-align: center;
}

.skills h3 {
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.3s ease;
}

/* ===== INLINE STYLE CLASSES FOR THEME SUPPORT ===== */
.section-subtitle {
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  margin: 2rem 0 1rem 0;
  transition: color 0.3s ease;
}

.italic-accent {
  font-style: italic;
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.3s ease;
}

.section-subtitle-small {
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  margin: 1.5rem 0 0.8rem 0;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skill-tag {
  background: var(--shadow-color);
  color: var(--accent-primary);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--border-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

/* ===== PROGRESS SECTION ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--project-card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--shadow-color), transparent);
  transition: left 0.5s ease;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 15px 35px var(--shadow-color);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-title {
  color: var(--text-heading);
  font-size: 1.5rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.project-status {
  background: var(--shadow-color);
  color: var(--accent-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: var(--shadow-color);
  color: var(--accent-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.project-links {
  margin-top: 1rem;
}

.project-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.project-link:hover {
  color: var(--accent-secondary);
  text-shadow: 0 0 10px var(--accent-primary);
}

.project-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

.project-link:hover::after {
  width: 100%;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-description {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 3rem;
  transition: color 0.3s ease;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: 1rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  min-width: 300px;
}

.contact-method:hover {
  background: var(--shadow-color);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--shadow-color);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 100%;
  height: 100%;
  color: #ffffff;
  transition: color 0.3s ease;
}

[data-theme="light"] .contact-icon svg {
  color: #000000;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--navbar-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.footer-signature {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: var(--accent-primary);
}

.skull-icon {
  width: 60px;
  height: 60px;
  opacity: 0.8;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 4px var(--accent-primary));
  cursor: pointer;
}

.skull-icon:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px var(--accent-primary));
}

.skull-link {
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* ===== IMPRESSUM PAGE ===== */
.impressum-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.impressum-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.impressum-subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-style: italic;
}

.impressum-content {
  line-height: 1.8;
}

.impressum-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.impressum-content h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
}

.impressum-content p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.impressum-content a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.impressum-content a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .nav-menu {
    gap: 1.5rem;
  }

  .nav-center {
    margin: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1.5rem;
    gap: 1rem;
  }

  .nav-center {
    margin: 0 1rem;
  }

  .nav-right {
    gap: 1rem;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: var(--navbar-bg);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding-top: 100px;
    padding-bottom: 2rem;
    min-height: calc(100vh - 70px);
    align-items: flex-start;
  }

  .hero-title {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
  }

  .greeting {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .hero-title .name {
    margin-bottom: 0.75rem;
    display: block;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  .contact-method {
    min-width: auto;
    width: 100%;
    max-width: 400px;
  }

  .skill-tags {
    justify-content: center;
  }

  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .impressum-container {
    padding: 1rem 0;
  }

  .impressum-content h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
  }

  .impressum-content h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }

  .hero {
    padding: 100px 1rem 2rem 1rem;
  }

  .project-card {
    padding: 1rem;
  }

  .contact-method {
    padding: 0.8rem 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-secondary), var(--accent-primary));
}

/* ===== SELECTION STYLING ===== */
::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

::-moz-selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}
