/* Resume: Linear/Vercel-style one-column sheet on portfolio chrome */

:root {
  --resume-text: #1a1a1a;
  --resume-muted: #3d3d3d;
  --resume-soft: #5c5c5c;
  --resume-rule: #e5e5e5;
  --resume-accent: #176b52;
  --resume-link: #176b52;
  --resume-sheet-bg: #ffffff;
  --resume-page-bg: #0a0a0f;
}

.resume-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--resume-page-bg);
}

.resume-main {
  flex: 1;
  padding: 6rem 1.25rem 2.5rem;
}

.resume-page-inner {
  max-width: 920px;
  margin: 0 auto;
}

.resume-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
}

.resume-toolbar .btn {
  text-decoration: none;
  cursor: pointer;
  border: none;
  font: inherit;
}

.resume-toolbar button.btn {
  appearance: none;
  -webkit-appearance: none;
}

/* White A4-style sheet — no border on sheet itself */
.resume-sheet {
  max-width: 820px;
  margin: 0 auto;
  background: var(--resume-sheet-bg);
  color: var(--resume-text);
  border: none;
  border-radius: 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  padding: 2.15rem 2.15rem 2.25rem;
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 10.65px;
  line-height: 1.48;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.resume-sheet a {
  color: var(--resume-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(23, 107, 82, 0.35);
}

.resume-sheet a:hover {
  text-decoration-color: var(--resume-link);
}

/* Left-aligned header */
.resume-header {
  text-align: left;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--resume-rule);
}

.resume-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--resume-text);
  line-height: 1.15;
}

.resume-headline {
  margin: 0.32rem 0 0.45rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--resume-muted);
  line-height: 1.4;
}

.resume-contact {
  margin: 0;
  font-size: 9.5px;
  color: var(--resume-soft);
  line-height: 1.45;
}

.resume-contact a {
  color: var(--resume-link);
}

.resume-contact .sep {
  margin: 0 0.3rem;
  color: #c4c4c4;
}

/* Sections */
.resume-section {
  margin-top: 1.15rem;
}

.resume-section > h2 {
  margin: 0 0 0.45rem;
  padding-bottom: 0.18rem;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--resume-accent);
  border-bottom: 1px solid var(--resume-rule);
  break-after: avoid;
  page-break-after: avoid;
}

.resume-profile {
  margin: 0;
  font-size: 10.5px;
  color: var(--resume-muted);
  line-height: 1.48;
}

.resume-emphasis {
  font-weight: 600;
  color: var(--resume-text);
}

/* Core Skills: fixed-width label column via CSS grid */
.resume-skills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.resume-skills li {
  display: grid;
  grid-template-columns: 5.75rem 1fr;
  gap: 0.65rem;
  align-items: baseline;
  margin: 0;
  font-size: 10.25px;
  color: var(--resume-muted);
  line-height: 1.42;
}

.resume-skills .skill-label {
  font-weight: 600;
  color: var(--resume-text);
}

.resume-skills .skill-items {
  min-width: 0;
}

/* Entries */
.resume-entry,
.project-entry {
  margin-top: 1rem;
  break-inside: avoid;
  page-break-inside: avoid;
}

.resume-entry:first-of-type,
.project-entry:first-of-type {
  margin-top: 0.25rem;
}

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

.resume-org,
.project-name {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--resume-text);
  letter-spacing: 0.02em;
}

.resume-dates {
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  color: var(--resume-soft);
  white-space: nowrap;
}

.resume-role {
  margin: 0.18rem 0 0;
  font-size: 10.25px;
  font-weight: 600;
  font-style: normal;
  color: var(--resume-text);
}

.resume-promotion {
  margin: 0.12rem 0 0;
  font-size: 10px;
  font-weight: 400;
  font-style: normal;
  color: var(--resume-soft);
  line-height: 1.4;
}

.resume-link-line {
  margin: 0.15rem 0 0;
  font-size: 10px;
}

.project-meta {
  margin: 0.15rem 0 0;
  font-size: 10px;
  font-weight: 400;
  font-style: normal;
  color: var(--resume-soft);
}

/* Bullets: consistent hanging indent */
.resume-bullets {
  margin: 4px 0 0;
  padding-left: 18px;
  list-style-type: disc;
}

.resume-bullets li {
  margin: 0 0 4px;
  padding-left: 0.15rem;
  font-size: 10.65px;
  color: var(--resume-muted);
  line-height: 1.48;
  break-inside: avoid;
  page-break-inside: avoid;
}

.resume-bullets li::marker {
  color: var(--resume-soft);
}

.resume-bullets li:last-child {
  margin-bottom: 0;
}

.resume-school {
  margin: 0.15rem 0 0;
  font-size: 10.25px;
  color: var(--resume-muted);
}

