/* ==========================================================================
   Resume page: a white "paper" on the site's dark background.
   The print styles at the bottom produce the A4 PDF (Sagar-Mali-Resume.pdf).
   ========================================================================== */

.resume-page {
  --paper-text: #24222f;
  --paper-muted: #5f5c70;
  --paper-line: #e6e3f0;
  --paper-accent: #5b4bd8;
}

.resume-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px max(var(--gutter), calc((100% - 860px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 11, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.resume-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.25s;
}

.resume-back:hover {
  color: var(--text);
}

.resume-back svg,
.resume-bar .arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* The sheet */
.paper {
  max-width: 860px;
  margin: 12px auto 40px;
  padding: 56px 60px 60px;
  border-radius: 16px;
  background: #ffffff;
  color: var(--paper-text);
  font-size: 0.95rem;
  line-height: 1.55;
  box-shadow: 0 50px 140px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 120px -50px rgba(157, 140, 255, 0.5);
}

.paper ::selection {
  background: var(--paper-accent);
  color: #ffffff;
}

.paper a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #c9c3ee;
  text-underline-offset: 2px;
}

.paper a:hover {
  color: var(--paper-accent);
}

.cv-head {
  padding-bottom: 22px;
  border-bottom: 2px solid var(--paper-text);
}

.cv-head h1 {
  color: #13121c;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: -0.015em;
}

.cv-title {
  margin-top: 8px;
  color: var(--paper-accent);
  font-size: 1.02rem;
  font-weight: 700;
}

.paper .cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--paper-muted);
  font-size: 0.86rem;
}

.paper .cv-contact + .cv-contact {
  margin-top: 4px;
}

.cv-contact li:not(:last-child)::after {
  content: "·";
  margin: 0 10px;
  color: #b9b5cc;
}

.cv-contact a {
  text-decoration: none;
}

.cv-section {
  margin-top: 26px;
}

.cv-section h2 {
  margin-bottom: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--paper-line);
  color: var(--paper-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  break-after: avoid;
}

.cv-skills {
  display: grid;
  gap: 6px;
  margin: 0;
}

.cv-skills div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
}

.cv-skills dt {
  color: #13121c;
  font-weight: 700;
}

.cv-skills dd {
  margin: 0;
}

.cv-job + .cv-job {
  margin-top: 18px;
}

.cv-job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
  break-after: avoid;
}

.paper h3 {
  color: #13121c;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
}

.cv-meta {
  color: var(--paper-muted);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.paper h4 {
  margin: 10px 0 4px;
  color: #35324a;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.4;
  letter-spacing: 0;
  break-after: avoid;
}

.paper ul {
  margin: 4px 0 0;
  padding-left: 1.15em;
}

.paper li {
  margin: 3px 0;
  break-inside: avoid;
}

.paper li::marker {
  color: var(--paper-accent);
}

.cv-item + .cv-item {
  margin-top: 10px;
}

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

.cv-item p {
  color: var(--paper-text);
}

.cv-aside {
  color: var(--paper-muted);
  font-weight: 500;
}

.resume-foot {
  margin: 0 auto 48px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.resume-foot a {
  color: var(--text);
  text-decoration: none;
}

.resume-foot a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .paper {
    margin: 8px 12px 32px;
    padding: 30px 22px 34px;
    border-radius: 12px;
    font-size: 0.93rem;
  }

  .paper .cv-contact {
    flex-direction: column;
    gap: 2px;
  }

  .cv-contact li:not(:last-child)::after {
    content: none;
  }

  .cv-skills div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .cv-meta {
    white-space: normal;
  }
}

/* --------------------------------------------------------------------------
   Print / PDF (A4)
   -------------------------------------------------------------------------- */
@page {
  size: A4;
  margin: 14mm 15mm 14mm;
}

@media print {
  /* The site uses color-scheme: dark, which makes Chrome fill the page margins
     dark in the PDF. Paper should be white everywhere. */
  :root {
    color-scheme: light;
  }

  html,
  body {
    background: #ffffff !important;
  }

  .resume-bar,
  .resume-foot,
  .skip-link {
    display: none !important;
  }

  .paper {
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 10.4pt;
    line-height: 1.5;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .paper a {
    text-decoration: none;
  }

  .cv-head {
    padding-bottom: 14pt;
  }

  .cv-head h1 {
    font-size: 23pt;
  }

  .cv-title {
    margin-top: 5pt;
    font-size: 11.5pt;
  }

  .paper .cv-contact {
    margin-top: 9pt;
    font-size: 9.6pt;
  }

  .paper .cv-contact + .cv-contact {
    margin-top: 3pt;
  }

  .cv-section {
    margin-top: 17pt;
  }

  .cv-section h2 {
    margin-bottom: 8pt;
    padding-bottom: 5pt;
    font-size: 8.2pt;
  }

  .cv-skills {
    gap: 3pt;
  }

  .cv-skills div {
    grid-template-columns: 88pt minmax(0, 1fr);
    gap: 10pt;
  }

  .paper h3 {
    font-size: 10.8pt;
  }

  .cv-meta {
    font-size: 9.6pt;
  }

  .paper h4 {
    margin: 7pt 0 3pt;
    font-size: 10.2pt;
  }

  .paper li {
    margin: 2.5pt 0;
  }

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

  .cv-job + .cv-job {
    margin-top: 13pt;
  }

  .cv-item + .cv-item {
    margin-top: 8pt;
  }
}
