/* ==========================================================================
   Harsh Gurawaliya, portfolio
   Shared stylesheet for index.html and the project pages.
   Look: near-black and white sections, light display type, white pill
   buttons, soft motion-blur imagery with film grain.
   ========================================================================== */

:root {
  --black: #080808;
  --card: #141414;
  --ink: #171719;
  --white: #ffffff;
  --paper: #f5f5f5;
  --snow: #fafafa;
  --g1: #393939;
  --g2: #6e6e6e;
  --g3: #9b9b9b;
  --g4: #c9c9c9;
  --line: rgba(23, 23, 25, 0.1);
  --line-d: rgba(255, 255, 255, 0.12);
  --dim: rgba(255, 255, 255, 0.7);
  --dimmer: rgba(255, 255, 255, 0.5);

  --display: "Host Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --h1: clamp(40px, 4.6vw, 64px);
  --h2: clamp(32px, 3.5vw, 48px);
  --h3: clamp(26px, 2.5vw, 34px);
  --h4: clamp(22px, 2vw, 26px);

  --gutter: clamp(20px, 4.2vw, 60px);
  --wrap: 1200px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid #7fb2ff; outline-offset: 3px; border-radius: 4px; }
.sec--white :focus-visible, .sec--paper :focus-visible, .bar :focus-visible, .ecard--white :focus-visible { outline-color: #1f5fd1; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--white); color: var(--ink);
  padding: 10px 16px; border-radius: 50px; font-size: 14px;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */

.d1, .d2, .d3, .d4 {
  font-family: var(--display);
  font-weight: 300;
  text-wrap: balance;
}
.d1 { font-size: var(--h1); line-height: 1.05; letter-spacing: -0.05em; }
.d2 { font-size: var(--h2); line-height: 1.08; letter-spacing: -0.045em; }
.d3 { font-size: var(--h3); line-height: 1.14; letter-spacing: -0.04em; }
.d4 { font-size: var(--h4); line-height: 1.2; letter-spacing: -0.035em; }

.lead { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.32; letter-spacing: -0.02em; text-wrap: pretty; }
.small { font-size: 14px; line-height: 1.45; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: currentColor;
  flex: none;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: calc(1320px + 2 * var(--gutter)); }

.sec { position: relative; padding-block: clamp(72px, 9vw, 128px); }
.sec--white { background: var(--white); color: var(--ink); }
.sec--paper { background: var(--paper); color: var(--ink); }
.sec--dark { background: var(--black); color: var(--snow); }

.grain::after {
  content: "";
  position: absolute; inset: 0;
  background: url("gfx/grain.png") 0 0 / 256px 256px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}
.grain > * { position: relative; z-index: 2; }
.grain > .bg { z-index: 0; }

.bg { position: absolute; inset: 0; background-size: cover; background-position: center; }

/* ---------- Buttons ---------- */

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 18px;
  border-radius: 50px;
  background: var(--white); color: var(--ink);
  font-family: var(--body); font-size: 14px; font-weight: 400; letter-spacing: -0.02em;
  white-space: nowrap;
  border: 1px solid var(--white);
  transition: transform 0.35s var(--ease), background-color 0.25s, color 0.25s, border-color 0.25s;
}
.pill svg { width: 14px; height: 14px; flex: none; transition: transform 0.35s var(--ease); }
.pill:hover { transform: translateY(-1px); background: #ececec; border-color: #ececec; }
.pill:hover svg { transform: translateX(3px); }
.pill:active { transform: translateY(0) scale(0.98); }

.pill--lg { height: 50px; padding: 0 26px; font-size: 15px; }
.pill--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.85); }
.pill--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.pill--ink { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pill--ink:hover { background: #2c2c30; border-color: #2c2c30; }
.pill--line { background: transparent; color: var(--ink); border-color: rgba(23, 23, 25, 0.28); }
.pill--line:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.arrow-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1px solid rgba(23, 23, 25, 0.16);
  color: var(--ink);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, opacity 0.25s;
}
.arrow-btn svg { width: 14px; height: 14px; }
.arrow-btn:hover:not(:disabled) { background: var(--ink); color: var(--white); border-color: var(--ink); }
.arrow-btn:disabled { opacity: 0.35; cursor: default; }
.arrow-btn--d { border-color: rgba(255, 255, 255, 0.25); color: var(--white); }
.arrow-btn--d:hover:not(:disabled) { background: var(--white); color: var(--ink); border-color: var(--white); }

.round {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  background: var(--g1); color: var(--white);
  transition: transform 0.4s var(--ease), background-color 0.25s;
}
.round svg { width: 16px; height: 16px; }

/* ---------- Announcement bar + nav ---------- */

.bar {
  position: relative; z-index: 60;
  background: var(--white); color: var(--ink);
  min-height: 46px; padding: 8px var(--gutter);
  display: flex; align-items: center; justify-content: center; gap: 10px 16px; flex-wrap: wrap;
  font-size: 14px; text-align: center;
}
.bar__mark { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); display: inline-grid; place-items: center; flex: none; }
.bar__mark::before { content: ""; width: 6px; height: 6px; background: var(--white); }
.bar__text { display: inline-flex; align-items: center; gap: 10px; color: var(--g1); }
.bar a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.bar a svg { width: 13px; height: 13px; transition: transform 0.35s var(--ease); }
.bar a:hover svg { transform: translateX(3px); }
.show-s { display: none; }

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h); margin-bottom: calc(-1 * var(--nav-h));
  color: var(--white);
  transition: background-color 0.35s, backdrop-filter 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(8, 8, 8, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}
