@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono[wght].woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Italic[wght].woff2') format('woff2');
  font-weight: 100 800;
  font-style: italic;
}

/* ---------------------------------------------------------------- tokens */

:root {
  --color-text:          #000;
  --color-bg:            #fff;
  --color-border:        #ccc;

  --font-size-h1:   28px;
  --font-size-base: 16px;
  --font-size-sm:   14px;

  --font-weight-normal:   400;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  --line-height-tight:  1.3;
  --line-height-normal: 1.5;
  --line-height-loose:  1.6;

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;

  --page-padding-v: 13mm;
  --page-padding-h: 15mm;

  --photo-size:   176px;
  --photo-radius: 10px;
}

/* --------------------------------------------------------------- reset */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@page {
  size: 210mm auto;
  margin: 0;
}

/* --------------------------------------------------------------- base */

html {
  font-size: var(--font-size-base);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: #e8e8e8;
}

/* ----------------------------------------------------------------- page */

.page {
  width: 210mm;
  margin: var(--space-6) auto;
  padding: var(--page-padding-v) var(--page-padding-h);
  background: var(--color-bg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

@media print {
  body { background: var(--color-bg); }
  .page {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }
}

/* -------------------------------------------------------------- header */

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.header-left {
  flex: 1;
  min-width: 0;
}

.header-right {
  flex-shrink: 0;
}

.photo {
  width: var(--photo-size);
  height: var(--photo-size);
  object-fit: cover;
  border-radius: var(--photo-radius);
  display: block;
}

h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.headline {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  margin-top: var(--space-1);
  line-height: var(--line-height-normal);
}

.contacts {
  list-style: none;
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.contacts li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  padding-left: 0;
}

.contacts li::before {
  content: none;
}

.contacts svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ------------------------------------------------------------ sections */

section {
  margin-bottom: var(--space-6);
}

section:last-child {
  margin-bottom: 0;
}

h2 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
}

section > p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-loose);
}

/* ---------------------------------------------------------- experience */

.company + .company {
  margin-top: var(--space-6);
}

.company-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
}

.project {
  margin-top: var(--space-3);
}

.project + .project {
  margin-top: var(--space-5);
}

.company h3 {
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.award {
  font-size: var(--font-size-sm);
  font-style: italic;
}

.company-divider {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: var(--space-3) 0;
}

.project h4 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-1);
  margin-bottom: var(--space-2);
}

.tag {
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 1px var(--space-2);
}

.entry-label {
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
}

.tech-stack {
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
}

section ol,
section ul {
  margin-top: var(--space-2);
  font-size: var(--font-size-base);
  line-height: var(--line-height-loose);
  list-style-position: inside;
}

section dl {
  margin-top: var(--space-2);
}

section dt {
  font-weight: var(--font-weight-semibold);
  margin-top: var(--space-3);
}

section dt:first-child {
  margin-top: 0;
}

section dd {
  font-size: var(--font-size-base);
  line-height: var(--line-height-loose);
  margin-left: 0;
}
