/* Resume — recruiter-scan layout, black & white, print & PDF ready */

:root {
  --ink: #111;
  --muted: #3a3a3a;
  --faint: #5a5a5a;
  --line: #c8c8c8;
  --line-soft: #e4e4e4;
  --wash: #f4f4f4;
  --sheet-w: 794px;
  --sheet-pad-x: 42px;
  --sheet-pad-y: 0;
  --font-body: Arial, Helvetica, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body.studio {
  margin: 0;
  min-height: 100vh;
  background: #d8d8d8;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 11pt;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.studio-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.studio-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.studio-bar a,
.studio-bar button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.studio-bar .gold {
  background: #111;
  color: #fff;
  border-color: #111;
  font-weight: 600;
}

.preview-pane {
  padding: 1.5rem;
  overflow: auto;
  min-height: calc(100vh - 58px);
}

.sheet {
  width: var(--sheet-w);
  max-width: 100%;
  margin: 0 auto 2rem;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  font-family: var(--font-body);
  font-size: 10.25pt;
  line-height: 1.48;
  padding: 0 0 28px;
  overflow: hidden;
}

/* ── Masthead: first thing a recruiter sees ── */
.resume-header {
  margin-bottom: 0;
}

.masthead {
  background: #111;
  color: #fff;
  padding: 22px var(--sheet-pad-x) 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.resume-header h1 {
  margin: 0;
  font-size: 26pt;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.05;
}

.resume-header .role {
  margin: 0.35rem 0 0;
  font-size: 8.75pt;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  max-width: 28rem;
  line-height: 1.4;
}

.stack-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.stack-chips li {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
}

.contact-strip {
  list-style: none;
  margin: 0;
  padding: 10px var(--sheet-pad-x);
  background: #1c1c1c;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.contact-strip li {
  font-size: 8.75pt;
  color: #e8e8e8;
}

.contact-strip a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-strip .label {
  font-weight: 700;
  color: #fff;
  margin-right: 0.28rem;
}

.contact-strip .label::after { content: ":"; }

.signal-row {
  list-style: none;
  margin: 0;
  padding: 12px var(--sheet-pad-x);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  background: var(--wash);
  border-bottom: 1px solid var(--line-soft);
}

.signal-row li {
  font-size: 8pt;
  color: var(--faint);
  line-height: 1.3;
  padding-left: 0.7rem;
  border-left: 2px solid #111;
}

.signal-row b {
  display: block;
  font-size: 10.5pt;
  color: #000;
  font-weight: 700;
  margin-bottom: 0.08rem;
}

.resume-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 18px var(--sheet-pad-x) 0;
}

.section-block { margin: 0; }

.section-block > h2 {
  margin: 0 0 0.55rem;
  font-size: 8.25pt;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: #111;
  padding: 0.38rem 0.65rem;
  display: inline-block;
}

.profile-text {
  margin: 0;
  color: var(--muted);
  font-size: 10pt;
  line-height: 1.58;
}

.skill-rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.skill-line {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 0.6rem;
  align-items: start;
}

.skill-label {
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #000;
  padding-top: 0.28rem;
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.skill-list li {
  font-size: 8pt;
  font-weight: 600;
  color: #111;
  background: var(--wash);
  border: 1px solid #ccc;
  padding: 0.2rem 0.48rem;
  line-height: 1.3;
}

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.edu-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.edu-degree {
  margin: 0 0 0.12rem;
  font-size: 10.5pt;
  font-weight: 700;
  color: #000;
}

.edu-school {
  margin: 0;
  font-size: 9.5pt;
  color: var(--faint);
}

.edu-meta {
  margin: 0.15rem 0 0;
  font-size: 9.25pt;
  font-weight: 700;
  color: #000;
}

.edu-year {
  margin: 0;
  font-size: 9pt;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
  background: var(--wash);
  border: 1px solid #ccc;
  padding: 0.22rem 0.5rem;
}

.job,
.project {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0 0.85rem 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  border-left: 3px solid #111;
  break-inside: avoid;
  page-break-inside: avoid;
}

.job:last-child,
.project:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.job-head,
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.job-title h3,
.project-head h3 {
  margin: 0;
  font-size: 11.5pt;
  font-weight: 700;
  color: #000;
  line-height: 1.25;
}

.job-company {
  margin: 0.15rem 0 0;
  font-size: 9.25pt;
  color: var(--faint);
}

.job-date,
.project-period {
  flex-shrink: 0;
  font-size: 8pt;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
  background: var(--wash);
  border: 1px solid #ccc;
  padding: 0.22rem 0.5rem;
}

.job p,
.project p {
  margin: 0.25rem 0 0;
  font-size: 9.75pt;
  color: var(--muted);
  line-height: 1.5;
}

.job ul {
  margin: 0.3rem 0 0;
  padding-left: 1.05rem;
  color: var(--muted);
}

.job li {
  font-size: 9.75pt;
  margin: 0.22rem 0;
  line-height: 1.45;
}

.job li::marker { color: #111; font-weight: 700; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin: 0.2rem 0 0.15rem;
}

.tags span {
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000;
  background: var(--wash);
  border: 1px solid #ccc;
  padding: 0.16rem 0.42rem;
}

@media (max-width: 640px) {
  .preview-pane { padding: 1rem; }

  .sheet { width: 100%; }

  .masthead,
  .contact-strip,
  .signal-row,
  .resume-body {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .masthead,
  .edu-row,
  .job-head,
  .project-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .stack-chips { justify-content: flex-start; }

  .signal-row,
  .skill-line {
    grid-template-columns: 1fr;
  }

  .job-date,
  .project-period,
  .edu-year { white-space: normal; }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  .studio-bar { display: none !important; }

  body.studio { background: #fff; }

  .preview-pane {
    display: block;
    background: #fff;
    padding: 0;
    overflow: visible;
  }

  .sheet {
    width: 100%;
    max-width: none;
    margin: 0;
    box-shadow: none;
    padding-bottom: 0;
  }

  .job,
  .project,
  .skill-group {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