.nav__in {
  height: 100%;
  max-width: calc(1320px + 2 * var(--gutter));
  margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 40px;
}
.brand {
  font-family: var(--display); font-weight: 300;
  font-size: 23px; letter-spacing: -0.055em; line-height: 1;
  display: inline-flex; align-items: baseline; gap: 0.28em;
  white-space: nowrap;
}
.brand b { font-weight: 400; }
.brand i { font-style: normal; opacity: 0.6; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav__links a {
  font-size: 14.5px; padding: 8px 14px; border-radius: 50px;
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s, background-color 0.2s;
}
.nav__links a:hover, .nav__links a.is-on { color: var(--white); background: rgba(255, 255, 255, 0.1); }
.nav__cta { display: flex; align-items: center; gap: 8px; }
.nav__cta .pill { height: 36px; padding: 0 16px; font-size: 13px; }
.burger { display: none; flex: none; width: 44px; height: 44px; margin-right: -10px; position: relative; }
.burger::before, .burger::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--white);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.burger::before { top: 17px; }
.burger::after { top: 26px; }
.menu-open .burger::before { top: 21.5px; transform: rotate(45deg); }
.menu-open .burger::after { top: 21.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(8, 8, 8, 0.97);
  color: var(--white);
  padding: calc(var(--nav-h) + 56px) var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow-y: auto;
}
.menu-open .menu { opacity: 1; visibility: visible; }
.menu a.menu__link {
  font-family: var(--display); font-weight: 300; font-size: 34px; letter-spacing: -0.045em; line-height: 1.25;
  padding: 6px 0; border-bottom: 1px solid var(--line-d);
}
.menu__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Hero (home) ---------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--black); color: var(--snow);
  min-height: min(calc(100svh - 46px), 900px);
  display: flex; flex-direction: column;
}
.hero__bg { background-image: url("gfx/hero.webp"); background-position: left top; }
.hero__photo {
  position: absolute; z-index: 0;
  right: max(0px, calc((100vw - 1560px) / 2)); bottom: 0;
  height: min(94%, 860px); aspect-ratio: 1 / 1; width: auto; max-width: none;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 4%, #000 34%, #000 86%, transparent 100%), linear-gradient(to top, transparent 0%, #000 20%);
  mask-image: linear-gradient(to right, transparent 4%, #000 34%, #000 86%, transparent 100%), linear-gradient(to top, transparent 0%, #000 20%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.hero__in {
  position: relative; z-index: 2; flex: 1;
  width: 100%; max-width: calc(1320px + 2 * var(--gutter));
  margin-inline: auto; padding: calc(var(--nav-h) + 64px) var(--gutter) 0;
  display: flex; flex-direction: column; justify-content: center;
}
.hero__copy { max-width: 800px; padding-bottom: 56px; }
.hero__copy .d1 { max-width: 12.5em; }
.nw { white-space: nowrap; }
.hero__copy .eyebrow { color: var(--dim); margin-bottom: 28px; }
.hero__copy .lead { color: var(--dim); margin-top: 22px; max-width: 34em; }
.hero__copy .lead strong { color: var(--white); font-weight: 400; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }

.strip {
  position: relative; z-index: 2;
  width: 100%; max-width: calc(1320px + 2 * var(--gutter));
  margin-inline: auto; padding: 0 var(--gutter) 34px;
}
.strip__in {
  border-top: 1px solid var(--line-d); padding-top: 26px;
  display: flex; align-items: baseline; gap: 14px 44px; flex-wrap: wrap;
}
.strip__label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0; color: var(--dimmer); }
.strip__list { display: flex; gap: 12px 44px; flex-wrap: wrap; }
.strip__list li {
  font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: -0.045em;
  color: rgba(255, 255, 255, 0.72); white-space: nowrap;
}

