  :root {
    --bg: #faf6f0;
    --ink: #1d1d1d;
    --muted: rgba(29, 29, 29, .66);
    --faint: rgba(29, 29, 29, .14);
    --accent: #d9583b;          /* sunset coral */
    --serif: "Newsreader", Georgia, serif;
    --sans: "Familjen Grotesk", system-ui, sans-serif;
    --pad: clamp(20px, 5vw, 48px);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body { background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
  a { color: inherit; }
  img { display: block; max-width: 100%; }
  .wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--pad); }
  .label { font: 500 11px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; }

  /* ---------- header ---------- */
  header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; }
  header nav { display: flex; align-items: center; gap: 28px; }
  header a { text-decoration: none; }
  header nav a:hover, .np:hover .np-song { color: var(--accent); }
  .np { display: inline-flex; align-items: center; gap: 10px; max-width: 360px; color: var(--muted); text-decoration: none; }
  .np-song { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; text-transform: none; letter-spacing: 0; font-size: 13px; }
  .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; flex: none; }
  .eq i { width: 2px; background: var(--accent); animation: eq 1s ease-in-out infinite; }
  .eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
  @keyframes eq { 0%, 100% { height: 3px; } 50% { height: 10px; } }

  /* ---------- hero ---------- */
  .hero { padding: clamp(36px, 7vw, 72px) 0 clamp(64px, 10vw, 120px); }
  .hero p {
    font: 300 clamp(34px, 5.4vw, 64px)/1.14 var(--serif); letter-spacing: -.01em; max-width: 15.5em;
  }
  .pill {
    display: inline-block; position: relative; width: 2.3em; height: .82em; margin: 0 .06em;
    vertical-align: -.06em; border-radius: 999px; overflow: hidden; background: #ddd;
    transition: transform .45s cubic-bezier(.16, 1, .3, 1); cursor: default;
  }
  .pill:hover { transform: scale(1.18) rotate(-3deg); z-index: 1; }
  .pill svg, .pill img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .pill img { object-fit: cover; }
  .hero em { font-style: italic; }
  .nw { white-space: nowrap; }  /* a pill never starts a line on its own */

  /* animated bits inside the pills */
  .swell { animation: swell 3.2s linear infinite; }
  .swell.b { animation-duration: 4.6s; animation-direction: reverse; }
  @keyframes swell { to { transform: translateX(-40px); } }
  .twinkle { animation: twinkle 2.4s steps(1) infinite; }
  .twinkle.d2 { animation-delay: -.8s; } .twinkle.d3 { animation-delay: -1.6s; }
  @keyframes twinkle { 50% { opacity: .15; } }
  .reel { transform-box: fill-box; transform-origin: center; animation: spin 2.2s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .sunrise { animation: sunrise 5s ease-in-out infinite alternate; }
  @keyframes sunrise { from { transform: translateY(2px); } to { transform: translateY(-2px); } }

  /* ---------- work ---------- */
  .divider { width: 1px; height: 56px; margin: 0 auto 72px; background: var(--faint); }
  .work { display: grid; gap: clamp(72px, 10vw, 120px); padding-bottom: clamp(80px, 12vw, 140px); }
  .sec-head { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px 20px; padding-top: 22px; border-top: 1px solid var(--ink); margin-bottom: calc(clamp(72px, 10vw, 120px) * -.45); }
  .sec-head h2 { font: 300 clamp(40px, 5vw, 56px)/1.05 var(--serif); }
  .sec-head h2 em { font-style: italic; }
  .sec-head .label { color: var(--muted); }
  #projects .shot { border-radius: 14px; }
  .more-row { display: flex; flex-wrap: wrap; gap: 4px 28px; }
  #projects .meta .label { color: #a83a1b; }
  .row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 7vw, 88px); align-items: start; }
  .shot {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 2px;
    background: #ece4d8;
  }
  .shot > svg, .shot > img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .shot > img { object-fit: cover; }
  .shot.logo { display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--faint); }
  .shot.logo > img { position: static; width: auto; height: auto; max-width: 62%; max-height: 46%; object-fit: contain; }
  .shot.logo.tall > img { max-height: 62%; }
  .row:hover .shot > * { transform: scale(1.025); }
  .shot > * { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
  .meta .label { color: var(--ink); margin-bottom: 10px; }
  .meta h2 { font: 300 clamp(30px, 3.4vw, 40px)/1.15 var(--serif); margin-bottom: 14px; }
  .meta h2:has(+ .role) { margin-bottom: 4px; }
  .role { font: 400 clamp(18px, 1.7vw, 20px)/1.3 var(--serif); font-style: italic; color: var(--muted); margin-bottom: 14px; }
  .meta p { color: var(--muted); max-width: 30em; }
  .meta p + p { margin-top: .8em; }
  .more {
    display: inline-flex; gap: .35em; margin-top: 22px; padding-bottom: 2px;
    font: 500 14px var(--sans); text-decoration: none; border-bottom: 1px solid currentColor;
    background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; color: var(--ink);
  }
  .more:hover { color: var(--accent); }
  .more[aria-disabled="true"] { color: var(--muted); border-bottom-style: dashed; cursor: default; }

  /* ---------- about ---------- */
  .about { border-top: 1px solid var(--faint); padding: 104px 0; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 7vw, 88px); }
  .about h2 { font: 300 clamp(40px, 5vw, 56px)/1.05 var(--serif); }
  .about h2 em { font-style: italic; }
  .about .body p { font: 300 clamp(20px, 2vw, 24px)/1.45 var(--serif); }
  .about .body p + p { margin-top: 1em; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
  .chips span { padding: 6px 14px; border: 1px solid var(--faint); border-radius: 999px; font-size: 14px; }
  .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; margin-top: 40px; }
  .facts .label { color: var(--muted); margin-bottom: 4px; }

  /* ---------- footer ---------- */
  footer { border-top: 1px solid var(--faint); padding: clamp(56px, 9vw, 104px) 0 32px; }
  .cta { font: 300 clamp(44px, 8vw, 104px)/1 var(--serif); text-decoration: none; display: inline-flex; gap: .2em; }
  .cta:hover { color: var(--accent); }
  .cta em { font-style: italic; }
  .links { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 40px; }
  .links a, .links button { font: 500 14px var(--sans); color: var(--ink); text-decoration: none; background: none; border: 0; border-bottom: 1px solid currentColor; padding-bottom: 2px; cursor: pointer; }
  .links a:hover, .links button:hover { color: var(--accent); }
  .fine { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 72px; color: var(--muted); }
  .fine a { text-decoration: none; }
  .fine a:hover { color: var(--accent); }

  /* ---------- lightbox ---------- */
  dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100vh; }
  dialog::backdrop { background: rgba(250, 246, 240, .96); }
  .lb { position: relative; width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr auto; padding: 24px var(--pad); }
  .lb-top, .lb-bottom { display: flex; justify-content: space-between; align-items: center; }
  .lb figure { display: flex; align-items: center; justify-content: center; min-height: 0; }
  .lb video { max-width: min(1100px, 100%); max-height: 100%; background: #000; border-radius: 4px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .35); }
  .lb img { max-width: min(900px, 100%); max-height: 100%; object-fit: contain; filter: drop-shadow(0 20px 30px rgba(0,0,0,.12)); }
  .lb button { background: none; border: 0; font: 500 14px var(--sans); cursor: pointer; color: var(--ink); padding: 8px 0; }
  .lb button:hover { color: var(--accent); }

  @media (max-width: 760px) {
    header { flex-wrap: wrap; }
    .np { order: 3; width: 100%; max-width: none; }
    .row, .about { grid-template-columns: 1fr; }
    .about { padding: 64px 0; }
    .divider { margin-bottom: 56px; }
    .sec-head { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
  }
