/* =============================================================
   matthewburr.is — single-page scroll per copy spec v3
   (Financial Crimes Executive positioning; April 24, 2026)
============================================================= */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color — light */
  --c-bg: #ffffff;
  --c-bg-subtle: #f5f5f7;
  --c-ink: #1d1d1f;
  --c-ink-soft: #3a3a3d;
  --c-text-muted: #6e6e73;
  --c-text-faint: #86868b;
  --c-accent: #0066cc;
  --c-accent-hover: #0077ed;
  --c-focus: #0071e3;
  --c-hair: rgba(29, 29, 31, 0.08);

  --c-nav-bg: rgba(255, 255, 255, 0.72);
  --c-nav-bg-solid: #ffffff;

  /* Motion */
  --ease-relax: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-opacity: cubic-bezier(0.645, 0.045, 0.355, 1);
  --dur-fast: 180ms;
  --dur-reveal: 900ms;

  /* Layout */
  --container-wide: 1200px;
  --container: 760px;
  --gutter: 28px;
  --gutter-mobile: 20px;
  --nav-h: 64px;
  --section-pad: clamp(80px, 10vw, 130px);

  /* Type */
  --font-sans:
    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-feature: "cv11", "ss01", "ss03";
}

/* =============================================================
   Reset + base
============================================================= */

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

html {
  font-family: var(--font-sans);
  font-feature-settings: var(--font-feature);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}

@media (max-width: 743px) {
  body {
    font-size: 16px;
    line-height: 1.55;
  }
}

img,
picture,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: rgba(0, 102, 204, 0.16);
}

/* =============================================================
   Shared separator (middle-dot)
============================================================= */

.sep {
  display: inline-block;
  margin: 0 0.4em;
  color: var(--c-text-faint);
  font-weight: 400;
}

/* =============================================================
   Utilities
============================================================= */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--c-ink);
  color: #f5f5f7;
  font-weight: 600;
  font-size: 14px;
  transform: translateY(-120%);
  transition: transform 150ms var(--ease-opacity);
}

.skip-link:focus {
  transform: translateY(0);
}

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

/* =============================================================
   Sticky header
============================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--c-nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-hair);
}

@supports not (
  (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))
) {
  .site-header {
    background: var(--c-nav-bg-solid);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--c-nav-bg-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.nav-inner {
  height: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-ink);
  transition: opacity var(--dur-fast) var(--ease-opacity);
}

.nav-brand:hover {
  opacity: 0.72;
}

.nav-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--c-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: -0.005em;
  transition: color var(--dur-fast) var(--ease-opacity);
}

.nav-link:hover {
  color: var(--c-ink);
}

@media (max-width: 420px) {
  .nav-inner {
    padding: 0 var(--gutter-mobile);
  }
}

/* =============================================================
   Hero — first section (no longer 100vh)
============================================================= */

.hero {
  position: relative;
  padding: var(--section-pad) 0;
  overflow: hidden;
}