/* ---------- Section heads ---------- */

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; margin-bottom: clamp(36px, 4.6vw, 64px); }
.head .d2 { max-width: 16ch; }
.head--wide .d2 { max-width: 24ch; }
.head__tools { display: flex; gap: 8px; flex: none; padding-bottom: 6px; }
.head--center { flex-direction: column; align-items: center; text-align: center; }
.head--center .d2 { max-width: 20ch; }
.head p { color: var(--g2); max-width: 46ch; }
.sec--dark .head p { color: var(--dim); }

/* ---------- Project carousel ---------- */

.rail-out { overflow: hidden; }
.rail {
  display: flex; gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - 1320px) / 2));
  padding-inline: max(var(--gutter), calc((100% - 1320px) / 2));
  padding-block: 6px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline-offset: -3px; }

.pcard {
  position: relative; flex: none; overflow: hidden;
  width: min(518px, 82vw); aspect-ratio: 518 / 478;
  border-radius: 8px;
  scroll-snap-align: start;
  background: #1c1c1c; color: var(--white);
  text-align: left;
  display: block;
  isolation: isolate;
}
.pcard__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.pcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(8, 8, 8, 0.5), rgba(8, 8, 8, 0) 30%), linear-gradient(to top, rgba(8, 8, 8, 0.62) 0%, rgba(8, 8, 8, 0.12) 46%, rgba(8, 8, 8, 0) 70%), url("gfx/grain.png") 0 0 / 256px 256px;
}
.pcard:hover .pcard__img { transform: scale(1.05); }
.pcard__date {
  position: absolute; left: 24px; top: 22px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0;
  color: #fff;
}
.pcard__plus {
  position: absolute; right: 18px; top: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color 0.3s, color 0.3s, transform 0.5s var(--ease);
}
.pcard__plus svg { width: 14px; height: 14px; }
.pcard:hover .pcard__plus { background: var(--white); color: var(--ink); transform: rotate(90deg); }
.pcard__mark {
  position: absolute; left: 0; right: 0; top: 43%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 400; font-size: 21px; letter-spacing: -0.045em;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.25);
}
.pcard__mark svg { width: 46px; height: 46px; filter: drop-shadow(0 1px 12px rgba(0, 0, 0, 0.25)); }
.pcard__title {
  position: absolute; left: 24px; right: 24px; bottom: 24px;
  font-family: var(--display); font-weight: 300; font-size: 22px; line-height: 1.2; letter-spacing: -0.04em;
  max-width: 15em; text-wrap: balance;
}
.glyph { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Statement ---------- */

.statement { padding-block: clamp(96px, 13vw, 200px); }
.statement p {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(28px, 3.5vw, 48px); line-height: 1.16; letter-spacing: -0.045em;
  max-width: 21em; margin-inline: auto; text-align: center; text-wrap: balance;
  color: var(--ink);
}
.js .statement .w { color: var(--g4); transition: color 0.5s ease; }
.js .statement .w.is-lit { color: var(--g2); }
.js .statement .w.is-lit.k { color: var(--ink); }

/* ---------- White paper (wave + dot grid) ---------- */

.paper { position: relative; overflow: hidden; background: #2b2d31; color: var(--snow); padding-block: clamp(84px, 10vw, 150px); }
.paper .bg { background-image: url("gfx/wave-grey.webp"); }
.dots {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='214' height='158'%3E%3Crect x='0' y='0' width='5' height='5' fill='%23fff' fill-opacity='.5'/%3E%3Crect x='107' y='39' width='5' height='5' fill='%23fff' fill-opacity='.95'/%3E%3Crect x='0' y='79' width='5' height='5' fill='%23fff' fill-opacity='.5'/%3E%3Crect x='107' y='118' width='5' height='5' fill='%23fff' fill-opacity='.95'/%3E%3C/svg%3E");
  background-position: center 30px;
  -webkit-mask-image: radial-gradient(ellipse 46% 50% at 50% 50%, transparent 0 62%, #000 100%);
  mask-image: radial-gradient(ellipse 46% 50% at 50% 50%, transparent 0 62%, #000 100%);
}
.chip {
  position: absolute; z-index: 2; display: inline-flex; align-items: stretch; height: 28px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  opacity: 0; transform: translateY(6px);
  animation: chip 9s var(--ease) infinite;
}
.chip span { background: var(--paper); color: var(--ink); padding: 0 34px 0 10px; display: flex; align-items: center; }
.chip::after { content: ""; width: 28px; background: var(--black) radial-gradient(circle, #fff 0 3px, transparent 3.5px); }
.chip:nth-of-type(1) { left: 7%; top: 16%; animation-delay: 0s; }
.chip:nth-of-type(2) { right: 5%; bottom: 9%; animation-delay: 3s; }
.chip:nth-of-type(3) { left: 14%; bottom: 12%; animation-delay: 6s; }
@keyframes chip {
  0%, 4% { opacity: 0; transform: translateY(6px); }
  10%, 38% { opacity: 1; transform: none; }
  46%, 100% { opacity: 0; transform: translateY(-6px); }
}
.paper__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.paper__copy .eyebrow { color: var(--dim); margin-bottom: 26px; }
.paper__copy p { color: rgba(255, 255, 255, 0.82); margin-top: 22px; max-width: 34em; }
.paper__cover {
  position: relative; border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55);
  aspect-ratio: 3 / 2; display: block;
}
.paper__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.paper__cover:hover img { transform: scale(1.04); }
.paper__cover figcaption, .paper__cover .cap {
  position: absolute; left: 14px; bottom: 14px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0;
  background: rgba(8, 8, 8, 0.72); color: var(--white); padding: 6px 9px; border-radius: 3px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* ---------- Context engineering ---------- */

.ctx { position: relative; overflow: hidden; background: var(--black); color: var(--snow); padding-block: clamp(84px, 10vw, 150px); }
.ctx .bg {
  background-image: url("gfx/hero.webp"); background-position: left top; opacity: 0.8;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 55%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 55%);
}
.ctx__head { max-width: 860px; margin-bottom: clamp(44px, 6vw, 84px); }
.ctx__head .eyebrow { color: var(--dim); margin-bottom: 26px; }
.ctx__head .lead { color: rgba(255, 255, 255, 0.8); margin-top: 22px; max-width: 36em; }

.ctx__src { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cx {
  border-radius: 8px; background: var(--card); border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 24px 28px;
  transition: border-color 0.3s, background-color 0.3s;
}
.ctx__src .cx:hover { border-color: rgba(255, 255, 255, 0.2); background: #191919; }
.cx__art { width: 100%; height: auto; margin-bottom: 22px; color: var(--white); }
.cx__art .s { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cx__art .dim { opacity: 0.32; }
.cx__art .hi { opacity: 1; }
.cx__art .f { fill: rgba(255, 255, 255, 0.09); stroke: none; }
.cx__art .node { fill: var(--card); stroke: rgba(255, 255, 255, 0.7); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.cx__art .node.hi { fill: var(--white); stroke: var(--white); }
.cx__art .pulse { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1; vector-effect: non-scaling-stroke; transform-origin: 138px 64px; animation: cxpulse 3.2s ease-out infinite; }
.cx__art .caret { animation: cxblink 1.1s steps(1) infinite; }
@keyframes cxpulse { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes cxblink { 50% { opacity: 0; } }
.cx__n { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0; color: var(--dimmer); display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cx__n::before { content: ""; width: 6px; height: 6px; background: currentColor; flex: none; }
.cx p:not(.cx__n) { color: var(--dim); font-size: 15.5px; line-height: 1.45; margin-top: 10px; text-wrap: pretty; }

.ctx__join { display: block; width: 100%; height: 96px; overflow: visible; }
.ctx__join--one { height: 56px; }
.ctx__join path { fill: none; stroke: rgba(255, 255, 255, 0.42); stroke-width: 1.2; stroke-dasharray: 3 7; vector-effect: non-scaling-stroke; animation: cxflow 1.6s linear infinite; }
@keyframes cxflow { to { stroke-dashoffset: -20; } }

.cx--core {
  background: var(--paper); color: var(--g1); border-color: transparent;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(26px, 3.6vw, 48px);
}
.cx--core .cx__n { color: var(--g2); }
.cx--core .d3 { color: var(--ink); }
.cx--core p:not(.cx__n) { color: var(--g1); font-size: 17px; line-height: 1.4; margin-top: 14px; max-width: 30em; }
.cx__props { border-top: 1px solid var(--line); }
.cx__props li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 15.5px; line-height: 1.35; }
.cx__props li::before { content: ""; width: 6px; height: 6px; background: var(--ink); margin-top: 7px; }

.ctx__use { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ctx__use li {
  border-radius: 8px; padding: 18px 20px 20px;
  background: rgba(245, 245, 245, 0.08); border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--display); font-weight: 300; font-size: clamp(19px, 1.7vw, 22px); letter-spacing: -0.04em; line-height: 1.2;
}
.ctx__use li span { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0; color: var(--dimmer); margin-bottom: 26px; }

.ctx__more { display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; margin-top: clamp(44px, 5vw, 72px); padding-top: 26px; border-top: 1px solid var(--line-d); }
.ctx__more p { color: var(--dim); max-width: 34em; }

@media (max-width: 860px) {
  .ctx__src, .cx--core { grid-template-columns: 1fr; }
  .ctx__use { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctx__use li span { margin-bottom: 16px; }
  .ctx__join { height: 44px; }
  .ctx__join path:not(:nth-child(2)):not(:only-child) { display: none; }
  .cx__art { max-width: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  .cx__art .pulse, .cx__art .caret, .ctx__join path { animation: none; }
  .cx__art .pulse { opacity: 0; }
}

/* ---------- Two tall cards ---------- */

.duo { position: relative; overflow: hidden; background: var(--black); color: var(--snow); padding-block: clamp(64px, 8vw, 112px) clamp(72px, 9vw, 128px); }
.duo .bg {
  background-image: url("gfx/wave-grey.webp"); opacity: 0.26;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
}
.duo__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tall {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 8px; background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  min-height: clamp(560px, 62vw, 780px);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  text-align: center; padding: clamp(28px, 4vw, 56px) clamp(22px, 3vw, 44px);
}
.tall__img { position: absolute; left: 0; top: 0; width: 100%; height: 70%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease); }
.tall:hover .tall__img { transform: scale(1.04); }
.tall::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(20, 20, 20, 0) 26%, rgba(20, 20, 20, 0.86) 56%, var(--card) 70%), url("gfx/grain.png") 0 0 / 256px 256px;
}
.tall .d3 { max-width: 13em; }
.tall p { color: var(--dim); margin-top: 14px; max-width: 26em; text-wrap: pretty; }
.tall .pill { margin-top: 30px; }

/* ---------- Experience tabs ---------- */

.tabs {
  display: inline-flex; gap: 2px; padding: 4px;
  background: var(--paper); border-radius: 50px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none; position: relative;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  height: 34px; padding: 0 16px; border-radius: 50px;
  font-size: 13.5px; color: var(--g2); white-space: nowrap;
  transition: color 0.25s, background-color 0.25s, box-shadow 0.25s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.06); }
.tabs-row { display: flex; justify-content: center; margin-bottom: 28px; }

.xp-panel[hidden] { display: none; }
.js .xp-panel { animation: fade 0.6s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.banner {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 12px; color: var(--white); background: #222;
  min-height: clamp(320px, 36vw, 460px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 48px 24px;
}
.banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(8, 8, 8, 0.3), rgba(8, 8, 8, 0.3)), url("gfx/grain.png") 0 0 / 256px 256px;
}
.banner__date { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0; opacity: 0.9; margin-bottom: 22px; }
.banner__name { font-family: var(--display); font-weight: 300; font-size: clamp(38px, 5.6vw, 72px); line-height: 1; letter-spacing: -0.055em; }
.banner__role { margin-top: 20px; font-size: 17px; opacity: 0.92; }
.banner__type {
  margin-top: 22px; display: inline-flex; height: 30px; align-items: center; padding: 0 13px;
  border-radius: 50px; border: 1px solid rgba(255, 255, 255, 0.6); font-size: 13px;
}

.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 12px; counter-reset: pt; }
.points li {
  counter-increment: pt;
  display: grid; grid-template-columns: 38px 1fr; gap: 6px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  color: var(--g1); line-height: 1.42; text-wrap: pretty;
}
.points li::before { content: counter(pt, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--g3); padding-top: 4px; }
.points strong, .points em { color: var(--ink); font-weight: 500; font-style: normal; }

/* ---------- Skills ---------- */

.skills { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 40px clamp(32px, 6vw, 96px); }
.skills__intro p { color: var(--g2); margin-top: 18px; max-width: 24em; }
.skills__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; }
.sgroup h3 { font-family: var(--body); font-size: 14px; font-weight: 500; letter-spacing: -0.03em; color: var(--g2); margin-bottom: 14px; }
.sgroup li { font-family: var(--display); font-weight: 300; font-size: clamp(21px, 1.9vw, 26px); line-height: 1.26; letter-spacing: -0.04em; color: var(--ink); }

/* ---------- Education (blurred foliage) ---------- */

.edu { position: relative; overflow: hidden; background: var(--black); color: var(--snow); padding-block: clamp(84px, 10vw, 140px) clamp(72px, 8vw, 120px); }
.edu .bg { background-image: linear-gradient(rgba(8, 8, 8, 0.36), rgba(8, 8, 8, 0.36)), url("gfx/edu.webp"); background-position: center top; }
.edu__head p { text-shadow: 0 1px 14px rgba(8, 8, 8, 0.45); }
.ecard--glass .ecard__top { color: #fff; }
.edu__head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px clamp(32px, 8vw, 140px); align-items: center; margin-bottom: clamp(40px, 5vw, 72px); }
.edu__head p { color: rgba(255, 255, 255, 0.92); max-width: 30em; }
.edu__head p span { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0; opacity: 0.75; margin-bottom: 10px; }
.edu__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.ecard {
  position: relative; border-radius: 8px; min-height: clamp(260px, 26vw, 330px);
  padding: 26px 28px 28px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.ecard--white { background: var(--paper); color: var(--g1); }
.ecard--glass {
  background: rgba(245, 245, 245, 0.16); color: var(--white);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ecard__top { display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0; }
.ecard__top span:last-child { opacity: 0.62; text-align: right; }
.ecard .d3 { color: inherit; }
.ecard--white .d3 { color: var(--ink); }
.ecard__sub { margin-top: 10px; font-size: 17px; opacity: 0.86; }
.ecard__meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; min-height: 28px; padding: 3px 12px;
  border-radius: 50px; border: 1px solid rgba(23, 23, 25, 0.2);
  font-size: 13px; line-height: 1.3;
}
.tag--d { border-color: rgba(255, 255, 255, 0.28); color: rgba(255, 255, 255, 0.9); }

/* ---------- CTA ---------- */

.cta { position: relative; overflow: hidden; background: var(--black); color: var(--snow); text-align: center; padding-block: clamp(120px, 14vw, 200px) clamp(120px, 15vw, 230px); }
.cta .bg { background-image: url("gfx/cta.webp"); background-position: center top; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26%); mask-image: linear-gradient(to bottom, transparent 0, #000 26%); }
.cta .d2 { max-width: 15em; margin-inline: auto; }
.cta p { color: rgba(255, 255, 255, 0.86); max-width: 34em; margin: 22px auto 0; text-wrap: pretty; }
.cta .btns { justify-content: center; }

/* ---------- Footer ---------- */

.foot { position: relative; overflow: hidden; background: var(--black); color: var(--snow); border-top: 1px solid var(--line-d); }
.foot__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); gap: 48px 40px; padding-block: 64px 40px; }
.foot__brand .brand { font-size: 30px; }
.foot__brand p { color: var(--dim); font-size: 14px; max-width: 22em; margin-top: 12px; }
.foot__brand .pill { margin-top: 22px; }
.foot__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.foot__cols h2 { font-family: var(--body); font-size: 12px; font-weight: 400; letter-spacing: -0.01em; color: var(--dimmer); margin-bottom: 14px; }
.foot__cols a { display: inline-block; font-size: 15px; padding: 4px 0; color: rgba(255, 255, 255, 0.92); transition: opacity 0.2s; }
.foot__cols a:hover { opacity: 0.6; }
.foot__copy { font-size: 12px; color: var(--dim); padding-bottom: 28px; }
.foot__giant {
  font-family: var(--display); font-weight: 300; letter-spacing: -0.06em; line-height: 0.74;
  font-size: min(31vw, 520px); text-align: center; white-space: nowrap;
  color: transparent;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.015) 78%);
  -webkit-background-clip: text; background-clip: text;
  height: 0.5em; overflow: hidden;
  -webkit-user-select: none; user-select: none; pointer-events: none;
  margin-top: 8px;
}

/* ---------- Project sheet (dialog) ---------- */

.sheet {
  width: min(900px, calc(100vw - 24px)); max-height: min(88vh, 860px); max-height: min(88dvh, 860px);
  padding: 0; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
  background: var(--card); color: var(--snow);
  overflow: hidden;
  box-shadow: 0 60px 120px -20px rgba(0, 0, 0, 0.7);
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet 0.5s var(--ease) both; }
.sheet::backdrop { background: rgba(8, 8, 8, 0.66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@keyframes sheet { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
.sheet__top { position: relative; flex: none; margin-bottom: -1px; height: clamp(150px, 24vh, 230px); overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; padding: 24px clamp(22px, 4vw, 44px); }
.sheet__top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.sheet__top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--card) 0%, rgba(20, 20, 20, 0.2) 70%), url("gfx/grain.png") 0 0 / 256px 256px; }
.sheet__date { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0; color: rgba(255, 255, 255, 0.9); }
.sheet__tools { position: absolute; right: 16px; top: 16px; display: flex; gap: 8px; }
.sheet__tools .arrow-btn { background: rgba(8, 8, 8, 0.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 6px clamp(22px, 4vw, 44px) clamp(26px, 4vw, 44px); }
.sheet__body .d3 { max-width: 18em; }
.sheet__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 26px; }
.sheet__text p { color: rgba(255, 255, 255, 0.78); max-width: 44em; text-wrap: pretty; }
.sheet__text p + p { margin-top: 14px; }
.sheet__body .btns { margin-top: 30px; }
.pdetail[hidden] { display: none; }
html:has(dialog[open]) { overflow: hidden; }

/* ==========================================================================
   Project pages
   ========================================================================== */

.phero { position: relative; overflow: hidden; background: var(--black); color: var(--snow); padding: calc(var(--nav-h) + clamp(56px, 8vw, 110px)) 0 clamp(56px, 7vw, 96px); }
.phero .bg { -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); opacity: 0.9; }
.phero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to right, rgba(8, 8, 8, 0.55), rgba(8, 8, 8, 0.1) 70%); pointer-events: none; }
.crumbs { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0; color: var(--dim); margin-bottom: clamp(36px, 5vw, 64px); }
.crumbs a { display: inline-flex; align-items: center; gap: 8px; color: var(--white); }
.crumbs a svg { width: 13px; height: 13px; transition: transform 0.35s var(--ease); }
.crumbs a:hover svg { transform: translateX(-3px); }
.phero .eyebrow { color: rgba(255, 255, 255, 0.85); margin-bottom: 24px; }
.phero .d1 { font-size: clamp(48px, 7.4vw, 104px); letter-spacing: -0.06em; line-height: 0.98; }
.phero .lead { color: rgba(255, 255, 255, 0.88); max-width: 34em; margin-top: 26px; }
.phero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin-top: clamp(44px, 6vw, 80px); border-top: 1px solid rgba(255, 255, 255, 0.22); }
.phero__facts li { padding-top: 18px; font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, 0.9); text-wrap: pretty; }
.phero__facts li span { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0; color: var(--dimmer); margin-bottom: 8px; }

