/* ===========================
   Resume Stylesheet
   Screen + Print
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f0f0f0;
}

/* --- Page wrapper (screen only) --- */
.page {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2.5rem 2.5rem 3rem;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

/* --- Print button --- */
.print-btn {
  display: block;
  margin: 0 0 1.5rem auto;
  padding: 0.4rem 1rem;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #444;
  cursor: pointer;
  transition: background 0.15s;
}
.print-btn:hover {
  background: #f5f5f5;
}

/* ===========================
   Header
   =========================== */
header {
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #111;
}

header .title {
  font-size: 1.05rem;
  color: #444;
  margin-top: 0.15rem;
}

header .contact {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
}

header .contact a {
  color: inherit;
  text-decoration: none;
}
header .contact a:hover {
  text-decoration: underline;
}

header .contact span + span::before {
  content: "·";
  margin-right: 0.45rem;
}

/* ===========================
   Sections
   =========================== */
section {
  margin-bottom: 1.4rem;
}

section h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a1a1a;
  border-bottom: 1.5px solid #d0d0d0;
  padding-bottom: 0.25rem;
  margin-bottom: 0.8rem;
}

/* ===========================
   Summary
   =========================== */
.summary-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #2a2a2a;
}

/* ===========================
   Experience entries
   =========================== */
article.entry {
  margin-bottom: 1rem;
  break-inside: avoid;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.entry-header .role {
  font-weight: 600;
  font-size: 0.97rem;
}

.entry-header .company {
  font-weight: 400;
  color: #333;
}

.entry-header .period {
  font-size: 0.85rem;
  color: #666;
  white-space: nowrap;
}

.entry ul {
  margin-top: 0.35rem;
  padding-left: 1.1rem;
  list-style: disc;
}

.entry ul li {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  color: #1a1a1a;
}

/* ===========================
   Education entries
   =========================== */
article.edu-entry {
  margin-bottom: 0.7rem;
  break-inside: avoid;
}

.edu-entry .degree {
  font-weight: 600;
  font-size: 0.97rem;
}

.edu-entry .school {
  color: #333;
}

.edu-entry .year {
  font-size: 0.85rem;
  color: #666;
}

/* ===========================
   Skills
   =========================== */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.skill-row {
  font-size: 0.9rem;
}

.skill-row .category {
  font-weight: 600;
}

/* ===========================
   Projects (optional)
   =========================== */
article.project-entry {
  margin-bottom: 0.9rem;
  break-inside: avoid;
}

.project-entry .project-title {
  font-weight: 600;
  font-size: 0.97rem;
}

.project-entry .project-title a {
  color: inherit;
  text-decoration: none;
}
.project-entry .project-title a:hover {
  text-decoration: underline;
}

.project-entry .project-desc {
  font-size: 0.9rem;
  margin-top: 0.2rem;
  color: #1a1a1a;
}

/* ===========================
   Print styles
   =========================== */
@media print {
  @page {
    size: A4;
    margin: 10mm 13mm;
  }

  html { font-size: 14.2px; }

  body {
    background: #fff;
    font-size: 9.6pt;
    line-height: 1.38;
  }

  header { margin-bottom: 0.9rem; }
  section { margin-bottom: 0.85rem; }
  section h2 { margin-bottom: 0.5rem; }
  article.entry { margin-bottom: 0.65rem; }
  article.project-entry { margin-bottom: 0.45rem; }
  .entry ul { margin-top: 0.2rem; }
  .entry ul li { margin-bottom: 0.1rem; }
  .summary-text { line-height: 1.5; }
  .skills-grid { gap: 0.15rem; }

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

  .print-btn {
    display: none;
  }

  /* Force black on white */
  * {
    color: #000 !important;
    background: transparent !important;
  }

  /* No link underlines in print */
  a {
    text-decoration: none;
  }

  /* Show href for external links */
  /* a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  } */

  section h2 {
    border-bottom-color: #888;
  }

  article.edu-entry,
  article.project-entry {
    break-inside: avoid;
  }

  /* Long entries may span pages; keep headers with their first bullets */
  article.entry {
    break-inside: auto;
  }

  .entry-header {
    break-after: avoid;
  }

  article.entry li {
    break-inside: avoid;
  }
}

/* --- Headline tagline & project meta --- */
header .title .tagline {
  color: #666;
}

.project-entry .project-meta {
  font-weight: 400;
  font-size: 0.85rem;
  color: #666;
}

.entry ul ul {
  margin-top: 0.2rem;
  list-style: circle;
}
