/* General styles */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Poppins, sans-serif;
    color: white;
    overflow: hidden;
    font-size: 1rem; /* Base font size */
}

/* Background */
.background {
    background: url('./images/background.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    width: 100vw; /* Width equals the window width */
    height: 100vh; /* Height equals the window height */
    min-height: 100vh;
    z-index: 0; /* Ensure the background is at the very back */
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.9) 10%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
}

/* Centering the container */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative; /* Ensure the container is the reference for absolute positioning */
}

/* Profile photo */
.profile-photo {
    border-radius: 50%;
    width: 20vw; /* Width is 20% of the window width */
    height: 20vw; /* Height is 20% of the window width (to make it a circle) */
    min-width: 150px;
    min-height: 150px;
    margin-bottom: 2vh; /* Bottom margin: 2% of the window height */
    border: 0.2rem solid white; /* Border thickness depends on the font size */
    position: relative; /* Add this line */
    z-index: 1; /* Ensure the photo is behind the buttons */
}

/* Buttons */
.buttons {
    display: flex;
    flex-direction: column;
    gap: 2vh; /* Space between buttons: 2% of the window height */
    position: relative;
    z-index: 2; /* Add this line */
}

/* Zoom effect on hover */
.button:hover {
    transform: scale(1.1);
}

/* Common button styles */
.button {
    position: relative;
    padding: 10px 20px;
    font-size: clamp(8px, 2vw, 24px); /* Font size depends on the window width */
    font-weight: bold;
    text-decoration: none;
    color: white;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4)); /* Black translucent gradient */
    border: 0.1em solid white;
    border-radius: 0.5em;
    overflow: hidden;
    text-align: left; /* Align text to the center */
    width: 15vw;
    max-width: 200px; /* Max button width */
    min-width: 60px; /* Min button width */
    height: 6vh; /* Button height relative to the window height */
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: row; /* Icon and text side by side */
    align-items: center; /* Vertical alignment to center */
    justify-content: flex-start; /* Horizontal alignment to center */
}

.button .icon {
    width: 5vw; /* Icon size */
    height: 5vw;
    min-width: 20px;
    min-height: 20px;
    max-width: 30px;
    max-height: 30px;
    margin-right: 8px; /* Space between icon and text */
    background-size: contain;
    background-repeat: no-repeat;
    box-shadow: 0 0 calc(0.2 * 5vw) rgba(255, 255, 255, 0.5);
}

.button.linkedin .icon {
    background-image: url('./images/icons/ln.png'); /* Path to LinkedIn icon */
}

.button.github .icon {
    background-image: url('./images/icons/gh.png'); /* Path to GitHub icon */
}

.button.resume .icon {
    background-image: url('./images/icons/cv.png'); /* Path to Resume icon */
}

/* Zoom effect on hover */
.button:hover {
    transform: scale(1.1);
}

/* Individual button texts */
.button.linkedin::before {
    content: "fetch('https://www.linkedin.com/in/michael-hasso/');";
}
.button.github::before {
    content: "fetch('https://github.com/neuroborus');";
}
.button.resume::before {
    content: "fetch('cv.hasso.tech');";
}

/* Remove pseudo-element for Grafana */
.button.grafana::before {
    content: none; /* Removes scrolling code */
}

/* Style for pseudo-element */
.button::before {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    color: lime;
    font-family: monospace;
    font-size: 1vw;
    white-space: nowrap;
    animation: scroll 10s linear infinite;
    animation-delay: 3s;
    z-index: -1; /* Ensures the pseudo-element is behind the button */
}

/* Scrolling code animation */
@keyframes scroll {
    0% {
        top: 100%;
    }
    100% {
        top: -100%;
    }
}

/* Grafana button */
.grafana {
    position: fixed; /* Use fixed to pin the button in the corner */
    bottom: 2vh; /* Distance from the bottom edge */
    right: 2vw;  /* Distance from the right edge */
    background: url('./images/grafana.png') no-repeat center center;
    background-size: contain;
    width: 5vw;
    height: 5vw;
    border-radius: 50%;
    border: none;
    padding: 0;
    z-index: 3; /* Place the button above other elements */
    box-shadow: none;
}
.grafana:hover {
    transform: scale(1.1);
}