/* Aniconic — rebuilt from the Cargo mock-up (1153332.cargo.site)
   Type: the mock-up uses "Diatype Variable" (Dinamo, licensed through Cargo only).
   Inter stands in until a Diatype web licence is in /fonts — then swap --font. */

@font-face {
  font-family: "Diatype Variable";
  src: url("fonts/DiatypeVariable.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Linear B";
  src: url("fonts/noto-sans-linear-b.woff2") format("woff2");
  font-display: swap;
}

:root {
  --font: "Diatype Variable", "Inter", system-ui, sans-serif;
  --bg: #000;
  --ink: rgba(255, 255, 255, 0.85);
  --muted: #939393;
  --line: rgba(255, 255, 255, 0.18);
  --pad: 1rem;
  color-scheme: dark;
}

/* Cargo scales rem with the viewport */
html { font-size: clamp(9px, 0.9vw, 17px); scroll-behavior: smooth; scroll-padding-top: 4rem; }
@media (max-width: 768px) { html { font-size: 9.5px; } }

* { box-sizing: border-box; min-width: 0; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.2;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:active { opacity: 0.7; }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

h1 {
  margin: 0;
  font-weight: 300;
  font-size: 3.8rem;
  line-height: 0.95;
  letter-spacing: -0.015em;
}
.caption { font-size: 1.1rem; font-weight: 450; line-height: 1.2; display: block; }
.muted { color: var(--muted); }

sup, sub { position: relative; vertical-align: baseline; font-size: 0.75em; }
sup { top: -0.4em; }
sub { top: 0.3em; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
  padding: var(--pad);
  mix-blend-mode: difference;
}
.nav-links { display: flex; gap: 0 0.9em; flex-wrap: wrap; justify-content: center; }
.nav-mark {
  justify-self: end;
  font-family: "Noto Sans Linear B", var(--font);
  font-size: 1.59em; line-height: 0.8;
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad);
  min-height: 100vh; min-height: 100svh;
  padding: 0 var(--pad);
}
.hero-text {
  padding-top: calc(var(--pad) + 3.8rem * 0.95 * 2.3);
  text-wrap: pretty;
}
.marquee {
  height: 100vh; height: 100svh;
  overflow-y: auto; scrollbar-width: none;
  overscroll-behavior: contain;
}
.marquee::-webkit-scrollbar { display: none; }
.marquee-set { display: flex; flex-direction: column; gap: 6rem; padding-bottom: 6rem; }

.media { margin: 0; }
.media img { display: block; max-width: 100%; height: auto; background: #111; }
.media.fit-height img { max-height: 52vh; width: auto; }
.media.fit-width img { width: 100%; }
.media figcaption { margin-top: 1rem; max-width: 40em; }

/* Blur-in on reveal */
.media img { filter: blur(8px); transform: scale(0.992); transition: filter 1s cubic-bezier(.4,0,.2,1), transform 1s cubic-bezier(.4,0,.2,1); }
.media.in img { filter: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .media img { filter: none; transform: none; transition: none; } }

/* ---------- Disciplines ---------- */
.disciplines {
  display: grid; grid-template-columns: 3fr 9fr; gap: var(--pad);
  padding: 5rem var(--pad);
  border-top: 1px solid var(--line);
}
.disc-list a:hover { color: #fff; }

/* ---------- Projects ---------- */
.projects { padding: 3rem var(--pad) 10rem; }
.projects-head { display: grid; grid-template-columns: 1fr auto; margin-bottom: 4rem; }
.all-link { padding-right: 8vw; white-space: nowrap; }
.row {
  display: grid; grid-template-columns: 7fr 2fr 1fr 2fr; gap: var(--pad);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.row-head { border-bottom-color: transparent; }
#project-rows .row { font-size: 1.6rem; }
#project-rows .row:hover { color: #fff; }

/* ---------- Footer (pinned) ---------- */
.footer { position: fixed; left: var(--pad); bottom: var(--pad); z-index: 10; mix-blend-mode: difference; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .nav { grid-template-columns: 1fr auto; row-gap: 0.4rem; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { padding-top: 9rem; padding-bottom: 3rem; }
  .marquee { height: 70svh; }
  .media.fit-height img { max-height: 45svh; }
  .disciplines { grid-template-columns: 1fr; row-gap: 2rem; }
  .projects-head { margin-bottom: 2rem; }
  .all-link { padding-right: 0; }
  .row-head { display: none; }
  .row { grid-template-columns: 1fr; gap: 0.2rem; padding: 1rem 0; }
  .row span[data-l] { font-size: 1.1rem; color: var(--muted); }
  .row span[data-l]::before { content: attr(data-l) " · "; }
  .footer { position: static; padding: 0 var(--pad) var(--pad); }
}
