*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

:root {
  color-scheme: light dark;
  --bg: #f4f6f8;
  --bg-hero: linear-gradient(160deg, #e3ecf7 0%, #f4f6f8 60%);
  --card: #fff;
  --text: #1f2933;
  --muted: #5b6672;
  --line: #dde3e9;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -12px rgba(16, 24, 40, 0.18);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.06), 0 16px 32px -12px rgba(16, 24, 40, 0.28);
  --chip: #eef2f6;
  --accent: #0a66c2;
  --accent-hover: #0857a6;
  --accent-soft: rgba(10, 102, 194, 0.1);
  --brand-dark: #24292f;
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111519;
    --bg-hero: linear-gradient(160deg, #16263a 0%, #111519 60%);
    --card: #1a2027;
    --text: #e6edf3;
    --muted: #9aa5b1;
    --line: #2a333d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 32px -12px rgba(0, 0, 0, 0.8);
    --chip: #232b34;
    --accent: #4f9be8;
    --accent-hover: #75b2f0;
    --accent-soft: rgba(79, 155, 232, 0.14);
    --brand-dark: #e6edf3;
  }
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-width: 300px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

i.fa-brands {
  font-style: normal;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Kopfbereich */

.hero {
  background: var(--bg-hero);
  padding: 72px 0 64px 0;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: center;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  background-color: var(--card);
  border-radius: 28%;
  box-shadow: var(--shadow);
}

.name {
  font-family: 'Rock Salt', cursive;
  font-size: 40px;
  font-weight: normal;
  line-height: 1.3;
}

.role {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}

.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.facts li {
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--card);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-primary {
  color: #fff;
  background-color: #0a66c2;
  box-shadow: var(--shadow);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #0857a6;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background-color: var(--card);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Abschnitte */

.section {
  margin-top: 72px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
  align-items: start;
}

.profile-text {
  font-size: 18px;
  line-height: 1.7;
}

.timeline {
  list-style: none;
  border-left: 2px solid var(--line);
  padding-left: 20px;
}

.timeline li {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 18px;
}

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

.timeline li::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--bg);
  border: 2px solid var(--accent);
}

.timeline li:first-child::before {
  background-color: var(--accent);
}

.timeline .year {
  font-size: 13px;
  color: var(--muted);
}

.timeline .what {
  font-weight: 600;
  line-height: 1.4;
}

.timeline small {
  font-size: 14px;
  font-weight: normal;
  color: var(--muted);
}

/* Tech-Stack */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stack-group.wide {
  grid-column: span 2;
}

.stack-group {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.stack-group h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack li {
  padding: 3px 10px;
  font-size: 13px;
  background-color: var(--chip);
  border-radius: 999px;
}

/* Projekte */

.repo-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.repo {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  color: var(--text);
  transition: transform 0.25s, box-shadow 0.25s;
}

a.repo:hover,
a.repo:focus {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.repo .repo-name {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 8px;
  word-break: break-word;
}

.repo .repo-name .fa-brands {
  margin-right: 8px;
}

.repo .repo-desc {
  flex-grow: 1;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repo .repo-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.repo .repo-meta span + span::before {
  content: '\00b7';
  margin: 0 8px;
}

.repo.soon {
  margin-top: 16px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--card);
  border: 1px dashed var(--accent);
  box-shadow: none;
}

.soon-badge {
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  background-color: var(--accent-soft);
  border-radius: 999px;
}

.all {
  display: inline-block;
  margin-top: 20px;
  font-size: 15px;
  font-weight: 600;
}

/* Social Media */

.social-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.social-btns .btn {
  display: inline-block;
  background-color: var(--card);
  width: 64px;
  height: 64px;
  line-height: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 28%;
  box-shadow: var(--shadow);
  opacity: 0.99;
}

.social-btns .btn,
.social-btns .btn::before,
.social-btns .btn .fa-brands {
  transition: all 0.35s;
  transition-timing-function: cubic-bezier(0.31, -0.105, 0.43, 1.59);
}

.social-btns .btn::before {
  content: '';
  width: 120%;
  height: 120%;
  position: absolute;
  top: 90%;
  left: -110%;
  transform: rotate(45deg);
  z-index: -1;
}

.social-btns .btn .fa-brands {
  font-size: 28px;
  vertical-align: middle;
  transform: scale(0.85);
}

.social-btns .btn:focus::before,
.social-btns .btn:hover::before {
  top: -10%;
  left: -10%;
}

.social-btns .btn:focus .fa-brands,
.social-btns .btn:hover .fa-brands {
  color: #fff;
  transform: scale(1);
}

.social-btns .btn.facebook::before { background-color: #3b5998; }
.social-btns .btn.facebook .fa-brands { color: #3b5998; }
.social-btns .btn.steam::before { background-color: #171a21; }
.social-btns .btn.steam .fa-brands { color: var(--brand-dark); }
.social-btns .btn.github::before { background-color: #24292f; }
.social-btns .btn.github .fa-brands { color: var(--brand-dark); }
.social-btns .btn.instagram::before { background-color: #e1306c; }
.social-btns .btn.instagram .fa-brands { color: #e1306c; }
.social-btns .btn.linkedin::before { background-color: #0a66c2; }
.social-btns .btn.linkedin .fa-brands { color: #0a66c2; }
.social-btns .btn.xing::before { background-color: #0698a0; }
.social-btns .btn.xing .fa-brands { color: #0698a0; }
.social-btns .btn.xbox::before { background-color: #107c10; }
.social-btns .btn.xbox .fa-brands { color: #107c10; }

@media (prefers-color-scheme: dark) {
  .social-btns .btn.facebook .fa-brands { color: #6f8fd8; }
  .social-btns .btn.linkedin .fa-brands { color: #4f9be8; }
  .social-btns .btn.xbox .fa-brands { color: #3fb43f; }
}

/* Kontakt */

.contact-card {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 80%), var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.contact-title {
  font-family: 'Rock Salt', cursive;
  font-size: 24px;
  font-weight: normal;
  line-height: 1.5;
}

.contact-card p {
  margin: 8px 0 24px 0;
  color: var(--muted);
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 64px auto 40px auto;
  padding: 0 24px;
  font-size: 14px;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
}

@media (min-width: 768px) and (max-width: 959.98px) {
  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobil */

@media (max-width: 767.98px) {
  .hero {
    padding: 40px 0 40px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .portrait {
    width: 180px;
    margin: 0 auto;
  }

  .name {
    font-size: 30px;
  }

  .role {
    font-size: 19px;
  }

  .facts,
  .actions {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .profile-text {
    font-size: 16px;
  }

  .section {
    margin-top: 48px;
  }

  .stack-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stack-group {
    padding: 14px 16px;
  }

  .repo-list {
    grid-template-columns: 1fr;
  }

  .social-btns {
    justify-content: center;
    gap: 10px;
  }

  .social-btns .btn {
    width: 56px;
    height: 56px;
    line-height: 56px;
  }

  .social-btns .btn .fa-brands {
    font-size: 24px;
  }

  .contact-title {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
