@font-face {
  font-family: "Amerga";
  src: url("extras/Amerga.woff") format("woff");
  font-display: swap;
}

:root {
  --cream: #fff8dc;
  --paper: #fffced;
  --paper-deep: #f7edc4;
  --coral: #ff6b5f;
  --pink: #f4b8b3;
  --brown: #70401f;
  --mustard: #f7c957;
  --olive: #86a94a;
  --purple: #7652c8;
  --ink: #432611;
  --muted: rgba(67, 38, 17, 0.72);
  --line: rgba(112, 64, 31, 0.28);
  --soft-line: rgba(112, 64, 31, 0.16);
  --shadow: 5px 6px 0 rgba(112, 64, 31, 0.16);
  --shadow-strong: 7px 8px 0 rgba(112, 64, 31, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  background: #f2dfad;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    "Avenir Next", Avenir, "Gill Sans", "Trebuchet MS", Arial, sans-serif;
  background:
    repeating-linear-gradient(
      92deg,
      rgba(112, 64, 31, 0.04) 0 1px,
      transparent 1px 7px
    ),
    linear-gradient(135deg, #fffbed 0%, var(--cream) 52%, #f4dfa4 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 16% 18%, rgba(255, 107, 95, 0.1) 0 1px, transparent 1.6px),
    radial-gradient(circle at 72% 74%, rgba(112, 64, 31, 0.08) 0 1px, transparent 1.7px),
    repeating-radial-gradient(
      circle at 38% 42%,
      rgba(67, 38, 17, 0.055) 0 0.8px,
      transparent 0.9px 5px
    );
  background-size: 18px 18px, 24px 24px, 12px 12px;
  content: "";
  mix-blend-mode: multiply;
  opacity: 0.5;
}

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

p,
li,
dd {
  font-size: 8.7pt;
  line-height: 1.48;
}

p {
  margin: 0;
}

p + p {
  margin-top: 7px;
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
}

.cv-document {
  display: grid;
  gap: 24px;
  width: min-content;
  margin: 32px auto;
}

.sheet {
  position: relative;
  isolation: isolate;
  width: 210mm;
  min-height: 297mm;
  overflow: hidden;
  padding: 12mm;
  border: 1px solid rgba(112, 64, 31, 0.2);
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 252, 237, 0.9), rgba(255, 252, 237, 0.9)),
    repeating-linear-gradient(
      90deg,
      rgba(112, 64, 31, 0.035) 0 1px,
      transparent 1px 9px
    ),
    var(--cream);
  box-shadow: 0 28px 80px rgba(67, 38, 17, 0.22);
}

.sheet::before,
.sheet::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
}

.sheet::before {
  inset: 5mm;
  border: 1px solid rgba(112, 64, 31, 0.16);
  border-radius: 9mm;
}

.sheet::after {
  right: -35mm;
  top: -18mm;
  width: 112mm;
  height: 176mm;
  background: url("assets/sanserifa-retro/svg/fluid-bands-right.svg") center / contain no-repeat;
  opacity: 0.2;
}

.sheet-work::after {
  right: auto;
  left: -38mm;
  top: 112mm;
  background-image: url("assets/sanserifa-retro/svg/fluid-bands-left.svg");
  opacity: 0.16;
}

.cv-hero {
  position: relative;
  margin-bottom: 6mm;
  padding: 7mm;
  overflow: hidden;
  border: 2.4px solid var(--brown);
  border-radius: 8mm;
  background:
    radial-gradient(circle at 84% 16%, rgba(247, 201, 87, 0.62) 0 12mm, transparent 12.4mm),
    radial-gradient(circle at 9% 82%, rgba(134, 169, 74, 0.22) 0 19mm, transparent 19.4mm),
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(244, 184, 179, 0.16)),
    var(--paper);
  box-shadow: var(--shadow-strong);
}

.cv-hero::before {
  position: absolute;
  right: -13mm;
  bottom: -23mm;
  width: 92mm;
  height: 58mm;
  background:
    linear-gradient(180deg, var(--mustard) 0 23%, var(--coral) 23% 48%, #e84855 48% 72%, var(--purple) 72% 100%);
  border: 2px solid rgba(112, 64, 31, 0.25);
  border-radius: 24mm 0 0 24mm;
  content: "";
  opacity: 0.9;
  transform: rotate(-8deg);
}

.hero-topline,
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10mm;
}

