/* Color palette from devbackend.ru */
:root {
    --color-bg: #0f172a;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-primary: #60a5fa;
    --color-primary-hover: #93c5fd;
    --color-border: #334155;
    --color-code-bg: #1e293b;
    --color-card-bg: #1e293b;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--color-primary-hover);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    font-weight: 600;
    line-height: 1.3;
}

p {
    margin: 0 0 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-content {
    padding: 2rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.sidebar h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.sidebar .tagline {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.sidebar .description {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.sidebar .contacts {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.sidebar .social-links {
    justify-content: flex-start;
    margin-bottom: 2rem;
}

.sidebar .social-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.skills-section {
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
}

.skills-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.skills-section .skill-group {
    margin-bottom: 1.25rem;
}

.skills-section .skill-group:last-child {
    margin-bottom: 0;
}

.skills-section .skill-group h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.skills-section .tag {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.main-content {
    min-width: 0;
}

.main-content .section {
    padding: 0 0 3rem;
    border-top: none;
}

.main-content .section:first-child {
    padding-top: 0;
}

.main-content .section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

/* Header */
.site-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.site-title:hover {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0 4rem;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 3px solid var(--color-border);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.description {
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.contact-item {
    color: var(--color-text-muted);
}

a.contact-item:hover {
    color: var(--color-primary);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.social-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--color-border);
    border-color: var(--color-primary);
}

/* Sections */
.section {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
}

.section h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

/* Skills */
.skills-grid {
    display: grid;
    gap: 2rem;
}

.skill-group h3 {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.875rem;
}

.tag.small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Experience Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    padding: 1.5rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.timeline-header {
    margin-bottom: 1rem;
}

.company-name {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--color-primary);
}

.company-period {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Roles Timeline inside company */
.roles-timeline {
    margin: 1rem 0;
    padding-left: 0.5rem;
    border-left: 2px solid var(--color-border);
}

.role-item {
    position: relative;
    padding-left: 1.25rem;
    padding-bottom: 0.75rem;
}

.role-item:last-child {
    padding-bottom: 0;
}

.role-marker {
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    background: var(--color-primary);
    border-radius: 50%;
    transform: translateX(-50%);
}

.role-item:first-child .role-marker {
    width: 0.625rem;
    height: 0.625rem;
    box-shadow: 0 0 0 3px var(--color-card-bg), 0 0 0 4px var(--color-primary);
}

.role-content {
    flex: 1;
}

.role-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.role-title {
    font-weight: 500;
    color: var(--color-text);
}

.role-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.role-description {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.role-description li {
    margin-bottom: 0.375rem;
}

.role-description li:last-child {
    margin-bottom: 0;
}

.summary {
    color: var(--color-text-muted);
    margin: 0;
    font-size: 0.9375rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
    margin-top: 1rem;
}

/* Projects */
.projects-grid {
    display: grid;
    gap: 1.5rem;
}

.project-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.project-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.project-content {
    flex: 1;
}

.project-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.project-content p {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.site-footer p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* Single Page */
.single header {
    margin-bottom: 2rem;
}

.single h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.single time {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.content {
    color: var(--color-text);
}

/* List Page */
.list h1 {
    margin-bottom: 2rem;
}

.items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.item h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.item p {
    color: var(--color-text-muted);
    margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: static;
    }

    .sidebar-content {
        text-align: center;
    }

    .sidebar .contacts {
        align-items: center;
    }

    .sidebar .social-links {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .project-card {
        flex-direction: column;
    }

    .project-image {
        width: 100%;
        height: 200px;
    }

    .nav-links {
        gap: 1rem;
    }

    .timeline-item {
        padding: 1rem;
    }
}
