:root {
    --bg-color: #1a1a1a;
    --sidebar-bg: #151515;
    --text-color: #e6e6e6;
    --link-color: #58a6ff;
    --link-hover: #79c0ff;
    --gray-color: #8b949e;
    --light-gray: #6e7681;
    --border-color: #30363d;
    --tag-bg: #21262d;
    --tag-active-bg: #30363d;
    --font-main: 'JetBrains Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
    overflow: hidden;
}

.layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 200px;
    background-color: var(--sidebar-bg);
    padding: 180px 20px 40px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--light-gray);
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--tag-bg);
    color: var(--text-color);
}

.nav-item.active {
    color: var(--text-color);
    border: 1px solid var(--link-color);
}

.nav-text {
    flex: 1;
}

.nav-tag {
    color: var(--link-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active .nav-tag {
    opacity: 1;
    transform: translateX(0);
}

.content-area {
    flex: 1;
    max-width: 900px;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px 40px;
    scroll-behavior: smooth;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--light-gray);
}

header {
    margin-bottom: 0;
    padding: 40px 40px 20px;
    flex-shrink: 0;
    width: fit-content;
}

h1.home-link {
    font-size: 36px;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    white-space: nowrap;
}



h1.home-link:hover {
    color: var(--link-color);
    cursor: default;
}

.social-links {
    display: flex;
    margin-top: 12px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
}

.social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s ease;
}

.social-item:hover {
    transform: translateY(-2px);
}

.social-icon {
    width: 48px;
    height: 48px;
    background-color: var(--tag-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: background-color 0.2s ease;
}

.social-item:hover .social-icon {
    background-color: var(--tag-active-bg);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

main {
    margin-bottom: 40px;
}

.intro {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 16px;
    color: var(--text-color);
}

.intro p {
    margin: 0;
}

#about {
    margin-bottom: 40px;
    padding-bottom: 20px;
}

#about p {
    margin-bottom: 8px;
    line-height: 1.6;
    color: var(--text-color);
}

#about p:last-child {
    margin-bottom: 0;
}

#about strong {
    font-weight: 600;
    color: var(--text-color);
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 12px;
    color: var(--text-color);
}

h2:first-of-type {
    margin-top: 0;
}

#about h2:first-of-type {
    margin-top: 20px;
}

#projects {
    margin-top: 40px;
    margin-bottom: 120px;
    padding-bottom: 40px;
    min-height: calc(100vh - 200px);
    display: none;
}

#projects h2 {
    margin-top: 0;
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-list li {
    margin-bottom: 32px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.post-list li:last-child {
    margin-bottom: 0;
}

.date {
    color: var(--gray-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    min-width: 100px;
    flex-shrink: 0;
    padding-top: 2px;
}

.post-list a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-list a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.description {
    margin: 8px 0 0 124px;
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

#about p {
    color: var(--text-color);
    line-height: 1.8;
}

footer {
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--light-gray);
}

footer p {
    margin: 8px 0;
}

footer a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--link-color);
}

.copyright {
    margin-top: 16px;
    font-size: 0.8125rem;
}

/* Адаптивність */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 12px;
    }

    .content-area {
        margin-left: 0;
        padding: 40px 20px 30px;
    }

    header {
        margin-bottom: 50px;
    }

    .post-list li {
        flex-direction: column;
        gap: 8px;
    }

    .date {
        min-width: auto;
    }

    .description {
        margin-left: 0;
    }
}