/* Reset and base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.5;
  color: #000;
  background: #5a5a5a;
  min-height: 100vh;
}

/* PDF-style toolbar */
.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #4a4a4a;
  color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 100;
  gap: 12px;
}
.toolbar-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.toolbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
}
.toolbar-zoom {
  min-width: 44px;
  text-align: center;
  font-size: 13px;
  cursor: pointer;
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.toolbar-btn {
  background: transparent;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
  border-radius: 4px;
}
.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.toolbar-btn-icon {
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.toolbar-btn-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.toolbar-btn-icon:hover svg {
  stroke: currentColor;
}

/* Viewer: grey area with centered paper */
.viewer {
  padding-top: 48px;
  min-height: 100vh;
  background: #5a5a5a;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-bottom: 2rem;
}
.page-wrap {
  width: 8.5in;
  transform-origin: top center;
  margin-top: 1.5rem;
}

/* Single-page container: fixed-width paper (does not scale down) */
.page {
  width: 8.5in;
  min-width: 8.5in;
  min-height: 11in;
  margin: 0;
  padding: 0.75in 0.6in;
  display: flex;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.column-left {
  flex: 0 0 62%;
  padding-right: 1.5rem;
}

.column-divider {
  flex: 0 0 1px;
  background: #ccc;
  min-height: 0;
}

.column-right {
  flex: 0 0 calc(38% - 1px);
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  margin-bottom: 1.25rem;
}

.name {
  font-size: 26pt;
  font-weight: 700;
  margin: 0 0 0.15em 0;
  letter-spacing: -0.02em;
}

.title {
  font-size: 16pt;
  font-weight: 600;
  margin: 0 0 0.75em 0;
  color: #000;
  line-height: 1.4;
}


.contact {
  font-size: 10pt;
  margin: 0;
}

.contact p {
  margin: 0.15em 0;
}

.contact-inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 13pt;
}

.contact-location {
  margin: 0.35em 0 0 0;
  font-size: 10pt;
  text-align: left;
}

.contact-divider {
  color: #999;
  font-weight: 400;
  user-select: none;
}

.contact a {
  color: #1a4d8c;
  text-decoration: underline;
}

.contact a:hover {
  color: #0d3a6e;
}

/* Bio */
.bio {
  margin-bottom: 1.6rem;
}

.bio p {
  margin: 0 0 0.75em 0;
  text-align: left;
}

.bio p:last-child {
  margin-bottom: 0;
}

/* Section headings (left column) */
section h2 {
  font-size: 12pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.5em 0;
  color: #000;
}

section h3 {
  font-size: 11pt;
  font-weight: 700;
  margin: 1em 0 0.35em 0;
  color: #000;
}

section h3:first-of-type {
  margin-top: 0.5em;
}

section ul {
  margin: 0 0 1em 0;
  padding-left: 1.25em;
}

section li {
  margin-bottom: 0.35em;
}

section p {
  margin: 0.25em 0;
}

/* Right column: photo */
.photo-wrap {
  margin-bottom: 1.25rem;
}

.photo {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 12px;
}

/* Right column: capabilities & credentials */
.capabilities {
  margin-bottom: 1rem;
}

.credentials {
  flex: 1;
}

.credentials h3:first-of-type {
  margin-bottom: 0.6em;
}

.credentials p {
  font-size: 11pt;
  margin: 0.2em 0;
}

.credentials ul,
.credentials li {
  font-size: 10pt;
}

/* Footers */
.footer-left {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  font-size: 8pt;
  color: #333;
}

.footer-left p {
  margin: 0.2em 0;
}

.print-hint {
  margin-top: 0.75rem !important;
  font-size: 9pt;
  color: #555;
}

.print-hint button {
  font-size: 9pt;
  padding: 0.25em 0.5em;
  cursor: pointer;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.print-hint button:hover {
  background: #e5e5e5;
}

.footer-left a {
  color: #1a4d8c;
  text-decoration: underline;
}

.footer-right {
  margin-top: auto;
  padding-top: 1rem;
}

.peer-recognition p {
  font-size: 10pt;
}

.peer-recognition p + p {
  margin-top: 1em;
}

.brand {
  font-size: 14pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  color: #000;
}

/* ----- Mobile: fit page like a PDF ----- */
/* Scale so 8.5in (816px) page fits in viewport; scale ≈ 100vw/816 per breakpoint */
@media (max-width: 900px) {
  .page-wrap {
    transform: scale(0.95);
    transform-origin: top center;
    margin-top: 0.5rem;
  }
}

@media (max-width: 768px) {
  .page-wrap {
    transform: scale(0.75);
    transform-origin: top center;
    margin-top: 0.5rem;
  }

  .viewer {
    padding-top: 56px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .toolbar {
    padding: 8px 10px;
  }

  .toolbar-title {
    font-size: 13px;
    max-width: none;
  }

  .toolbar-center {
    display: none;
  }

  #print-btn {
    display: none;
  }

  .toolbar-btn {
    padding: 6px 8px;
    font-size: 16px;
  }

  .toolbar-btn-icon {
    padding: 6px;
  }

  .toolbar-btn-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .page-wrap {
    transform: scale(0.47); /* ~384/816 so page fits ~400px width */
    transform-origin: top center;
  }
}

@media (max-width: 380px) {
  .page-wrap {
    transform: scale(0.42);
    transform-origin: top center;
  }
}

/* ----- Print / PDF ----- */
@media print {
  body {
    background: #fff;
    font-size: 10pt;
  }

  .toolbar {
    display: none;
  }
  .viewer {
    padding-top: 0;
    background: #fff;
    padding-bottom: 0;
  }
  .page-wrap {
    transform: none !important;
    margin-top: 0;
  }
  .page {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: auto;
    padding: 0.5in 0.5in;
    box-shadow: none;
  }

  .column-left {
    padding-right: 1rem;
  }

  .column-right {
    padding-left: 1rem;
  }

  .name {
    font-size: 24pt;
  }

  .title {
    font-size: 14pt;
  }

  .contact a {
    color: #1a4d8c;
  }

  .footer-left a {
    color: #1a4d8c;
  }

  .photo {
    max-width: 240px;
  }

  /* Avoid breaking inside key blocks */
  .header,
  .photo-wrap,
  .capabilities,
  .credentials {
    break-inside: avoid;
  }

  .print-hint {
    display: none;
  }
}
