:root {
  --ink: #25202f;
  --muted: #625d6e;
  --paper: #fffdf7;
  --pink: #ff65a3;
  --sun: #ffdb57;
  --mint: #dff7ec;
  --line: #d8d2dc;
}

* {
  box-sizing: border-box;
}

html {
  background: #f2f7f3;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(circle at 1px 1px, rgba(37, 32, 47, 0.055) 1px, transparent 0) 0 0 / 12px 12px,
    linear-gradient(135deg, #effaf5, #fff7fb);
}

a {
  color: inherit;
}

.cv-toolbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem max(1rem, calc((100vw - 1020px) / 2));
  border-bottom: 2px solid var(--ink);
  background: rgba(255, 253, 247, 0.96);
  backdrop-filter: blur(12px);
}

.cv-toolbar a,
.cv-toolbar button {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  background: white;
  cursor: pointer;
}

.cv-toolbar button {
  background: var(--sun);
}

.cv-toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

.cv-page {
  width: min(1020px, calc(100% - 2rem));
  margin: 2.5rem auto;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 12px 12px 0 rgba(37, 32, 47, 0.12);
}

.cv-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 3px solid var(--ink);
}

.cv-kicker {
  margin: 0 0 0.4rem;
  color: #85506a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-intro h1 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.065em;
  text-shadow: 4px 4px 0 var(--pink);
}

.cv-location {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-weight: 650;
}

.cv-intro address {
  display: grid;
  gap: 0.3rem;
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
}

.cv-summary {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.25rem;
  border-radius: 12px;
  background: var(--mint);
}

.cv-summary p {
  max-width: 720px;
  margin: 0;
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(240px, 0.85fr);
  gap: 2.5rem;
}

.cv-page h2 {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.cv-main > section + section,
.cv-sidebar > section + section {
  margin-top: 2.25rem;
}

.cv-entry {
  padding: 0 0 1.6rem;
  border-bottom: 1px solid var(--line);
}

.cv-entry + .cv-entry {
  padding-top: 1.5rem;
}

.cv-entry header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cv-entry h3,
.cv-education h3,
.cv-skill-group h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.cv-entry header p,
.cv-education p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.cv-entry time,
.cv-education time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.cv-entry ul {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
}

.cv-entry li,
.cv-project-entry > p,
.cv-sidebar p {
  color: #4f4a59;
  font-size: 0.88rem;
}

.cv-entry li + li {
  margin-top: 0.45rem;
}

.cv-project-entry > p {
  margin: 0.75rem 0 0;
}

.cv-sidebar {
  padding-left: 2rem;
  border-left: 1.5px solid var(--ink);
}

.cv-education {
  display: grid;
  gap: 1.25rem;
}

.cv-education article {
  padding: 1rem;
  border-radius: 10px;
  background: #fff4f8;
}

.cv-education article:nth-child(2) {
  background: #fff7d7;
}

.cv-education article:nth-child(3) {
  background: var(--mint);
}

.cv-education time {
  display: block;
  margin-top: 0.45rem;
}

.cv-education small {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.73rem;
}

.cv-skill-group + .cv-skill-group {
  margin-top: 1rem;
}

.cv-skill-group p,
.cv-sidebar > section > p {
  margin: 0.35rem 0 0;
}

@media (max-width: 720px) {
  .cv-toolbar {
    align-items: stretch;
  }

  .cv-toolbar-actions a {
    display: none;
  }

  .cv-page {
    width: min(100% - 1rem, 1020px);
    margin: 0.5rem auto 2rem;
    padding: 1.25rem;
    border-radius: 14px;
    box-shadow: none;
  }

  .cv-intro,
  .cv-entry header {
    display: grid;
  }

  .cv-intro {
    align-items: start;
  }

  .cv-intro address {
    text-align: left;
  }

  .cv-summary,
  .cv-layout {
    grid-template-columns: 1fr;
  }

  .cv-summary {
    gap: 0.4rem;
  }

  .cv-sidebar {
    padding: 2rem 0 0;
    border-top: 1.5px solid var(--ink);
    border-left: 0;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0.45in;
  }

  html,
  body {
    background: white;
  }

  .cv-toolbar {
    display: none;
  }

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

  .cv-intro h1 {
    font-size: 3.5rem;
  }

  .cv-entry,
  .cv-education article,
  .cv-sidebar section {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
  }
}
