/* ============================================================
   patelyash.de — living portrait
   One material: the particles on the canvas and every letter
   share the same bone white on one flat blue.
   ============================================================ */

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  --klein: #1c2bc0;   /* the ground */
  --bone:  #f2f0ea;   /* particles and type */
  --mist:  rgba(242, 240, 234, .68);
  --faint: rgba(242, 240, 234, .32);
  --line:  rgba(242, 240, 234, .26);
  --heat:  #ffb38a;   /* fast particles only, and focus */

  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 48px);
  color-scheme: dark;
}

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

html { background: var(--klein); scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--klein);
  color: var(--bone);
  font: 400 18px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--heat); outline-offset: 4px; }
::selection { background: var(--bone); color: var(--klein); }

/* ---------- the field ------------------------------------------ */

.field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* shown only when WebGL is unavailable */
.still {
  display: none;
  position: fixed;
  right: 4vw;
  bottom: 0;
  height: 92vh;
  width: auto;
  max-width: 60vw;
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: .9;
  z-index: 0;
}
.no-gl .still { display: block; }
.no-gl .field { display: none; }

/* ---------- chrome --------------------------------------------- */

.corner {
  position: fixed;
  top: calc(var(--gutter) * .7 + env(safe-area-inset-top, 0px));
  right: var(--gutter);
  z-index: 5;
  display: flex;
  gap: 24px;
}
.corner a {
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.corner a:hover { border-color: var(--bone); }

main { position: relative; z-index: 1; }

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

.hero,
.contact {
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: var(--gutter);
  padding-bottom: calc(clamp(32px, 8vh, 88px) + env(safe-area-inset-bottom, 0px));
}

/* the CV: label column on the left, content on the right */
.cv {
  padding: clamp(96px, 18vh, 180px) var(--gutter) clamp(40px, 8vh, 96px);
  display: grid;
  gap: clamp(72px, 12vh, 128px);
  max-width: 1240px;
}

.block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr);
  gap: 16px clamp(32px, 5vw, 80px);
  align-items: start;
  scroll-margin-top: 96px;
}
.block__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(30px, 3vw, 44px);
  line-height: .95;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.block__body { margin: 0; padding: 0; min-width: 0; }

.lede {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.32;
  letter-spacing: -.015em;
  max-width: 34ch;
}

.more {
  margin: 18px 0 0;
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--mist);
  max-width: 58ch;
}
.lede + .more { margin-top: 24px; }

.copy { width: min(34vw, 460px); min-width: 0; }
.copy--wide { width: min(100%, 720px); }

/* ---------- type ----------------------------------------------- */

.name {
  margin: 0;
  font-weight: 800;
  font-size: clamp(64px, 9.4vw, 156px);
  line-height: .84;
  letter-spacing: -.048em;
}
.name span { display: block; }

.title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(44px, 5.4vw, 88px);
  line-height: .9;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.line {
  margin: 20px 0 0;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.4;
  color: var(--mist);
  max-width: 28ch;
}

.hint { margin: 28px 0 0; font-size: 15px; color: var(--faint); }
.hint--touch { display: none; }
@media (hover: none) {
  .hint--pointer { display: none; }
  .hint--touch { display: inline; }
}

