/* ═══════════════════════════════════════════════════════════
   PAGE: Resume — Page header, layout, experience, sidebar
   ═══════════════════════════════════════════════════════════ */

/* ── Page Header (resume variant) ───────────────────────── */
.page-header {
  padding-top: calc(var(--nav-h) + var(--ruler-h) + 72px);
  padding-bottom: 72px;
  position: relative;
  overflow: hidden;
}
.page-header .dot-grid-subtle {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 30% 50%, transparent 40%, rgba(14, 26, 35, 0.8) 100%);
  z-index: 1;
  pointer-events: none;
}
.page-header::before {
  content: '';
  position: absolute;
  top: calc(var(--nav-h) + var(--ruler-h) + 16px);
  left: 20px;
  width: 16px; height: 16px;
  border-top: 1.5px solid var(--primary);
  border-left: 1.5px solid var(--primary);
  opacity: 0.4;
  z-index: 3;
}
.page-header .container { position: relative; z-index: 2; }

.page-title {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--space-5);
}
.page-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.65;
}

/* ── Download Bar ────────────────────────────────────────── */
.download-bar {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-8);
}
/* Resume uses smaller button sizing */
.download-bar .btn-primary,
.download-bar .btn-ghost {
  font-size: 13px;
  padding: 10px 22px;
}

/* ── Resume Layout ───────────────────────────────────────── */
.resume-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-16);
  align-items: start;
  padding: var(--space-20) 0;
}

#references {
  padding: 0 0 var(--space-24);
}

/* ── Resume Sections ─────────────────────────────────────── */
.resume-section { margin-bottom: 56px; }
.resume-section:last-child { margin-bottom: 0; }

.resume-section-title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-6);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Summary ─────────────────────────────────────────────── */
.summary-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-6);
}

/* ── Highlights ──────────────────────────────────────────── */
.highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.highlights-list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  padding-left: var(--space-5);
  position: relative;
}
.highlights-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 11px;
  height: 11px;
  background-color: var(--primary);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z'/></svg>");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.highlights-list li strong { color: var(--text); font-weight: var(--weight-medium); }

/* ── Experience ──────────────────────────────────────────── */
.exp-item { margin-bottom: 36px; }
.exp-item:last-child { margin-bottom: 0; }
.exp-item + .exp-item {
  padding-top: 36px;
  border-top: 1px dashed var(--border);
}

.exp-header { margin-bottom: 4px; }
.exp-role {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  color: var(--text);
  letter-spacing: -0.01em;
}
.exp-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.exp-org {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary);
  letter-spacing: 0.03em;
}
.exp-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.exp-context {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: var(--space-3);
  line-height: 1.5;
}
.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.exp-bullets li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}
.exp-bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 1px;
  background: var(--border-bright);
}
.exp-bullets li strong { color: var(--text); font-weight: var(--weight-medium); }

/* ── Sidebar ─────────────────────────────────────────────── */
.resume-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + var(--ruler-h) + 32px);
}

.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: var(--space-5);
}
.sidebar-block-header {
  padding: 8px 14px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sidebar-row {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-row:last-child { border-bottom: none; }
.sidebar-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidebar-value {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.sidebar-value strong { color: var(--text); font-weight: var(--weight-medium); }
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--space-3) 14px;
}
.stag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.03em;
}
.stag--primary {
  color: var(--primary);
  background: rgba(1, 158, 219, 0.08);
  border-color: rgba(1, 158, 219, 0.25);
}

/* ── Uxcel Skills ────────────────────────────────────────── */
.uxcel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.uxcel-item:last-child { border-bottom: none; }
.uxcel-skill { font-size: 12.5px; color: var(--text-secondary); }
.uxcel-rank {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  letter-spacing: 0.04em;
  text-decoration: none;
}
.uxcel-rank:hover { text-decoration: underline; }

/* ── Education / Involvement ─────────────────────────────── */
.edu-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; }
.edu-degree { font-size: 12.5px; color: var(--text); font-weight: var(--weight-medium); }
.edu-org { font-family: var(--font-mono); font-size: 10px; color: var(--primary); letter-spacing: 0.03em; margin-top: 2px; }
.edu-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.inv-item { padding: 9px 14px; border-bottom: 1px solid rgba(58, 77, 92, 0.4); }
.inv-item:last-child { border-bottom: none; }
.inv-role { font-size: 12.5px; color: var(--text-secondary); }
.inv-org { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); letter-spacing: 0.03em; margin-top: 2px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .resume-layout { grid-template-columns: 1fr; gap: 48px; }
  .resume-sidebar { position: static; }
}