.frame {
  position: relative; overflow: hidden; border-radius: 12px;
  background: #101010; border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.7);
}
.frame img, .frame video { width: 100%; display: block; }
.sec--white .frame, .sec--paper .frame { border-color: rgba(23, 23, 25, 0.1); box-shadow: 0 40px 80px -44px rgba(23, 23, 25, 0.35); background: var(--white); }
.cap { margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--g2); max-width: 46em; text-wrap: pretty; }
.sec--dark .cap { color: var(--dimmer); }
.cap b { font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 0; margin-right: 10px; color: var(--ink); }
.sec--dark .cap b { color: var(--white); }

.pull { margin-top: calc(-1 * clamp(40px, 5vw, 72px)); position: relative; z-index: 3; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: st; }
.step {
  position: relative; border-radius: 8px; background: var(--card); border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 22px 22px 26px; min-height: 210px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 36px;
  transition: background-color 0.3s, border-color 0.3s, transform 0.5s var(--ease);
}
.step:hover { background: #1b1b1b; border-color: rgba(255, 255, 255, 0.16); transform: translateY(-3px); }
.step__n { font-family: var(--mono); font-size: 12px; color: var(--dimmer); display: flex; align-items: center; gap: 10px; }
.step__n::before { content: ""; width: 6px; height: 6px; background: var(--white); }
.step h3 { font-family: var(--display); font-weight: 300; font-size: 24px; letter-spacing: -0.04em; line-height: 1.15; }
.step p { color: var(--dim); font-size: 15px; line-height: 1.42; margin-top: 8px; text-wrap: pretty; }
.sec--white .step, .sec--paper .step { background: var(--paper); border-color: transparent; }
.sec--paper .step { background: var(--white); }
.sec--white .step:hover, .sec--paper .step:hover { border-color: rgba(23, 23, 25, 0.14); }
.sec--white .step__n, .sec--paper .step__n { color: var(--g3); }
.sec--white .step__n::before, .sec--paper .step__n::before { background: var(--ink); }
.sec--white .step p, .sec--paper .step p { color: var(--g2); }
.step--wide { grid-column: span 2; }

.split { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.5fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center; }
.split--flip > :first-child { order: 2; }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split__copy .eyebrow { color: var(--g2); margin-bottom: 22px; }
.sec--dark .split__copy .eyebrow { color: var(--dim); }
.split__copy p { color: var(--g2); margin-top: 18px; max-width: 30em; text-wrap: pretty; }
.sec--dark .split__copy p { color: var(--dim); }
.split__n { font-family: var(--mono); font-size: 12px; color: var(--g3); display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.split__n::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.stack > * + * { margin-top: clamp(72px, 9vw, 128px); }

.checks { margin-top: 26px; border-top: 1px solid var(--line); }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--g1); line-height: 1.42; }
.checks li::before { content: ""; width: 6px; height: 6px; background: var(--ink); margin-top: 9px; }
.sec--dark .checks, .sec--dark .checks li { border-color: var(--line-d); }
.sec--dark .checks li { color: rgba(255, 255, 255, 0.86); }
.sec--dark .checks li::before { background: var(--white); }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trio--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.note { border-radius: 8px; background: var(--paper); padding: clamp(26px, 4vw, 48px); }
.sec--paper .note { background: var(--white); }
.sec--dark .note { background: var(--card); border: 1px solid rgba(255, 255, 255, 0.07); }
.note p { color: var(--g1); margin-top: 16px; max-width: 44em; text-wrap: pretty; }
.sec--dark .note p { color: var(--dim); }

