/* ---------------------------------------------------------------
   Patent Document Resume
   Visual system: formal legal document aesthetic with numbered
   claims, official seal, ruled sections, and serif typography.
   --------------------------------------------------------------- */

:root {
  /* Patent document palette: white paper, black ink, ruled lines */
  --ink: #0a0a0a;
  --ink-muted: #3d3d3d;
  --bg: #ffffff;
  --surface: #f5f5f5;
  --rule: #0a0a0a;
  --accent: #0a0a0a;
  --accent-ink: #ffffff;
  --seal-color: #0a0a0a;

  --measure: 65ch;

  scrollbar-color: var(--rule) transparent;
  caret-color: var(--accent);
  color-scheme: light;
}

/* Dark mode preserves formal document aesthetic with inverted tones */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e6e0;
    --ink-muted: #b8b6b0;
    --bg: #1a1816;
    --surface: #252320;
    --rule: #d8d6d0;
    --accent: #d8d6d0;
    --accent-ink: #1a1816;
    --seal-color: #d8d6d0;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
  line-height: 1.2;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------
   Document Structure
   --------------------------------------------------------------- */

.resume-document {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3.5rem 4rem 4rem;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .resume-document {
    padding: 2rem 1.5rem;
  }
}

/* ---------------------------------------------------------------
   Document Header
   --------------------------------------------------------------- */

.document-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 2.5rem;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.candidate-name {
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin: 0;
  line-height: 1;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.candidate-title {
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  margin: 0;
  text-transform: uppercase;
}

.official-seal {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  color: var(--seal-color);
}

@media (max-width: 768px) {
  .document-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .candidate-name {
    font-size: 2.25rem;
  }

  .candidate-title {
    font-size: 1rem;
  }

  .official-seal {
    width: 90px;
    height: 90px;
    justify-self: end;
  }
}

/* ---------------------------------------------------------------
   Document Sections
   --------------------------------------------------------------- */

.document-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.document-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-heading {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 1.25rem 0;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.section-number {
  font-size: 1.25rem;
  font-weight: 700;
  min-width: 2rem;
}

/* ---------------------------------------------------------------
   Summary Section
   --------------------------------------------------------------- */

.summary-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  max-width: var(--measure);
}

/* ---------------------------------------------------------------
   Technical Expertise Section
   --------------------------------------------------------------- */

.expertise-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.expertise-category {
  display: grid;
  grid-template-columns: 11rem 0.5rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.category-label {
  font-weight: 700;
  font-size: 1rem;
}

.category-label::after {
  content: ":";
}

.category-items {
  margin: 0;
  font-size: 1rem;
  max-width: var(--measure);
}

@media (max-width: 768px) {
  .expertise-category {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .category-label::after {
    content: "";
  }
}

/* ---------------------------------------------------------------
   Professional Experience Section
   --------------------------------------------------------------- */

.experience-entry {
  margin-bottom: 2rem;
}

.experience-entry:last-child {
  margin-bottom: 0;
}

.position-header {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.date-range {
  font-weight: 700;
}

.company-position {
  font-weight: 700;
}

.achievement-list {
  margin: 0;
  padding-left: 1.25rem;
  list-style-type: disc;
}

.achievement-list li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
  max-width: var(--measure);
}

.achievement-list li:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------
   Education Section
   --------------------------------------------------------------- */

.education-entry {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.degree-info {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.year {
  font-weight: 700;
  display: inline-block;
  min-width: 3rem;
}

/* ---------------------------------------------------------------
   Contact Information Section
   --------------------------------------------------------------- */

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 2rem;
}

.contact-info p {
  margin: 0;
  font-size: 1rem;
}

.contact-info strong {
  font-weight: 700;
}

@media (max-width: 768px) {
  .contact-info {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* ---------------------------------------------------------------
   Print Styles
   --------------------------------------------------------------- */

@media print {
  :root {
    --bg: #ffffff;
    --ink: #000000;
    --rule: #000000;
    --seal-color: #000000;
  }

  body {
    background: #fff;
    color: #000;
  }

  .resume-document {
    padding: 0.5in 0.75in;
    max-width: none;
  }

  .document-section {
    page-break-inside: avoid;
  }

  .experience-entry {
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.875rem;
    color: #666;
  }
}
@media (max-width: 480px) {
  /* --impeccable-mobile-pad */
  body { padding-inline: max(1rem, 16px); }
  .container, [class*="container"], section, header, footer, nav, main, article {
    padding-inline: max(1rem, 16px);
  }
}
/* --impeccable-measure */
p, li, dt, dd, blockquote, figcaption, td, th { max-width: var(--measure); }