/* Single deliberate radial wash, bottom-left, very faint */
.hero::before {
  content: "";
  position: absolute;
  inset: auto auto -10% -10%;
  width: 70%;
  height: 70%;
  pointer-events: none;
  background: radial-gradient(
    ellipse 60% 60% at 30% 70%,
    rgba(29, 29, 31, 0.04),
    transparent 70%
  );
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

@media (max-width: 420px) {
  .hero-inner {
    padding: 0 var(--gutter-mobile);
  }
}

.hero-name {
  margin: 0 0 24px;
  font-size: clamp(3rem, 6vw + 1rem, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 600;
  color: var(--c-ink);
  overflow-wrap: break-word;
}

.hero-positioning {
  margin: 0 0 28px;
  max-width: 52ch;
  font-size: clamp(1.25rem, 0.9vw + 1rem, 1.5rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 400;
  color: var(--c-ink);
  text-wrap: balance;
}

.hero-credentials {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--c-text-muted);
  letter-spacing: 0.01em;
}

/* =============================================================
   Section — generic long-scroll block
============================================================= */

.section {
  padding: var(--section-pad) 0;
}

.section-about {
  background: var(--c-bg-subtle);
}

.section-contact {
  background: var(--c-bg-subtle);
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 420px) {
  .section-inner {
    padding: 0 var(--gutter-mobile);
  }
}

.section-heading {
  margin: 0 0 40px;
  font-size: clamp(2rem, 1vw + 1.75rem, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--c-ink);
}

/* =============================================================
   About
============================================================= */

.about-paragraph {
  margin: 0 0 40px;
  max-width: 64ch;
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  line-height: 1.6;
  color: var(--c-ink);
}

.philosophy {
  margin: 0;
  padding: 4px 0 4px 24px;
  max-width: 60ch;
  border-left: 3px solid var(--c-accent);
  font-size: clamp(1.125rem, 0.3vw + 1rem, 1.25rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--c-ink);
  font-weight: 400;
}

/* =============================================================
   Recognition
============================================================= */

.recognition-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recognition-item {
  padding: 28px 0;
  border-top: 1px solid var(--c-hair);
}

.recognition-item:first-child {
  padding-top: 0;
  border-top: none;
}

.recognition-item:last-child {
  padding-bottom: 0;
}

.recognition-label {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  line-height: 1.3;
}

.recognition-description {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--c-text-muted);
  max-width: 60ch;
}

.recognition-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-accent);
  transition: color var(--dur-fast) var(--ease-opacity);
}

.recognition-link:hover {
  color: var(--c-accent-hover);
}

/* =============================================================
   Contact
============================================================= */

.contact-intro {
  margin: 0 0 28px;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--c-text-muted);
}

.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-link {
  display: inline-flex;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--c-accent);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition:
    color var(--dur-fast) var(--ease-opacity),
    border-color var(--dur-fast) var(--ease-opacity);
}

.contact-link:hover {
  color: var(--c-accent-hover);
  border-bottom-color: currentColor;
}

/* =============================================================
   Site footer
============================================================= */

.site-footer {
  padding: 32px var(--gutter);
  background: var(--c-bg);
  border-top: 1px solid var(--c-hair);
  text-align: center;
}

.footer-line {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--c-text-muted);
}

/* =============================================================
   On-load staggered reveal (hero only)
============================================================= */

.reveal {
  opacity: 1;
  transform: none;
}

.hero-inner > .reveal:nth-child(1) { --d: 0ms; }
.hero-inner > .reveal:nth-child(2) { --d: 140ms; }
.hero-inner > .reveal:nth-child(3) { --d: 280ms; }
.hero-inner > .reveal:nth-child(4) { --d: 420ms; }

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal var(--dur-reveal) var(--ease-relax) forwards;
    animation-delay: var(--d, 0ms);
  }
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================================
   Reduced motion
============================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================
   Dark mode — palette inversion
============================================================= */

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #0a0a0a;
    --c-bg-subtle: #141416;
    --c-ink: #f5f5f7;
    --c-ink-soft: #c7c7cc;
    --c-text-muted: #8e8e93;
    --c-text-faint: #6e6e73;
    --c-accent: #4aa3ff;
    --c-accent-hover: #74bcff;
    --c-focus: #4aa3ff;
    --c-hair: rgba(255, 255, 255, 0.1);
    --c-nav-bg: rgba(10, 10, 10, 0.72);
    --c-nav-bg-solid: #0a0a0a;
  }

  .nav-mono {
    background: #f5f5f7;
    color: #0a0a0a;
  }

  .hero::before {
    background: radial-gradient(
      ellipse 60% 60% at 30% 70%,
      rgba(255, 255, 255, 0.04),
      transparent 70%
    );
  }

  .skip-link {
    background: #f5f5f7;
    color: #0a0a0a;
  }

  ::selection {
    background: rgba(74, 163, 255, 0.24);
  }
}

/* =============================================================
   Print
============================================================= */

@media print {
  body {
    color: #000;
    background: #fff;
  }

  .site-header,
  .skip-link,
  .sr-only {
    display: none;
  }

  .hero,
  .section {
    padding: 24px 0;
    background: none;
    border: none;
  }

  .hero::before {
    display: none;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
    word-break: break-all;
  }

  .philosophy {
    border-left-color: #000;
  }
}
