/* =========================================================
   Fonts (self-hosted Funnel Sans variable font, weights 300–800, OFL-1.1)
   ========================================================= */
@font-face {
  font-family: "Funnel Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../assets/fonts/funnel-sans-latin-wght-normal.woff2") format("woff2-variations"),
       url("../assets/fonts/funnel-sans-latin-wght-normal.woff2") format("woff2");
}

/* =========================================================
   Tokens
   ========================================================= */
:root {
  --ink: #1e1e1e;
  --ink-muted: #595959;
  --paper: #ffffff;
  --bar: rgba(241, 241, 241, 0.8);
  --font: "Funnel Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #0f0f0f; -webkit-font-smoothing: antialiased; }
h1, h2, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img { display: block; max-width: none; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 700; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 8px 16px; background: var(--paper); border-radius: 4px; }
.skip-link:focus { top: 16px; }

/* =========================================================
   Slide system
   Every slide is the 1920 × 1080 Figma artboard, scaled to the
   viewport width. 1 design pixel = var(--u).
   Position children with --x / --y / --w / --h in design pixels.
   ========================================================= */
.slide {
  --u: calc(100cqw / 1920);
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 1080;
  container-type: inline-size;
  overflow: hidden;
  background: var(--paper);
  scroll-snap-align: start;
}
.slide--dark { background: var(--ink); color: var(--paper); }
.slide--tall { aspect-ratio: 1920 / 1619; }
.slide--gray { background: #f1f1f1; }
.slide--ink { background: #16181b; }
.slide--image > img:first-child { width: 100%; height: 100%; object-fit: cover; }

.abs {
  position: absolute;
  left: calc(var(--x, 0) * var(--u));
  top: calc(var(--y, 0) * var(--u));
}
.abs[style*="--w"] { width: calc(var(--w) * var(--u)); }
.abs[style*="--h"] { height: calc(var(--h) * var(--u)); }
img.abs { height: auto; }

/* =========================================================
   Shared type
   ========================================================= */
.meta {
  width: calc(329 * var(--u));
  font-size: calc(21 * var(--u));
  letter-spacing: calc(-1.05 * var(--u));
  line-height: 1.2;
}
.meta--right { text-align: right; }

.display { font-weight: 800; color: inherit; letter-spacing: calc(-6 * var(--u)); }
.display > span { display: block; line-height: calc(120 * var(--u)); }
.display--150 { font-size: calc(150 * var(--u)); }
.display--tight { letter-spacing: calc(-7.5 * var(--u)); }
.display__light { font-weight: 300; font-size: calc(120 * var(--u)); }
.display--contents { font-size: calc(150 * var(--u)); line-height: calc(150 * var(--u)); letter-spacing: calc(-7.5 * var(--u)); }

.body-copy { font-size: calc(21 * var(--u)); line-height: 1.2; }
.body-copy p + p { margin-top: calc(25 * var(--u)); }

/* =========================================================
   01 · Cover
   ========================================================= */
.cover-meta { font-size: calc(24 * var(--u)); letter-spacing: calc(-1.2 * var(--u)); line-height: 1.2; }
.cover-meta__title { font-size: calc(30 * var(--u)); font-weight: 700; }
.cover-meta__by { line-height: calc(33 * var(--u)); }

.cover-tags {
  display: flex; align-items: center; gap: calc(22.5 * var(--u));
  font-size: calc(24 * var(--u)); letter-spacing: calc(-1.2 * var(--u)); white-space: nowrap;
}
.cover-tags span { padding-inline: calc(4 * var(--u)); }

.cover-title {
  display: flex; align-items: center; justify-content: center;
  font-size: calc(500 * var(--u)); font-weight: 800; line-height: 1;
  letter-spacing: calc(-25 * var(--u));
  /* nudge to match Figma's optical centring of the word */
  padding-right: calc(25 * var(--u));
}

.cover-contact {
  display: flex; align-items: center; justify-content: flex-end; gap: calc(56 * var(--u));
  font-size: calc(24 * var(--u)); letter-spacing: calc(-1.2 * var(--u)); white-space: nowrap;
}
.cover-contact a:hover, .contact-row a:hover { text-decoration: underline; text-underline-offset: .2em; }

/* =========================================================
   02 · About
   ========================================================= */
.about-kicker { font-size: calc(36 * var(--u)); font-weight: 700; white-space: nowrap; }
.contact-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: calc(24 * var(--u)); letter-spacing: calc(2.4 * var(--u)); white-space: nowrap;
}

/* =========================================================
   03 · What I do
   ========================================================= */
.hex-label {
  left: calc(var(--cx) * var(--u));
  top: calc(var(--cy) * var(--u));
  transform: translate(-50%, -50%);
  font-size: calc(30 * var(--u)); font-weight: 700; line-height: 1.2;
  color: var(--paper); text-align: center; white-space: nowrap;
}

/* =========================================================
   04 · Tools
   ========================================================= */
.tools-bar {
  background: var(--bar);
  backdrop-filter: blur(3px);
  border-radius: calc(27 * var(--u));
}

/* =========================================================
   05 · Experience
   ========================================================= */
.job {
  display: grid;
  grid-template-columns: calc(170 * var(--u)) auto;
  column-gap: 0;
  width: calc(470 * var(--u));
}
.job__years { grid-row: 1 / span 2; padding-top: calc(1 * var(--u)); font-size: calc(21 * var(--u)); line-height: calc(30 * var(--u)); color: var(--ink-muted); }
.job__role { font-size: calc(24 * var(--u)); font-weight: 700; line-height: calc(30 * var(--u)); }
.job__company { font-size: calc(21 * var(--u)); line-height: calc(30 * var(--u)); color: var(--ink-muted); }

/* =========================================================
   06 · Contents
   ========================================================= */
.toc__item { height: calc(51 * var(--u)); }
.toc__item a {
  display: flex; justify-content: space-between; align-items: center;
  height: calc(47 * var(--u));
  border-bottom: max(1px, calc(1 * var(--u))) solid var(--ink);
  font-size: calc(30 * var(--u)); font-weight: 700; line-height: 1;
  transition: padding .2s ease, opacity .2s ease;
}
.toc__item a[href] { cursor: pointer; }
.toc__item a[href]:hover { padding-inline: calc(12 * var(--u)); }

/* =========================================================
   07 · Section divider
   ========================================================= */
.section-title {
  display: flex; align-items: flex-end;
  font-size: calc(250 * var(--u)); font-weight: 800;
  line-height: calc(200 * var(--u));
  letter-spacing: calc(-12.5 * var(--u));
  padding-bottom: calc(14 * var(--u));
}

/* =========================================================
   Email Design
   ========================================================= */
.email {
  border-radius: calc(15 * var(--u));
  box-shadow: 0 0 calc(50 * var(--u)) calc(5 * var(--u)) rgba(0, 0, 0, .15);
}

/* Two-line section titles (e.g. Storyboard & Illustrations) */
.section-title--2line { flex-direction: column; align-items: flex-start; justify-content: flex-end; line-height: calc(220 * var(--u)); }
.section-title--2line span { display: block; }
.section-title--200 { font-size: calc(200 * var(--u)); letter-spacing: calc(-10 * var(--u)); }

/* =========================================================
   Slide navigation
   ========================================================= */
.deck-nav {
  position: fixed; right: 20px; bottom: 20px; z-index: 20;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  font: 500 14px/1 var(--font);
  color: var(--paper);
  background: rgba(30, 30, 30, .78);
  backdrop-filter: blur(8px);
  border-radius: 999px;
}
.deck-nav__count { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.deck-nav__btn {
  display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
.deck-nav__btn:hover { background: rgba(255, 255, 255, .14); }
.deck-nav__btn:disabled { opacity: .35; cursor: default; background: none; }
.deck-nav__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .deck-nav, .skip-link { display: none; }
  .slide { break-after: page; }
}
