

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(255, 209, 120, 0.12), transparent 18%),
        linear-gradient(135deg, #2f1f13 0%, #160b06 55%, #080403 100%);
    color: #f3efe6;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

header {
    position: fixed;
    inset: 0 auto 0 0;
    width: 320px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 48px 32px;
    background: rgba(14, 10, 8, 0.96);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
}

header h1 {
    margin: 0;
    font-size: clamp(2.4rem, 3vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

header nav {
    margin-top: 48px;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

header nav a {
    color: #d9d4c8;
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    border-left: 2px solid transparent;
    padding-left: 14px;
    transition: color 0.25s ease, border-color 0.25s ease;
}

header nav a:hover,
header nav a:focus,
header nav a.active {
    color: #ffffff;
    border-color: #f9d36d;
}

main {
    margin-left: 320px;
    padding: 48px 40px;
    width: calc(100% - 320px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: stretch;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    width: 100%;
    max-width: none;
    margin: 0;
    align-items: stretch;
}

.project-item {
    background: rgba(22, 18, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}

.project-item h1 {
    margin: 0;
    font-size: 1.6rem;
}

.project-description,
#languages-used,
.sidebar-footer-text {
    color: #d5cfc4;
}

.project-description {
    line-height: 1.8;
    margin: 0 0 16px;
}

.project-image {
    display: block;
    width: 100%;
    height: 260px;
    border-radius: 18px;
    object-fit: cover;
    margin: 22px 0;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-footer-links {
    display: flex;
    gap: 16px;
}

.sidebar-footer-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#footerIMG,
#footerIMG2 {
    width: 24px;
    height: 24px;
    filter: brightness(0.95);
    transition: filter 0.2s ease;
}

#footerIMG:hover,
#footerIMG2:hover {
    filter: invert(1) opacity(1);
}

#profile-pic {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
    transition: filter 0.3s ease;
}

#profile-pic:hover {
    filter: brightness(1.2);
}

#languages-used {
    font-style: italic;
    margin-top: 8px;
}

@media (max-width: 1100px) {
    header {
        width: 280px;
        padding: 36px 24px;
    }

    main {
        margin-left: 280px;
        padding: 40px 32px;
        width: calc(100% - 280px);
    }
}

@media (max-width: 840px) {
    header {
        position: static;
        width: 100%;
        height: auto;
        padding: 32px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    header nav {
        margin-top: 24px;
    }

    header nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
    }

    header nav a {
        padding-left: 0;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    header nav a:hover,
    header nav a:focus,
    header nav a.active {
        border-bottom-color: #f9d36d;
    }

    main {
        margin-left: 0;
        width: 100%;
        padding: 32px 20px;
        padding-bottom: 140px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-item {
        padding: 24px;
    }

    .project-image {
        height: auto;
        min-height: 200px;
    }

    .sidebar-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 18px 20px;
        background: rgba(14, 10, 8, 0.96);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
        z-index: 50;
    }

    .sidebar-footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 540px) {
    body {
        font-size: 0.95rem;
    }

    header {
        padding: 24px 16px;
    }

    header nav ul {
        gap: 10px;
    }

    main {
        padding: 24px 16px;
        gap: 32px;
    }

    .project-item {
        padding: 22px;
        border-radius: 20px;
    }

    .project-image {
        border-radius: 16px;
    }
}
