/* Resume2026 — warm neutral design system
   Paper: off-white cream. Ink: deep warm charcoal. Accent: terracotta.
   Type: Source Serif 4 (display) · Inter Tight (body, functional) · JetBrains Mono (meta)
   — Inter Tight chosen over generic Inter; tighter optical spacing reads
     better at small print sizes. Fallback to system sans is fine.
*/

:root {
  --paper: #f5efe6;
  --paper-2: #efe8dc;
  --ink: #2b241d;
  --ink-2: #4a4037;
  --ink-3: #7a6e62;
  --ink-4: #b3a89a;
  --rule: #d9cfc0;
  --accent: #b5552c;
  --accent-soft: #e6c4ae;
  --accent-ink: #8a3e1e;

  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

.dark {
  --paper: #1a1612;
  --paper-2: #221c16;
  --ink: #ece3d5;
  --ink-2: #c9bfae;
  --ink-3: #8e8477;
  --ink-4: #5a5247;
  --rule: #3a322a;
  --accent: #e08762;
  --accent-soft: #4a2f20;
  --accent-ink: #f2a884;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------------------------------
   Page "sheet" — US Letter at print density (8.5×11 → 816×1056 at 96dpi).
   We scale the sheet to fit its container in the web view; print-mode
   undoes the scale.
--------------------------------------------------------------- */
.sheet {
  width: 816px;
  min-height: 1056px;
  background: var(--paper);
  color: var(--ink);
  padding: 56px 72px;
  position: relative;
  overflow: hidden;
}
.sheet[data-extended="1"] {
  min-height: auto;
  padding: 72px 80px 96px;
}

/* texture — extremely subtle paper grain */
.sheet::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(180, 140, 90, 0.035) 1px, transparent 1px),
    radial-gradient(rgba(180, 140, 90, 0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  opacity: 0.6;
  mix-blend-mode: multiply;
}
.dark .sheet::before { opacity: 0.25; mix-blend-mode: screen; }

.resume {
  position: relative;
  z-index: 1;
}

/* =====================================================
   VARIATION A — Editorial one-column
===================================================== */

.resume-a { font-family: var(--sans); color: var(--ink); }

/* 1-page masthead: compact horizontal layout.
   Extended masthead: centered editorial (overrides below). */
.a-masthead {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

.a-avatar-wrap {
  width: 56px;
  height: 56px;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.a-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
}
.dark .a-avatar { filter: saturate(0.85) brightness(0.95); }

.a-masthead-center { min-width: 0; }

.a-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.a-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--ink);
  font-variation-settings: "opsz" 36;
}

.a-rule { display: none; }

.a-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-3);
  max-width: 440px;
  margin: 0;
  text-wrap: pretty;
}

.a-contact {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
  text-align: right;
}
.a-contact > span:not(.a-dot) { display: block; }
.a-dot { display: none; }

/* Extended-mode masthead — return to centered editorial treatment */
.resume-a[data-extended="1"] .a-masthead {
  display: block;
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 28px;
}
.resume-a[data-extended="1"] .a-avatar-wrap {
  width: 72px; height: 72px; margin: 0 auto 16px;
}
.resume-a[data-extended="1"] .a-masthead-center { display: contents; }
.resume-a[data-extended="1"] .a-eyebrow { font-size: 10px; margin-bottom: 16px; }
.resume-a[data-extended="1"] .a-name {
  font-size: 58px; font-weight: 400; margin: 0 0 16px;
  font-variation-settings: "opsz" 60; letter-spacing: -0.025em;
}
.resume-a[data-extended="1"] .a-rule {
  display: block; width: 40px; height: 2px; background: var(--accent); margin: 0 auto 16px;
}
.resume-a[data-extended="1"] .a-tagline {
  font-size: 14.5px; line-height: 1.5; color: var(--ink-2);
  max-width: 520px; margin: 0 auto 18px;
}
.resume-a[data-extended="1"] .a-contact {
  font-size: 11px; flex-direction: row; flex-wrap: wrap;
  align-items: baseline; justify-content: center;
  text-align: center; gap: 0 10px; white-space: normal;
}
.resume-a[data-extended="1"] .a-dot { display: inline; color: var(--accent); }

.a-section { margin-top: 18px; }
.resume-a[data-extended="1"] .a-section { margin-top: 28px; }

.a-h2 {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
}
.resume-a[data-extended="1"] .a-h2 { font-size: 10px; margin: 0 0 14px; padding-bottom: 6px; }

.a-prose {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}

.a-roles { display: flex; flex-direction: column; gap: 12px; }
.resume-a[data-extended="1"] .a-roles { gap: 14px; }

.a-role {
  border-top: 1px solid transparent;
  padding-top: 2px;
}

.a-role-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 8px 20px;
  cursor: default;
  user-select: none;
  position: relative;
}
.resume-a:not([data-extended="1"]) .a-role-head {
  cursor: pointer;
}

.a-role-title-line {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
  font-weight: 500;
  min-width: 0;
  text-wrap: balance;
}
.a-role-title { font-weight: 600; }
.a-role-sep { color: var(--accent); margin: 0 4px; }
.a-role-company { font-style: italic; font-weight: 400; color: var(--ink-2); }

.a-role-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: right;
}
.a-role-loc { color: var(--ink-3); }
.a-role-dates { color: var(--accent); }

.a-role-short {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 6px 0 0;
  max-width: 620px;
  grid-column: 1 / -1;
}

.a-bullets {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.a-bullets li {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  padding-left: 16px;
  position: relative;
  text-wrap: pretty;
}
.a-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.a-grid-2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
}

.a-skills {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 12px;
}
.a-skills dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 2px;
}
.a-skills dd {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.5;
  font-family: var(--serif);
  font-size: 12.5px;
}

