/* Obsidian — shared chrome for every page: nav, phone menu, buttons, footer, reveals. */
:root {
  --ease-out: cubic-bezier(.32, .72, 0, 1);
  --ink: #050505;
  --fg: #f4f4f4;
  --fg-muted: #9b9b9b;
  --fg-dim: #8a8a8a;
  --fg-soft: #c4c4c4;
  --fg-nav: #a6a6a6;
  --link-hover: #9fb6f2;
  --hair: rgba(255, 255, 255, .12);
  --gutter: clamp(0px, 3.5vw, 56px);
}

html { overflow-x: clip; }
body { background: var(--ink); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--link-hover); }
::selection { background: #fff; color: var(--ink); }
:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 3px; }

.icon { display: block; flex: none; }

.page {
  position: relative;
  z-index: 1;
  isolation: isolate;
  font-family: var(--font-family-body);
  color: var(--fg);
}
/* About / Contact: keep the footer near the bottom of short pages */
.page--short { display: flex; flex-direction: column; min-height: 92vh; }
.page--short > main { flex: 1 1 auto; display: flex; flex-direction: column; }

/* Blue glow behind the top of every page */
.glow {
  position: absolute; top: -24px; left: calc(50% - 50vw);
  width: 100vw; height: 1400px; z-index: -1;
  overflow: hidden; pointer-events: none;
}
.glow::before {
  content: ""; position: absolute; top: -396px; right: -380px;
  width: 1100px; height: 1100px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(26, 73, 183, .34), rgba(26, 73, 183, 0));
}

/* ---------- Floating pill nav ---------- */
.site-header {
  position: sticky; top: 16px; z-index: 10;
  display: flex; justify-content: center;
  margin-top: 24px; pointer-events: none;
}
.site-nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 2px;
  padding: 6px; border-radius: 999px;
  background: rgba(22, 22, 22, .62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 48px -24px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  font-size: clamp(13px, 3.6vw, 14px); font-weight: 500;
}
.site-nav a {
  padding: 10px clamp(9px, 2.8vw, 18px); border-radius: 999px; color: var(--fg-nav);
  white-space: nowrap;
  transition: color .5s var(--ease-out), background .5s var(--ease-out);
}
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.site-nav .nav-name { color: #fff; padding: 10px clamp(9px, 2.8vw, 16px) 10px clamp(10px, 2.8vw, 18px); }
.nav-divider { width: 1px; height: 16px; margin: 0 clamp(2px, 1.2vw, 6px); background: rgba(255, 255, 255, .16); }
.nav-links { display: flex; align-items: center; gap: 2px; }

.menu-btn {
  display: none; align-items: center; gap: 10px;
  padding: 10px 16px 10px 14px; border: 0; border-radius: 999px;
  background: transparent; color: #fff; font: inherit; cursor: pointer;
  transition: background .5s var(--ease-out);
}
.menu-btn:hover { background: rgba(255, 255, 255, .08); }
.menu-glyph { position: relative; display: block; width: 14px; height: 14px; }
.menu-glyph span {
  position: absolute; left: 0; top: 6px; width: 14px; height: 1.5px; border-radius: 1px;
  background: currentColor; transition: transform .5s var(--ease-out);
}
.menu-glyph span:first-child { transform: translateY(-3px); }
.menu-glyph span:last-child { transform: translateY(3px); }
.menu-btn[aria-expanded="true"] .menu-glyph span:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-glyph span:last-child { transform: rotate(-45deg); }

/* Phone widths swap the links for a Menu button (wider cut-off when the nav has four links) */
@media (max-width: 379px) {
  .site-nav--compact .nav-links { display: none; }
  .site-nav--compact .menu-btn { display: flex; }
}
@media (max-width: 539px) {
  .site-nav--compact-wide .nav-links { display: none; }
  .site-nav--compact-wide .menu-btn { display: flex; }
}

.site-menu {
  position: fixed; inset: 0; z-index: 9;
  display: flex; flex-direction: column;
  padding: 120px calc(20px + 3.5vw) 48px;
  background: rgba(5, 5, 5, .9);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  font-family: var(--font-family-body);
}
.site-menu[hidden] { display: none; }
.site-menu nav { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.site-menu a {
  display: inline-flex; align-items: center; gap: 16px; padding: 10px 0;
  font-size: clamp(2.25rem, 11vw, 3rem); letter-spacing: -0.045em; line-height: 1.05; color: #fff;
  transition: color .5s var(--ease-out);
}
.site-menu a:hover { color: var(--link-hover); }
.site-menu a[aria-current="page"]::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--link-hover); flex: none;
}

/* ---------- Page intro (Work, Principles) ---------- */
.intro {
  display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: end;
  padding: clamp(88px, 11vw, 152px) var(--gutter) clamp(64px, 7vw, 96px);
}
.page-title {
  font-size: clamp(4rem, 11vw, 10rem); letter-spacing: -0.065em; line-height: .88; color: #fff;
}
.intro .page-title { flex: 1 1 280px; }
.intro-deck { color: var(--fg-muted); flex: 2 1 480px; line-height: 1.35; max-width: 40ch; text-wrap: pretty; }

/* ---------- Buttons & links ---------- */
.btn-pill {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 7px 7px 7px 26px; border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: 16px; font-weight: 500; line-height: 1;
  transition: background .5s var(--ease-out), transform .5s var(--ease-out);
}
.btn-pill:hover { color: var(--ink); background: #dfe5f7; }
.btn-pill:active { transform: scale(.98); }
.btn-pill--plain { padding: 17px 30px; }
.btn-knob {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(5, 5, 5, .08);
  display: flex; align-items: center; justify-content: center; flex: none;
  transition: transform .6s var(--ease-out);
}
.btn-pill--nudge:hover .btn-knob, .btn-pill--nudge:focus-visible .btn-knob { transform: translateX(4px); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 7px 7px 7px 26px; border-radius: 999px;
  background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); color: #fff;
  font-size: 16px; font-weight: 500; line-height: 1;
  transition: background .5s var(--ease-out), transform .5s var(--ease-out);
}
.btn-outline:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.btn-outline:active { transform: scale(.98); }
.btn-outline .btn-knob { background: rgba(255, 255, 255, .1); }

.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 500; color: #fff;
  transition: color .5s var(--ease-out);
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; padding-top: 8px; }

/* ---------- Footer ---------- */
.brand-rule { width: 100%; height: var(--rule-brand-height); background: var(--gradient-brand); }
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px;
  padding: 32px var(--gutter) 40px;
  font-family: var(--font-family-body); font-size: 14px; font-weight: 500; color: var(--fg-dim);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Site arrow icon (from the design system's Icon), drawn in currentColor via a mask */
.i-arrow, .i-arrow-left {
  display: block; flex: none; width: 16px; height: 17px; background: currentColor;
  -webkit-mask: url(../assets/icons/arrow-right.svg) center / contain no-repeat;
  mask: url(../assets/icons/arrow-right.svg) center / contain no-repeat;
}
.i-arrow-left {
  height: 16px;
  -webkit-mask-image: url(../assets/icons/arrow-left.svg);
  mask-image: url(../assets/icons/arrow-left.svg);
}
.i-arrow.is-14 { width: 14px; height: 15px; }
.i-arrow.is-18 { width: 18px; height: 19px; }
.i-arrow-left.is-18 { width: 18px; height: 18px; }