.issue-pill,
.section-label span,
.project-meta span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 7mm;
  border: 1.5px solid var(--brown);
  border-radius: 999px;
  background: var(--paper);
  color: var(--brown);
  font-size: 6.5pt;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.issue-pill {
  padding: 0 3mm;
  background: var(--mustard);
  box-shadow: 3px 4px 0 rgba(112, 64, 31, 0.14);
}

.issue-number {
  color: rgba(67, 38, 17, 0.72);
  font-size: 7.5pt;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 47mm;
  gap: 8mm;
  align-items: end;
  margin-top: 8mm;
}

.kicker {
  margin-bottom: 1mm;
  color: var(--coral);
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.95;
}

h1 {
  max-width: 112mm;
  color: var(--brown);
  font-family: "Amerga", Georgia, serif;
  font-size: 42pt;
  font-weight: 700;
  letter-spacing: 0;
}

.role {
  width: fit-content;
  margin-top: 2mm;
  padding: 2mm 3mm;
  border: 1.5px solid var(--olive);
  border-radius: 999px;
  background: rgba(255, 252, 237, 0.86);
  color: var(--brown);
  font-size: 8.4pt;
  font-weight: 900;
}

.contact-stamp {
  display: grid;
  gap: 1.4mm;
  padding: 4mm;
  border: 2px solid var(--brown);
  border-radius: 5mm;
  background: rgba(255, 252, 237, 0.9);
  box-shadow: var(--shadow);
  font-style: normal;
  transform: rotate(1.1deg);
}

.contact-stamp span {
  color: var(--coral);
  font-size: 6.4pt;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-stamp a {
  overflow-wrap: anywhere;
  font-size: 7.8pt;
  font-weight: 800;
  line-height: 1.18;
}

.positioning {
  position: relative;
  z-index: 1;
  max-width: 128mm;
  margin-top: 7mm;
  color: var(--ink);
  font-size: 13pt;
  font-weight: 900;
  line-height: 1.14;
}

.support-line {
  position: relative;
  z-index: 1;
  max-width: 122mm;
  margin-top: 3mm;
  color: rgba(67, 38, 17, 0.76);
  font-size: 8.6pt;
  line-height: 1.45;
}

.page-grid {
  display: grid;
  gap: 6mm;
}

.page-grid-work {
  grid-template-columns: minmax(0, 1fr) 61mm;
}

.page-grid-front {
  grid-template-columns: minmax(0, 1fr) 66mm;
  gap: 5mm;
}

.main-column,
.side-column {
  display: grid;
  gap: 5mm;
  align-content: start;
}

.panel {
  position: relative;
  break-inside: avoid;
  overflow: hidden;
  padding: 5mm;
  border: 2px solid var(--brown);
  border-radius: 5mm;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(244, 184, 179, 0.13)),
    var(--paper);
  box-shadow: var(--shadow);
}

.panel::after {
  position: absolute;
  right: -11mm;
  bottom: -13mm;
  width: 32mm;
  height: 32mm;
  border-radius: 50%;
  background: var(--panel-accent, var(--coral));
  content: "";
  opacity: 0.18;
}

.compact-panel {
  padding: 3.6mm;
}

.panel-coral {
  --panel-accent: var(--coral);
}

.panel-olive {
  --panel-accent: var(--olive);
}

.panel-mustard {
  --panel-accent: var(--mustard);
}

.panel-purple {
  --panel-accent: var(--purple);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 2.8mm;
  margin-bottom: 3.2mm;
}

.section-label span {
  justify-content: center;
  min-width: 8.2mm;
  padding: 0 2.2mm;
  background: var(--section-accent, var(--mustard));
}

.panel-coral .section-label span,
.project-coral .project-meta span {
  --section-accent: var(--coral);
}

.panel-olive .section-label span,
.project-olive .project-meta span {
  --section-accent: var(--olive);
}

.panel-mustard .section-label span,
.project-mustard .project-meta span {
  --section-accent: var(--mustard);
}

.panel-purple .section-label span {
  --section-accent: var(--purple);
  color: #fffdf3;
}

h2 {
  color: var(--brown);
  font-size: 13.4pt;
  letter-spacing: 0;
}

.compact-panel h2 {
  font-size: 10.4pt;
}

.check-list {
  display: grid;
  gap: 1.55mm;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 4mm;
  color: rgba(67, 38, 17, 0.83);
  font-size: 6.9pt;
  line-height: 1.27;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.7mm;
  width: 2.4mm;
  height: 2.4mm;
  border: 1.2px solid var(--brown);
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.tag-cloud,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6mm;
  list-style: none;
}

