/* amithash.com */

@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap; src: url("/fonts/jost-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("/fonts/dm-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/dm-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/dm-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --aegean: #0A2F9E;
  --white: #FFFFFF;
  --whitewash: #FCFDFF;
  --mist: #D5DEFF;
  --slate: #46527A;
  --rule: #C3CCE8;
  --pad: clamp(24px, 5.5vw, 80px);

  /* Lozenge size and origin. site.js overwrites these with the same values in px;
     the CSS versions keep the static pattern and the band right without JavaScript.
     W runs 44 -> 64 px between 720 and 1280 px wide (even px), H = W * 11/8 rounded down. */
  --W: clamp(44px, calc(44px + (100vw - 720px) * 0.0357143), 64px);
  --H: calc(var(--W) * 1.375);
  --ox: calc(var(--W) * 0.75);
  --oy: calc(var(--H) * 0.6);

  /* Soft fade behind the text block: centre measured from the bottom-left corner */
  --fx: clamp(136px, calc(136px + (100vw - 390px) * 0.08), 220px);
  --fy: clamp(144px, calc(144px + (100vw - 390px) * 0.062857), 210px);
  --frx: clamp(430px, calc(430px + (100vw - 390px) * 0.2), 640px);
  --fry: clamp(300px, calc(300px + (100vw - 390px) * 0.133333), 440px);
  --crx: clamp(130px, calc(130px + (100vw - 390px) * 0.038095), 170px);
}
@supports (width: round(1px, 1px)) {
  :root {
    --W: round(nearest, clamp(44px, calc(44px + (100vw - 720px) * 0.0357143), 64px), 2px);
    --H: round(down, calc(var(--W) * 1.375), 1px);
    --ox: round(nearest, calc(var(--W) * 0.75), 1px);
    --oy: round(nearest, calc(var(--H) * 0.6), 1px);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--aegean); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--whitewash); color: var(--aegean); font-family: "DM Sans", system-ui, sans-serif; font-weight: 300; font-synthesis: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, p, ul { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, [tabindex]:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
section:focus { outline: none; }
h3 { margin: 0; }
ol { margin: 0; padding: 0; list-style: none; }

.label, .nav, .cities, .row-meta, .foot, .years, .org, .purl {
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Stage ---------- */

.stage-wrap { position: relative; background: var(--aegean); overflow: hidden; overflow: clip; }

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 40px var(--pad) 44px;
  background: var(--aegean);
  color: var(--white);
}

/* The art layer: static final pattern as a CSS tile (works without JavaScript),
   with the two canvases on top once the script runs. */
.art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 88' preserveAspectRatio='none'%3E%3Cg opacity='.7'%3E%3Cpath d='M32 0L64 44L32 88L0 44Z' fill='%23fff' fill-opacity='.09'/%3E%3Cpath d='M32 0L64 44L32 88L0 44Z' fill='none' stroke='%23fff' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M16 22L48 66M48 22L16 66' stroke='%23DDB85C' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3Cg fill='%23fff'%3E%3Ccircle r='1.7'/%3E%3Ccircle cx='64' r='1.7'/%3E%3Ccircle cy='88' r='1.7'/%3E%3Ccircle cx='64' cy='88' r='1.7'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: var(--W) var(--H);
  background-position: var(--ox) var(--oy);
  background-repeat: repeat;
}
.art canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; }
.art .weave { opacity: 0.7; }
.art.drawn { background-image: none; }

.fade { position: absolute; z-index: 1; pointer-events: none; }
.fade-text {
  left: calc(var(--pad) + var(--fx) - var(--frx));
  bottom: calc(var(--fy) - var(--fry));
  width: calc(var(--frx) * 2);
  height: calc(var(--fry) * 2);
  background: radial-gradient(closest-side, rgba(10, 47, 158, 0.95), rgba(10, 47, 158, 0.893) 60%, rgba(10, 47, 158, 0));
}
.fade-contact {
  right: calc(var(--pad) - 90px);
  top: 2px;
  width: min(480px, 130vw);
  height: 120px;
  background: radial-gradient(closest-side, rgba(10, 47, 158, 0.9), rgba(10, 47, 158, 0.846) 60%, rgba(10, 47, 158, 0));
}

