:root {
  color-scheme: light dark;
  --background: #ffffff;
  --surface: #f6f6f6;
  --foreground: #111111;
  --muted: #5f5f5f;
  --border: #dedede;
  --accent: #111111;
  --accent-soft: #f1f1f1;
  --page: 48rem;
  --gutter: clamp(1.1rem, 4vw, 1.5rem);
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111111;
    --surface: #1b1b1b;
    --foreground: #f5f5f5;
    --muted: #b4b4b4;
    --border: #2d2d2d;
    --accent: #f5f5f5;
    --accent-soft: #1a1a1a;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 18rem;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--background);
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-style: dashed;
  text-underline-offset: 0.25em;
  transition: color 150ms ease;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
summary:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 0.3rem;
}

hr {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.55rem 0.75rem;
  background: var(--foreground);
  color: var(--background);
  transform: translateY(-160%);
}

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

.site-header,
main,
.site-footer {
  width: min(100%, var(--page));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  padding-top: 1.35rem;
}

.header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
}

.site-name {
  flex: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 1.25rem;
  font-size: 0.9rem;
}

nav a {
  text-decoration: none;
}

nav a[aria-current="page"] {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: clamp(10rem, 28vw, 13rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.75rem, 5vw, 3.25rem);
  padding-block: clamp(2.5rem, 8vw, 4.5rem);
  text-align: left;
}

.portrait-slot {
  margin: 0;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--foreground) 22%, transparent);
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 0.7rem color-mix(in srgb, var(--foreground) 4%, transparent);
}

.portrait-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--background);
  transform: scale(1.2) translateY(2.5%);
  transform-origin: center;
}

.eyebrow,
.role-date,
.project-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 0.45rem;
}

.hero h1,
.page-intro h1 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  white-space: nowrap;
}

.hero-copy {
  max-width: 35rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: flex-start;
}

.inline-links a {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.inline-links a:hover {
  border-color: var(--foreground);
  color: var(--foreground);
  transform: translateY(-2px);
}

.inline-links svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.section {
  padding-block: clamp(2.75rem, 8vw, 4.25rem);
  border-top: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1.75rem;
}

.section-heading span {
  color: var(--accent);
  font-size: 0.75rem;
}

.section-heading h2,
.about-page h2 {
  margin: 0;
  font-size: 1.25rem;
}

.lede {
  max-width: 43rem;
  margin-bottom: 2rem;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  line-height: 1.75;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 2.25rem 0 0;
  border-block: 1px solid var(--border);
}

.facts div {
  padding: 1.25rem 1rem;
}

.facts div + div {
  border-left: 1px solid var(--border);
}

.facts dt {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
}

.facts dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.role-list {
  border-top: 1px solid var(--border);
}

.company-group + .company-group {
  margin-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.company-heading {
  margin: 0;
  padding: 1rem 0 0.7rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role {
  border-bottom: 1px solid var(--border);
}

.role summary {
  position: relative;
  padding: 1rem 2.5rem 1rem 0;
  cursor: pointer;
  list-style: none;
}

.role summary::-webkit-details-marker {
  display: none;
}

.role summary::after {
  content: "+";
  position: absolute;
  top: 1.1rem;
  right: 0.15rem;
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
}

.role[open] summary::after {
  content: "−";
}

.role h4 {
  margin: 0.2rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.role-body {
  margin: -0.1rem 2.5rem 1.25rem 0;
}

.role-body > p:not(.role-hierarchy) {
  max-width: 39rem;
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.role-body .role-hierarchy {
  margin: 0 0 0.8rem 0.2rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
}

.role-hierarchy span {
  position: relative;
  display: block;
}

.role-hierarchy span::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: -1rem;
  width: 0.65rem;
  border-top: 1px solid var(--border);
}

.role-body ul {
  margin: 0 0 0 1.15rem;
  padding-left: 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.role-body li {
  margin-top: 0.65rem;
  padding-left: 0.25rem;
}

.role-body li::marker,
.principles li::marker {
  color: var(--accent);
}

.writing-list {
  display: grid;
  gap: clamp(2.5rem, 7vw, 3.5rem);
}

.post {
  padding: 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.post h3 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
}

.post h3 a {
  color: inherit;
  text-decoration: none;
}

.post h3 a:hover {
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 0.25em;
}

.post-calendar {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-copy {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.article-page {
  max-width: 43rem;
}

.article-intro {
  padding-block: clamp(3.5rem, 10vw, 6rem);
}

.back-link {
  display: inline-block;
  margin-bottom: 2.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--foreground);
}

.article-intro .post-meta {
  margin-bottom: 0.75rem;
}

.article-intro h1 {
  max-width: 42rem;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 7vw, 3.2rem);
}

.article-deck {
  max-width: 39rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
}

.article-body {
  padding-block: clamp(2.5rem, 7vw, 4rem);
  border-block: 1px solid var(--border);
}

.article-body p {
  margin-bottom: 1.35rem;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body ul {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

.article-body li {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
}

.article-body li::marker {
  color: var(--muted);
}

.article-end {
  padding-block: 2rem 4rem;
  font-size: 0.9rem;
}

.article-end a {
  font-weight: 600;
}

.project {
  display: block;
  padding: 1.4rem 0;
  border-block: 1px solid var(--border);
  text-decoration: none;
}

.project + .project {
  border-top: 0;
}

.project h3 {
  margin: 0.35rem 0 0.6rem;
  color: var(--accent);
  font-size: 1.15rem;
}

.project p {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.arrow-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 600;
}

.site-footer {
  padding-bottom: 2rem;
}

.site-footer > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.about-page {
  max-width: 43rem;
  margin-inline: auto;
}

.page-intro {
  padding-block: clamp(3.5rem, 10vw, 6rem);
}

.page-intro .lede {
  margin-bottom: 0;
  color: var(--muted);
}

.about-page > section {
  padding-block: clamp(2.5rem, 7vw, 3.75rem);
  border-top: 1px solid var(--border);
}

.about-page h2 {
  margin-bottom: 1.5rem;
}

.about-page section p {
  margin-bottom: 1rem;
}

.about-page section p:last-child {
  margin-bottom: 0;
}

.principles {
  margin: 0;
  padding-left: 1.25rem;
}

.principles li {
  margin-bottom: 1.1rem;
  padding-left: 0.35rem;
}

.principles strong {
  color: var(--accent);
}

@media (max-width: 38rem) {
  .header-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

  nav {
    justify-content: flex-start;
  }

  .hero {
    gap: 1.25rem;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .facts div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .site-footer > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 34rem) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .portrait-slot {
    width: min(13rem, 58vw);
  }

  .hero-copy {
    margin-inline: auto;
  }

  .inline-links {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