.tag-cloud span,
.pill-list li {
  display: inline-flex;
  min-height: 5.8mm;
  align-items: center;
  border: 1.3px solid rgba(112, 64, 31, 0.34);
  border-radius: 999px;
  background: rgba(255, 252, 237, 0.86);
  color: var(--brown);
  font-size: 6.6pt;
  font-weight: 850;
  line-height: 1.1;
}

.tag-cloud span {
  padding: 1mm 1.9mm;
}

.pill-list li {
  padding: 1.1mm 2.2mm;
}

.page-header {
  margin-bottom: 7mm;
  padding: 4mm 5mm;
  border: 2px solid var(--brown);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(247, 201, 87, 0.82), rgba(255, 107, 95, 0.28)),
    var(--paper);
  box-shadow: var(--shadow);
}

.page-header p {
  color: rgba(67, 38, 17, 0.82);
  font-size: 8.4pt;
  font-weight: 800;
}

.panel-projects {
  --panel-accent: var(--coral);
  display: grid;
  gap: 3.4mm;
}

.project-entry {
  position: relative;
  display: grid;
  grid-template-columns: 38mm minmax(0, 1fr);
  gap: 4mm;
  padding: 3.4mm;
  border: 1.5px solid rgba(112, 64, 31, 0.28);
  border-radius: 4mm;
  background:
    linear-gradient(90deg, var(--project-accent, var(--coral)) 0 2.2mm, transparent 2.2mm),
    rgba(255, 252, 237, 0.76);
}

.project-coral {
  --project-accent: var(--coral);
}

.project-mustard {
  --project-accent: var(--mustard);
}

.project-olive {
  --project-accent: var(--olive);
}

.project-meta {
  display: grid;
  align-content: start;
  gap: 2mm;
}

.project-meta span {
  padding: 0 2mm;
  background: var(--project-accent, var(--mustard));
}

.project-meta strong {
  color: var(--brown);
  font-size: 13pt;
  line-height: 1;
}

.project-entry p {
  color: rgba(67, 38, 17, 0.8);
  font-size: 7.8pt;
  line-height: 1.39;
}

.panel-rhythm {
  --panel-accent: var(--olive);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5mm;
  margin-bottom: 3.4mm;
}

.method-grid div {
  padding: 3mm;
  border: 1.4px solid var(--soft-line);
  border-radius: 3.4mm;
  background: rgba(255, 252, 237, 0.75);
}

.method-grid strong {
  display: block;
  margin-bottom: 1.2mm;
  color: var(--coral);
  font-size: 8.2pt;
  line-height: 1.1;
}

.method-grid p {
  color: rgba(67, 38, 17, 0.76);
  font-size: 7.3pt;
  line-height: 1.31;
}

.panel-direction {
  --panel-accent: var(--mustard);
}

.panel-direction p {
  margin-bottom: 3mm;
}

.closing-note {
  margin-top: 3.5mm;
  margin-bottom: 0 !important;
  padding-top: 3mm;
  border-top: 1px solid var(--soft-line);
  color: rgba(67, 38, 17, 0.82);
  font-weight: 800;
}

.panel-contact {
  --panel-accent: var(--coral);
  background:
    radial-gradient(circle at 91% 8%, rgba(118, 82, 200, 0.22) 0 11mm, transparent 11.5mm),
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(244, 184, 179, 0.13)),
    var(--paper);
}

.contact-list {
  display: grid;
  gap: 3mm;
}

.contact-list div {
  padding-bottom: 2.7mm;
  border-bottom: 1px solid var(--soft-line);
}

.contact-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-list dt {
  color: var(--coral);
  font-size: 6.7pt;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 1.4mm 0 0;
  overflow-wrap: anywhere;
  color: var(--brown);
  font-size: 8pt;
  font-weight: 850;
  line-height: 1.24;
}

.pdf-actions {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.pdf-download,
.site-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 2px solid var(--brown);
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: var(--brown);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.pdf-download {
  background: var(--mustard);
}

.site-link {
  background: rgba(255, 252, 237, 0.94);
}

.pdf-download:hover,
.pdf-download:focus-visible,
.site-link:hover,
.site-link:focus-visible {
  color: #fffdf3;
  transform: translateY(-2px);
  outline: 0;
  box-shadow: 5px 6px 0 rgba(112, 64, 31, 0.2);
}

.pdf-download:hover,
.pdf-download:focus-visible {
  background: var(--coral);
}

.site-link:hover,
.site-link:focus-visible {
  background: var(--olive);
}

.panel-portfolio {
  --panel-accent: var(--purple);
  background:
    radial-gradient(circle at 88% 18%, rgba(247, 201, 87, 0.24) 0 13mm, transparent 13.5mm),
    linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(118, 82, 200, 0.08)),
    var(--paper);
}

