/* Grundstil für den Body */
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  background-color: #fff; /* Ensure background for initial state */
  display: flex; /* Needed for initial centering */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
}

#page-container {
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 0; /* Start hidden, fade in */
    animation: fadeInPage 0.5s ease forwards;
}

@keyframes fadeInPage {
    to { opacity: 1; }
}

/* Header Area */
#main-header {
    position: fixed; /* Changed from fixed to allow initial centering */
    width: 100%;
    top: 0;
    left: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 0%,   /* Solid white at the top */
    rgba(255, 255, 255, 1) 90%,  /* Solid white until X% down */
    rgba(255, 255, 255, 0) 100% /* Fades to transparent at the bottom */
  );
    z-index: 100;
    transition: top 1s ease-out; /* Smooth transition */
}


/* Logo Container */
#logo-container {
    width: 50%;
    max-width: 1000px;
    height: auto; /* Ensure height adjusts with width */
    margin: auto;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    top: 50vh;
    /* Add vendor prefixes for transition */
    -webkit-transition: top 1s ease-in-out, width 1s ease-in-out, transform 1s ease-in-out;
    -moz-transition: top 1s ease-in-out, width 1s ease-in-out, transform 1s ease-in-out;
    -o-transition: top 1s ease-in-out, width 1s ease-in-out, transform 1s ease-in-out;
    transition: top 1s ease-in-out, width 1s ease-in-out, transform 1s ease-in-out;
    /* Ensure initial display block/inline-block if needed, though SVG usually handles this */
    display: block;
}

/* .logo-centered class is mainly semantic now, styles are on the base rule */
#logo-container.logo-centered {
    /* No specific style overrides needed here if base styles are correct */
}

#logo-container.logo-top {
    /* Target state */
    top: 20px;
    transform: translateX(-50%);
    width: 50%; /* Target width */
    max-width: 1000px;
}

/* SVG Styles */
.logo-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

/* SVG Segments */
.segment {
    fill: black;
    cursor: pointer;
    /* Slightly shorter transition for responsiveness */
    transition: fill 0.3s ease;
    pointer-events: auto; /* Explicitly ensure enabled by default */
}

.segment.grayed-out {
    fill: #d3d3d3 !important; /* Keep important */
}

/* Header Links */
.header-links {
    display: flex;
    justify-content: space-around; /* Center links horizontally */
    gap: 25px; /* Space between links */
    padding-top: 10px; /* Space below logo */
    width: 50%;
    max-width: 1000px;
    position: absolute;
    top: 0; /* Position relative to header */
    left: 50%;
    transform: translate(-50%, 0%);
    opacity: 0; /* Initially hidden */
    transition: opacity 0.8s ease-in;
    pointer-events: none; /* Prevent interaction while hidden/animating */
    margin-top: 0; /* Will be set by JS */
}

.header-links.visible {
    opacity: 1;
    pointer-events: auto; /* Allow interaction when visible */
}

.header-link {
    color: #333333;
    text-decoration: none;
    font-size: 16px; /* Slightly larger */
}

.header-link:hover {
    text-decoration: underline;
}

/* Main Content Area (Titles and Info Boxes) */
#main-content {
    margin-top: 375px; /* Initial margin-top, adjust as needed based on header size */
    padding: 20px;
    opacity: 0; /* Initially hidden */
    transition: opacity 1s ease-in;
    position: relative; /* Needed for absolute positioning of children */
    width: 50%; /* Adjust width as desired */
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

#main-content.visible {
    opacity: 1;
}

/* Title Box */
.svg-title-container {
    text-align: center;
    min-height: 2em; /* Reserve space for title */
}

#svg-title {
    font-size: 1.8em; /* Larger title */
    font-weight: bold;
    color: #333;
    display: inline-block;
    opacity: 0;
    transition: opacity 0.4s ease; /* Slightly faster fade, but still smooth */
}

#svg-title.visible {
    opacity: 1;
}

/* Info Box */
.info-box {
    border-radius: 8px;
    display: none; /* Controlled by JS */
    flex-direction: column;
    align-items: center; /* Center content */
    width: 100%; /* Take full width of main-content */
    box-sizing: border-box;
    font-size: 15px;
    line-height: 1.6;
    animation: fadeInBox 0.5s ease forwards; /* Fade in animation */
}

@keyframes fadeInBox {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Add fadeOutBox animation if you didn't before */
@keyframes fadeOutBox {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

/* Add this class for fade-out effect */
.info-box.fade-out {
   animation: fadeOutBox 0.3s ease forwards;
}

#info-text {
    white-space: normal;
    overflow-wrap: break-word;
    margin: 0px; /* Space below text */
    text-align: left;
    width: 100%;
}

#info-text a {
    color: #2E88F1;
    text-decoration: underline;
}
#info-text a:hover {
    color: #F07241;
}

#info-kontakt {
    margin-top: 15px; /* Space above contact link */
    font-size: 1em;
}

#info-kontakt a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px dotted #333;
    padding-bottom: 2px;
}
#info-kontakt a:hover {
    color: #F1494B;
    border-bottom: 1px solid #F1494B;
}

/* Footer Links */
.footer-links {
    position: fixed;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 20px;
    z-index: 50;
}

.footer-link {
    color: #555;
    text-decoration: none;
    font-size: 14px;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Highlight and Experience Styles (from original) */
.highlight {
  color: #EF46A8; /* Updated color */
  font-weight: bold;
}

.experience-header {
  background-color: #eee;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  margin-top: 20px;
  border-radius: 4px;
}
.experience-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive columns */
  gap: 25px;
  padding: 10px 0;
}
.experience-column {
  text-align: left; /* Align text left for readability */
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 6px;
}
.experience-column-title {
  margin-bottom: 8px;
  font-weight: bold;
/*  color: #F07241; /* Updated color */*/
}
.experience-column-description {
  margin: 0;
  font-size: 0.95em;
  color: #444;
}

pre:has(code) *{
  overflow: visible !important;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    body, html {
        display: block; /* Revert centering for smaller screens if needed */
    }

    #logo-container.logo-centered {
        width: 70%;
    }
    #logo-container.logo-top {
        width: 45%;
    }

    .header-links {
        gap: 15px;
        flex-wrap: wrap; /* Allow links to wrap */
        padding-left: 10px;
        padding-right: 10px;
    }
    .header-link {
        font-size: 14px;
    }

    #main-content {
        width: 90%;
        margin-top: 150px; /* Adjust margin */
    }

    #svg-title {
        font-size: 1.5em;
    }
    .info-box {
        font-size: 14px;
    }

    .experience-container {
        grid-template-columns: 1fr; /* Stack columns */
    }
}