.stage-top { position: relative; z-index: 2; display: flex; justify-content: flex-end; }
.nav { display: flex; gap: clamp(18px, 2.4vw, 32px); color: var(--white); }
.nav a { display: inline-flex; align-items: center; min-height: 44px; }
.nav a:hover { opacity: 0.75; }

.intro { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 28px; max-width: 500px; }
h1 {
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(56px, 6.7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.tagline { font-weight: 300; font-size: 24px; line-height: 1.45; }
.cities { display: flex; flex-wrap: wrap; gap: 14px; color: var(--white); }
.cities .sep { opacity: 0.45; }

/* Animated version: a 400vh runway with the stage pinned to the top. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js .stage-wrap { height: 400vh; }
  .js .stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }
  /* Taller than the stage, so the pattern still fills the screen when a phone toolbar collapses. */
  .js .art { bottom: auto; height: 100vh; height: max(100%, 100lvh); background-image: none; }
  .js .city { opacity: 0.45; transition: opacity 0.6s ease; }
  .js .city.lit { opacity: 1; }
}


/* ---------- Point clouds ---------- */

.cloud { position: relative; display: block; margin: 0; aspect-ratio: 5 / 4; }
.cloud.portrait { aspect-ratio: 4 / 5; }
.cloud img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cloud canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.cloud.live img { opacity: 0; }
.cloud.live canvas { opacity: 1; }

/* ---------- About ---------- */

.about { position: relative; z-index: 1; padding: 96px var(--pad) 0; background: var(--whitewash); color: var(--aegean); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px 64px; align-items: start; }
.about .label { grid-column: 1 / -1; }
.about-head { display: grid; gap: 28px; }
.areas { list-style: none; display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--rule); max-width: 26em; font-family: "DM Mono", ui-monospace, monospace; font-weight: 400; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); }
.lede { font-family: "Jost", system-ui, sans-serif; font-weight: 300; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.12; letter-spacing: -0.01em; max-width: 14em; }
.about-text { display: grid; gap: 18px; max-width: 34em; font-size: 17px; line-height: 1.6; color: var(--slate); padding-top: 6px; }

/* ---------- Work ---------- */

.work { position: relative; z-index: 1; padding: 96px var(--pad) 80px; background: var(--whitewash); color: var(--aegean); }
.work .label, .projects .label { margin-bottom: 28px; }
.chapters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px 27px; }
.chapter { display: flex; flex-direction: column; min-width: 0; }
.chapter .cloud { margin-bottom: 28px; }
.years { padding-top: 18px; border-top: 1px solid var(--rule); color: var(--slate); }
.chapter h3 { margin-top: 18px; font-family: "Jost", system-ui, sans-serif; font-weight: 300; font-size: clamp(26px, 2.1vw, 30px); line-height: 1.15; letter-spacing: -0.01em; }
.sub { margin-top: 12px; max-width: 16em; font-size: 15px; line-height: 1.5; color: var(--slate); }
.org { margin-top: auto; padding-top: 36px; font-size: 11px; color: #6B7594; }

/* ---------- Projects ---------- */

.projects { position: relative; z-index: 1; padding: 96px var(--pad); background: var(--aegean); color: var(--white); }
.projects .label { color: var(--mist); }
.plist { list-style: none; border-bottom: 1px solid rgba(213, 222, 255, 0.28); }
.prow { display: grid; grid-template-columns: 76px minmax(0, 0.9fr) minmax(0, 1.6fr) auto; align-items: center; gap: 0 24px; min-height: 84px; border-top: 1px solid rgba(213, 222, 255, 0.28); }
.prow:hover { opacity: 0.8; }
.pmark { display: flex; align-items: center; }
.pmark img { display: block; height: 46px; width: auto; }
.pname { font-weight: 400; font-size: 22px; line-height: 1.3; }
.pdesc { font-size: 15px; line-height: 1.5; color: var(--mist); }
.purl { display: inline-flex; align-items: center; gap: 12px; color: var(--mist); }
.purl svg { flex: none; }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 48px 64px;
  padding: 96px var(--pad);
  background: var(--whitewash);
  color: var(--aegean);
}
.portrait { flex: none; width: clamp(240px, 26vw, 360px); margin-left: -16px; margin-bottom: -24px; }
.details { flex: 1 1 420px; min-width: 0; max-width: 620px; display: flex; flex-direction: column; gap: 28px; }
.label { color: var(--slate); }
.email {
  align-self: flex-start;
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.email:hover { opacity: 0.75; }
.links { list-style: none; border-bottom: 1px solid var(--rule); }
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  border-top: 1px solid var(--rule);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
}
.row:hover { opacity: 0.75; }
.row-meta { display: inline-flex; align-items: center; gap: 12px; color: var(--slate); }
.row-meta svg { flex: none; }

