/* Curriculum vitae page. Inherits every colour and font token from styles.css;
   this file only lays out the document and defines how it prints on A4. */

.cv-body { background: var(--bg); }
.cv-site-header { position: static; background: var(--bg); }
.cv-site-header .header-email { text-transform: uppercase; }

.cv-page { max-width: 62rem; margin: 0 auto; padding: 3.5rem 6vw 5rem; }

.cv-masthead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; align-items: start; padding-bottom: 2rem; border-bottom: 2px solid var(--text); }
.cv-masthead h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.cv-masthead .eyebrow { margin: 0 0 .9rem; }
.cv-affiliation { margin: 1rem 0 0; max-width: 34rem; color: var(--muted); font-size: 1rem; }
.cv-contact { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin: 1.5rem 0 0; padding: 0; font-size: .72rem; letter-spacing: .03em; }
.cv-contact a { color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: .15rem; transition: color .2s ease, border-color .2s ease; }
.cv-contact a:hover, .cv-contact a:focus-visible { color: var(--accent); border-color: var(--accent); }

.cv-masthead-side { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.cv-portrait { width: 7.5rem; height: 7.5rem; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.cv-print { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.cv-print:hover, .cv-print:focus-visible { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.cv-notice { margin: 1.5rem 0 0; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: .4rem; color: var(--muted); font-size: .85rem; }

.cv-section { padding-top: 2.75rem; }
.cv-section-title { display: flex; align-items: baseline; gap: .8rem; margin: 0 0 1.25rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); color: var(--accent); font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.cv-section-count { color: var(--muted); letter-spacing: .06em; }

.cv-profile p { margin: 0 0 .9rem; max-width: 52rem; color: var(--muted); font-size: .92rem; line-height: 1.65; }
.cv-profile p:last-child { margin-bottom: 0; }

/* One shared row shape for education, experience, patents and projects: a
   narrow left rail for the date, and the detail block beside it. */
.cv-entries { display: flex; flex-direction: column; }
.cv-entry { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.cv-entry:first-child { border-top: 0; padding-top: 0; }
.cv-entry-date { padding-top: .15rem; color: var(--muted); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
.cv-entry-body h3 { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.35; }
.cv-entry-logo { flex: none; width: 1.5rem; height: 1.5rem; padding: .1rem; border: 1px solid var(--line); border-radius: 50%; background: #fff; object-fit: contain; }
.cv-entry-body p { margin: .35rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.cv-label { display: inline-block; min-width: 5.5rem; color: var(--accent); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.cv-tag-row { margin-top: .5rem; color: var(--muted); font-size: .68rem; letter-spacing: .04em; }

.cv-pub-group { padding-top: 1.6rem; }
.cv-pub-group:first-child { padding-top: 0; }
.cv-group-title { margin: 0 0 .85rem; color: var(--text); font-size: .82rem; font-weight: 600; letter-spacing: .02em; }
.cv-pub-list { list-style: none; margin: 0; padding: 0; }
.cv-pub { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 1rem; padding: .95rem 0; border-top: 1px solid var(--line); }
.cv-pub-marker { padding-top: .1rem; color: var(--accent); font-size: .7rem; }
.cv-pub-authors { margin: 0; color: var(--muted); font-size: .82rem; }
.cv-pub-authors strong { color: var(--text); font-weight: 600; }
.cv-pub-title { margin: .3rem 0 .35rem; font-size: .98rem; font-weight: 600; line-height: 1.4; }
.cv-pub-venue { margin: 0; color: var(--muted); font-size: .85rem; }
.cv-pub-year { margin-left: .35rem; color: var(--accent); font-size: .74rem; }
.cv-pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; margin: .45rem 0 0; font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; }
.cv-pub-status { color: var(--muted); }
.cv-link { display: inline-flex; align-items: center; gap: .2rem; color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.cv-link:hover, .cv-link:focus-visible { border-color: var(--accent); }

.cv-skills { margin: 0; color: var(--muted); font-family: var(--mono); font-size: .8rem; letter-spacing: .03em; }

.cv-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; }

@media (max-width: 760px) {
  .cv-page { padding: 2.25rem 6vw 3.5rem; }
  .cv-masthead { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .cv-masthead-side { flex-direction: row; align-items: center; justify-content: flex-start; }
  .cv-portrait { width: 4.5rem; height: 4.5rem; }
  .cv-entry, .cv-pub { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .cv-entry-date, .cv-pub-marker { padding-top: 0; }
}

/* Print: one clean A4 document, always on white, with the site chrome removed
   and every link's address spelled out because paper cannot be clicked. */
@media print {
  @page { size: A4; margin: 15mm 14mm; }

  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #ffffff; --surface: #ffffff; --text: #101114; --muted: #444852;
    --line: #c8ccd4; --accent: #062f78; --accent-soft: rgba(6, 47, 120, .07);
  }

  body { font-size: 10.5pt; }
  .site-header, .cv-print, .cv-notice, .external-mark { display: none !important; }
  .cv-page { max-width: none; margin: 0; padding: 0; }

  .cv-masthead { gap: 1.5rem; padding-bottom: 1rem; }
  .cv-masthead h1 { font-size: 26pt; }
  .cv-portrait { width: 22mm; height: 22mm; }
  .cv-section { padding-top: 7mm; }
  .cv-section-title { break-after: avoid; }
  .cv-group-title { break-after: avoid; }
  .cv-entry, .cv-pub { break-inside: avoid; padding: 2.5mm 0; }
  .cv-profile p { color: #333740; }

  .cv-link { border: 0; }
  .cv-link::after { content: " " attr(data-url); color: #5b6070; font-size: 7pt; letter-spacing: 0; text-transform: none; word-break: break-all; }
  .cv-contact a { border: 0; }
  .cv-foot { margin-top: 8mm; }
}