.panel-portfolio p + p {
  margin-top: 2.6mm;
}

@media screen and (max-width: 860px) {
  .pdf-actions {
    position: sticky;
    top: 0;
    right: auto;
    left: 0;
    justify-content: flex-end;
    padding: 12px 12px 0;
    background: linear-gradient(180deg, rgba(255, 248, 220, 0.96), rgba(255, 248, 220, 0));
  }

  .pdf-download,
  .site-link {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.72rem;
  }
}

@media screen and (max-width: 560px) {
  .pdf-actions {
    gap: 8px;
    justify-content: stretch;
  }

  .pdf-download,
  .site-link {
    min-width: 0;
    flex: 1 1 0;
    padding: 0 10px;
    font-size: 0.64rem;
    letter-spacing: 0.05em;
    text-align: center;
  }
}

@media screen and (max-width: 860px) {
  .cv-document {
    width: 100%;
    margin: 0;
  }

  .sheet {
    width: 100%;
    min-height: auto;
    padding: 24px 18px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
  }

  .sheet::before {
    inset: 10px;
    border-radius: 28px;
  }

  .sheet::after {
    right: -72px;
    top: -32px;
    width: 220px;
    height: 320px;
  }

  .cv-hero {
    padding: 22px 18px 20px;
    border-radius: 32px;
    margin-bottom: 20px;
  }

  .cv-hero::before {
    right: -56px;
    bottom: -28px;
    width: 280px;
    height: 148px;
    border-radius: 999px 0 0 999px;
    opacity: 0.7;
  }

  .hero-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .hero-layout,
  .page-grid-front,
  .page-grid-work,
  .project-entry,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .contact-stamp {
    max-width: none;
    width: 100%;
    padding: 18px;
    gap: 6px;
    border-radius: 24px;
    transform: none;
  }

  h1 {
    max-width: none;
    font-size: clamp(3rem, 14vw, 5rem);
    line-height: 0.9;
  }

  .kicker {
    margin-bottom: 8px;
    font-size: 0.88rem;
    line-height: 1.45;
    letter-spacing: 0.12em;
  }

  .role {
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    font-size: 0.98rem;
    line-height: 1.35;
    text-wrap: balance;
  }

  .positioning,
  .support-line {
    max-width: none;
  }

  .positioning {
    margin-top: 22px;
    font-size: clamp(1.05rem, 4.8vw, 1.5rem);
    line-height: 1.14;
  }

  .support-line {
    margin-top: 14px;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  p,
  li,
  dd,
  .check-list li,
  .project-entry p,
  .method-grid p {
    font-size: 0.95rem;
  }

  .page-header {
    align-items: flex-start;
    border-radius: 22px;
    flex-direction: column;
    gap: 10px;
  }
}

@media screen and (max-width: 560px) {
  .cv-document {
    gap: 0;
    margin: 0;
  }

  .sheet {
    padding: 18px 10px;
  }

  .sheet::before {
    inset: 8px;
    border-radius: 24px;
  }

  .sheet::after {
    right: -88px;
    top: -44px;
    width: 190px;
    height: 280px;
    opacity: 0.12;
  }

  .cv-hero {
    padding: 16px 14px 18px;
    border-radius: 24px;
  }

  .cv-hero::before {
    right: -72px;
    bottom: -32px;
    width: 250px;
    height: 126px;
    opacity: 0.5;
  }

  .issue-pill,
  .issue-number {
    font-size: 0.74rem;
  }

  .hero-layout {
    gap: 16px;
    margin-top: 16px;
  }

  .kicker {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
  }

  h1 {
    font-size: clamp(2.2rem, 15vw, 3.8rem);
  }

  .role {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .contact-stamp span {
    font-size: 0.72rem;
  }

  .contact-stamp a {
    font-size: 0.86rem;
    line-height: 1.3;
  }

  .positioning {
    margin-top: 18px;
    font-size: 0.98rem;
    line-height: 1.16;
  }

  .support-line {
    font-size: 0.78rem;
    line-height: 1.5;
  }
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm;
    background: #fff;
  }

  body::before,
  .screen-only {
    display: none !important;
  }

  .cv-document {
    display: block;
    width: auto;
    margin: 0;
  }

  .sheet {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    margin: 0;
    border: 0;
    box-shadow: none;
    page-break-after: always;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sheet:last-child {
    page-break-after: auto;
  }
}
