/**
 * ATS-Friendly Resume Styles
 * Single-column layout, standard fonts, clean structure for optimal parsing
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #16211c;
  --muted: #526159;
  --accent: #18794e;
  --accent-soft: #e7f6ed;
  --rule: #cfd9d3;
}

body {
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.4;
  color: var(--ink);
  background: #eef3ef;
  padding: 1.5rem;
  max-width: 8.5in;
  margin: 0 auto;
}

.resume {
  max-width: 8.5in;
  background: #fff;
  padding: 0.55in;
  box-shadow: 0 18px 55px rgba(18, 42, 29, 0.13);
}

/* Header */
.header {
  text-align: center;
  padding-bottom: 1rem;
  border-top: 5px solid var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-top: 0.8rem;
  margin-bottom: 1rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.2rem;
}

.header .title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.contact {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.contact a {
  color: var(--ink);
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

.contact .sep {
  margin: 0 0.4rem;
  color: #999;
}

/* Sections */
.section {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--rule);
}

/* Summary */
.summary-text {
  font-size: 11pt;
  line-height: 1.5;
  margin-bottom: 0;
}

.summary-text a {
  color: #1a1a1a;
  text-decoration: underline;
}

.summary-bullets {
  list-style-type: disc;
  margin-left: 1.25rem;
  padding-left: 0.25rem;
}

.summary-bullets li {
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.summary-bullets a {
  color: #1a1a1a;
  text-decoration: underline;
}

/* Skills - Compact Layout */
.skills-section {
  margin-bottom: 1.25rem;
}

.skills-compact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skills-row {
  font-size: 10.5pt;
  line-height: 1.35;
}

.skills-row strong {
  font-weight: 700;
  margin-right: 0.3rem;
}

strong {
  font-weight: 700;
}

/* Jobs */
.job {
  margin-bottom: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #eee;
}

.job:first-of-type {
  padding-top: 0;
  border-top: none;
}

.job:last-child {
  margin-bottom: 0;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.job h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.job .company {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.job-meta {
  text-align: right;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}

.job-meta .location {
  display: block;
  font-size: 0.85rem;
}

.tech-stack {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-style: italic;
}

.job ul,
.project ul {
  list-style-type: disc;
  margin-left: 1.25rem;
  padding-left: 0.25rem;
}

.job li,
.project li {
  margin-bottom: 0.3rem;
  line-height: 1.38;
}

/* Projects */
.project {
  margin-bottom: 0.85rem;
}

.project:last-child {
  margin-bottom: 0;
}

.project h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.project h3 a {
  color: var(--ink);
  text-decoration: none;
}

.project h3 a:hover {
  text-decoration: underline;
}

.project h3 .role-tag {
  font-weight: 500;
  color: var(--muted);
}

.featured-project {
  border-left: 3px solid var(--accent);
  padding-left: 0.65rem;
}

.project p {
  margin-bottom: 0.35rem;
  line-height: 1.38;
}

.project .tech-stack {
  margin-bottom: 0.3rem;
}

/* Print styles - single-column, two-page layout */
@media print {
  @page {
    size: letter;
    margin: 0.32in 0.4in 0.45in;

    @bottom-center {
      content: counter(page) " / " counter(pages);
      font-family: Arial, Helvetica, sans-serif;
      font-size: 8pt;
      color: #999;
    }
  }

  html {
    font-size: 13.5px;
  }

  html, body {
    margin: 0;
    padding: 0;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    padding: 0;
    font-size: 9.7pt;
    line-height: 1.27;
  }

  .resume {
    max-width: none;
    padding: 0;
    box-shadow: none;
  }

  .header {
    border-top-width: 3px;
    padding-top: 0.28rem;
    padding-bottom: 0.42rem;
    margin-bottom: 0.42rem;
  }

  .header .title {
    margin-bottom: 0.3rem;
  }

  .section {
    margin-bottom: 0.5rem;
  }

  .section-title {
    margin-bottom: 0.3rem;
    padding-bottom: 0.15rem;
  }

  .summary-text {
    font-size: 9.7pt;
    line-height: 1.27;
  }

  .skills-row {
    font-size: 9.7pt;
    line-height: 1.27;
  }

  .skills-section {
    margin-bottom: 0.5rem;
  }

  .skills-compact {
    gap: 0.18rem;
  }

  .job {
    margin-bottom: 0.38rem;
    padding-top: 0.34rem;
  }

  .job:first-of-type {
    padding-top: 0;
  }

  .job-header {
    margin-bottom: 0.2rem;
    break-after: avoid;
    page-break-after: avoid;
  }

  .tech-stack {
    margin-bottom: 0.25rem;
  }

  .job li,
  .project li {
    margin-bottom: 0.12rem;
    line-height: 1.27;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .project {
    margin-bottom: 0.5rem;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .projects-section {
    break-before: page;
    page-break-before: always;
  }

  .project h3 {
    margin-bottom: 0.15rem;
    break-after: avoid;
    page-break-after: avoid;
  }

  .project .tech-stack {
    margin-bottom: 0.2rem;
  }

  .page-break {
    page-break-before: always;
    margin: 0;
    padding: 0;
    height: 0;
    border: none;
  }

  a[href]::after {
    content: none !important;
  }

  a {
    color: #1a1a1a;
    text-decoration: none;
  }

  .contact .sep {
    color: #1a1a1a;
  }
}

/* Responsive */
@media screen and (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .job-header {
    flex-direction: column;
  }

  .job-meta {
    text-align: left;
  }
}
