/* Resume - Paper stack effect */
.paper-stack {
  position: relative;
  margin: 2rem auto;
  max-width: 100%;
}

.paper-shadow {
  position: absolute;
  inset: 0;
  background: #e3ded6;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

.paper-shadow:nth-child(1) {
  transform: rotate(1.5deg) translate(4px, 4px);
}

.paper-shadow:nth-child(2) {
  transform: rotate(-1deg) translate(-3px, 6px);
  background: #ebe7e0;
}

.dark .paper-shadow {
  background: #282a2e;
}

.dark .paper-shadow:nth-child(2) {
  background: #232527;
}

.paper {
  position: relative;
  background: #faf8f5;
  padding: 3rem;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dark .paper {
  background: #1d1f21;
  box-shadow: 0 2px 8px rgb(0 0 0 / 40%);
}

.resume-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0 1rem;
  box-sizing: border-box;
}

.resume-container .paper-stack {
  width: 900px;
  max-width: 100%;
  position: relative;
}

.resume-download {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
}

.resume-download:hover {
  background: var(--accent-secondary);
}

.resume-nav {
  background: var(--accent);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.resume-nav:hover:not(:disabled) {
  background: var(--accent-secondary);
}

.resume-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.resume-page {
  display: none;
}

.resume-page.active {
  display: block;
}

.page-indicator {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.resume-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent);
}

.resume-header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.resume-header .tagline {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.resume-header .contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.resume-section {
  margin-bottom: 2rem;
}

.resume-section h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.job {
  margin-bottom: 1.5rem;
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.job-header h3 {
  font-size: 1rem;
  margin: 0;
}

.job-header .company {
  color: var(--accent-secondary);
}

.job-header .company::before {
  content: "@ ";
}

.job-header .dates {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
}

.job-header .location {
  width: 100%;
  font-size: 0.85rem;
  color: var(--muted);
}

.job ul {
  margin: 0;
  padding-left: 1.25rem;
}

.job li {
  margin: 0.25rem 0;
  color: var(--fg);
}

.job p {
  margin: 0.25rem 0;
  color: var(--fg);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill {
  background: var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
}

.education h3 {
  font-size: 1rem;
  margin: 0;
}

.education .school,
.education .dates {
  color: var(--muted);
  font-size: 0.9rem;
}

.education .school::after {
  content: " · ";
}

.education {
  margin-bottom: 1rem;
}

@media (width <= 600px) {
  .resume-container {
    overflow-x: hidden;
    padding: 0 0.5rem;
  }

  .paper-shadow {
    display: none;
  }

  .paper {
    padding: 1.5rem 1rem;
    border-radius: 0;
  }

  .resume-header h1 {
    font-size: 1.5rem;
  }

  .resume-header .tagline {
    font-size: 1rem;
  }

  .resume-header .contact {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .resume-header .contact a {
    word-break: break-all;
  }

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

  .job-header .dates {
    margin-left: 0;
  }

  .resume-section h2 {
    font-size: 1rem;
  }

  .job-header h3 {
    font-size: 0.95rem;
  }

  .skills {
    gap: 0.4rem;
  }

  .skill {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
  }
}

@media (width <= 1024px) {
  .resume-container {
    flex-direction: column;
    gap: 1rem;
  }

  .resume-container .paper-stack {
    order: 1;
  }

  .resume-nav {
    position: fixed;
    bottom: 1.5rem;
    z-index: 100;
    box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
  }

  .resume-nav.prev {
    left: 1.5rem;
  }

  .resume-nav.next {
    right: 1.5rem;
  }
}

/* Print styles for resume PDF download */
@media print {
  /* Hide all site chrome - everything except main */
  body > *:not(main) {
    display: none !important;
  }

  .resume-nav,
  .resume-download,
  .page-indicator,
  .paper-shadow,
  #chat-trigger {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    font-size: 9pt;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
  }

  .resume-container {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .resume-container .paper-stack {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    position: static !important;
  }

  .paper {
    background: #fff !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Show all pages, no page breaks */
  .resume-page {
    display: block !important;
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  /* Hide "Experience (continued)" since it's one page now */
  .experience-continued {
    display: none !important;
  }

  /* Compact header */
  .resume-header {
    border-bottom-color: #333 !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.5rem !important;
  }

  .resume-header h1 {
    color: #000 !important;
    font-size: 1.4rem !important;
    margin-bottom: 0.1rem !important;
  }

  .resume-header .tagline {
    color: #555 !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.4rem !important;
  }

  .resume-header .contact {
    color: #555 !important;
    font-size: 0.75rem !important;
    gap: 1rem !important;
  }

  /* Compact sections */
  .resume-section {
    margin-bottom: 0.5rem !important;
  }

  .resume-section h2 {
    color: #333 !important;
    border-bottom-color: #ccc !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.4rem !important;
    padding-bottom: 0.1rem !important;
  }

  /* Compact jobs */
  .job {
    margin-bottom: 0.5rem !important;
  }

  .job-header {
    margin-bottom: 0.15rem !important;
    gap: 0.3rem !important;
  }

  .job-header h3 {
    font-size: 0.85rem !important;
  }

  .job-header .company {
    color: #444 !important;
    font-size: 0.85rem !important;
  }

  .job-header .dates,
  .job-header .location {
    color: #555 !important;
    font-size: 0.7rem !important;
  }

  .job ul {
    margin: 0 !important;
    padding-left: 1rem !important;
  }

  .job li {
    color: #000 !important;
    margin: 0.05rem 0 !important;
    line-height: 1.3 !important;
  }

  .job p {
    color: #000 !important;
    margin: 0.05rem 0 !important;
    line-height: 1.3 !important;
  }

  /* Compact skills */
  .skills {
    gap: 0.3rem !important;
  }

  .skill {
    background: #eee !important;
    color: #000 !important;
    font-size: 0.7rem !important;
    padding: 0.15rem 0.5rem !important;
  }

  /* Compact education */
  .education {
    margin-bottom: 0.3rem !important;
  }

  .education h3 {
    font-size: 0.85rem !important;
  }

  .education .school,
  .education .dates {
    color: #555 !important;
    font-size: 0.75rem !important;
  }

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

  @page {
    margin: 1cm;
    size: letter;
  }
}
