:root {
    --color-bg: #f7f9fc;
    --color-paper: #ffffff;
    --color-text-main: #2d3748;
    --color-text-muted: #718096;
    --color-primary: #2b6cb0;
    --color-tag-bg: #edf2f7;
    --color-tag-text: #4a5568;
}

html {
    box-sizing: border-box;
    font-size: 16px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background-color: var(--color-bg);
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.6;
}

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

a:hover {
    text-decoration: underline;
    color: #2c5282;
}

.wrapper {
    background-color: var(--color-paper);
    max-width: 1000px;
    margin: 60px auto;
    padding: 60px 80px;
    box-shadow: none;
    border-radius: 8px;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #1a202c;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #2d3748;
}

/* Override for pages where h2 is the first element (like index.html) */
.wrapper > h2:first-child,
.wrapper > section:first-child > h2:first-child {
    margin-top: 0;
}

.contacts {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-style: normal;
}

.contacts span {
    display: inline-block;
}

.contacts span:not(:last-child)::after {
    content: '•';
    margin: 0 10px;
    color: #cbd5e0;
}

.summary {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 3rem;
    text-align: left;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--color-primary);
}

.summary p:first-child {
    margin-top: 0;
}

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

.job {
    margin-bottom: 2.5rem;
}

.job h3 {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1a202c;
}

.job h3 a {
    font-weight: 700;
    color: var(--color-primary);
}

.job h3 em {
    font-style: normal;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    margin-left: auto;
}

p {
    margin: 0.5rem 0 1rem 0;
    color: #4a5568;
}

.tech {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech li {
    background-color: var(--color-tag-bg);
    color: var(--color-tag-text);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.interests li {
    margin-bottom: 0.5rem;
}

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

.projects-list li {
    margin-bottom: 0.75rem;
}

.checksums {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 1rem 0;
}

.checksums th,
.checksums td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.checksums th {
    font-weight: 600;
    color: var(--color-text-main);
}

.checksums code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.8rem;
    background: var(--color-tag-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    word-break: break-all;
}

.signed-label {
    color: #2f855a;
}

.signed-label:hover {
    color: #276749;
}

details {
    margin-top: 1.5rem;
}

details summary {
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

details summary:hover {
    color: var(--color-text-main);
}

details[open] summary {
    margin-bottom: 1rem;
}

.footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 768px) {
    .wrapper {
        margin: 0;
        padding: 30px 20px;
        border-radius: 0;
    }
    .job h3 {
        flex-direction: column;
        align-items: flex-start;
    }
    .job h3 em {
        margin-left: 0;
        margin-top: 4px;
    }
}

@media print {
    body {
        background: none;
        color: #000;
        margin: 0;
        font-size: 11pt;
    }
    .wrapper {
        box-shadow: none;
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: none;
        background: none;
    }
    .summary {
        background: none;
        border: none;
        padding: 0;
        text-align: justify;
        border-left: none;
        margin-bottom: 2rem;
        font-size: 11pt;
        line-height: 1.5;
    }
    h1 {
        font-size: 22pt;
        margin-bottom: 0.5rem;
        margin-top: 0;
    }
    h2 {
        border-bottom: 1px solid #000;
        margin-top: 1.5rem;
        font-size: 16pt;
    }
    .job h3 {
        font-size: 13pt;
        flex-direction: row !important;
        flex-wrap: nowrap;
        width: 100%;
        display: flex;
        align-items: baseline;
    }
    a {
        text-decoration: none;
        color: #000;
    }
    .tech li {
        border: 1px solid #ccc;
        color: #000;
        background: none;
        font-size: 9pt;
    }
    .job {
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
    }
    .job h3 em {
        color: #333;
        font-size: 10pt;
        margin-left: auto;
    }
    .contacts {
        color: #000;
        font-size: 10pt;
    }
    .contacts span::after {
        color: #000;
    }
}
