* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background-color: rgba(0, 150, 136, 0.3);
}

html {
  height: 100%;
  scrollbar-width: none; /* Versteckt Scrollbalken in Firefox */
  -ms-overflow-style: none; /* Versteckt Scrollbalken in IE/Edge */
  overscroll-behavior: none; /* Verhindert das elastische Scrollen (Bounce) */
}

html::-webkit-scrollbar {
  display: none; /* Versteckt Scrollbalken in Chrome/Safari/Brave */
}

:root {
  --bg-color: #0b0c10;
  --card-bg: rgba(21, 23, 32, 0.8);
  --accent: #64ffda;
  --text-main: #f4f4f4;
  --text-dim: #9da0b5;
  --border: rgba(255, 255, 255, 0.1);
}

body {
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-color);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(100, 255, 218, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(100, 255, 218, 0.05) 0%, transparent 40%);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  overscroll-behavior: none;
  background-attachment: fixed;
  /* Initialer Lade-Effekt */
  filter: blur(20px);
  opacity: 0;
  transition: filter 1.2s ease-in-out, opacity 1s ease-in-out;
}

body.loaded {
  filter: blur(0px);
  opacity: 1;
}

.mono-text {
  font-family: monospace;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease-in-out, text-shadow 0.2s ease-in-out;
}

/* Hover-Effekt für alle Akzent-Links (Patou, Socials, etc.) */
a.accent-text:hover {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.6);
}

/* Layout Improvements */
.page {
  width: 100%;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

header {
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 16, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 35px; /* Du kannst die Höhe hier anpassen */
  width: auto;
  user-select: none; /* Verhindert das Markieren des Bildes */
}

/* Scroll Animations classes */
.reveal {
  opacity: 0;
  transform: scale(0.98) translateY(20px);
  filter: blur(5px);
  transition: 
    opacity 0.8s ease-out, 
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
    filter 0.8s ease-out;
  will-change: transform, opacity, filter;
}

.reveal.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0px);
}

/* Animation beim Verlassen der Sektion */
.reveal.exit {
  opacity: 0;
  transform: scale(1.01) translateY(-20px);
  filter: blur(5px);
}

/* Sections Styling */
section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 66px; /* Platz für den Header schaffen, damit Inhalt zentriert wirkt */
  border-bottom: none; /* Entfernt die störende Linie beim Scrollen */
}

/* Spezifische Anpassung für die Projects-Sektion */
/* Wir nutzen :has(), um die Sektion mit dem Projekt-Grid gezielt anzusprechen */
section:has(.project-grid) {
  justify-content: flex-start; /* Erlaubt dem Inhalt, oben zu beginnen statt starr zentriert zu sein */
  padding-top: 120px; /* Mehr Abstand für die Überschrift am oberen Rand */
  padding-bottom: 100px; /* Erzeugt den gewünschten Abstand am Ende der Projektliste */
  height: 100vh;
  overflow-y: auto; /* Aktiviert den internen Scrollbereich */
  scrollbar-width: none; /* Versteckt Scrollbalken in Firefox */
}

section:has(.project-grid)::-webkit-scrollbar {
  display: none; /* Versteckt Scrollbalken in Chrome/Safari */
}

.section-title {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  width: 100%;
  white-space: nowrap;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
}

.section-title::after {
  content: "";
  display: block;
  position: relative;
  width: 300px;
  height: 1px;
  margin-left: 20px;
  background-color: var(--border);
}

/* Timeline Styling */
.timeline {
  margin-top: 20px;
}

.timeline-item {
  position: relative;
  padding-left: 30px;
  padding-bottom: 30px;
  border-left: 1px solid var(--accent);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 5px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
}

.timeline-date {
  font-family: monospace;
  font-size: 13px;
  color: var(--accent);
}

.timeline-title {
  font-size: 18px;
  font-weight: 600;
  margin: 5px 0;
}

.timeline-org {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 10px;
}

/* Nav overhaul */
.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.nav-links a:hover {
  color: var(--accent);
}

/* Project Grid & Blocks */
.project-grid {
  display: grid;
  grid-template-columns: 1fr; /* Einspaltig für Block-Look */
  gap: 30px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.project-image {
  width: 35%;
  min-height: 250px;
  background: #151720;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: clamp(40px, 8vw, 80px);
  line-height: 1.1;
  margin-bottom: 20px;
}

.accent-text {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 30px; /* Erhöhter Gap für symmetrische Abstände in der Mitte */
  justify-content: center;
  margin-top: 40px;
}

/* New footer styles */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 60px; /* Abstand zu den Social Links */
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap; /* Ermöglicht Umbruch auf kleineren Bildschirmen */
  gap: 10px; /* Abstand zwischen den Elementen beim Umbruch */
}

.site-footer .copyright {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0; /* Setzt den Standard-Absatz-Margin zurück */
}
/* Impressum Link */
.impressum-link {
  font-size: 12px;
  color: var(--accent); /* Startfarbe wie andere Akzent-Links */
  text-decoration: none;
  transition: color 0.2s ease;
}

/* About Section Layout */
.about-content {
  display: grid;
  grid-template-columns: 1fr 300px; /* Text links, Bild rechts mit fester Breite */
  gap: 50px;
  align-items: flex-start;
}

.avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center; /* Zentriert Bild und Text horizontal im Container */
  gap: 15px;
}

.avatar {
  width: 160px;
  height: auto;
  border-radius: 18px;
  border: 2px solid #f4f4f4;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  background: #202331;
}

.avatar-caption {
  font-size: 12px;
  color: #9da0b5;
  text-align: center; /* Zentriert den Textinhalt */
  max-width: 200px;   /* Verhindert, dass der Text breiter als das Bild wirkt */
}

h1 {
  font-size: 28px;
  margin-bottom: 4px;
}
.about-text {
  font-size: 14px;
  color: #d0d2e3;
  max-width: 540px;
}

.about-text p + p {
  margin-top: 10px;
}

/* Skills section */

.skills-section {
  margin-top: 60px;
  padding-top: 18px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 18px;
  margin-top: 12px;
}

.skills-group-title {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8f92aa;
  margin-bottom: 2px;
}

.skill-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--accent);
  background: rgba(100, 255, 218, 0.05);
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Button hover effects for interactive pills */
a.pill:hover, button.pill:hover {
  transform: scale(1.06) translateY(-3px);
  background: rgba(100, 255, 218, 0.12);
  border-color: var(--accent);
  box-shadow: 0 10px 20px -10px rgba(100, 255, 218, 0.3);
}

/* Contact Split Button Animation */
.contact-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  width: 100%;
  min-height: 60px;
}

.btn-split-trigger {
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 999px;
}

.btn-split-container {
  position: absolute;
  display: flex;
  gap: 15px;
  opacity: 0;
  pointer-events: none;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  transform-origin: center center;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.contact-wrapper.active .btn-split-trigger {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}

.contact-wrapper.active .btn-split-container {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

@media (max-width: 768px) {
  .about-content { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero h1 { font-size: 40px; }
  .avatar { width: 100%; height: auto; }
  .project-card { flex-direction: column; }
  .project-image { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
}