* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Consolas, monospace;
}

body {
    background: #0a0f1c;
    color: #e5e7eb;
    display: block;
    overflow-x: hidden;
}


/* ===== MOBILE NAVBAR ===== */

.hamburger {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 28px;
    color: #38bdf8;
    background: #020617;
    border: 1px solid #1e293b;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 100;
    display: none;
    box-shadow: 0 0 10px rgba(56,189,248,0.2);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    z-index: 9;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

/* Mobile state */
@media (max-width: 768px) {

    .sidebar {
        transform: translateX(-100%);
        transition: 0.3s;
        box-shadow: 0 0 30px rgba(0,0,0,0.6);
    }

        .sidebar.active {
            transform: translateX(0);
        }

    .content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 80px 20px;
    }

    .hamburger {
        display: block;
    }

    .mobile-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* === SIMPLE PREMIUM BACKGROUND === */

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 20% 30%, rgba(56,189,248,0.15), transparent 40%), radial-gradient(circle at 80% 70%, rgba(56,189,248,0.12), transparent 40%), radial-gradient(circle at 50% 50%, rgba(59,130,246,0.08), transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite alternate;
}

@keyframes backgroundMove {
    0% {
        transform: translate(0,0) scale(1);
    }

    100% {
        transform: translate(-50px,-30px) scale(1.1);
    }
}


body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #020617;
    padding: 30px;
    border-right: 1px solid #1e293b;
    z-index: 10;
}

.logo {
    font-size: 22px;
    color: #38bdf8;
    margin-bottom: 30px;
    font-weight: bold;
}

/* NAVBAR & GLOW EFFECT */
.nav a {
    display: block;
    font-size: 18px;
    padding: 12px 15px;
    margin-bottom: 5px;
    color: #cbd5f5;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

    .nav a:hover, .nav a.active {
        background: #0f172a;
        color: #38bdf8;
        text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
        border: 1px solid #1e293b;
        box-shadow: 0 0 15px rgba(56, 189, 248, 0.15), inset 0 0 10px rgba(56, 189, 248, 0.1);
        transform: translateX(5px);
    }

/* PROGRESS BAR */
.progress-container {
    height: 6px;
    background: #1e293b;
    margin-bottom: 25px;
    border-radius: 3px;
    overflow: hidden;
}

#scroll-progress {
    height: 6px;
    width: 0%;
    background: #38bdf8;
    border-radius: 3px;
    box-shadow: 0 0 10px #38bdf8;
}

/* CONTENT */
.content {
    margin-left: 260px;
    padding: 60px 50px;
    width: calc(100% - 260px);
}

/* SECTION BOX & SLIDE IN */
.box {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(5px);
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 90px;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.box-large {
    max-width: 1100px;
}

/* Gör att Hero/Terminal-sektionen tar upp hela skärmens höjd */
#hero {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.slide-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

    .slide-in.show {
        opacity: 1;
        transform: translateY(0);
    }

h2 {
    color: #38bdf8;
    margin-bottom: 25px;
    font-size: 28px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 10px;
}

h3 {
    color: #94a3b8;
    margin-bottom: 15px;
    font-size: 20px;
}

/* LIST BOXES & GRIDS */
.box-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.grid-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    position: relative;
}

.list-box {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

    .list-box:hover {
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        border-color: #334155;
    }

    .list-box strong {
        color: #38bdf8;
        font-size: 18px;
        display: block;
        margin-bottom: 8px;
    }

    .list-box p {
        color: #94a3b8;
        font-size: 15px;
        line-height: 1.5;
    }

/* EXTRA NOTES */
/* Ersätt den gamla .linkedin-note med detta */
.linkedin-link {
    display: inline-block;
    margin-top: 15px;
    margin-bottom: 25px;
    color: #38bdf8;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid #1e293b;
    padding: 10px 18px;
    border-radius: 6px;
    background: #0f172a;
    transition: all 0.3s ease;
}

    .linkedin-link:hover {
        background: #1e293b;
        color: #fff;
        border-color: #38bdf8;
        box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
        transform: translateY(-2px);
    }

/* --- EXPANDABLE PROJECTS --- */
.project-item {
    cursor: pointer;
    position: relative;
}

    .project-item:not(.expanded):hover {
        transform: translateY(-2px);
        border-color: #38bdf8;
        box-shadow: 0 5px 20px rgba(56, 189, 248, 0.1);
    }

.project-body {
    display: none;
}

.close-project {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}

    .close-project:hover {
        color: #38bdf8;
    }

/* Expanded State */
.project-item.expanded {
    grid-column: 1 / -1; /* Spans across all columns */
    background: #060b19;
    border-color: #38bdf8;
    padding: 30px;
    cursor: default;
    box-shadow: inset 0 0 20px rgba(56, 189, 248, 0.05), 0 10px 30px rgba(0,0,0,0.5);
    transform: none;
}

    .project-item.expanded .project-header .short-desc {
        display: none; /* Hide the short text when expanded */
    }

    .project-item.expanded .project-header strong {
        font-size: 22px;
        margin-bottom: 20px;
        padding-right: 30px; /* Room for close button */
    }

    .project-item.expanded .project-body {
        display: block;
        border-top: 1px dashed #1e293b;
        padding-top: 20px;
        animation: fadeIn 0.5s ease;
    }

        .project-item.expanded .project-body p {
            color: #e5e7eb;
            font-size: 16px;
            line-height: 1.6;
        }

    .project-item.expanded .close-project {
        display: block;
    }

/* Dim other items when one is expanded */
#projects-grid.has-expanded .project-item:not(.expanded) {
    opacity: 0.4;
    filter: grayscale(60%);
    transform: scale(0.98);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- TERMINAL --- */
.terminal {
    border-radius: 8px;
    padding: 20px;
}

.terminal-line {
    margin-bottom: 10px;
    min-height: 24px;
    font-size: 16px;
}

.answer {
    color: #94a3b8;
    margin-bottom: 20px;
}

.prompt {
    color: #38bdf8;
    margin-right: 8px;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: #38bdf8;
    vertical-align: middle;
    margin-left: 5px;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 5px #38bdf8;
}

@keyframes blink {
    0%, 100% {
        opacity: 1
    }

    50% {
        opacity: 0
    }
}

/* Media Queries */
@media (max-width: 900px) {
    .grid-list {
        grid-template-columns: 1fr;
    }
}
