/* Reset and base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #f8f9fa;
    --color-card: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-badge-bg: #f3f4f6;
    --color-badge-text: #374151;
    --font-sans:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    --font-mono:
        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --max-width: 720px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    padding: 2rem 1rem;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Card wrapper */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2.5rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.header-content {
    flex: 1;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.tagline {
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.location {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Social icons */
.social-links {
    display: flex;
    gap: 0.625rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-icon:hover {
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

/* Header photo */
.header-photo {
    flex-shrink: 0;
}

.overlap-wrapper {
    display: grid;
    cursor: pointer;
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
}

.overlap-item {
    grid-area: 1/1;
    transition: opacity 500ms ease-in-out;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.overlap-item.reveal-item {
    opacity: 1;
}

.overlap-item.reveal-item:hover {
    opacity: 0;
}

/* Sections */
.section {
    margin-bottom: 2rem;
}

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

.section h2 {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

/* Entry (for experience, education) */
.entry {
    margin-bottom: 1.5rem;
}

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

.entry-minimal {
    margin-bottom: 1rem;
}

.entry-minimal .meta {
    margin-bottom: 0;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.entry-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.badge {
    display: inline-block;
    padding: 0.1875rem 0.625rem;
    background-color: var(--color-badge-bg);
    color: var(--color-badge-text);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

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

.meta {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

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

.meta a:hover {
    color: var(--color-text);
}

.meta .separator {
    margin: 0 0.25rem;
}

.description {
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.65;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 1rem 0.75rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .header {
        flex-direction: column-reverse;
        gap: 1.25rem;
    }

    .header-photo {
        align-self: flex-start;
    }

    .overlap-wrapper {
        width: 80px;
        height: 80px;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .date {
        font-size: 0.875rem;
    }
}

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

    .card {
        border: none;
        padding: 0;
        box-shadow: none;
    }

    .container {
        max-width: 100%;
    }

    .social-icon {
        border: 1px solid #ccc;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}
