/* ===================================================
   Print-Friendly Styles - Ultra Compact 2-3 Page Resume
   Optimized for professional resume printing
   =================================================== */

@media print {
  /* === Page Setup === */
  @page {
    size: letter portrait;
    margin: 0.4in 0.5in;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    width: 100%;
    height: auto;
    background: white !important;
    color: #000 !important;
    font-size: 9pt;
    line-height: 1.2;
    margin: 0;
    padding: 0;
  }

  /* === Hide Non-Essential Elements === */
  .navbar,
  .scroll-down,
  .cheddar-console,
  .cheddar-console-toggle,
  .screen-pet,
  .jumbotron,
  #interest-galaxy-container,
  .experience-view-toggle,
  #journey-view,
  #journey-map-section,
  #journey-map-container,
  .galaxy-instructions,
  .galaxy-legend,
  .mode-toggle-notification,
  .pet-controls,
  button,
  .csce,
  p.lead,
  hr,
  .imagehover,
  .float,
  #interests,
  #languages-container,
  #tools-container,
  .profile-stats,
  #contact,
  .contact-card,
  .contact-cards-container {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Hide the h3 headers for Languages and Tools and HRs between them */
  #abilities h3:nth-of-type(2),
  #abilities h3:nth-of-type(3),
  #abilities hr,
  #skills-container ~ hr,
  #languages-container ~ hr {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Ensure languages and tools row containers take no space */
  #abilities .row#languages-container,
  #abilities .row#tools-container {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Show timeline view, it should be visible */
  #timeline-view,
  #timeline-view .experiences {
    display: block !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #timeline-view hr {
    display: none !important;
  }

  /* Ensure experience items are visible */
  .experiences .experience {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Hide older/less relevant experiences */
  #experiences .experience:nth-child(n+8) {
    display: none !important;
  }

  /* Hide leadership section */
  #experiences h3:last-of-type,
  #experiences h3:last-of-type ~ .experience {
    display: none !important;
  }

  /* === Remove All Animations, Shadows, Transitions === */
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  /* === Remove Backgrounds === */
  .background-white,
  .background-gray {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .container,
  #profile.container,
  #experiences.container,
  #abilities.container,
  #contact.container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* === Compact Spacing === */
  #profile {
    page-break-before: auto;
    margin: 0 !important;
    padding: 0 !important;
  }

  #experiences,
  #abilities {
    page-break-before: auto;
    margin: 0.08in 0 0.15in 0 !important;
    padding: 0 !important;
  }

  #experiences {
    page-break-before: auto;
    margin-top: 0.08in !important;
  }

  /* === Headers === */
  h1 {
    font-size: 18pt;
    font-weight: bold;
    color: #000 !important;
    text-align: center;
    margin: 0 0 4pt 0 !important;
    padding: 0 0 3pt 0 !important;
    border-bottom: 1.5pt solid #000;
  }

  h2 {
    font-size: 12pt;
    font-weight: bold;
    color: #000 !important;
    margin: 8pt 0 4pt 0 !important;
    padding: 0 0 2pt 0 !important;
    border-bottom: 1pt solid #000;
    page-break-after: avoid;
  }

  h3 {
    font-size: 10pt;
    font-weight: bold;
    color: #000 !important;
    margin: 6pt 0 3pt 0 !important;
    page-break-after: avoid;
  }

  h4 {
    font-size: 9pt;
    font-weight: bold;
    color: #000 !important;
    margin: 0 !important;
  }

  p {
    margin: 0 0 2pt 0 !important;
  }

  /* === Profile Section (Minimal) === */
  #profile {
    margin-bottom: 0 !important;
    padding: 0 !important;
  }

  /* Hide all wrappers around profile - ensure no space */
  .background-white:has(#profile) {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: visible !important;
  }

  #profile h2,
  #profile p.lead,
  #profile hr {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
  }

  #profile .row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12pt;
    margin: 0 !important;
    padding: 0 !important;
  }

  #profile .col-md-4 {
    width: auto !important;
    display: block !important;
    vertical-align: top;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide profile image completely - no space taken */
  #profile .col-md-4:nth-child(2) {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  #profile .col-md-4:nth-child(2) img {
    display: none !important;
  }

  /* Make About and Details side by side */
  #profile .col-md-4:first-child,
  #profile .col-md-4:last-child {
    flex: 1;
    text-align: left;
    font-size: 8pt;
  }

  #profile h3 {
    margin: 0 0 3pt 0 !important;
    padding: 0 !important;
    font-size: 9pt;
  }

  #profile p {
    font-size: 8pt;
    line-height: 1.2;
    margin: 0 !important;
    padding: 0 !important;
  }

  .profile-details {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 8pt;
  }

  .profile-details dt {
    font-weight: bold;
    display: inline;
    margin-right: 3pt;
  }

  .profile-details dd {
    display: inline;
    margin: 0;
  }

  .profile-details dd::after {
    content: '';
    display: block;
    margin-bottom: 1pt;
  }

  /* === Experiences Section (Ultra Compact) === */
  #experiences .experience {
    margin-bottom: 5pt !important;
    padding: 3pt 0 3pt 6pt !important;
    border-left: 1.5pt solid #000;
    page-break-inside: avoid;
  }

  #experiences .experience::before,
  #experiences .experience::after {
    display: none !important;
  }

  #experiences .experience .row {
    display: block !important;
  }

  #experiences .experience .col-md-4,
  #experiences .experience .col-md-8 {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #experiences .experience h4 {
    display: inline;
    font-size: 9pt;
    font-weight: bold;
    margin: 0;
  }

  .experience-period {
    display: inline;
    font-size: 7.5pt;
    font-weight: normal;
    color: #333 !important;
    margin-left: 4pt;
  }

  .experience-period::before {
    content: " (";
  }

  .experience-period::after {
    content: ")";
  }

  #experiences .experience strong {
    display: inline;
    font-weight: bold;
    margin: 0;
    font-size: 8.5pt;
  }

  #experiences .experience strong::before {
    content: " — ";
  }

  #experiences .experience p {
    font-size: 7.5pt;
    line-height: 1.2;
    margin: 1pt 0 0 0 !important;
  }

  .experience-details {
    font-size: 7pt;
    margin-top: 1pt !important;
  }

  .experience-details > span {
    display: inline;
    margin-right: 6pt;
  }

  .experience-details .seperator {
    display: inline;
  }

  .experience-details i {
    display: none;
  }

  .experience-details a {
    color: #000 !important;
    text-decoration: none;
  }

  .experience-details a::after {
    content: "";
  }

  .hidden-phone {
    display: inline !important;
    max-height: none !important;
  }

  /* === Abilities Section (Compact Two Columns - Skills Only) === */
  #abilities {
    page-break-before: auto;
    margin-bottom: 0.1in !important;
  }

  #abilities .row {
    display: block !important;
    column-count: 2;
    column-gap: 12pt;
  }

  #abilities .col-md-6 {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    break-inside: avoid-column;
  }

  /* Only show the first skills container */
  #abilities #skills-container {
    display: block !important;
  }

  .skill-list {
    list-style: none;
    margin: 0 0 6pt 0 !important;
    padding: 0 !important;
    break-inside: avoid-column;
  }

  .skill-list li {
    margin-bottom: 2pt !important;
    padding: 1pt 2pt !important;
    background: transparent !important;
    border: none !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .skill-list li::before {
    display: none !important;
  }

  .skill-title {
    display: flex;
    justify-content: space-between;
    font-size: 7.5pt;
    margin-bottom: 1pt;
  }

  .skill-title span:first-child {
    font-weight: 600;
  }

  .skill-percent {
    font-weight: bold;
    color: #000 !important;
    font-size: 7pt;
  }

  .skill-bar {
    height: 3pt;
    background: #d0d0d0 !important;
    border-radius: 1.5pt;
    position: relative;
  }

  .skill-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--fill, 0%) !important;
    background: #000 !important;
    border-radius: 1.5pt;
  }

  .skill-bar::after {
    display: none !important;
  }

  .prestige-stars {
    display: none !important;
  }

  /* === Links === */
  a {
    color: #000 !important;
    text-decoration: none;
  }

  a[href^="http"]::after,
  a[href^="mailto"]::after {
    content: "";
  }

  /* === Ensure Everything Fits === */
  .skill-list li.scroll-animated,
  .skill-list li {
    opacity: 1 !important;
    transform: none !important;
  }

  /* === Remove extra spacing === */
  .row {
    margin: 0 !important;
  }

  .col-md-4,
  .col-md-6,
  .col-md-8 {
    padding: 0 !important;
  }

  /* === Add header with name on each page === */
  @page {
    @top-center {
      content: "Adrian Cheddar Ordorica";
      font-size: 8pt;
      font-weight: bold;
    }
  }
}
