@charset "UTF-8";

:root {
    --cv-primary: #2d72cd;
    --cv-accent: #074cbb;
    --ink: #0f172a;
    --ink-soft: #475569;
    --muted: #6b7280;
    --line: #e5e9f0;
    --paper: #ffffff;
    --page: #eef1f5;
    --radius: 6px;
    --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 48px 24px 64px;
    background-color: var(--page);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

body.has-background {
    background-color: #d9dee6;
}

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

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

/* Sheet */
.sheet {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 56px 60px 60px;
    background: var(--paper);
    border-top: 3px solid var(--cv-primary);
    border-radius: var(--radius);
    box-shadow: 0 32px 80px -48px rgba(15, 23, 42, 0.45), 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* Masthead */
.masthead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--line);
}

.identity {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cv-primary);
}

.name {
    margin: 0;
    font-family: var(--font-heading, "Instrument Serif", Georgia, "Times New Roman", serif);
    font-weight: 400;
    font-size: clamp(2.6rem, 5vw, 3.9rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.role {
    max-width: 620px;
    margin: 14px 0 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.8;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.portrait {
    flex: 0 0 auto;
}

.portrait img {
    width: 118px;
    height: 142px;
    object-fit: cover;
    object-position: center top;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f4f6f9;
}

.contact-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 24px 0 0;
}

.contact-strip li {
    min-width: 0;
}

.contact-strip a,
.contact-plain {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    font-size: 12.5px;
    color: var(--ink-soft);
    transition: color 0.18s ease;
}

.contact-strip a:hover {
    color: var(--cv-accent);
}

.contact-strip i {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--cv-primary);
}

.contact-strip span {
    overflow-wrap: anywhere;
}

/* Columns */
.cv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(230px, 0.8fr);
    gap: 52px;
    padding-top: 36px;
}

.cv-main,
.cv-side {
    min-width: 0;
}

.cv-side {
    padding-left: 40px;
    border-left: 1px solid var(--line);
}

/* Sections */
.cv-section + .cv-section {
    margin-top: 34px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.section-head h2 {
    position: relative;
    margin: 0;
    padding-left: 14px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink);
}

.section-head h2::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 1px;
    background: var(--cv-primary);
}

/* Work & education */
.entry {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 18px;
    padding: 12px 0;
}

.entry + .entry {
    border-top: 1px solid #f1f4f8;
}

.entry-period {
    margin: 1px 0 0;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.entry-body h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.005em;
    color: var(--ink);
    overflow-wrap: break-word;
    transition: color 0.18s ease;
}

.entry:hover .entry-body h3 {
    color: var(--cv-accent);
}

.entry-org {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--ink-soft);
}

/* Programming meters */
.meter-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 30px;
}

.meter-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--ink-soft);
}

.meter-label span {
    overflow-wrap: anywhere;
}

.meter-label small {
    flex: 0 0 auto;
    font-size: 10.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.meter {
    height: 3px;
    margin-top: 6px;
    border-radius: 999px;
    background: #edf1f6;
    overflow: hidden;
}

.meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cv-primary), var(--cv-accent));
}

/* Tools */
.tool-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 30px;
}

.tool-group h3 {
    margin: 0 0 9px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    font-size: 11px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.tag small {
    font-size: 9.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* Sidebar */
.simple-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    font-size: 12.5px;
    border-bottom: 1px solid #f1f4f8;
}

.simple-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.simple-list .tag {
    padding: 2px 8px;
    font-size: 10px;
    background: #f1f5f9;
}

.link-list {
    display: flex;
    flex-direction: column;
}

.link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-soft);
    border-bottom: 1px solid #f1f4f8;
    transition: color 0.18s ease;
}

.link-row:last-child {
    border-bottom: 0;
}

.link-row i {
    width: 16px;
    flex: 0 0 auto;
    font-size: 14px;
    text-align: center;
    color: var(--cv-primary);
}

.link-row:hover {
    color: var(--cv-accent);
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 18px;
    padding: 11px 14px;
    border-radius: 9px;
    background: var(--cv-accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    transition: filter 0.18s ease;
}

.download-btn:hover {
    filter: brightness(1.12);
}

.download-btn i {
    font-size: 13px;
}

.barcode {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.barcode img {
    width: 104px;
    height: 104px;
    padding: 6px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
}

.interest-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-list li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    font-size: 11.5px;
    color: var(--ink-soft);
}

.interest-list i {
    font-size: 12px;
    color: var(--cv-primary);
}

/* Tablet */
@media (max-width: 900px) {
    body {
        padding: 24px 16px 40px;
    }

    .sheet {
        padding: 36px 32px 40px;
    }

    .cv-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .cv-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 32px;
        padding-top: 32px;
        padding-left: 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .cv-side .cv-section + .cv-section {
        margin-top: 0;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .masthead {
        gap: 20px;
    }

    .name {
        font-size: clamp(2.1rem, 9vw, 2.8rem);
    }

    .role {
        font-size: 11px;
        letter-spacing: 0.07em;
    }

    .portrait img {
        width: 86px;
        height: 104px;
        border-radius: 12px;
    }

    .contact-strip {
        flex-direction: column;
        gap: 8px;
        margin-top: 20px;
    }

    .cv-grid {
        padding-top: 28px;
    }

    .cv-side {
        grid-template-columns: 1fr;
    }

    .entry {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .entry-period {
        font-size: 10.5px;
    }

    .meter-list,
    .tool-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 14px 10px 28px;
    }

    .sheet {
        padding: 26px 20px 32px;
        border-radius: 4px;
    }
}

/* Print */
@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        padding: 0;
        background: #ffffff !important;
        font-size: 10pt;
    }

    body.has-background {
        background-image: none !important;
    }

    .sheet {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
        border-top: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .masthead {
        padding-bottom: 18px;
    }

    .portrait img {
        width: 90px;
        height: 110px;
    }

    .cv-grid {
        gap: 32px;
        padding-top: 24px;
    }

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

    .cv-section + .cv-section {
        margin-top: 22px;
    }

    .entry {
        padding: 8px 0;
        break-inside: avoid;
    }

    .download-btn {
        border: 1px solid var(--line);
        background: #ffffff;
        color: var(--ink);
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Keep the short sidebar visible while scanning a long resume */
@media (min-width: 901px) {
    .cv-side {
        position: sticky;
        top: 32px;
        align-self: start;
    }
}
