:root {
    --bg-dark: #030303;
    --bg-red: #101010;
    --surface: #111111;
    --ink: #f8f8f8;
    --ink-dark: #171717;
    --accent: #ffffff;
    --border: rgba(255, 255, 255, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background: linear-gradient(to top, #0a0a0a, var(--bg-dark));
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

.wrapper {
    max-width: 1100px;
    margin: 0 auto;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legacy-nav {
    background: #000;
    border-bottom: 2px solid #2f2f2f;
}

.legacy-nav ul {
    list-style: none;
    margin: 0;
    padding: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
}

.legacy-nav a {
    display: inline-block;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.92rem;
    border: 1px solid transparent;
}

.legacy-nav a:hover,
.legacy-nav a:focus-visible {
    border-color: var(--ink);
    outline: none;
}

.legacy-nav a.active {
    background: #ffffff;
    color: #000;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}

.innehall {
    flex: 1;
    padding: 1rem;
    background: rgba(7, 7, 7, 0.92);
    display: grid;
    gap: 1rem;
}

.single-column {
    grid-template-columns: 1fr;
}

.text {
    background: rgba(8, 8, 8, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 1rem;
    line-height: 1.6;
}

.text h1,
.text h2 {
    margin: 0 0 0.6rem;
    line-height: 1.2;
}

.text p {
    margin: 0.6rem 0;
}

.centered {
    text-align: center;
}

.media-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    color: #f2f2f2;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.14);
}

.selfie,
.juicebild,
.psbilder,
.full-width-image {
    width: 100%;
    border-radius: 10px;
}

.internetbild img {
    border-radius: 999px;
}

.html-logo,
.psIcon,
.rocket-icon {
    width: min(120px, 40vw);
    margin: 0 auto 0.8rem;
}

.assignment-grid {
    display: grid;
    gap: 0.7rem;
}

.knapp {
    display: inline-block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.9rem 1rem;
    background: #101010;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
}

.knapp:hover,
.knapp:focus-visible {
    background: #ffffff;
    color: #101010;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.48);
}

.gallery {
    display: grid;
    gap: 1rem;
}

.video-link {
    text-decoration: none;
}

.video-link .ball {
    transition: transform 180ms ease;
}

.video-link:hover .ball,
.video-link:focus-visible .ball {
    transform: scale(1.04);
}

.video-section {
    display: grid;
    gap: 0.7rem;
}

.video-section h2 {
    margin: 0;
    font-size: 1.1rem;
}

.video-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--border);
}

.video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.footer {
    background: #000;
    text-align: center;
    padding: 0.8rem 1rem;
}

.footer p {
    margin: 0;
}

@media (min-width: 760px) {
    .innehall {
        padding: 1.4rem;
    }

    body[data-page="index"] .innehall,
    body[data-page="historia"] .innehall {
        grid-template-columns: 1.4fr 1fr;
        align-items: start;
    }

    .two-col {
        grid-template-columns: 1fr 1fr;
    }

    .legacy-nav a {
        font-size: 1rem;
    }
}