/* entries: a real chronology, so the years lead */
.entries { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.entry {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 8px 32px;
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
}
.entry__when {
  margin: 0;
  font-weight: 800;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.entry__role { margin: 0; font-size: clamp(20px, 1.7vw, 24px); font-weight: 500; line-height: 1.25; letter-spacing: -.015em; text-wrap: balance; }
.entry__where { margin: 4px 0 0; color: var(--mist); }
.entry__list { margin: 14px 0 0; padding: 0 0 0 1.1em; color: var(--mist); display: grid; gap: 4px; max-width: 60ch; }
.entry__list li::marker { color: var(--faint); }

/* skills */
.skills { border-top: 1px solid var(--line); }
.skills__row {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 4px 32px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.skills__row dt { color: var(--mist); font-size: 16px; }
.skills__row dd { margin: 0; font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; letter-spacing: -.015em; line-height: 1.3; }

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px 4px;
  border-radius: 999px;
  background: var(--bone);
  color: var(--klein);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: middle;
}

/* certificate and languages */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.fact { padding: 22px 24px 22px 0; min-width: 0; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact__big { margin: 0; font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; line-height: 1.25; letter-spacing: -.015em; text-wrap: balance; }
.fact__small { margin: 6px 0 0; color: var(--mist); font-size: 16px; }
.level { font-weight: 800; letter-spacing: -.02em; }

.print-only { display: none; }

/* ---------- contact -------------------------------------------- */

.address {
  margin: 28px 0 0;
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
  letter-spacing: -.01em;
  user-select: all;
  overflow-wrap: anywhere;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--bone);
  font: 500 16px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--bone); }
.btn--solid { background: var(--bone); border-color: var(--bone); color: var(--klein); }
.btn--solid:hover { background: #fff; }

.status { min-height: 1.5em; margin: 12px 0 0; font-size: 15px; color: var(--mist); }

/* ---------- phones: shapes on top, words below ----------------- */

@media (max-width: 760px) {
  body { font-size: 17px; }
  .copy { width: 100%; }
  .name { font-size: clamp(56px, 17vw, 88px); }
  .title { font-size: clamp(40px, 12vw, 60px); }
  .line { margin-top: 14px; }
  .hint { margin-top: 18px; }
  .corner {
    top: 0; left: 0; right: 0;
    justify-content: flex-end;
    gap: 18px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 10px;
    background: var(--klein);
  }
  .block { scroll-margin-top: 72px; }
  .block { grid-template-columns: minmax(0, 1fr); }
  .entry, .skills__row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .entry__when { font-size: 22px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact, .fact + .fact { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .address { margin-top: 20px; }
  .still { right: 50%; transform: translateX(50%); top: 6vh; bottom: auto; height: 52vh; max-width: 90vw; }
}

/* ---------- reduced motion ------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- print: a plain two-page CV ------------------------- */

@media print {
  @page { size: A4; margin: 13mm 16mm 10mm; }
  :root {
    --bone: #14182e; --mist: #4a4f66; --faint: #8a8ea3; --line: #d6d8e2; --klein: #ffffff;
    color-scheme: light;
  }
  html, body { background: #fff; }
  body { font-size: 10pt; line-height: 1.4; }
  .field, .still, .corner, .hint, .actions, .status, .contact .line, #contactTitle { display: none !important; }
  .print-only { display: block; margin: 4px 0 0; color: var(--mist); }
  .joke { display: none; }

  .hero, .contact { min-height: 0; display: block; padding: 0; }
  .copy { width: auto; }
  .name { font-size: 34pt; line-height: .9; }
  .name span { display: inline; }
  .hero .line { margin-top: 6px; font-size: 13pt; max-width: none; color: var(--bone); }

  .contact { order: -1; }
  main { display: flex; flex-direction: column; }
  main > .hero { order: -2; }
  .contact { margin-top: 6px; }
  .address { margin: 6px 0 0; font-size: 11pt; }

  .cv { display: block; padding: 12pt 0 0; max-width: none; }
  .block + .block { margin-top: 9pt; }
  .block { grid-template-columns: 34mm minmax(0, 1fr); gap: 0 5mm; break-inside: avoid; }
  .block__title { font-size: 12pt; letter-spacing: -.01em; }
  .lede { font-size: 11pt; max-width: none; letter-spacing: -.01em; }
  .more, .lede + .more { margin-top: 2pt; font-size: 10pt; line-height: 1.4; max-width: none; }
  .entry { grid-template-columns: 28mm minmax(0, 1fr); gap: 0 5mm; padding-block: 6pt; break-inside: avoid; }
  .entry__when { font-size: 11pt; letter-spacing: 0; }
  .entry__role { font-size: 11.5pt; }
  .entry__list { margin-top: 3pt; gap: 0; }
  .skills__row { grid-template-columns: 28mm minmax(0, 1fr); gap: 0 5mm; padding-block: 4pt; }
  .skills__row dt { font-size: 10pt; }
  .skills__row dd { font-size: 11pt; }
  .tag { font-size: 8pt; padding: 1px 6px 2px; background: none; border: 1px solid var(--bone); color: var(--bone); }
  .facts { grid-template-columns: 1.6fr 1fr 1fr; }
  .fact { padding: 7pt 8pt 7pt 0; border: 0; }
  .fact + .fact { padding-left: 8pt; border-left: 1px solid var(--line); }
  .fact__big { font-size: 11pt; }
  .fact__small { font-size: 9.5pt; }
}