@media (max-width: 600px) {
  .nav-links { gap: 16px; }
}

/* ── Light mode overrides ────────────────────────────────── */

/* Swap harsh dark vignette for a soft bg-toned edge fade */
[data-theme="light"] .page-header::after {
  background: radial-gradient(ellipse 80% 60% at 30% 50%, transparent 40%, rgba(242, 246, 248, 0.6) 100%);
}

/* ── Print ───────────────────────────────────────────────
   Goal: a clean, recruiter-friendly PDF when the resume is
   printed or Save-as-PDF'd. Hide chrome, unlock the layout,
   and force black-on-white regardless of the current theme. */
@media print {
  @page { margin: 14mm 12mm; }

  :root, [data-theme="dark"], [data-theme="light"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --text: #000000;
    --text-secondary: #222222;
    --text-muted: #555555;
    --border: #bbbbbb;
    --border-bright: #999999;
    --primary: #016592;
    --primary-hover: #016592;
    --link-color: #016592;
    --link-visited-color: #016592;
  }

  html, body { background: #fff !important; color: #000 !important; }
  body { opacity: 1 !important; }

  /* Hide site chrome + decorative ornaments + the "Let's work together" CTA */
  nav, .ruler, .conference-banner, footer, .fab-container, .figma-toolbar, .kb-modal,
  .skip-link, .back-to-top, .scroll-indicator,
  .dot-grid, .dot-grid-subtle,
  .hero-corner, .hero-frame-label,
  .hero-comment, .anchored-comment, .chip-onboard,
  .callout,
  .sidebar-block:has(.uxcel-item),
  .page-header::before, .page-header::after { display: none !important; }

  /* References: stack as a list instead of a 3-column grid */
  .references-grid {
    display: block !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }
  .ref-card {
    background: transparent !important;
    padding: 10pt 0 !important;
    border-bottom: 1px solid #bbb !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .ref-card:last-child { border-bottom: none !important; }
  .ref-quote { font-size: 10pt !important; margin-bottom: 6pt !important; }
  .ref-byline { gap: 10pt !important; }
  .ref-avatar { width: 32px !important; height: 32px !important; }
  .ref-avatar img { filter: none !important; }
  .ref-avatar::after { content: none !important; }

  /* Force all reveal-animated elements visible — IntersectionObserver
     doesn't fire for below-fold content when printing from scroll=0,
     which otherwise leaves entire sections invisible but still occupying
     space and producing blank pages. */
  .reveal-section, .reveal-node, .reveal-stagger > .reveal-stagger-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .page-header .dot-grid-subtle { display: none !important; }

  /* Remove top padding reserved for fixed nav/ruler */
  .page-header { padding: 0 0 8pt; overflow: visible; }
  .page-body, .site-main { padding-top: 0 !important; }

  /* First resume section sits right under the page header — no extra gap */
  .resume-section:first-of-type,
  .resume-section:first-of-type .resume-section-title { margin-top: 0 !important; }
  main[aria-label="Resume content"] { padding-top: 0 !important; }

  /* Download bar is useless in print */
  .download-bar { display: none !important; }

  /* Unfurl the 2-column resume layout */
  .resume-layout { display: block !important; }
  .resume-sidebar { position: static !important; margin-top: 18pt; }

  /* Typography: tighten for paper */
  body, .page-subtitle, .summary-text, .exp-bullets li,
  .highlights-list li, .sidebar-panel, .edu-item, .inv-item {
    font-size: 10pt !important;
    line-height: 1.45 !important;
  }
  .page-title { font-size: 22pt !important; }
  .resume-section-title { font-size: 11pt !important; margin-top: 14pt; }

  /* Avoid orphaned headings and split list items */
  h1, h2, h3, .resume-section-title, .exp-header { break-after: avoid; page-break-after: avoid; }
  .exp-item, .highlights-list li, .exp-bullets li, .edu-item, .inv-item,
  .sidebar-panel { break-inside: avoid; page-break-inside: avoid; }

  /* Show URLs after links so the printed copy is self-contained */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  /* Don't print URLs for in-page anchors or mailto */
  a[href^="#"]::after, a[href^="mailto:"]::after { content: ""; }

  /* Images: remove any colour filters */
  img { filter: none !important; max-width: 100% !important; }
}