.nextp {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  border-radius: 12px; min-height: clamp(240px, 26vw, 340px); padding: clamp(24px, 3.4vw, 44px); color: var(--white); background: #222;
}
.nextp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.4s var(--ease); }
.nextp::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8, 8, 8, 0.5), rgba(8, 8, 8, 0.05)), url("gfx/grain.png") 0 0 / 256px 256px; }
.nextp:hover img { transform: scale(1.04); }
.nextp:hover .round { transform: translateX(4px); background: var(--white); color: var(--ink); }
.nextp span.k { display: block; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0; margin-bottom: 12px; opacity: 0.9; }

/* ---------- Motion ---------- */

.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .rv.is-in { opacity: 1; transform: none; }
.js .load { opacity: 0; transform: translateY(20px); animation: load 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes load { to { opacity: 1; transform: none; } }
.js .hero__photo.load, .js .hero__bg.load { transform: none; animation-name: loadfade; animation-duration: 1.6s; }
@keyframes loadfade { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js .load { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .chip { animation: none; opacity: 1; transform: none; }
  .js .xp-panel, .sheet[open] { animation: none; }
  .js .statement .w { color: var(--g2); transition: none; }
  .js .statement .w.k { color: var(--ink); }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .nav__links { display: none; }
  .js .burger { display: block; }
  .chip:nth-of-type(2), .chip:nth-of-type(3) { display: none; }
  .chip:nth-of-type(1) { left: auto; right: 6%; top: 5%; animation-duration: 6s; }
  .nav__in { justify-content: space-between; gap: 16px; }
  .nav__cta { margin-left: auto; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: 1fr; }
  .hero__photo { height: min(80%, 700px); opacity: 0.9; }
}
@media (min-width: 1101px) { .menu { display: none; } }

@media (max-width: 860px) {
  .hero { min-height: 0; }
  .hero__photo {
    position: relative; right: auto; bottom: auto; height: auto; width: 100%; aspect-ratio: 1 / 0.86; object-position: 62% 30%;
    opacity: 1; order: -1; z-index: 1; margin-top: calc(var(--nav-h) - 24px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 60%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 60%, transparent 100%);
    -webkit-mask-composite: source-over; mask-composite: add;
  }
  .hero__in { padding-top: 0; margin-top: -40px; }
  .hero__copy { padding-bottom: 44px; }
  .paper__in, .edu__head, .edu__grid, .split, .split--even, .foot__in { grid-template-columns: 1fr; }
  .split--flip > :first-child { order: 0; }
  .duo__grid { grid-template-columns: 1fr; }
  .tall { min-height: 540px; }
  .points { grid-template-columns: 1fr; }
  .head { flex-direction: column; align-items: flex-start; }
  .head--center { align-items: center; }
  .head__tools { display: none; }
  .dots { -webkit-mask-image: linear-gradient(to bottom, #000, transparent 30%, transparent 78%, #000); mask-image: linear-gradient(to bottom, #000, transparent 30%, transparent 78%, #000); opacity: 0.7; }
  .phero__facts { grid-template-columns: 1fr; }
  .phero__facts li { padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .phero__facts { border-top: 0; }
  .trio, .trio--2 { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hide-s { display: none; }
  .show-s { display: inline; }
  .bar { font-size: 13px; gap: 6px 10px; }
  .bar__mark { display: none; }
  .nav__cta .pill--ghost { display: none; }
  .brand { font-size: 21px; }
  .skills__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; gap: 22px; }
  .step--wide { grid-column: auto; }
  .strip__list { gap: 8px 26px; }
  .strip__list li { font-size: 17px; }
  .pcard__title { font-size: 20px; left: 18px; right: 18px; bottom: 18px; }
  .pcard__date { left: 18px; top: 18px; }
  .ecard { padding: 22px; }
  .banner__role { font-size: 16px; }
  .btns .pill--lg { height: 46px; padding: 0 22px; }
  .sheet { max-height: 92vh; max-height: 92dvh; }
  .foot__giant { font-size: 34vw; }
}

@media (max-width: 480px) {
  .tabs { flex-wrap: wrap; justify-content: center; border-radius: 22px; }
}

@media (max-width: 400px) {
  .tall::before { background: linear-gradient(to bottom, rgba(20, 20, 20, 0.2) 0%, rgba(20, 20, 20, 0.86) 26%, var(--card) 48%), url("gfx/grain.png") 0 0 / 256px 256px; }
  .nav__in { gap: 8px; }
  .nav__cta .pill { padding: 0 12px; }
  .brand { font-size: 19px; }
}

@media (max-width: 345px) {
  .nav__cta { display: none; }
  .nw { white-space: normal; }
}

@media print {
  .js .rv, .js .load { opacity: 1 !important; transform: none !important; animation: none !important; }
  .nav { position: static; }
}
