:root {
  color-scheme: light;
  --bg: #f4f1eb;
  --paper: #fffdf9;
  --ink: #22201c;
  --muted: #6d675f;
  --line: #ded8cf;
  --accent: #6f5b3e;
  --accent-dark: #453927;
  --chip: #f1ece3;
  --shadow: 0 24px 80px rgba(55, 46, 35, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(111, 91, 62, 0.16), transparent 32rem),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.page {
  width: min(100% - 32px, 1040px);
  margin: 40px auto;
  padding: 56px;
  background: var(--paper);
  border: 1px solid rgba(222, 216, 207, 0.8);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.location {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-card {
  display: grid;
  gap: 10px;
  min-width: 250px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #faf7f1;
  color: var(--muted);
  font-size: 0.95rem;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.linkedin-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin: 22px 0 0;
}

button,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent-dark);
  color: #fffdf9;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(69, 57, 39, 0.22);
}

button:hover,
.download-link:hover {
  background: var(--accent);
  color: #fffdf9;
}

.section {
  padding-top: 34px;
}

h2 {
  margin-bottom: 18px;
  color: var(--accent-dark);
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.summary p,
.tools {
  max-width: 860px;
  color: var(--muted);
  font-size: 1.02rem;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-grid span {
  padding: 9px 13px;
  border: 1px solid rgba(111, 91, 62, 0.16);
  border-radius: 999px;
  background: var(--chip);
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 650;
}

.experience {
  display: grid;
  gap: 26px;
}

.experience h2 {
  margin-bottom: 0;
}

.role {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.role:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.role-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  margin-bottom: 12px;
}

.role h3,
.education-card h3 {
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 1.05rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.role-header p,
.education-card p,
time {
  margin: 0;
  color: var(--muted);
}

time {
  white-space: nowrap;
  font-size: 0.93rem;
  font-weight: 700;
}

ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

li + li {
  margin-top: 5px;
}

.education-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #faf7f1;
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 20px, 1040px);
    margin: 10px auto;
    padding: 28px 22px;
    border-radius: 20px;
  }

  .hero,
  .role-header {
    grid-template-columns: 1fr;
  }

  .contact-card {
    min-width: 0;
  }

  .actions {
    justify-content: stretch;
  }

  button,
  .download-link {
    width: 100%;
  }

  time {
    white-space: normal;
  }
}

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

@media print {
  :root {
    --paper: #ffffff;
    --ink: #1f1f1f;
    --muted: #4f4f4f;
    --line: #d7d7d7;
    --accent: #333333;
    --accent-dark: #111111;
    --chip: #f4f4f4;
  }

  body {
    background: #ffffff;
    font-size: 10.4pt;
    line-height: 1.48;
  }

  .page {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .actions {
    display: none;
  }

  .hero {
    gap: 24px;
    padding-bottom: 14px;
  }

  h1 {
    margin-bottom: 8px;
    font-size: 34pt;
  }

  .section {
    padding-top: 15px;
  }

  h2 {
    margin-bottom: 9px;
    font-size: 8.8pt;
    letter-spacing: 0.14em;
  }

  .summary p,
  .tools {
    margin-bottom: 0;
    font-size: 10.4pt;
  }

  .contact-card,
  .education-card {
    gap: 6px;
    padding: 11px 12px;
  }

  .experience {
    gap: 14px;
  }

  .role {
    break-inside: auto;
    page-break-inside: auto;
    padding-bottom: 12px;
  }

  .role-header {
    gap: 12px;
    margin-bottom: 7px;
  }

  .role h3,
  .education-card h3 {
    margin-bottom: 3px;
    font-size: 10.4pt;
  }

  .pill-grid {
    gap: 5px;
  }

  .pill-grid span {
    padding: 4px 7px;
    font-size: 8.4pt;
  }

  ul {
    padding-left: 16px;
  }

  li + li {
    margin-top: 3px;
  }

}
