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

:root {
  --black: #000;
  --white: #fff;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --gray-950: #0a0a0a;

  --font-sans: 'Raleway', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;

  --nav-height: 72px;
  --container-max: 1120px;
  --section-padding: 6rem 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Language Toggle ===== */
body .en { display: none; }
body.lang-en .en { display: revert; }
body.lang-en .de { display: none; }

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 48px;
  width: auto;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-switch {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.lang-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 2px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
}

.lang-btn.active {
  opacity: 1;
  border-color: var(--black);
}

.lang-btn:hover {
  opacity: 1;
}

.flag-icon {
  width: 24px;
  height: 16px;
  object-fit: cover;
  display: block;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--black);
  transition: width 0.2s;
}

.nav-link:hover {
  color: var(--black);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--white);
  color: var(--black);
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--gray-500);
  text-transform: lowercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.hero-desc {
  max-width: 560px;
  color: var(--gray-500);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.hero-portrait {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gray-200);
  transform: rotate(5deg);
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
}

/* ===== Sections ===== */
.section {
  padding: var(--section-padding);
}

.section-alt {
  background: var(--gray-100);
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--black);
  margin-top: 0.75rem;
}

.section-intro {
  color: var(--gray-500);
  font-size: 1.05rem;
  margin-bottom: 3rem;
  max-width: 560px;
}

/* ===== Über mich ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--gray-700);
  line-height: 1.8;
}

.competences h3,
.industries h3 {
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.competence-list li {
  padding: 0.4rem 0;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.95rem;
}

.competence-list li:last-child {
  border-bottom: none;
}

.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  padding: 0.4rem 1rem;
  background: var(--white);
  color: var(--gray-700);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--gray-300);
  border-left: 3px solid var(--black);
}

/* ===== Zertifizierungen ===== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.cert-card {
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cert-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cert-badge {
  flex-shrink: 0;
}

.cert-badge-img {
  width: 80px;
  height: auto;
}

.cert-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.cert-issuer {
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.cert-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-500);
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-300);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

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

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  background: var(--black);
  border: 2px solid var(--white);
  border-radius: 50%;
  transform: translateX(-5px);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.timeline-row.timeline-parallel {
  grid-template-columns: 1fr 1fr;
}

.timeline-card {
  padding: 1.5rem;
  background: var(--gray-100);
  border-left: 3px solid var(--black);
  transition: box-shadow 0.2s;
}

.timeline-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.card-industry {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.timeline-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.card-note {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.timeline-card ul {
  list-style: none;
}

.timeline-card li {
  position: relative;
  padding-left: 1rem;
  padding-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.timeline-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  background: var(--gray-400);
  border-radius: 50%;
}

/* ===== Leistungen ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s, transform 0.2s;
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.service-icon {
  color: var(--black);
  margin-bottom: 1.25rem;
}

.service-icon-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.6;
}

.service-details {
  margin-top: 0.75rem;
  list-style: none;
}

.service-details li {
  position: relative;
  padding-left: 1rem;
  padding-bottom: 0.25rem;
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.service-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  background: var(--gray-400);
  border-radius: 50%;
}

/* ===== Kontakt ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--gray-100);
  border-left: 3px solid var(--black);
}

.contact-item svg {
  flex-shrink: 0;
  color: var(--black);
  margin-top: 2px;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.contact-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-900);
  transition: color 0.2s;
}

a.contact-value:hover {
  color: var(--gray-500);
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-950);
  color: var(--gray-400);
  padding: 2rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: var(--gray-400);
  transition: color 0.2s;
  font-size: 0.85rem;
}

.footer-nav a:hover {
  color: var(--white);
}

/* ===== Legal Pages ===== */
.legal-page {
  padding-top: calc(var(--nav-height) + 4rem);
}

.legal-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.legal-content a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--gray-500);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 4rem 0;
    --nav-height: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-logo-img {
    height: 40px;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    font-size: 1.1rem;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + 4rem) 0 4rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-portrait {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    order: -1;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

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

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .timeline-row.timeline-parallel {
    grid-template-columns: 1fr;
  }

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

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

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

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-card {
    padding: 1.25rem;
  }
}
