/* =========================================================
   CV — Print-ready single page
   ========================================================= */

.cv-body {
  background: #e8e6e0;
  font-family: var(--ff-sans);
  color: #1a1a1a;
  margin: 0;
  padding: 32px 16px 64px;
}

/* Toolbar */
.cv-toolbar {
  max-width: 820px;
  margin: 0 auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.cv-back {
  font-size: 14px;
  color: #404040;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.cv-back:hover { border-bottom-color: currentColor; color: #1a1a1a; }
.cv-print {
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #1a1a1a;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background .2s, color .2s;
}
.cv-print:hover { background: #fff; color: #1a1a1a; }

/* Paper sheet — A4 proportions */
.cv-page {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.25);
  padding: 56px 60px 48px;
  font-size: 11.5pt;
  line-height: 1.45;
  color: #1a1a1a;
}

/* Header */
.cv-head {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 22px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 2px solid #1a1a1a;
  margin-bottom: 24px;
}
.cv-photo {
  width: 88px;
  height: 110px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid #d4d4d4;
}
.cv-head-text { min-width: 0; }
.cv-name {
  font-family: var(--ff-display);
  font-size: 28pt;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0 0 6px;
}
.cv-tag {
  font-size: 10.5pt;
  color: #525252;
  margin: 0;
}
.cv-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 9.5pt;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #404040;
  justify-self: end;
}
.cv-contact li {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
  align-items: baseline;
}
.cv-contact span {
  color: #8a8a8a;
  font-size: 8.5pt;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}
.cv-contact a {
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid #d4d4d4;
  word-break: break-all;
}

/* Sections */
.cv-section { margin-bottom: 22px; page-break-inside: avoid; }
.cv-section h2 {
  font-family: var(--ff-sans);
  font-size: 9.5pt;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #1a1a1a;
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #d4d4d4;
}

.cv-summary {
  font-size: 11pt;
  line-height: 1.55;
  color: #2a2a2a;
  margin: 0;
}

/* List items (Education / Experience / Honors) */
.cv-list { list-style: none; margin: 0; padding: 0; }
.cv-list li {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 16px;
  padding: 8px 0;
  page-break-inside: avoid;
}
.cv-list li + li { border-top: 1px dotted #e5e5e5; }
.cv-when {
  font-size: 9.5pt;
  color: #737373;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.cv-what { min-width: 0; }
.cv-title-line { margin: 0 0 2px; font-size: 10.5pt; }
.cv-title-line strong { font-weight: 600; }
.cv-desc { margin: 0; font-size: 10pt; color: #525252; line-height: 1.45; }

/* Publications */
.cv-pubs {
  list-style: decimal inside;
  margin: 0;
  padding: 0;
}
.cv-pubs li {
  list-style: none;
  position: relative;
  padding: 10px 0 10px 28px;
  page-break-inside: avoid;
}
.cv-pubs li + li { border-top: 1px dotted #e5e5e5; }
.cv-pubs li::before {
  content: attr(data-number);
  position: absolute;
  left: 0;
  top: 10px;
  font-size: 9.5pt;
  font-weight: 500;
  color: #737373;
}
.cv-pub-title { font-size: 10.5pt; font-weight: 600; margin: 0 0 3px; }
.cv-pub-authors { font-size: 10pt; color: #2a2a2a; margin: 0 0 2px; }
.cv-pub-venue { font-size: 9.5pt; color: #525252; margin: 0; }
.cv-pub-venue a { color: #1a1a1a; }
.cv-pub-tbd { color: #999; font-style: italic; }

/* Skills */
.cv-skills { font-size: 10pt; color: #2a2a2a; margin: 0; }

/* Footer */
.cv-foot {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid #d4d4d4;
  font-size: 8.5pt;
  color: #8a8a8a;
  text-align: center;
}

/* =========================================================
   PRINT
   ========================================================= */
@page {
  size: A4;
  margin: 12mm;
}

@media print {
  .no-print { display: none !important; }
  body, .cv-body { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .cv-page {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    font-size: 10pt;
  }
  .cv-name { font-size: 22pt; }
  a { color: #1a1a1a !important; text-decoration: none !important; border-bottom: none !important; }
  .cv-section { margin-bottom: 14px; }
  .cv-list li, .cv-pubs li { padding-top: 5px; padding-bottom: 5px; }
}

/* =========================================================
   RESPONSIVE (web view)
   ========================================================= */
@media (max-width: 720px) {
  .cv-page { padding: 32px 24px; font-size: 11pt; }
  .cv-head { grid-template-columns: 76px 1fr; gap: 14px; }
  .cv-photo { width: 76px; height: 96px; }
  .cv-contact { grid-column: 1 / -1; text-align: left; padding-top: 8px; border-top: 1px solid #e5e5e5; }
  .cv-contact span { width: 60px; }
  .cv-name { font-size: 22pt; }
  .cv-list li { grid-template-columns: 1fr; gap: 2px; }
  .cv-when { padding-top: 0; }
}
