/* Base and body */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: #222;
  background-color: #f9f9f9;
  margin: 0;
  padding: 20px;
}

/* Container */
.container {
  max-width: 700px;
  margin: 0 auto;
  background-color: #fff;
  padding: 30px 40px;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.05);
  border-radius: 8px;
}

/* Headings */
h1 {
  font-weight: 700;
  font-size: 2.8rem;
  margin-bottom: 0.3em;
  color: #111;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 0.8em;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.2em;
  color: #333;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5em;
  color: #444;
}

/* Address / Contact info */
address.contact {
  font-style: normal;
  margin-bottom: 2em;
  color: #555;
}

address.contact a {
  display: inline-block;
  margin-bottom: 8px;
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
}

address.contact a:hover,
address.contact a:focus {
  text-decoration: underline;
  outline: none;
}

address.contact a svg {
  margin-right: 6px;
  vertical-align: middle;
  fill: currentColor; /* match link color */
}

/* Sections */
.section {
  margin-bottom: 2.5em;
}

/* Lists */
ul {
  padding-left: 1.3em;
  margin-top: 0;
  color: #444;
}

ul li {
  margin-bottom: 0.35em;
}

/* Articles inside Experience */
section.section article {
  margin-bottom: 1.7em;
}

/* Links general */
a {
  color: #0077cc;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
  outline: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

@media print {
  /* Remove background and shadows for cleaner print */
  body, .container {
    background: white !important;
    box-shadow: none !important;
    color: black !important;
  }

  /* Adjust container width for print */
  .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }

  /* Remove links underline and colors, show URL in parentheses */
  a {
    color: black !important;
    text-decoration: none !important;
    border-bottom: none !important;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #444;
  }

  /* Hide any interactive elements or things not useful on paper */
  address.contact svg,
  address.contact a svg {
    display: none !important;
  }

  /* Remove spacing to fit better on page */
  h1,
  h2,
  h3 {
    color: black !important;
  }

  /* Avoid page breaks inside experience articles */
  section.section article {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 1.5em;
  }

  /* Remove margins for lists for tighter layout */
  ul {
    margin: 0 0 1em 1.2em;
  }

  /* Use system font for better print clarity */
  * {
    font-family: "Times New Roman", serif !important;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Ensure URLs can break */
  a::after {
    word-wrap: break-word;
    word-break: break-all;
  }

  /* Slightly reduce font size for better fit */
  body {
    font-size: 0.95rem;
  }

  /* Remove page padding */
  body,
  html {
    margin: 0;
    padding: 0;
  }

  /* Avoid breaking section titles from content */
  h2,
  h3 {
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Make sure long sections don’t split awkwardly */
  section.section {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}