.resume-study {
  margin: 0.28rem 0 0;
  font-size: 10.25px;
  color: var(--resume-soft);
  line-height: 1.45;
}

/* EightScope: prominence through spacing and type, not a coloured card */
.resume-section--projects {
  margin-top: 1.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--resume-rule);
}

.project-role {
  margin: 0.18rem 0 0;
  font-size: 10.25px;
  font-weight: 600;
  font-style: normal;
  color: var(--resume-text);
}

.project-entry--featured .project-name {
  font-size: 11.5px;
}

.project-entry--featured .project-role {
  font-size: 10.5px;
}

.project-entry--featured .resume-bullets {
  margin-top: 6px;
}

.footer--resume {
  margin-top: auto;
  padding-top: 2.5rem;
}

@media (max-width: 640px) {
  .resume-main {
    padding: 5.5rem 0.75rem 2rem;
  }

  .resume-sheet {
    padding: 1.35rem 1.05rem 1.5rem;
    border-radius: 0;
    max-width: 100%;
    box-shadow: none;
  }

  .resume-header h1 {
    font-size: 24px;
  }

  .resume-headline {
    font-size: 12px;
  }

  .resume-contact {
    font-size: 9.5px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .resume-contact .sep {
    display: none;
  }

  .resume-skills li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .resume-dates {
    white-space: normal;
  }

  .resume-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .resume-toolbar .btn {
    text-align: center;
    width: 100%;
  }
}

@page {
  size: A4;
  margin: 11mm 12mm;
}

@media print {
  html,
  body {
    background: white !important;
    color: #1a1a1a !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.resume-page {
    background: white !important;
    color: #1a1a1a !important;
  }

  .cursor-glow,
  .resume-toolbar,
  .site-header,
  .site-footer,
  .navbar,
  .footer,
  .mobile-menu-btn {
    display: none !important;
  }

  .resume-main {
    padding: 0 !important;
  }

  .resume-page-inner {
    max-width: none;
  }

  .resume-sheet {
    width: 100%;
    max-width: none;
    margin: 0;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 10.35px;
    line-height: 1.44;
    overflow-wrap: normal;
    word-break: normal;
    color: #1a1a1a;
  }

  .resume-header {
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
  }

  .resume-header h1 {
    font-size: 24px;
    letter-spacing: 0.03em;
  }

  .resume-headline {
    margin: 0.22rem 0 0.35rem;
    font-size: 11.5px;
    color: #3d3d3d;
  }

  .resume-contact {
    font-size: 9.75px;
    line-height: 1.45;
    color: #5c5c5c;
  }

  .resume-sheet a {
    color: #176b52;
    text-decoration: underline;
    text-underline-offset: 1px;
    text-decoration-color: rgba(23, 107, 82, 0.45);
  }

  .resume-section {
    margin-top: 0.62rem;
    break-inside: auto;
    page-break-inside: auto;
  }

  .resume-section--projects {
    margin-top: 0.68rem;
    padding-top: 0;
    border-top: none;
  }

  .resume-section > h2 {
    margin-bottom: 0.32rem;
    padding-bottom: 0.16rem;
    font-size: 10.35px;
    color: #176b52;
    border-bottom-color: #d8d8d8;
    break-after: avoid;
    page-break-after: avoid;
  }

  .resume-profile,
  .resume-skills li,
  .resume-bullets li,
  .resume-school,
  .resume-study,
  .resume-role,
  .resume-promotion,
  .project-meta,
  .project-role {
    font-size: 10.35px;
    line-height: 1.44;
  }

  .resume-skills {
    gap: 0.22rem;
  }

  .resume-skills li {
    grid-template-columns: 5rem 1fr;
    gap: 0.55rem;
  }

  .resume-entry,
  .project-entry {
    margin-top: 0.52rem;
    break-inside: auto;
    page-break-inside: auto;
  }

  .resume-entry:first-of-type,
  .project-entry:first-of-type {
    margin-top: 0.18rem;
  }

  .resume-org,
  .project-name {
    font-size: 10.75px;
  }

  .project-entry--featured .project-name {
    font-size: 11px;
  }

  .resume-dates {
    font-size: 9.75px;
  }

  .resume-promotion {
    margin-top: 0.1rem;
  }

  .resume-bullets {
    margin-top: 4px;
    padding-left: 16px;
    list-style-type: disc;
  }

  .resume-bullets li {
    margin-bottom: 3px;
    padding-left: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .resume-bullets li::marker {
    color: #666666;
    font-size: 0.85em;
  }

  .resume-link-line {
    margin-top: 0.1rem;
    font-size: 9.75px;
  }

  .resume-study {
    margin-top: 0.2rem;
  }

  .project-entry--featured .resume-bullets {
    margin-top: 4px;
  }

  h2,
  h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .resume-section[aria-labelledby="projects-heading"] {
    break-before: auto;
    page-break-before: auto;
  }
}
