:root {
    --bg-color: #FBF7EB;
    --secondary-color: #EEE8E0;
    --text-color: #1e1e1e;
    --shadow-color: rgba(30, 30, 30, 0.15);
    --sidebar-width: 120px;
    --sidebar-width-mobile: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: inherit;
}

html, body {
    height: 100%;
    overflow: hidden;
    cursor: url('../images/cursor.svg'), auto;
}

::selection {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
}

iframe {
    border: 1px solid #1e1e1e;
    margin-bottom: 15px;
}

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    padding: 20px;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-item-image {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-item-image img {
    max-height: 100px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.menu-item-image.menu-item-image--large img {
    max-height: none;
    max-width: none;
    width: 120px;
    height: auto;
}

.menu-item-label {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: var(--text-color);
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.desktop-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.desktop-area::before,
.desktop-area::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: 30px;
    width: 269px;
    height: 283px;
    background-repeat: no-repeat;
    background-size: 269px 283px;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.desktop-area::before {
    background-image: url('https://ferrybastiaens.nl/images/background-1.webp');
    opacity: 1;
}

.desktop-area::after {
    background-image: url('https://ferrybastiaens.nl/images/background-2.webp');
    opacity: 0;
}

.desktop-area.bg-alt::before {
    opacity: 0;
}

.desktop-area.bg-alt::after {
    opacity: 1;
}

.window {
    position: fixed;
    width: 400px;
    height: 300px;
    min-width: 250px;
    min-height: 200px;
    background-color: var(--bg-color);
    border: 2px solid #1e1e1e;
    box-shadow: 0 4px 4px 0 rgba(30, 30, 30, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--secondary-color);
    user-select: none;
    -webkit-user-select: none;
    border-bottom: 1px solid #1e1e1e;
}

.window-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-color);
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #1e1e1e;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.window-btn:hover {
    background-color: var(--secondary-color);
}

.window-btn img {
    width: 14px;
    height: 14px;
}

.window-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.window-content h2 {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
}

.window-content h3 {
    margin-bottom: 10px;
}

.window-content a {
    color: #1e1e1e;
    text-decoration: underline;
}

.window-content p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.window-content p:last-child {
    margin-bottom: 0;
}

.window-content ul {
    margin-left: 20px;
}

.window-content li {
    margin-bottom: 8px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.projects-grid:last-child {
    margin-bottom: 0;
}

.project-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease;
}

.project-item img {
    width: 100%;
    height: auto;
    border: 1px solid #1e1e1e;
    margin-bottom: 8px;
}

.project-item span {
    font-size: 14px;
    font-weight: 500;
}

.project-image {
    width: 100%;
    aspect-ratio: 1920 / 1080;
    object-fit: cover;
    border: 1px solid #1e1e1e;
    display: block;
    margin-bottom: 15px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-left: 20px;
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.skills-category h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.skills-category ul {
    margin-left: 18px;
    font-size: 13px;
}

.skills-category li {
    margin-bottom: 4px;
}

.project-cta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.cta-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--text-color);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.project-cta a {
    color: inherit;
    text-decoration: none !important;
}

.cta-button:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.demo-credentials {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #666;
}

.about-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-image {
    max-width: 150px;
    height: auto;
    margin-bottom: 15px;
}

.about-header h3 {
    text-align: center;
}

.window.maximized {
    left: calc(var(--sidebar-width) + 40px) !important;
    top: 0 !important;
    width: calc(100% - var(--sidebar-width) - 40px) !important;
    height: 100% !important;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
}

.window.maximized .window-content {
    max-width: 900px;
    margin: 0 auto;
}

.window.maximized .window-content::-webkit-scrollbar-track {
    border-right: 1px solid #1e1e1e;
}

.window.maximized .window-content::-webkit-scrollbar-thumb {
    border-right: 1px solid #1e1e1e;
}

@keyframes windowZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.window-opening {
    animation: windowZoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes windowZoomOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

.window-closing {
    animation: windowZoomOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
    pointer-events: none;
}

@keyframes menuItemPulse {
    0%, 100% {
        box-shadow: 0 4px 8px var(--shadow-color);
    }
    50% {
        box-shadow: 0 6px 16px var(--shadow-color);
    }
}

@media screen and (max-width: 1024px) {
    .window {
        width: 350px;
        height: 280px;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --sidebar-width: var(--sidebar-width-mobile);
        --mobile-header-height: 100px;
    }

    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        flex-direction: row;
        padding: 10px;
        margin-left: 0;
        gap: 15px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .menu-item {
        flex-shrink: 0;
        width: 60px;
        height: 80px;
        padding-bottom: 15px;
    }

    .menu-item-image img,
    .menu-item-image.menu-item-image--large img {
        height: 60px;
        width: 60px;
        max-height: 60px;
        max-width: 60px;
    }

    .menu-item-label {
        font-size: 10px;
    }

    .desktop-area {
        flex: 1;
        padding: 10px;
    }

    .desktop-area::before,
    .desktop-area::after {
        width: 135px;
        height: 142px;
        background-size: 135px 142px;
        right: -10px;
        bottom: 15px;
    }

    .window {
        width: calc(100% - 20px) !important;
        height: auto !important;
        min-height: 250px;
        max-height: calc(100dvh - var(--mobile-header-height) - 30px);
        left: 10px !important;
    }

    .window.maximized {
        left: 0 !important;
        top: var(--mobile-header-height) !important;
        width: 100% !important;
        height: calc(100dvh - var(--mobile-header-height)) !important;
        max-height: none;
        border-radius: 0;
    }

    .window-header {
        padding: 10px 12px;
    }

    .window-content {
        padding: 15px;
    }

    .window-content h2 {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .menu-item-image {
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }

    .menu-item-label {
        font-size: 9px;
    }

    .window-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

.window-content::-webkit-scrollbar {
    width: 12px;
}

.window-content::-webkit-scrollbar-track {
    background: var(--secondary-color);
    border-left: 1px solid #1e1e1e;
}

.window-content::-webkit-scrollbar-thumb {
    background: #c4beb6;
    border-left: 1px solid #1e1e1e;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}

@media (prefers-reduced-motion: reduce) {
    .window-opening,
    .window-closing,
    .menu-item,
    .menu-item-image,
    .window-btn {
        animation: none;
        transition: none;
    }
}

.menu-item:focus-visible {
    outline: 3px solid var(--text-color);
    outline-offset: 4px;
    border-radius: 8px;
}

.window-btn:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
}
