/* ── Reset & variables ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --text:    #111827;
    --muted:   #4b5563;
    --light:   #9ca3af;
    --accent:  #1d4ed8;
    --border:  #e5e7eb;
    --bg:      #ffffff;
    --page-width: 860px;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    padding: 2.5rem 1.5rem;
}

.resume {
    max-width: var(--page-width);
    margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────────── */
.resume-header {
    border-bottom: 2px solid var(--text);
    padding-bottom: 0.875rem;
    margin-bottom: 1.25rem;
}

.resume-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.375rem;
}

.contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--muted);
    list-style: none;
}

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

.sep { color: var(--border); user-select: none; }

/* ── Section wrapper ────────────────────────────────────────── */
.resume-section {
    margin-bottom: 1.375rem;
}

.resume-section h2 {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.2rem;
    margin-bottom: 0.625rem;
}

/* ── Summary ────────────────────────────────────────────────── */
.resume-section p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.65;
}

/* ── Skills ─────────────────────────────────────────────────── */
.skills {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.skill-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.skill-row dt {
    font-weight: 600;
    color: var(--text);
}

.skill-row dd {
    color: var(--muted);
}

/* ── Entry (experience / project) ───────────────────────────── */
.entry {
    margin-bottom: 0.875rem;
}

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

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 1rem;
    row-gap: 0.1rem;
    margin-bottom: 0.3rem;
}

.entry-title { flex: 1; min-width: 0; }

.role {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text);
}

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

.period {
    font-size: 0.8125rem;
    color: var(--light);
    white-space: nowrap;
    flex-shrink: 0;
}

.entry ul {
    padding-left: 1.125rem;
    margin: 0;
}

.entry li {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.2rem;
    padding-left: 0.25rem;
}

/* Technology stack line under project bullets */
.stack {
    font-size: 0.8rem;
    color: var(--light);
    margin-top: 0.35rem;
    padding-left: 1.375rem;
    font-style: italic;
}

/* Education detail line */
.edu-detail {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-top: 0.2rem;
    padding-left: 0;
}

.entry--edu .entry-header { margin-bottom: 0.1rem; }

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

    .resume-header h1 { font-size: 1.5rem; }

    .skill-row {
        grid-template-columns: 1fr;
        gap: 0.05rem;
    }

    .skill-row dt::after { content: ":"; }

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

    .period { margin-top: 0.1rem; }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
    body {
        padding: 0;
        font-size: 11.5px;
        color: #000;
    }

    .resume { max-width: 100%; }

    a {
        color: #000;
        text-decoration: none;
    }

    /* Show href for external links when printing */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #666;
    }

    /* Avoid page breaks inside entries */
    .entry { break-inside: avoid; }

    .resume-section { break-inside: avoid; }
}