/* tedlistens: a scale model.
   Palette: plaster ground, foam blocks, graphite ink, ultramarine for anything you can point at. */

:root {
  --plaster: #E3E5E2;
  --foam: #F6F7F5;
  --graphite: #1D2125;
  --slate: #5B636A;
  --ultramarine: #2643F0;
  --rule: rgba(29, 33, 37, 0.16);

  --gutter: clamp(20px, 4vw, 40px);
  --measure: 36em;

  /* Type scale (classical): 13 / 17 / 21 / 24 / 36 / 60 / 96 */
  --t-small: 0.8125rem;
  --t-body: 1.0625rem;
  --t-lede: 1.3125rem;
  --t-h3: 1.5rem;
  --t-h2: 2.25rem;
  --t-email: clamp(2rem, 5vw, 3.75rem);
  --t-display: clamp(3rem, 7.4vw, 6rem);
}

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

html {
  background: var(--plaster);
  color: var(--graphite);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-size: var(--t-body);
  line-height: 1.55;
  font-stretch: 100%;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ultramarine);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  background: var(--graphite);
  color: var(--foam);
  padding: 8px 12px;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.brand {
  font-weight: 650;
  font-stretch: 118%;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
}

.site-header nav a {
  text-decoration: none;
  color: var(--slate);
  font-size: 0.9375rem;
}
.site-header nav a:hover { color: var(--graphite); }

.site-header.is-solid {
  background: rgba(227, 229, 226, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--rule);
}

.vr-button {
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foam);
  background: var(--ultramarine);
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}
.vr-button:hover { background: #1B33C9; }

/* ---------- Hero / maquette ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}

#maquette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.hero-copy {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  max-width: 34rem;
  pointer-events: none;
}

h1 {
  margin: 0 0 20px;
  font-size: var(--t-display);
  font-weight: 760;
  font-stretch: 125%;
  line-height: 0.92;
  letter-spacing: -0.025em;
  max-width: 7.5em;
}

.lede {
  margin: 0 0 14px;
  font-size: var(--t-lede);
  line-height: 1.4;
  max-width: 26em;
}

.hint {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--slate);
  max-width: 30em;
}

.no-webgl .hint { display: none; }

/* Tags that float over each block, like labels pinned to a model */
.block-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.block-label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 3px 8px 4px;
  font-size: var(--t-small);
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  color: var(--graphite);
  background: var(--foam);
  border: 1px solid var(--rule);
  border-radius: 2px;
  pointer-events: auto;
  will-change: transform;
  transition: opacity 0.3s;
}
.block-label::after {
  /* leader line down to the block */
  content: "";
  position: absolute;
  left: calc(50% + var(--leader, 0px));
  top: 100%;
  width: 1px;
  height: 12px;
  background: currentColor;
  opacity: 0.35;
}
.block-label .years {
  color: var(--slate);
  font-variant-numeric: tabular-nums;
}
.block-label.is-active {
  color: var(--ultramarine);
  border-color: var(--ultramarine);
}
.block-label.is-hidden { opacity: 0; pointer-events: none; }

/* ---------- Sections ---------- */

.section {
  padding: clamp(72px, 12vw, 140px) var(--gutter) 0;
  scroll-margin-top: 40px;
}

.section-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 32px;
  border-top: 1px solid var(--graphite);
  padding-top: 24px;
}

h2 {
  margin: 0;
  font-size: var(--t-h2);
  font-weight: 700;
  font-stretch: 118%;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h3 {
  margin: 0;
  font-size: var(--t-h3);
  font-weight: 650;
  line-height: 1.25;
}

/* Work timeline */

.roles {
  list-style: none;
  margin: 0;
  padding: 0;
}

.roles li {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 24px;
  padding: 26px 0 30px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 80px;
}
.roles li:first-child { border-top: 0; padding-top: 4px; }

.roles .years {
  margin: 4px 0 0;
  color: var(--slate);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.roles .company {
  margin: 2px 0 12px;
  color: var(--slate);
}

.roles li p:last-child {
  margin: 0;
  max-width: var(--measure);
}

.roles li.is-current .years { color: var(--ultramarine); }

.roles li:target h3,
.roles li.is-flagged h3 { color: var(--ultramarine); }

/* About */

.about {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.portrait {
  width: 100%;
  max-width: 320px;
  filter: grayscale(1) contrast(1.05);
}

.about-text > p {
  margin: 0 0 1em;
  max-width: var(--measure);
}
.about-text > p:first-child { font-size: var(--t-lede); line-height: 1.45; }

.about-text h3 {
  font-size: var(--t-body);
  font-weight: 650;
  margin: 40px 0 12px;
}

.toolkit {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 14em;
  column-gap: 32px;
  max-width: var(--measure);
}
.toolkit li {
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
}

.education { margin: 0; max-width: var(--measure); }
.education div { padding: 6px 0 8px; border-bottom: 1px solid var(--rule); }
.education dt { font-weight: 600; }
.education dd { margin: 0; color: var(--slate); }

/* Contact */

.contact > p {
  margin: 0 0 16px;
  max-width: var(--measure);
  font-size: var(--t-lede);
  line-height: 1.45;
}

.email {
  display: inline-block;
  font-size: var(--t-email);
  font-weight: 720;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ultramarine);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
  overflow-wrap: anywhere;
}
.email:hover { text-decoration-thickness: 4px; }

.contact-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 28px 0 0;
  padding: 0;
}
.contact-links a {
  text-underline-offset: 0.2em;
  text-decoration-color: var(--rule);
}
.contact-links a:hover { text-decoration-color: currentColor; }

.site-footer {
  max-width: calc(1200px + 2 * var(--gutter));
  margin: clamp(72px, 12vw, 140px) auto 0;
  padding: 24px var(--gutter) 40px;
  color: var(--slate);
  font-size: var(--t-small);
}
.site-footer p { margin: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 760px) {

  .section-grid,
  .about { grid-template-columns: minmax(0, 1fr); }

  .roles li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .roles .years { margin: 0; }

  .portrait { max-width: 220px; }

  .lede { font-size: 1.125rem; }
  .hint { font-size: 0.875rem; }
  .block-label { font-size: 0.75rem; padding: 2px 6px 3px; gap: 6px; }
}

@media (max-width: 420px) {
  .site-header nav a[href="#about"] { display: none; }
}
