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

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-light: #e8e8e8;
    --gray-medium: #666666;
    --gray-dark: #1a1a1a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrapper {
    display: flex;
    min-height: 100vh;
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 40px;
}

.sidebar {
    width: 160px;
    flex-shrink: 0;
    padding: 0 20px 0 0;
    position: sticky;
    top: 80px;
    height: fit-content;
    align-self: flex-start;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 32px;
}

.nav-item {
    text-decoration: none;
    color: var(--gray-medium);
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s ease;
    padding: 6px 0;
    letter-spacing: -0.01em;
}

.nav-item:hover {
    color: var(--black);
}

.nav-item.active {
    color: var(--black);
    font-weight: 500;
}

.divider {
    width: 100%;
    height: 1px;
    background: var(--gray-light);
    margin: 32px 0;
}

.divider-vertical {
    width: 1px;
    background: var(--gray-light);
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: auto;
}

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

.social-link:hover {
    color: var(--black);
}

.social-link svg {
    display: block;
}

.main-content {
    flex: 1;
    padding: 0 0 0 40px;
    max-width: 480px;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

h1 {
    font-size: 42px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 13px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 24px;
    margin-top: 56px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

h3 {
    font-size: 20px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 8px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.intro {
    margin-bottom: 72px;
}

.tagline {
    font-size: 17px;
    color: var(--gray-dark);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.page-intro {
    font-size: 15px;
    color: var(--gray-medium);
    margin-bottom: 56px;
    font-weight: 400;
}

.content-section {
    margin-bottom: 48px;
}

.text-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--black);
    font-weight: 400;
}

.text-content p {
    margin-bottom: 24px;
}

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

.work-grid {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.work-item {
    padding-bottom: 40px;
    border-bottom: 1px solid var(--gray-light);
}

.work-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.work-year {
    font-size: 13px;
    color: var(--gray-medium);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.work-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--black);
    margin-bottom: 16px;
    font-weight: 400;
}

.work-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 11px;
    color: var(--gray-medium);
    padding: 3px 8px;
    background: transparent;
    border: 1px solid var(--gray-light);
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 400;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.note-item {
    padding-bottom: 40px;
    border-bottom: 1px solid var(--gray-light);
}

.note-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.note-date {
    font-size: 13px;
    color: var(--gray-medium);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.note-excerpt {
    font-size: 16px;
    line-height: 1.7;
    color: var(--black);
    font-weight: 400;
}

.library-section {
    margin-bottom: 56px;
}

.library-section:last-child {
    margin-bottom: 0;
}

.library-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.library-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.book-title {
    font-size: 16px;
    color: var(--black);
    font-weight: 400;
}

.book-author {
    font-size: 14px;
    color: var(--gray-medium);
    font-weight: 400;
}

@media (max-width: 1024px) {
    .wrapper {
        padding: 60px 30px;
        max-width: 800px;
    }
    
    .main-content {
        padding: 0 0 0 30px;
    }
    
    .sidebar {
        width: 150px;
        padding: 0 15px 0 0;
        top: 60px;
    }
}

@media (max-width: 768px) {
    .wrapper {
        flex-direction: column;
        padding: 40px 24px;
        max-width: 100%;
    }

    .sidebar {
        width: 100%;
        padding: 0 24px 24px;
        position: relative;
        height: auto;
        top: 0;
        border-bottom: 1px solid var(--gray-light);
        margin-bottom: 24px;
    }

    .sidebar-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .nav {
        flex-direction: row;
        gap: 24px;
        margin-bottom: 0;
    }

    .divider {
        display: none;
    }

    .divider-vertical {
        display: none;
    }

    .social-links {
        margin-top: 0;
        gap: 16px;
    }

    .main-content {
        padding: 0;
        max-width: 100%;
    }

    h1 {
        font-size: 32px;
    }

    .tagline {
        font-size: 16px;
    }

    .work-header,
    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .work-grid,
    .notes-list {
        gap: 40px;
    }
}
