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

:root {
    --color-bg: #fafaf9;
    --color-surface: #ffffff;
    --color-text: #1c1917;
    --color-text-secondary: #57534e;
    --color-accent: #2563eb;
    --color-accent-light: #eff6ff;
    --color-border: #e7e5e4;
    --color-tag-bg: #f5f5f4;
    --color-tag-border: #d6d3d1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
}

/* Visitor counter */
.visitor-counter {
    position: fixed;
    top: 16px;
    right: 24px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    background: var(--color-tag-bg);
    border: 1px solid var(--color-tag-border);
    border-radius: 4px;
    padding: 4px 12px;
    z-index: 10;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.contact-info a {
    color: var(--color-accent);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.separator::after {
    content: "\00b7";
    color: var(--color-tag-border);
    font-weight: 700;
}

/* Sections */
section {
    margin-bottom: 36px;
}

section > h2 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 6px;
    margin-bottom: 20px;
}

section > p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

/* Entry blocks */
.entry {
    margin-bottom: 24px;
}

.entry:last-child {
    margin-bottom: 0;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.entry-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.organisation {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.entry-meta {
    text-align: right;
    flex-shrink: 0;
}

.location {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.date {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

.project-link {
    font-size: 0.9rem;
    color: var(--color-accent);
    text-decoration: none;
}

.project-link:hover {
    text-decoration: underline;
}

/* Lists */
ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}

ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-accent);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.skill-category h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.82rem;
    background: var(--color-tag-bg);
    border: 1px solid var(--color-tag-border);
    border-radius: 4px;
    color: var(--color-text-secondary);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 32px 16px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .entry-header {
        flex-direction: column;
    }

    .entry-meta {
        text-align: left;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* 404 page */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 12px;
}

.error-message {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

.back-link {
    display: inline-block;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--color-accent);
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.85;
}

/* Print */
@media print {
    body {
        background: white;
    }

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

    section > h2 {
        color: var(--color-text);
        border-color: var(--color-text);
    }

    .contact-info a {
        color: var(--color-text);
    }

    .tag {
        border-color: var(--color-border);
    }
}
