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

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role=list],
ol[role=list] {
  list-style: none;
}

/* Set core root defaults */
html {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  /* min-height: 100vh; */
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Breakpoints
'sm': '640px'
'md': '768px'
'lg': '1024px'
'xl': '1280px' */
:root {
  /* Text sizes */
  --base-text-size: clamp(1rem, 0.9565rem + 0.2174vw, 1.125rem);
  --h1-text-size: clamp(1.6rem, 0.9565rem + 0.2174vw, 1.125rem);
  --mono-text-size: 1rem;
  --base-line-height: 1.5;
  /* Spacing */
  --space-s-m: clamp(1rem, 0.7609rem + 1.1957vw, 1.6875rem);
  --space-xl-2xl: clamp(3rem, 2.4783rem + 2.6087vw, 4.5rem);
  --space-2xl-3xl: clamp(4rem, 3.0435rem + 4.7826vw, 6.75rem);
  /* Font Families */
  --font-family: "Inter", ui-sans-serif, system-ui, -system-ui, -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif,
    "Apple Color Emoji";
  /* Colors */
  --foreground-rgb: 1, 71, 55;
  --background-rgb: 243, 250, 247;
  /* Layout */
  --wrap-max-width: 690px;
}

@supports (font-variation-settings: normal) {
  :root {
    --font-family: "Inter V", ui-sans-serif, system-ui, -system-ui, -apple-system,
      BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif,
      "Apple Color Emoji";
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --foreground-rgb: 1, 71, 55;
    --background-rgb: 243, 250, 247;
  }
}

* {
  font-variation-settings: "slnt"0;
}

html {
  font-size: 100%;
}

body {
  font-size: var(--base-text-size);
  font-family: var(--font-family);
  line-height: var(--base-line-height);
  color: rgb(var(--foreground-rgb));
  background-color: rgb(var(--background-rgb));
  margin: var(--space-xl-2xl) auto;
  padding: 0 6vw;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

nav {
  padding: 0.7rem 1rem;
}

footer {
  max-width: var(--wrap-max-width);
  padding-top: var(--space-xl-2xl);
  margin: var(--space-xl-2xl) auto;
  border-top: 1px solid rgba(var(--foreground-rgb), 0.1);
}

footer p {
  margin: 1em 0;
}

a {
  color: rgb(var(--foreground-rgb));
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: var(--base-text-size);
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: var(--h1-text-size);
}

h3 {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  opacity: .6;
}

p {
  margin: 1rem 0;
}

em {
  font-variation-settings: "slnt"10;
  font-style: italic;
}

ul,
ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

blockquote {
  padding: 0 var(--space-s-m);
  font-variation-settings: "slnt"10;
  font-style: italic;
  border-left: 2px solid rgb(var(--foreground-rgb));
}

code {
  font-size: var(--text-size-sm);
}

figure.highlight,
div.highlight {
  padding: 0.5rem 1rem;
  background: rgb(var(--background-rgb));
  border: 1px solid rgba(var(--foreground-rgb), 0.25);
  border-radius: 0.75rem;
  overflow-x: scroll;
  margin-top: 1rem;
}

figure.highlight code,
div.highlight {
  font-size: var(--mono-text-size);
}

/* Classes */
.wrap {
  max-width: var(--wrap-max-width);
  margin: 0 auto;
}

.global-header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
}

.home-link {
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0;
}

.page-header p {
  margin: 0;
}

.metadata {
  color: rgba(var(--foreground-rgb), 0.5);
}

.footnotes {
  margin-top: 2rem;
  color: rgba(var(--foreground-rgb), 0.75);
}

.reversefootnote {
  color: rgba(var(--foreground-rgb), 0.75);
  text-decoration: none;
}

.tags {
  display: flex;
  gap: 0.5rem;
}

.tag {
  color: rgba(var(--foreground-rgb), 0.5);
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }
}

/* Case study (same layout on all viewports) */
.case-split, .case-leadin {
  display: block;               /* single column everywhere */
  margin-block: 2rem;
  margin-bottom: 6rem;
}

.case-split__media {
  overflow: hidden;
  border-radius: 8px;
}

/* Keep a consistent crop; remove if you want natural height */
.case-split__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;         /* consistent look across images */
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

h2.split-title { margin: 2rem 0 .25rem; }

.muted {
  color: rgba(var(--foreground-rgb), 0.5);
  margin: 0;
}

.bullets { margin: .75rem 0 1rem; padding-left: 1.2rem; }
.bullets li { margin: .25rem 0; }

.cta {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.case-split__media img { transition: transform .45s ease; }
.case-split__media:hover img { transform: scale(1.03); }

/* Avatar lock-up */
.identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0 10px;
}

.identity__avatar_primary {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border, #e8e8e8);
}

.identity__title {
  margin: 0 0 2px;
  line-height: 1.1;
  font-size: clamp(1.6rem, 3.5vw, 1.5rem);
}

.identity__subtitle {
  margin: 0;
  color: var(--muted, #666);
}

/* Secondary Avatar lock-up */

.site-header {
  padding: 0 0 1rem 0;
  border-bottom: 1px solid var(--border, #e6e6e6);
  margin-bottom: 2rem;
}

.identity {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.identity__link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  color: var(--foreground, #014737);
  text-decoration: none;
}

.identity__link:hover {
  text-decoration: underline;
}

.identity__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border, #e6e6e6);
}

.identity__name {
  font-size: 1.1rem;
}


/* Optional chips */
.identity__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  padding: 6px 0 0;
  margin: 0;
}
.identity__chips li {
  font-size: 0.9rem;
  color: var(--muted, #666);
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 999px;
  padding: 4px 8px;
}

/* Mobile tweak: tighten spacing + smaller avatar */
@media (max-width: 560px) {
  .identity { gap: 12px; }
  .identity__avatar { width: 64px; height: 64px; }
}


/* Looks like a normal link */
.emailAction {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: rgb(var(--foreground-rgb));
  cursor: pointer;
  text-decoration: none;
  display: inline-block;        /* take on line-height like links */
  line-height: inherit;
  vertical-align: baseline;     /* align with surrounding text */
}
.emailAction:hover { text-decoration: underline; }

/* Reserve width and keep baseline by using a 1-cell grid */
.emailAction__labels {
  display: inline-grid;         
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  min-width: 6ch;               /* enough for 'copied' */  
  justify-items: start;           /* <- left align */
  align-items: baseline;          /* <- follow text baseline */
  text-decoration: underline;
}

/* Both labels sit in the same grid cell; we just fade them */
.label {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  opacity: 0;
  transition: opacity .18s ease;
}
.label--default { opacity: 1; }
.emailAction.copied .label--default { opacity: 0; }
.emailAction.copied .label--copied  { opacity: 1; }