.a-edu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.a-edu-school { font-family: var(--serif); font-weight: 600; font-size: 13px; color: var(--ink); }
.a-edu-detail { font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--ink-3); line-height: 1.5; }

/* Earlier Career (Extended only) — compact two-column rows */
.a-early {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.a-early-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid var(--rule);
}
.a-early-item:first-child { border-top: none; padding-top: 2px; }
.a-early-dates {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding-top: 2px;
}
.a-early-title-line {
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ink);
}
.a-early-title { font-weight: 600; }
.a-early-company { font-style: italic; color: var(--ink-2); }
.a-early-loc {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  font-style: normal;
}
.a-early-short {
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
  margin-top: 2px;
  text-wrap: pretty;
}

.a-footer {
  margin-top: 40px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.a-footer-dot { color: var(--accent); }

/* =====================================================
   VARIATION B — Two-column with sidebar
===================================================== */

.resume-b {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  color: var(--ink);
}

.b-sidebar {
  border-right: 1px solid var(--rule);
  padding-right: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.resume-b[data-extended="1"] .b-sidebar { gap: 20px; }

.b-photo {
  width: 90px;
  height: 90px;
  position: relative;
}
.resume-b[data-extended="1"] .b-photo { width: 110px; height: 110px; }
.b-photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--accent);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
}
.b-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.82) contrast(1.02);
}
.dark .b-photo-img { filter: saturate(0.7) contrast(1.05) brightness(0.95); }

.b-sidebar-name .b-name-first {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  font-variation-settings: "opsz" 32;
}
.b-sidebar-name .b-name-last {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  margin-top: 2px;
  color: var(--ink);
  font-variation-settings: "opsz" 32;
}
.b-role-chip {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 8px;
  border: 1px solid var(--accent);
  border-radius: 2px;
}

.b-sb-h {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
  font-weight: 500;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}

.b-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.b-contact li {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
  line-height: 1.4;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 6px;
  word-break: break-all;
}
.b-ck { color: var(--accent); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 1px; }

.b-skill-group { margin-bottom: 12px; }
.b-skill-group-h {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.b-skill-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.b-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-2);
  background: var(--paper-2);
  padding: 3px 6px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.b-edu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.b-edu-school { font-family: var(--serif); font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.b-edu-detail { font-family: var(--serif); font-style: italic; font-size: 11px; color: var(--ink-3); line-height: 1.45; }

.b-hobbies { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.b-hobbies li {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
  background: var(--paper-2);
  padding: 3px 7px;
  border-radius: 2px;
}

.b-main { padding-top: 2px; }

.b-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.b-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--ink);
  font-variation-settings: "opsz" 36;
}
.resume-b[data-extended="1"] .b-title {
  font-size: 46px; margin: 0 0 14px; font-variation-settings: "opsz" 48;
}
.b-title-accent { color: var(--accent); font-style: italic; font-weight: 600; }

.b-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-3);
  margin: 0 0 16px;
  max-width: 540px;
  text-wrap: pretty;
}
.resume-b[data-extended="1"] .b-tagline {
  font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 0 0 24px;
}

.b-eyebrow { margin-bottom: 10px; font-size: 9.5px; }
.resume-b[data-extended="1"] .b-eyebrow { margin-bottom: 12px; font-size: 10px; }

.b-section { margin-top: 16px; }
.resume-b[data-extended="1"] .b-section { margin-top: 22px; }

.b-h2 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.b-h2-num {
  color: var(--ink-4);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.b-prose {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}

.b-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  position: relative;
}
.b-timeline::before {
  content: "";
  position: absolute;
  left: 72px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--rule);
}

.b-t-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 26px;
  padding: 10px 0 14px;
  position: relative;
}
.b-t-dot {
  position: absolute;
  left: 67px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--paper);
}
.b-t-dates {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  line-height: 1.3;
  padding-top: 14px;
  text-align: right;
}
.b-t-dates-end { color: var(--accent); }

.b-t-body { padding-top: 10px; }
.b-t-head {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
}
.b-t-head:disabled { cursor: default; }
.b-t-company {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.b-t-title {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: 2px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.b-t-loc { color: var(--ink-3); font-weight: 400; }
.b-t-short {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 6px 0 0;
}
.b-t-bullets {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.b-t-bullets li {
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
  padding-left: 14px;
  position: relative;
  text-wrap: pretty;
}
.b-t-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 1px;
  background: var(--accent);
}

/* Earlier Career (Extended only) — compact list aligned with timeline */
.b-early {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.b-early-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 26px;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.b-early-item:first-child { border-top: none; padding-top: 2px; }
.b-early-dates {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
}
.b-early-body { min-width: 0; }
.b-early-head {
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
.b-early-loc {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  font-weight: 400;
}
.b-early-title {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 1px;
  letter-spacing: 0.01em;
}
.b-early-short {
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-3);
  margin: 4px 0 0;
  text-wrap: pretty;
}

/* =====================================================
   Print mode — strip all chrome, let browser paginate
===================================================== */
@media print {
  html, body { background: white !important; margin: 0 !important; padding: 0 !important; }

  /* Hide app chrome explicitly */
  .app-bar, .mode-hint, .cursor-dot, .cursor-ring, .sheet-label, .web-mark { display: none !important; }

  /* Unwrap: stage and sheet-wrap must stay visible so the sheet renders */
  .stage, .sheet-wrap {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    min-height: 0 !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .sheet {
    margin: 0 !important;
    padding: 48px 56px !important;
    width: 100% !important;
    min-height: auto !important;
    box-shadow: none !important;
    transform: none !important;
    background: white !important;
  }
  .sheet::before { display: none !important; }
  @page { size: letter; margin: 0; }
}
