/* Print-specific stylesheet for A4 resume
   Purpose: produce a clean, compact A4 print output for the resume.
*/

@page {
    size: A4;
    margin: 10mm;
}

html, body {
    background: white !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12pt;
    line-height: 1.35;
}

/* Container sized to A4 width */
.center {
    width: 100%;
    max-width: 210mm;
    margin: 0 auto;
    background: white;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Header / bio layout (two-column) */
header {
    display: flex;
    flex-wrap: nowrap;
    gap: 6mm;
    padding: 4mm 4mm 4mm 4mm;
    align-items: flex-start;
}

#bio_left {
    flex: 1 1 auto;
    padding: 0;
}

#bio_right {
    flex: 0 0 50mm;
    padding: 0;
    text-align: center;
}

#bio_right img {
    width: 50mm;
    height: auto;
    border: none;
    box-shadow: none;
    border-radius: 4px;
}

h1 { font-size: 18pt; margin: 0 0 4px 0; }
h2 { font-size: 12pt; margin: 8px 0 6px 0; border-bottom: 1px solid #222; padding-bottom: 3px; }
h3 { font-size: 12pt; margin: 0 0 3px 0; }
p, li { font-size: 10.5pt; color: #111; }

/* Job layout: narrow left column for dates */
.job {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 6mm;
    margin: 4mm 6mm;
    padding: 0 0 4mm 0;
    border-bottom: 0.5px solid #ddd;
}

.job:last-child {
    border-bottom: none;
}

.date { font-size: 10.5pt; color: #222; }
.company b { font-size: 10.5pt; }

/* Simple list (Education, Papers, Patents, Awards) */
.simple-list {
    margin: 0 4mm 4mm 4mm;
    padding: 0;
}

.simple-list li {
    display: flex;
    gap: 4mm;
    padding: 0.4mm 0;
    border-bottom: none;
    align-items: flex-start;
}

.simple-list .item-date {
    flex: 0 0 22mm;
    font-size: 10.5pt;
    color: #222;
}

.simple-list .item-content {
    flex: 1;
    font-size: 10.5pt;
    line-height: 1.35;
}

.simple-list .item-sub {
    font-size: 9pt;
    color: #555;
    margin-top: 1px;
}

.simple-list .item-title-ko {
    display: block;
    font-size: 10.5pt;
    font-weight: 500;
}

.simple-list .item-title-en {
    display: block;
    font-size: 9.5pt;
    color: #444;
    margin-top: 1px;
}

/* Company and other lists */
.company ul, ul.full_width {
    margin: 0 4mm 4mm 4mm;
    padding-left: 0;
}

/* Allow page breaks inside long blocks to avoid large blank gaps */
.job, .simple-list li, h2 {
    break-inside: auto !important;
    -webkit-column-break-inside: auto !important;
    page-break-inside: auto !important;
}

/* Footer */
.footer-section { padding: 6mm; margin-top: 4mm; border-top: 1px solid #ddd; }

/* Hide interactive elements that don't make sense on paper */
.no-print, nav, .print-only-hidden { display: none !important; }

/* In print: do not show link URLs, show anchor text only */
a { color: inherit; text-decoration: none; pointer-events: none; }
a[href]:after { content: none !important; }

/* Reduce spacing before the highlights list in the header */
#bio_left .section-title { margin-top: 0.2rem; margin-bottom: 0.1rem; }
#bio_left .section-title + ul { margin-top: 0.2rem; }

/* Bio info tagline styling for print */
.bio-info .tagline {
    display: block;
    font-weight: 600;
    font-size: 10.5pt;
    margin: 0 0 1px 0;
    line-height: 1.3;
}

.bio-info .intro {
    margin-top: 2mm;
    margin-bottom: 2mm;
    font-size: 10.5pt;
    line-height: 1.35;
}

/* Ensure company name and location align on same line */
.job_data {
    position: relative;
}

.job_data h3 {
    display: inline-block;
    margin-right: 50mm;
    vertical-align: top;
    margin-bottom: 0;
}

.job_data .location {
    position: absolute;
    right: 0;
    top: 0;
    text-align: right;
    max-width: 45mm;
    font-size: 9pt;
    line-height: 1.3;
}

/* Task nested list styling */
.task-title { font-weight: 600; margin-bottom: 2px; }
.task-items { margin-top: 2px; margin-left: 10mm; }
.task-items li { list-style: circle; }

/* Reduce any large paddings coming from screen styles */
header, .main-content, .footer-section { padding-left: 6mm !important; padding-right: 6mm !important; }

/* Tweak for small type where necessary */
.company ul li { font-size: 10.5pt; line-height: 1.35; }

/* Ensure page-breaks between major sections - keep normal behavior */
h2 + .job { page-break-before: auto; }

/* For browsers that support margin boxes, this keeps content inside margins */
@supports (margin: 1cm) {
    .center { box-sizing: border-box; }
}
