/* ---- Fonts (self-hosted, offline = identical PDF rendering) ---- */
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-display: block;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: block;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: block;
}

/* ---- Design tokens (noiiise landing) ---- */
:root {
  --bg: #000000;
  --coral: #e05a45;
  --fg: #fafafa;
  --muted: #8a8a8a;
  --dim: #b5b5b5;
  --line: #1f1f1f;
  --sans: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

/* Kill OS auto-link styling (blue tel/email numbers on mobile) */
.card a:not(.pdf-link),
.c-val a {
  color: inherit;
  text-decoration: none;
  -webkit-text-fill-color: currentColor;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

body {
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* ---- Card canvas: identical on screen and in PDF ---- */
.card {
  width: 1280px;
  height: 720px;
  flex-shrink: 0;
  transform: scale(var(--fit, 1));
  transform-origin: center center;
  background: var(--bg);
  padding: 40px 48px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.rule { height: 1px; background: var(--line); flex-shrink: 0; }
.rule-soft { margin: 16px 0; }

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
}
.wordmark {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
}
.led {
  width: 6px;
  height: 6px;
  background: var(--coral);
  border-radius: 1px;
  display: inline-block;
}

/* ---- Main grid ---- */
.grid {
  display: flex;
  gap: 48px;
  padding: 26px 0;
  flex: 1;
  min-height: 0;
}

/* ---- Left column ---- */
.col-left {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.photo {
  width: 210px;
  height: 210px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    repeating-linear-gradient(45deg, #0c0c0c 0 10px, #080808 10px 20px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.name {
  font-weight: 800;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  margin-top: 20px;
}
.role {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--coral);
  margin-top: 9px;
}

.contacts { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.contacts li { display: flex; align-items: baseline; gap: 12px; }
.c-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--coral);
  width: 68px;
  flex-shrink: 0;
}
.c-val {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.01em;
}

/* ---- Right column ---- */
.col-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.deck {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 16px 0 9px;
}
.col-right > .deck:first-of-type { margin-top: 0; }
.diamond {
  width: 6px;
  height: 6px;
  border: 1px solid var(--muted);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.deck-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--coral);
}
.deck-line { flex: 1; height: 1px; background: var(--line); }

.profile {
  font-size: 12px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 92%;
}

.stack {
  display: grid;
  grid-template-columns: 92px 1fr;
  row-gap: 7px;
  column-gap: 14px;
}
.stack dt {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--coral);
  padding-top: 1px;
}
.stack dd {
  font-size: 12px;
  line-height: 1.5;
  color: var(--dim);
}

.xp { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.xp li { display: flex; gap: 16px; }
.xp-no {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--coral);
  width: 22px;
  flex-shrink: 0;
  padding-top: 3px;
}
.xp-body { flex: 1; min-width: 0; }
.xp-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--coral);
  margin-bottom: 8px;
}
.xp-head {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.xp-where {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.xp-where b { font-weight: 700; flex-shrink: 0; }
.xp-where i {
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}
.xp-head em,
.edu em {
  flex-shrink: 0;
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: inline-grid;
  grid-template-columns: 64px 14px 62px;
  column-gap: 13px;
  align-items: baseline;
}
.xp-head em .df,
.edu em .df { text-align: right; }
.xp-head em .ds,
.edu em .ds { text-align: center; }
.xp-head em .dt,
.edu em .dt { text-align: left; }
.xp-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--dim);
  margin-top: 4px;
}

.edu {
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

/* ---- Footer ---- */
.footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
}
.foot-id {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #6e6e6e;
}
.pdf-link {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  text-decoration: none;
}
.pdf-link:hover { text-decoration: underline; }

/* ---- Print: page == card, 1:1 ---- */
@page {
  size: 338.667mm 190.5mm; /* 1280x720 px @ 96dpi */
  margin: 0;
}
@media print {
  html, body { height: auto; }
  body { display: block; overflow: visible; }
  .card { box-shadow: none; transform: none; }
  .pdf-link { display: none; }
}

/* ---- Mobile: fluid layout, vertical scroll only, zoom locked ---- */
@media screen and (max-width: 820px) {
  html, body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body {
    display: block;
    -webkit-text-size-adjust: 100%;
  }
  .card {
    width: 100%;
    max-width: 100%;
    height: auto;
    transform: none;
    padding: 26px 22px 22px;
  }
  .topbar { padding-bottom: 12px; }
  .wordmark { font-size: 22px; }
  .tag { font-size: 8px; letter-spacing: 0.18em; gap: 7px; }

  .grid {
    flex-direction: column;
    gap: 18px;
    padding: 18px 0;
  }

  .col-left {
    width: 100%;
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
  }
  .photo { width: 116px; height: 116px; }
  .col-left .meta { flex: 1; min-width: 0; }
  .name { font-size: 24px; line-height: 1.1; white-space: normal; margin-top: 0; }
  .role { margin-top: 7px; }
  .rule-soft { margin: 12px 0; }
  .contacts { gap: 6px; }
  .c-key { width: 56px; font-size: 9px; }
  .c-val { font-size: 10px; }

  .col-right { gap: 0; min-width: 0; }
  .deck { margin: 13px 0 8px; }
  .col-right > .deck:first-of-type { margin-top: 0; }
  .profile { font-size: 11px; max-width: 100%; }
  .stack { grid-template-columns: 74px 1fr; row-gap: 5px; }
  .stack dt { font-size: 9px; }
  .stack dd { font-size: 10px; line-height: 1.4; }
  .xp { gap: 9px; }
  .xp li { gap: 12px; }
  .xp-no { font-size: 9px; width: 18px; }
  .xp-where i { font-size: 9px; }
  .xp-bar { margin-bottom: 5px; }
  .xp-desc { font-size: 10px; line-height: 1.4; margin-top: 3px; }

  /* Dates stay right-aligned (timetable) on mobile too */
  .xp-head, .edu { font-size: 11px; gap: 10px; }
  .xp-where { flex: 1 1 auto; }
  .xp-head em, .edu em {
    grid-template-columns: 52px 12px 50px;
    column-gap: 7px;
    font-size: 8px;
  }
  .edu { font-size: 11px; }
  .footbar { padding-top: 12px; }
  .foot-id, .pdf-link { font-size: 8px; }

  /* Containment: flex children must be allowed to shrink so text wraps
     instead of overflowing and getting clipped by the viewport */
  .card, .card * { min-width: 0; max-width: 100%; }
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .tag { flex-wrap: wrap; }
  .profile, .stack dd, .xp-desc, .c-val, .tag, .deck-label {
    overflow-wrap: anywhere;
  }
}
