html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100%;
    color: white;
    position: relative;

    --bg-gradient: linear-gradient(135deg, #1e1e1e, #28a745);
    --bg-angle: 135deg;

    background: var(--bg-gradient);
    transition: background 0.6s ease-in-out;
}

/* Rörlig bakgrund */
body.has-bg-layers::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: bgMove 30s ease infinite;
    transition: background 0.6s ease-in-out, transform 0.6s ease-in-out;
}

@keyframes bgMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Sektioner */
.slide {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    text-align: center;
    padding: 2rem;
}

/* Info-box */
.info-box {
    background: rgba(255, 255, 255, 0.95);
    color: black;
    padding: 3rem;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s ease, transform 0.8s ease;
    backdrop-filter: blur(10px);
    padding-top: 60px;
    padding-bottom: 80px;
}
.info-box.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.info-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 50px rgba(0,0,0,0.6);
}

/* Interaktiv hover för länkar */
.info-box a {
    color: #28a745;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.info-box a:hover {
    color: #0077ff;
    text-shadow: 0px 0px 8px rgba(0, 119, 255, 0.7);
}

/* Skills-lista */
.skills-list {
    list-style: none;
    padding: 0;
}
.skills-list li {
    font-size: 1.1rem;
    margin: 1rem 0;
    text-align: left;
    position: relative;
    cursor: pointer;
}
.skills-list li i {
    margin-right: 0.5rem;
    color: #0077ff;
}
.progress {
    background: rgba(0,0,0,0.1);
    height: 8px;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}
.progress-bar {
    background: #28a745;
    width: 0;
    height: 100%;
    border-radius: 4px;
    transition: width 1.2s ease-out;
}
.skills-list li:hover {
    cursor: default;
}

/* Timeline-kort */
.timeline-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    overflow: hidden;
}
.timeline-item {
    flex: 1 1 300px;
    max-width: 400px;
    background: rgba(255,255,255,0.9);
    color: black;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.timeline-item.active {
    opacity: 1;
    transform: translateY(0);
}
.timeline-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 0 30px rgba(40,167,69,0.5);
}

/* Navigationspunkter (oförändrade) */
.nav-dots {
    position: fixed;
    top: 50%;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateY(-50%);
    z-index: 999;
}
.nav-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #aaa;
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.3s, transform 0.3s;
}
.nav-dots button.active {
    background: #28a745;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}
.nav-dots button:hover {
    background: #1c7a33;
    transform: scale(1.2);
}
.nav-dots button::after {
    content: attr(data-label);
    position: absolute;
    right: 150%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.nav-dots button:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Scroll-indikator */
.scroll-indicator {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #28a745;
    width: 0%;
    z-index: 1000;
    transition: width 0.2s ease-out;
}

/* Mobilanpassning */
@media (max-width: 768px) {
    .info-box {
        max-width: 95%;
        padding: 2rem;
        min-height: auto;
    }
    h1, h2 {
        font-size: 1.6rem;
    }
    .skills-list li {
        font-size: 1rem;
    }
    .timeline-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: black;
    cursor: pointer;
    animation: bounce 1.5s infinite;
    opacity: 0.8;
}

.scroll-down:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(10px);
    }
    60% {
        transform: translateX(-50%) translateY(5px);
    }
}
#contact div a{
    text-decoration: none;
    color: black;
}
#contact div p {
    text-align: center;
    margin: 7px;
}
.contact-box{
    display: flex;
    align-self: center;
    justify-self: center;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 250px;
}