/* ---------- Band and footer ---------- */

.band {
  height: calc(var(--H) * 1.5);
  margin: 36px 0 28px;
  background-color: var(--whitewash);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 132' preserveAspectRatio='none'%3E%3Cpath d='M0 44L32 88L0 132L-32 88ZM64 44L96 88L64 132L32 88Z' fill='%230A2F9E' fill-opacity='.07'/%3E%3Cg fill='none' stroke='%230A2F9E' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M32 0L64 44L32 88L0 44ZM0 44L32 88L0 132L-32 88ZM64 44L96 88L64 132L32 88Z' vector-effect='non-scaling-stroke'/%3E%3Cg transform='translate(32 44) scale(0.6154)'%3E%3Cpath d='M0 0C9.5 -9.0 9.5 -22.5 0.0 -30.0C-9.5 -22.5 -9.5 -9.0 0 0M0 0C13.1 0.4 22.6 -9.2 21.2 -21.2C9.2 -22.6 -0.4 -13.1 0 0M0 0C9.0 9.5 22.5 9.5 30.0 0.0C22.5 -9.5 9.0 -9.5 0 0M0 0C-0.4 13.1 9.2 22.6 21.2 21.2C22.6 9.2 13.1 -0.4 0 0M0 0C-9.5 9.0 -9.5 22.5 0.0 30.0C9.5 22.5 9.5 9.0 0 0M0 0C-13.1 -0.4 -22.6 9.2 -21.2 21.2C-9.2 22.6 0.4 13.1 0 0M0 0C-9.0 -9.5 -22.5 -9.5 -30.0 0.0C-22.5 9.5 -9.0 9.5 0 0M0 0C0.4 -13.1 -9.2 -22.6 -21.2 -21.2C-22.6 -9.2 -13.1 0.4 0 0M0 0C6.9 -2.3 9.7 -9.0 6.1 -14.8C-0.5 -13.2 -3.2 -6.5 0 0M0 0C6.5 3.2 13.2 0.5 14.8 -6.1C9.0 -9.7 2.3 -6.9 0 0M0 0C2.3 6.9 9.0 9.7 14.8 6.1C13.2 -0.5 6.5 -3.2 0 0M0 0C-3.2 6.5 -0.5 13.2 6.1 14.8C9.7 9.0 6.9 2.3 0 0M0 0C-6.9 2.3 -9.7 9.0 -6.1 14.8C0.5 13.2 3.2 6.5 0 0M0 0C-6.5 -3.2 -13.2 -0.5 -14.8 6.1C-9.0 9.7 -2.3 6.9 0 0M0 0C-2.3 -6.9 -9.0 -9.7 -14.8 -6.1C-13.2 0.5 -6.5 3.2 0 0M0 0C3.2 -6.5 0.5 -13.2 -6.1 -14.8C-9.7 -9.0 -6.9 -2.3 0 0' vector-effect='non-scaling-stroke'/%3E%3Cg fill='%230A2F9E' stroke='none'%3E%3Ccircle cx='9.6' cy='-23.1' r='1.1'/%3E%3Ccircle cx='23.1' cy='-9.6' r='1.1'/%3E%3Ccircle cx='23.1' cy='9.6' r='1.1'/%3E%3Ccircle cx='9.6' cy='23.1' r='1.1'/%3E%3Ccircle cx='-9.6' cy='23.1' r='1.1'/%3E%3Ccircle cx='-23.1' cy='9.6' r='1.1'/%3E%3Ccircle cx='-23.1' cy='-9.6' r='1.1'/%3E%3Ccircle cx='-9.6' cy='-23.1' r='1.1'/%3E%3C/g%3E%3Ccircle r='4.4' fill='%23B48A2C' stroke='none'/%3E%3C/g%3E%3Cg transform='translate(0 88) scale(0.6154)'%3E%3Cpath d='M-10.9 -15.1A11 11 0 0 1 10.9 -15.1A11 11 0 0 1 17.7 5.8A11 11 0 0 1 0.0 18.6A11 11 0 0 1 -17.7 5.8A11 11 0 0 1 -10.9 -15.1ZM0.0 -9.1A5.4 5.4 0 0 1 8.6 -2.8A5.4 5.4 0 0 1 5.3 7.3A5.4 5.4 0 0 1 -5.3 7.3A5.4 5.4 0 0 1 -8.6 -2.8A5.4 5.4 0 0 1 0.0 -9.1ZM12.0 -16.6L15.6 -21.4M19.5 6.3L25.2 8.2M0.0 20.5L0.0 26.5M-19.5 6.3L-25.2 8.2M-12.0 -16.6L-15.6 -21.4' vector-effect='non-scaling-stroke'/%3E%3Ccircle r='2.2' vector-effect='non-scaling-stroke'/%3E%3C/g%3E%3Cg transform='translate(64 88) scale(0.6154)'%3E%3Cpath d='M-10.9 -15.1A11 11 0 0 1 10.9 -15.1A11 11 0 0 1 17.7 5.8A11 11 0 0 1 0.0 18.6A11 11 0 0 1 -17.7 5.8A11 11 0 0 1 -10.9 -15.1ZM0.0 -9.1A5.4 5.4 0 0 1 8.6 -2.8A5.4 5.4 0 0 1 5.3 7.3A5.4 5.4 0 0 1 -5.3 7.3A5.4 5.4 0 0 1 -8.6 -2.8A5.4 5.4 0 0 1 0.0 -9.1ZM12.0 -16.6L15.6 -21.4M19.5 6.3L25.2 8.2M0.0 20.5L0.0 26.5M-19.5 6.3L-25.2 8.2M-12.0 -16.6L-15.6 -21.4' vector-effect='non-scaling-stroke'/%3E%3Ccircle r='2.2' vector-effect='non-scaling-stroke'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: var(--W) calc(var(--H) * 1.5);
  background-position: calc(var(--ox) - var(--W) / 2) 0;
  background-repeat: repeat-x;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 28px var(--pad) 44px;
  background: var(--whitewash);
  color: var(--slate);
}

