/* ------------------------------------------------------------------
   San Tran — CV
   Same paper-and-ink family as grandpa-story: cream, warm ink,
   terracotta accent, Cormorant Garamond + EB Garamond. Print-first.
------------------------------------------------------------------- */

:root {
  --paper: #f6f1e6;
  --paper-2: #efe7d6;
  --ink: #2e2923;
  --ink-soft: #6a6056;
  --ink-faint: #9b9184;
  --line: #d9cdb6;
  --terracotta: #a8583c;
  --moss: #5f6d4d;
  --shadow: 0 18px 50px -24px rgba(60, 40, 20, 0.45);
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --body: "EB Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(180, 146, 79, 0.10), transparent 60%);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: rgba(168, 88, 60, 0.18); }

/* ------------------------------ toolbar ------------------------------ */

.toolbar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px -12px rgba(60, 40, 20, 0.5);
  transition: transform 0.2s ease, background 0.2s ease;
}
.tool:hover { background: #fff; transform: translateY(-1px); text-decoration: none; }
.tool svg { width: 16px; height: 16px; }
.tool.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tool.primary:hover { background: #3f3830; }

/* ------------------------------ sheet ------------------------------ */

.sheet {
  max-width: 1120px;
  margin: 3rem auto 4rem;
  background: #fbf8f1;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  overflow: hidden;
}

/* ------------------------------ sidebar ------------------------------ */

.side {
  background: var(--paper-2);
  border-right: 1px solid var(--line);
  padding: 2.6rem 1.8rem 2rem;
}
.name {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
}
.role {
  margin: 0.5rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
}
.rule { width: 42px; height: 2px; background: var(--terracotta); margin: 1.1rem 0 1.5rem; border-radius: 2px; }

.side h2, .main h2 {
  margin: 0 0 0.7rem;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.side section { margin-bottom: 1.7rem; }
.side section:last-child { margin-bottom: 0; }

.contact { list-style: none; margin: 0; padding: 0; font-size: 0.98rem; }
.contact li { display: flex; gap: 0.6rem; align-items: baseline; margin-bottom: 0.35rem; }
.contact svg { width: 14px; height: 14px; flex: none; position: relative; top: 2px; color: var(--ink-faint); }
.contact a { color: var(--ink); }

.skill { margin-bottom: 0.9rem; }
.skill b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.skill p { margin: 0.1rem 0 0; font-size: 0.93rem; color: var(--ink-soft); line-height: 1.45; }

.certs { list-style: none; margin: 0; padding: 0; font-size: 0.93rem; }
.certs li { display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.5rem; margin-bottom: 0.25rem; }
.certs .yr { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.certs .note { color: var(--ink-faint); font-style: italic; }
.edu { margin-top: 0.6rem; font-size: 0.93rem; }
.edu b { font-weight: 600; }

.side-foot { margin-top: 2rem; font-size: 0.85rem; color: var(--ink-faint); font-style: italic; }

/* ------------------------------ main ------------------------------ */

.main { padding: 2.6rem 2.8rem 2.6rem; }
.main section { margin-bottom: 2.2rem; }
.main section:last-child { margin-bottom: 0; }

.intro {
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.4;
  margin: 0 0 0.8rem;
}
.intro .drop::first-letter {
  font-size: 2.4em;
  float: left;
  line-height: 0.8;
  padding: 0.08em 0.1em 0 0;
  color: var(--terracotta);
}
.intro-note { margin: 0; color: var(--ink-soft); font-size: 1rem; }

/* timeline */
.jobs { list-style: none; margin: 0; padding: 0; }
.job {
  position: relative;
  padding: 0 0 1.5rem 1.6rem;
  border-left: 1px solid var(--line);
}
.job:last-child { padding-bottom: 0; }
.job::before {
  content: "";
  position: absolute;
  left: -5px; top: 0.55rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--terracotta);
}
.job.current::before { background: var(--terracotta); }
.job-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; }
.job-head h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.15;
}
.job-head .org { font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); }
.job-head .when { margin-left: auto; font-size: 0.9rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.job .blurb { margin: 0.35rem 0 0.45rem; color: var(--ink-soft); font-size: 0.98rem; }
.job ul { margin: 0; padding-left: 1.1rem; }
.job li { margin-bottom: 0.3rem; }
.job li::marker { color: var(--terracotta); }
.job .focus {
  margin: 0.7rem 0 0;
  padding: 0.8rem 1rem 0.85rem;
  border-left: 3px solid var(--terracotta);
  background: rgba(168, 88, 60, 0.06);
  border-radius: 0 10px 10px 0;
}
.job .focus > b { display: block; font-family: var(--display); font-size: 1.1rem; margin-bottom: 0.25rem; }
.job .focus li b { font-weight: 600; }
.job .focus ul { margin-top: 0.2rem; }
.job.compact li { margin-bottom: 0.15rem; }
.job.compact .blurb { margin-bottom: 0.3rem; }

.awards { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; font-size: 0.95rem; }
.awards li { display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.5rem; margin-bottom: 0.25rem; break-inside: avoid; }
.awards .yr { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.tiny { color: var(--ink-faint); font-size: 0.85rem; font-style: italic; margin: 0.6rem 0 0; }

/* ------------------------------ responsive ------------------------------ */

@media (max-width: 860px) {
  .sheet { grid-template-columns: 1fr; margin: 4.5rem 0.8rem 2rem; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 2rem 1.4rem; }
  .main { padding: 1.8rem 1.4rem 2rem; }
  .job-head .when { margin-left: 0; width: 100%; }
  .awards { columns: 1; }
  .toolbar { top: 0.7rem; right: 0.7rem; }
}

/* ------------------------------ print ------------------------------ */

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

@media print {
  body { background: #fff; font-size: 9.6pt; line-height: 1.36; }
  .toolbar { display: none !important; }
  .sheet {
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    grid-template-columns: 56mm minmax(0, 1fr);
  }
  .side {
    padding: 0 6mm 0 0;
    border-right: 1px solid var(--line);
    background: transparent;
  }
  .main { padding: 0 0 0 6mm; }
  .name { font-size: 22pt; }
  .role { font-size: 12.5pt; }
  .rule { margin: 3mm 0 5mm; }
  .side h2, .main h2 { font-size: 7.5pt; margin-bottom: 1.6mm; }
  .side section { margin-bottom: 4.5mm; }
  .main section { margin-bottom: 4mm; }
  .contact, .skill p, .certs, .edu { font-size: 8.6pt; }
  .skill { margin-bottom: 2.2mm; }
  .skill b { font-size: 10.5pt; }
  .certs li, .awards li { margin-bottom: 0.4mm; }
  .intro { font-size: 11pt; margin-bottom: 1.2mm; }
  .intro-note { font-size: 9pt; }
  .job { padding: 0 0 2.8mm 4mm; break-inside: avoid; }
  .job-head h3 { font-size: 11pt; }
  .job-head .org { font-size: 9.8pt; }
  .job-head .when { font-size: 8.6pt; }
  .job .blurb { font-size: 8.8pt; margin: 0.6mm 0 0.8mm; }
  .job li { margin-bottom: 0.5mm; }
  .job .focus { padding: 2mm 3mm; margin-top: 1.6mm; background: #f7efe9; }
  .job .focus > b { font-size: 10.5pt; }
  .awards { font-size: 8.6pt; }
  .side-foot, .tiny { display: none; }
  a { color: inherit; }
  .contact a[href^="http"]::after { content: none; }
}