@media (min-width: 720px) and (max-width: 1099px) {
  .chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prow { grid-template-columns: 76px minmax(0, 1fr) auto; }
  .pdesc { grid-column: 2; grid-row: 2; padding-bottom: 18px; }
  .pname { padding-top: 18px; }
}

/* ---------- Phone ---------- */

@media (max-width: 719px) {
  .tagline { font-size: 18px; }
  .contact { flex-direction: column; align-items: stretch; }
  .about { grid-template-columns: minmax(0, 1fr); padding-top: 72px; }
  .about-text { font-size: 16px; }
  .chapters { grid-template-columns: minmax(0, 1fr); }
  .chapter .cloud { max-width: 360px; }
  .org { padding-top: 20px; }
  .prow { grid-template-columns: 60px minmax(0, 1fr); padding: 20px 0; gap: 6px 16px; }
  .pmark { grid-row: span 3; align-self: start; }
  .pmark img { height: 38px; }
  .pname { font-size: 19px; }
  .pdesc, .purl { grid-column: 2; }
  .portrait { width: 240px; margin-bottom: 0; }
  .details { flex: none; }
  .row { font-size: 19px; }
  .foot { flex-direction: column; }
}

/* ---------- Work chapters, stacked (phone and tablet) ----------
   When chapters stack, the rule sits above each picture, so a picture and
   its own text read as one block. */
@media (max-width: 1099px) {
  .chapters { gap: 44px 27px; }
  .chapter { padding-top: 28px; border-top: 1px solid var(--rule); }
  .chapter .cloud { margin-bottom: 16px; }
  .years { padding-top: 0; border-top: 0; }
  .org { padding-top: 20px; }
}

/* ---------- Not found ---------- */

.lost { background: var(--whitewash); }
.lost-main { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; gap: 24px; padding: var(--pad); color: var(--aegean); }
.lost-main .email { font-size: clamp(24px, 4vw, 40px); }
